2022-02-23 14:56:10 +00:00
|
|
|
{ lib, runCommand, rustc, minimalContent ? true }:
|
2017-11-15 20:32:41 +00:00
|
|
|
|
2022-02-23 14:56:10 +00:00
|
|
|
runCommand "rust-src" { } ''
|
|
|
|
tar -xzf ${rustc.src}
|
|
|
|
mv rustc-${rustc.version}-src $out
|
|
|
|
rm -rf $out/{${lib.concatStringsSep "," ([
|
|
|
|
"ci"
|
|
|
|
"doc"
|
|
|
|
"etc"
|
|
|
|
"grammar"
|
|
|
|
"llvm-project"
|
|
|
|
"llvm-emscripten"
|
|
|
|
"rtstartup"
|
|
|
|
"rustllvm"
|
|
|
|
"test"
|
|
|
|
"vendor"
|
|
|
|
] ++ lib.optionals minimalContent [
|
|
|
|
"tools"
|
|
|
|
"stdarch"
|
|
|
|
])}}
|
|
|
|
''
|