depot/third_party/nixpkgs/pkgs/development/tools/rust/rust-analyzer/wrapper.nix
Default email 727493fff0 Project import generated by Copybara.
GitOrigin-RevId: b839d4a8557adc80e522f674529e586ab2a88d23
2020-11-09 16:59:12 +01:00

17 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}"
'')