3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/rust/rust-src.nix

15 lines
436 B
Nix
Raw Normal View History

2020-10-16 01:31:32 +01:00
{ stdenv, rustc, minimalContent ? true }:
stdenv.mkDerivation {
name = "rust-src";
src = rustc.src;
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mv src $out
2020-10-16 01:27:51 +01:00
rm -rf $out/{${if minimalContent
then "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,tools,vendor,stdarch"
else "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,vendor"
}}
'';
}