rustcSrc: remove unrelated files

This package is used to provide semantic completion in tools like racer
and is equivalent to rust-src in rustup. This commit gets rid of a
number of files not required for completion.
This commit is contained in:
Joerg Thalheim 2017-11-15 20:32:41 +00:00
parent c0f08557b9
commit 79aee3b57d
2 changed files with 13 additions and 6 deletions

View File

@ -0,0 +1,11 @@
{ stdenv, rustc }:
stdenv.mkDerivation {
name = "rust-src";
src = rustc.src;
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mv src $out
rm -rf $out/{ci,doc,driver,etc,grammar,llvm,rt,rtstartup,rustllvm,test,tools,vendor}
'';
}

View File

@ -6239,13 +6239,9 @@ with pkgs;
inherit rust;
};
rustcSrc = stdenv.mkDerivation {
name = "rust-src";
src = rust.rustc.src;
phases = ["unpackPhase" "installPhase"];
installPhase = "mv src $out";
rustcSrc = callPackage ../development/compilers/rust/rust-src.nix {
inherit (rust) rustc;
};
});
cargo-edit = callPackage ../tools/package-management/cargo-edit { };