rust-analyzer: init at unstable-2020-03-09

This commit is contained in:
oxalica
2020-03-10 19:12:35 +08:00
parent 5a8777ae50
commit 3ea54e6972
5 changed files with 116 additions and 0 deletions
@@ -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}"
'')