2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, rustc, minimalContent ? true }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rust-src";
|
|
|
|
src = rustc.src;
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
installPhase = ''
|
|
|
|
mv src $out
|
2021-12-06 16:07:01 +00:00
|
|
|
rm -rf $out/{${lib.concatStringsSep "," ([
|
|
|
|
"ci"
|
|
|
|
"doc"
|
|
|
|
"etc"
|
|
|
|
"grammar"
|
|
|
|
"llvm-project"
|
|
|
|
"llvm-emscripten"
|
|
|
|
"rtstartup"
|
|
|
|
"rustllvm"
|
|
|
|
"test"
|
|
|
|
"vendor"
|
|
|
|
] ++ lib.optionals minimalContent [
|
|
|
|
"tools"
|
|
|
|
"stdarch"
|
|
|
|
])}}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
}
|