1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 15:47:28 +00:00
nixpkgs/pkgs/development/tools/rust/rust-analyzer/wrapper.nix

17 lines
466 B
Nix
Raw Normal View History

{ lib, rustPlatform, runCommandNoCC, makeWrapper }:
lib.makeOverridable ({
unwrapped,
pname ? "rust-analyzer",
version ? unwrapped.version,
rustcSrc ? rustPlatform.rustcSrc,
}: 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 "${rustcSrc}"
'')