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-07-07 11:26:54 +01:00
|
|
|
version = "1.35.0";
|
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-07-07 11:26:54 +01:00
|
|
|
i686-unknown-linux-gnu = "05337776b3645e4b8c8c7ced0bcd1615cf9ad1b9c8b3d0f333620e5401e31aee";
|
|
|
|
x86_64-unknown-linux-gnu = "cf600e2273644d8629ed57559c70ca8db4023fd0156346facca9ab3ad3e8f86c";
|
|
|
|
armv7-unknown-linux-gnueabihf = "8f0f32d8ddc6fb7bcb8f50ec5e694078799d93facbf135eec5bd9a8c94d0c11e";
|
|
|
|
aarch64-unknown-linux-gnu = "31e6da56e67838fd2874211ae896a433badf67c13a7b68481f1d5f7dedcc5952";
|
|
|
|
i686-apple-darwin = "6a45ae8db094c5f6c57c5594a00f1a92b08c444a7347a657b4033186d4f08b19";
|
|
|
|
x86_64-apple-darwin = "ac14b1c7dc330dcb53d8641d74ebf9b32aa8b03b9d650bcb9258030d8b10dbd6";
|
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";
|
|
|
|
}
|