From 0cce835037cb0109ad8d9b6615d5f069b7075126 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 9 Feb 2025 16:25:03 +0300 Subject: [PATCH] Fix lldb primer for Helix --- modules/common/helix/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/common/helix/default.nix b/modules/common/helix/default.nix index 7258bf3..460450b 100644 --- a/modules/common/helix/default.nix +++ b/modules/common/helix/default.nix @@ -119,7 +119,10 @@ in { args.program = "{0}"; args.initCommands = let - primer = pkgs.writeTextDir "lldb_dap_rustc_primer.py" /* py */ '' + primer = pkgs.runCommand "primer" {} (/* py */ '' + mkdir $out + echo ' + import subprocess import pathlib import lldb @@ -132,8 +135,10 @@ in { # Load lldb_lookup.py and execute lldb_commands with the correct path lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """) lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """) - ''; - in [ "command script import ${primer}/lldb_dab_rustc_primer.py" ]; + + ' > $out/primer.py + ''); + in [ "command script import ${primer}/primer.py" ]; }]; } ];