summary refs log tree commit diff
path: root/pkgs/development/tools/rust/rust-analyzer/wrapper.nix
blob: 8ca3ff1a6d2020223be6605604dcbfffc89a1968 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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}"
'')