1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

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

This commit is contained in:
oxalica 2021-12-07 20:10:22 +08:00 committed by Martin Weinelt
parent e6368af3c4
commit a6d04cce67

View file

@ -6,6 +6,8 @@
, nodePackages
, moreutils
, esbuild
, pkg-config
, libsecret
, setDefaultServerPath ? true
}:
@ -22,7 +24,11 @@ let
releaseTag = rust-analyzer.version;
nativeBuildInputs = [ jq moreutils esbuild ];
nativeBuildInputs = [
jq moreutils esbuild
# Required by `keytar`, which is a dependency of `vsce`.
pkg-config libsecret
];
# Follows https://github.com/rust-analyzer/rust-analyzer/blob/41949748a6123fd6061eb984a47f4fe780525e63/xtask/src/dist.rs#L39-L65
postInstall = ''
@ -34,7 +40,9 @@ let
' package.json | sponge package.json
mkdir -p $vsix
npx vsce package -o $vsix/${pname}.zip
# vsce ask for continue due to missing LICENSE.md
# Should be removed after https://github.com/rust-analyzer/rust-analyzer/commit/acd5c1f19bf7246107aaae7b6fe3f676a516c6d2
echo y | npx vsce package -o $vsix/${pname}.zip
'';
};