2017-11-01 15:37:04 +01:00
|
|
|
{ stdenv, fetchurl, callPackage }:
|
2016-06-07 20:42:51 +02:00
|
|
|
|
|
|
|
let
|
2017-10-04 18:41:16 +02:00
|
|
|
# Note: the version MUST be one version prior to the version we're
|
|
|
|
# building
|
2019-08-15 17:50:28 +02:00
|
|
|
version = "1.36.0";
|
2017-10-04 18:41:16 +02:00
|
|
|
|
2019-08-15 17:50:28 +02:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.36.0`
|
2017-10-04 18:41:16 +02:00
|
|
|
hashes = {
|
2019-08-15 17:50:28 +02:00
|
|
|
i686-unknown-linux-gnu = "9f95c3e96622a792858c8a1c9274fa63e6992370493b27c1ac7299a3bec5156d";
|
|
|
|
x86_64-unknown-linux-gnu = "15e592ec52f14a0586dcebc87a957e472c4544e07359314f6354e2b8bd284c55";
|
|
|
|
armv7-unknown-linux-gnueabihf = "798181a728017068f9eddfa665771805d97846cd87bddcd67e0fe27c8d082ceb";
|
|
|
|
aarch64-unknown-linux-gnu = "db78c24d93756f9fe232f081dbc4a46d38f8eec98353a9e78b9b164f9628042d";
|
|
|
|
i686-apple-darwin = "3dbc34fdea8bc030badf9c8b2572c09fd3f5369b59ac099fc521064b390b9e60";
|
|
|
|
x86_64-apple-darwin = "91f151ec7e24f5b0645948d439fc25172ec4012f0584dd16c3fb1acb709aa325";
|
2017-10-04 18:41:16 +02:00
|
|
|
};
|
|
|
|
|
2016-06-07 20:42:51 +02:00
|
|
|
platform =
|
2018-08-20 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux"
|
2016-06-07 20:42:51 +02:00
|
|
|
then "i686-unknown-linux-gnu"
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux"
|
2016-06-07 20:42:51 +02:00
|
|
|
then "x86_64-unknown-linux-gnu"
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "armv7l-linux"
|
2018-01-16 13:17:40 +01:00
|
|
|
then "armv7-unknown-linux-gnueabihf"
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "aarch64-linux"
|
2017-12-02 13:46:33 +01:00
|
|
|
then "aarch64-unknown-linux-gnu"
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "i686-darwin"
|
2016-06-07 20:42:51 +02:00
|
|
|
then "i686-apple-darwin"
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-darwin"
|
2016-06-07 20:42:51 +02:00
|
|
|
then "x86_64-apple-darwin"
|
2018-08-20 21:11:29 +02:00
|
|
|
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}";
|
2016-06-07 20:42:51 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
2017-10-04 18:41:16 +02:00
|
|
|
sha256 = hashes."${platform}";
|
2016-06-07 20:42:51 +02:00
|
|
|
};
|
|
|
|
|
2019-08-15 17:50:28 +02:00
|
|
|
in callPackage ./binary.nix
|
2017-11-01 15:37:04 +01:00
|
|
|
{ inherit version src platform;
|
2017-05-30 15:48:06 +02:00
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|