mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
22 lines
400 B
Nix
22 lines
400 B
Nix
{ lib, runCommand, rustc, minimalContent ? true }:
|
|
|
|
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"
|
|
])}}
|
|
''
|