aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json2
-rw-r--r--editors/code/src/main.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 55825456e..defa108cb 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -707,7 +707,7 @@
707 } 707 }
708 }, 708 },
709 "rust-analyzer.rustcSource": { 709 "rust-analyzer.rustcSource": {
710 "markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects.", 710 "markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects, or \"discover\" to try to automatically find it.",
711 "default": null, 711 "default": null,
712 "type": [ 712 "type": [
713 "null", 713 "null",
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index d18d6c8a9..620810d72 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -246,10 +246,10 @@ async function patchelf(dest: PathLike): Promise<void> {
246 }, 246 },
247 async (progress, _) => { 247 async (progress, _) => {
248 const expression = ` 248 const expression = `
249 {src, pkgs ? import <nixpkgs> {}}: 249 {srcStr, pkgs ? import <nixpkgs> {}}:
250 pkgs.stdenv.mkDerivation { 250 pkgs.stdenv.mkDerivation {
251 name = "rust-analyzer"; 251 name = "rust-analyzer";
252 inherit src; 252 src = /. + srcStr;
253 phases = [ "installPhase" "fixupPhase" ]; 253 phases = [ "installPhase" "fixupPhase" ];
254 installPhase = "cp $src $out"; 254 installPhase = "cp $src $out";
255 fixupPhase = '' 255 fixupPhase = ''
@@ -262,7 +262,7 @@ async function patchelf(dest: PathLike): Promise<void> {
262 await fs.rename(dest, origFile); 262 await fs.rename(dest, origFile);
263 progress.report({ message: "Patching executable", increment: 20 }); 263 progress.report({ message: "Patching executable", increment: 20 });
264 await new Promise((resolve, reject) => { 264 await new Promise((resolve, reject) => {
265 const handle = exec(`nix-build -E - --arg src '${origFile}' -o ${dest}`, 265 const handle = exec(`nix-build -E - --argstr srcStr '${origFile}' -o '${dest}'`,
266 (err, stdout, stderr) => { 266 (err, stdout, stderr) => {
267 if (err != null) { 267 if (err != null) {
268 reject(Error(stderr)); 268 reject(Error(stderr));