core/pkgs/by-name/ru/rust/rust-src.nix

32 lines
491 B
Nix
Raw Normal View History

2024-06-30 08:16:52 +00:00
{
lib,
runCommand,
rustc,
minimalContent ? true,
}:
2024-05-02 00:46:19 +00:00
runCommand "rust-src" { } ''
tar -xzf ${rustc.src}
mv rustc-${rustc.version}-src $out
2024-06-30 08:16:52 +00:00
rm -rf $out/{${
lib.concatStringsSep "," (
[
"ci"
"doc"
"etc"
"grammar"
"llvm-project"
"llvm-emscripten"
"rtstartup"
"rustllvm"
"test"
"vendor"
]
++ lib.optionals minimalContent [
"tools"
"stdarch"
]
)
}}
2024-05-02 00:46:19 +00:00
''