summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/rust/bootstrap.nix
blob: e01dac1e94350100893d3577f6e6e497c392acbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  stdenv,
  fetchurl,
  callPackage,
  version,
  hashes,
}:

let
  platform = stdenv.hostPlatform.rust.rustcTarget;

  src = fetchurl {
    url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
    sha256 = hashes.${platform} or (throw "missing bootstrap url for platform ${platform}");
  };

in
callPackage ./binary.nix {
  inherit version src platform;
  versionType = "bootstrap";
}