about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/rust-src.nix
blob: 69bdb37ac2fdbb331baacf14f78cabf7b2d2e037 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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"
  ])}}
''