vscode-extensions.matklad.rust-analyzer: fix build

This commit is contained in:
oxalica 2020-06-01 19:36:40 +08:00
parent 41d34fa80b
commit 51ba1c04f2
No known key found for this signature in database
GPG Key ID: CED392DE0C483D00

View File

@ -32,12 +32,11 @@ in vscode-utils.buildVscodeExtension {
nativeBuildInputs = lib.optional setDefaultServerPath jq;
postFixup = lib.optionalString setDefaultServerPath ''
package_json="$out/${publisher}.${pname}/package.json"
preInstall = lib.optionalString setDefaultServerPath ''
jq '.contributes.configuration.properties."rust-analyzer.serverPath".default = $s' \
--arg s "${rust-analyzer}/bin/rust-analyzer" \
$package_json >$package_json.new
mv $package_json.new $package_json
package.json >package.json.new
mv package.json.new package.json
'';
meta = with lib; {