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
|
2019-06-13 20:20:37 +01:00
|
|
|
version = "1.34.2";
|
2017-10-04 17:41:16 +01:00
|
|
|
|
2019-06-13 20:20:37 +01:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.34.2`
|
2017-10-04 17:41:16 +01:00
|
|
|
hashes = {
|
2019-06-13 20:20:37 +01:00
|
|
|
i686-unknown-linux-gnu = "926bafd09eb90ba7d5a0195fcffb8f33dd57e515af4f8987a143459f6b1d3f04";
|
|
|
|
x86_64-unknown-linux-gnu = "2bf6622d980a52832bae141304e96f317c8a1ccd2dfd69a134a14033e6e43c0f";
|
|
|
|
armv7-unknown-linux-gnueabihf = "70d1057fcc133dc3e44377060a00d2f9d3a134e2670963d3f1d93f3dbfa0548e";
|
|
|
|
aarch64-unknown-linux-gnu = "15fc6b7ec121df9d4e42483dd12c677203680bec8c69b6f4f62e5a35a07341a8";
|
|
|
|
i686-apple-darwin = "b9fc44cbb06050975664f1033d1337bb38d5ea73b503a5d3af5409033397be5c";
|
|
|
|
x86_64-apple-darwin = "6fdd4bf7fe26dded0cd57b41ab5f0500a5a99b7bc770523a425e9e34f63d0fd8";
|
2017-10-04 17:41:16 +01:00
|
|
|
};
|
|
|
|
|
2016-06-07 19:42:51 +01:00
|
|
|
platform =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux"
|
2016-06-07 19:42:51 +01:00
|
|
|
then "i686-unknown-linux-gnu"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux"
|
2016-06-07 19:42:51 +01:00
|
|
|
then "x86_64-unknown-linux-gnu"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "armv7l-linux"
|
2018-01-16 12:17:40 +00:00
|
|
|
then "armv7-unknown-linux-gnueabihf"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "aarch64-linux"
|
2017-12-02 12:46:33 +00:00
|
|
|
then "aarch64-unknown-linux-gnu"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "i686-darwin"
|
2016-06-07 19:42:51 +01:00
|
|
|
then "i686-apple-darwin"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-darwin"
|
2016-06-07 19:42:51 +01:00
|
|
|
then "x86_64-apple-darwin"
|
2018-08-20 20:11:29 +01:00
|
|
|
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.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
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|