3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/rust-analyzer/wrapper.nix
oxalica 68060f6f6f
makeRustPlatform: add rustLibSrc
rust-analyzer: rustcSrc -> rustLibSrc to fix build
2020-11-07 01:42:27 +08:00

18 lines
500 B
Nix

{ lib, rustPlatform, runCommandNoCC, makeWrapper }:
lib.makeOverridable ({
unwrapped,
pname ? "rust-analyzer",
version ? unwrapped.version,
# Use name from `RUST_SRC_PATH`
rustSrc ? rustPlatform.rustLibSrc,
}: runCommandNoCC "${pname}-${version}" {
inherit pname version;
inherit (unwrapped) src meta;
nativeBuildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin
makeWrapper ${unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
--set-default RUST_SRC_PATH "${rustSrc}"
'')