From a6d04cce6790aa9c3500f902070c263bf032c453 Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 7 Dec 2021 20:10:22 +0800 Subject: [PATCH] vscode-extensions.matklad.rust-analyzer: fix build --- .../misc/vscode-extensions/rust-analyzer/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix b/pkgs/misc/vscode-extensions/rust-analyzer/default.nix index 82491389791e..668d87767803 100644 --- a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix +++ b/pkgs/misc/vscode-extensions/rust-analyzer/default.nix @@ -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 ''; };