diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index d18d6c8a9f8..620810d7229 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -246,10 +246,10 @@ async function patchelf(dest: PathLike): Promise { }, async (progress, _) => { const expression = ` - {src, pkgs ? import {}}: + {srcStr, pkgs ? import {}}: pkgs.stdenv.mkDerivation { name = "rust-analyzer"; - inherit src; + src = /. + srcStr; phases = [ "installPhase" "fixupPhase" ]; installPhase = "cp $src $out"; fixupPhase = '' @@ -262,7 +262,7 @@ async function patchelf(dest: PathLike): Promise { await fs.rename(dest, origFile); progress.report({ message: "Patching executable", increment: 20 }); await new Promise((resolve, reject) => { - const handle = exec(`nix-build -E - --arg src '${origFile}' -o ${dest}`, + const handle = exec(`nix-build -E - --argstr srcStr '${origFile}' -o '${dest}'`, (err, stdout, stderr) => { if (err != null) { reject(Error(stderr));