2021-11-08 01:52:35 +01:00
|
|
|
{ lib, stdenv, rustc, minimalContent ? true }:
|
2017-11-15 21:32:41 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rust-src";
|
|
|
|
src = rustc.src;
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
installPhase = ''
|
|
|
|
mv src $out
|
2021-11-08 01:52:35 +01:00
|
|
|
rm -rf $out/{${lib.concatStringsSep "," ([
|
|
|
|
"ci"
|
|
|
|
"doc"
|
|
|
|
"etc"
|
|
|
|
"grammar"
|
|
|
|
"llvm-project"
|
|
|
|
"llvm-emscripten"
|
|
|
|
"rtstartup"
|
|
|
|
"rustllvm"
|
|
|
|
"test"
|
|
|
|
"vendor"
|
|
|
|
] ++ lib.optionals minimalContent [
|
|
|
|
"tools"
|
|
|
|
"stdarch"
|
|
|
|
])}}
|
2017-11-15 21:32:41 +01:00
|
|
|
'';
|
|
|
|
}
|