cf3f6e7a7d
GitOrigin-RevId: 24eb3f87fc610f18de7076aee7c5a84ac5591e3e
14 lines
436 B
Nix
14 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"
|
|
}}
|
|
'';
|
|
}
|