Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, runCommand, rustc, minimalContent ? true }: 2 3runCommand "rust-src" { } '' 4 tar -xzf ${rustc.src} 5 mv rustc-${rustc.version}-src $out 6 rm -rf $out/{${lib.concatStringsSep "," ([ 7 "ci" 8 "doc" 9 "etc" 10 "grammar" 11 "llvm-project" 12 "llvm-emscripten" 13 "rtstartup" 14 "rustllvm" 15 "test" 16 "vendor" 17 ] ++ lib.optionals minimalContent [ 18 "tools" 19 "stdarch" 20 ])}} 21''