diff options
Diffstat (limited to 'pkgs/development/tools/rust/rust-analyzer/wrapper.nix')
-rw-r--r-- | pkgs/development/tools/rust/rust-analyzer/wrapper.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/rust-analyzer/wrapper.nix b/pkgs/development/tools/rust/rust-analyzer/wrapper.nix new file mode 100644 index 00000000000..8ca3ff1a6d2 --- /dev/null +++ b/pkgs/development/tools/rust/rust-analyzer/wrapper.nix @@ -0,0 +1,16 @@ +{ 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}" +'') |