2017-11-01 14:37:04 +00:00
|
|
|
{ stdenv, fetchurl, callPackage }:
|
2016-06-07 18:42:51 +00:00
|
|
|
|
|
|
|
let
|
2017-10-04 16:41:16 +00:00
|
|
|
# Note: the version MUST be one version prior to the version we're
|
|
|
|
# building
|
2018-11-09 09:54:28 +00:00
|
|
|
version = "1.30.0";
|
2017-10-04 16:41:16 +00:00
|
|
|
|
2018-11-09 09:54:28 +00:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.30.0`
|
2017-10-04 16:41:16 +00:00
|
|
|
hashes = {
|
2018-11-09 09:54:28 +00:00
|
|
|
i686-unknown-linux-gnu = "4ceb0e3011d96504587abb7edfdea9c1b4b7cb2c4488cc4a25adc2f3b6a88b21";
|
|
|
|
x86_64-unknown-linux-gnu = "f620e3125cc505c842150bd873c0603432b6cee984cdae8b226cf92c8aa1a80f";
|
|
|
|
armv7-unknown-linux-gnueabihf = "63991f6769ca8db693562c34ac25473e9d4f9f214d6ee98917891be469d69cfd";
|
|
|
|
aarch64-unknown-linux-gnu = "9690c7c50eba5a8461184ee4138b4c284bad31ccc4aa1f2ddeec58b253e6363e";
|
|
|
|
i686-apple-darwin = "b8e5ac31f0a192a58b0e98ff88c47035a2882598946352fa5a86c28ede079230";
|
|
|
|
x86_64-apple-darwin = "07008d90932712282bc599f1e9a226e97879c758dc1f935e6e2675e45694cc1b";
|
2017-10-04 16:41:16 +00:00
|
|
|
};
|
|
|
|
|
2016-06-07 18:42:51 +00:00
|
|
|
platform =
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux"
|
2016-06-07 18:42:51 +00:00
|
|
|
then "i686-unknown-linux-gnu"
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux"
|
2016-06-07 18:42:51 +00:00
|
|
|
then "x86_64-unknown-linux-gnu"
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "armv7l-linux"
|
2018-01-16 12:17:40 +00:00
|
|
|
then "armv7-unknown-linux-gnueabihf"
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "aarch64-linux"
|
2017-12-02 12:46:33 +00:00
|
|
|
then "aarch64-unknown-linux-gnu"
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "i686-darwin"
|
2016-06-07 18:42:51 +00:00
|
|
|
then "i686-apple-darwin"
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-darwin"
|
2016-06-07 18:42:51 +00:00
|
|
|
then "x86_64-apple-darwin"
|
2018-08-20 19:11:29 +00:00
|
|
|
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}";
|
2016-06-07 18:42:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
2017-10-04 16:41:16 +00:00
|
|
|
sha256 = hashes."${platform}";
|
2016-06-07 18:42:51 +00:00
|
|
|
};
|
|
|
|
|
2017-11-01 14:37:04 +00:00
|
|
|
in callPackage ./binaryBuild.nix
|
|
|
|
{ inherit version src platform;
|
2017-05-30 13:48:06 +00:00
|
|
|
buildRustPackage = null;
|
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|