vscode-extensions.matklad.rust-analyzer: fix server path
This commit is contained in:
parent
0f70b1bc9e
commit
a687f1aef4
|
@ -5,6 +5,7 @@
|
||||||
, rust-analyzer
|
, rust-analyzer
|
||||||
, nodePackages
|
, nodePackages
|
||||||
, setDefaultServerPath ? true
|
, setDefaultServerPath ? true
|
||||||
|
, moreutils
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -35,13 +36,12 @@ vscode-utils.buildVscodeExtension {
|
||||||
src = "${vsix}/${pname}.zip";
|
src = "${vsix}/${pname}.zip";
|
||||||
vscodeExtUniqueId = "${publisher}.${pname}";
|
vscodeExtUniqueId = "${publisher}.${pname}";
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional setDefaultServerPath jq;
|
nativeBuildInputs = lib.optionals setDefaultServerPath [ jq moreutils ];
|
||||||
|
|
||||||
preInstall = lib.optionalString setDefaultServerPath ''
|
preInstall = lib.optionalString setDefaultServerPath ''
|
||||||
jq '.contributes.configuration.properties."rust-analyzer.serverPath".default = $s' \
|
jq '.contributes.configuration.properties."rust-analyzer.server.path".default = $s' \
|
||||||
--arg s "${rust-analyzer}/bin/rust-analyzer" \
|
--arg s "${rust-analyzer}/bin/rust-analyzer" \
|
||||||
package.json >package.json.new
|
package.json | sponge package.json
|
||||||
mv package.json.new package.json
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue