mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 14:43:37 +00:00
15 lines
436 B
Nix
15 lines
436 B
Nix
{ stdenv, rustc, minimalContent ? true }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "rust-src";
|
|
src = rustc.src;
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
installPhase = ''
|
|
mv src $out
|
|
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"
|
|
}}
|
|
'';
|
|
}
|