My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/tools/rust/rust-analyzer/wrapper.nix

15 lines
515 B

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