core/pkgs/by-name/ru/rust/rust-src.nix
2024-06-30 09:12:46 +01:00

32 lines
491 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"
]
)
}}
''