2017-11-01 14:37:04 +00:00
|
|
|
{ stdenv, fetchurl, callPackage }:
|
2016-06-07 19:42:51 +01:00
|
|
|
|
|
|
|
let
|
2017-10-04 17:41:16 +01:00
|
|
|
# Note: the version MUST be one version prior to the version we're
|
|
|
|
# building
|
2017-11-23 11:47:03 +00:00
|
|
|
version = "1.21.0";
|
2017-10-04 17:41:16 +01:00
|
|
|
|
2017-11-23 11:47:03 +00:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.21.0`
|
2017-10-04 17:41:16 +01:00
|
|
|
hashes = {
|
2017-11-23 11:47:03 +00:00
|
|
|
i686-unknown-linux-gnu = "b7caed0f602cdb8ef22e0bfa9125a65bec411e15c0b8901d937e43303ec7dbee";
|
|
|
|
x86_64-unknown-linux-gnu = "b41e70e018402bc04d02fde82f91bea24428e6be432f0df12ac400cfb03108e8";
|
|
|
|
aarch64-unknown-linux-gnu = "491ee6c43cc672006968d665bd34c94cc2219ef3592d93d38097c97eaaa864c3";
|
|
|
|
i686-apple-darwin = "c8b0fabeebcde66b683f3a871187e614e07305adda414c2862cb332aecb2b3bf";
|
|
|
|
x86_64-apple-darwin = "75a7f4bd7c72948030bb9e421df27e8a650dea826fb5b836cf59d23d6f985a0d";
|
2017-10-04 17:41:16 +01:00
|
|
|
};
|
|
|
|
|
2016-06-07 19:42:51 +01:00
|
|
|
platform =
|
|
|
|
if stdenv.system == "i686-linux"
|
|
|
|
then "i686-unknown-linux-gnu"
|
|
|
|
else if stdenv.system == "x86_64-linux"
|
|
|
|
then "x86_64-unknown-linux-gnu"
|
2017-12-02 12:46:33 +00:00
|
|
|
else if stdenv.system == "aarch64-linux"
|
|
|
|
then "aarch64-unknown-linux-gnu"
|
2016-06-07 19:42:51 +01:00
|
|
|
else if stdenv.system == "i686-darwin"
|
|
|
|
then "i686-apple-darwin"
|
|
|
|
else if stdenv.system == "x86_64-darwin"
|
|
|
|
then "x86_64-apple-darwin"
|
2017-03-09 01:37:14 +00:00
|
|
|
else throw "missing bootstrap url for platform ${stdenv.system}";
|
2016-06-07 19:42:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
2017-10-04 17:41:16 +01:00
|
|
|
sha256 = hashes."${platform}";
|
2016-06-07 19:42:51 +01:00
|
|
|
};
|
|
|
|
|
2017-11-01 14:37:04 +00:00
|
|
|
in callPackage ./binaryBuild.nix
|
|
|
|
{ inherit version src platform;
|
2017-05-30 14:48:06 +01:00
|
|
|
buildRustPackage = null;
|
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|