makeRustPlatform: add rustLibSrc

rust-analyzer: rustcSrc -> rustLibSrc to fix build
This commit is contained in:
oxalica
2020-11-07 01:42:27 +08:00
parent 7ac7ce8b1a
commit 68060f6f6f
4 changed files with 19 additions and 3 deletions
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage {
inherit doCheck;
preCheck = lib.optionalString doCheck ''
export RUST_SRC_PATH=${rustPlatform.rustcSrc}
export RUST_SRC_PATH=${rustPlatform.rustLibSrc}
'';
doInstallCheck = true;
@@ -4,7 +4,8 @@ lib.makeOverridable ({
unwrapped,
pname ? "rust-analyzer",
version ? unwrapped.version,
rustcSrc ? rustPlatform.rustcSrc,
# Use name from `RUST_SRC_PATH`
rustSrc ? rustPlatform.rustLibSrc,
}: runCommandNoCC "${pname}-${version}" {
inherit pname version;
inherit (unwrapped) src meta;
@@ -12,5 +13,5 @@ lib.makeOverridable ({
} ''
mkdir -p $out/bin
makeWrapper ${unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
--set-default RUST_SRC_PATH "${rustcSrc}"
--set-default RUST_SRC_PATH "${rustSrc}"
'')