diff options
author | Joerg Thalheim <joerg@thalheim.io> | 2017-11-15 20:32:41 +0000 |
---|---|---|
committer | Joerg Thalheim <joerg@thalheim.io> | 2017-11-15 21:51:29 +0000 |
commit | 79aee3b57d646b0424e622e27acd6329b265bc65 (patch) | |
tree | ff3e0c6211999a560b3f9c19c3f37446b5de07d7 | |
parent | c0f08557b96b06790022795690d15c1ffd210e71 (diff) | |
download | nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar.gz nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar.bz2 nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar.lz nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar.xz nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.tar.zst nixlib-79aee3b57d646b0424e622e27acd6329b265bc65.zip |
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.
-rw-r--r-- | pkgs/development/compilers/rust/rust-src.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/compilers/rust/rust-src.nix b/pkgs/development/compilers/rust/rust-src.nix new file mode 100644 index 000000000000..1b819a7f6068 --- /dev/null +++ b/pkgs/development/compilers/rust/rust-src.nix @@ -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} + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 033e2df26e43..469f39dae0f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |