From d92c55ac5162a527107d489cf3037ed306f8c455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Wed, 8 Oct 2025 11:46:29 +0200 Subject: [PATCH] vscode-extensions.rust-lang.rust-analyzer: fix binary path --- .../vscode/extensions/rust-lang.rust-analyzer/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix b/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix index f3def1b463f5..2f9d65366c08 100644 --- a/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix +++ b/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix @@ -73,9 +73,15 @@ vscode-utils.buildVscodeExtension { ]; preInstall = lib.optionalString setDefaultServerPath '' - jq '(.contributes.configuration[] | select(.title == "server") | .properties."rust-analyzer.server.path".default) = $s' \ + jq '(.contributes.configuration[] | select(.title == "Server") | .properties."rust-analyzer.server.path".default) = $s' \ --arg s "${rust-analyzer}/bin/rust-analyzer" \ package.json | sponge package.json + + # Ensure that the previous modification worked, by searching for the binary path + grep -Fq ${rust-analyzer}/bin/rust-analyzer package.json || { + echo "Modifying 'rust-analyzer.server.path' in 'package.json' failed." + exit 1 + } ''; meta = {