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
|
2018-06-21 23:44:31 +02:00
|
|
|
version = "1.26.2";
|
2017-10-04 18:41:16 +02:00
|
|
|
|
2018-04-06 17:05:40 +02:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.24.1`
|
2017-10-04 18:41:16 +02:00
|
|
|
hashes = {
|
2018-06-21 23:44:31 +02:00
|
|
|
i686-unknown-linux-gnu = "e22286190a074bfb6d47c9fde236d712a53675af1563ba85ea33e0d40165f755";
|
|
|
|
x86_64-unknown-linux-gnu = "d2b4fb0c544874a73c463993bde122f031c34897bb1eeb653d2ba2b336db83e6";
|
|
|
|
armv7-unknown-linux-gnueabihf = "1140387a61083e3ef10e7a097269200fc7e9db6f6cc9f270e04319b3b429c655";
|
|
|
|
aarch64-unknown-linux-gnu = "3dfad0dc9c795f7ee54c2099c9b7edf06b942adbbf02e9ed9e5d4b5e3f1f3759";
|
|
|
|
i686-apple-darwin = "3a5de30f3e334a66bd320ec0e954961d348434da39a826284e00d55ea60f8370";
|
|
|
|
x86_64-apple-darwin = "f193705d4c0572a358670dbacbf0ffadcd04b3989728b442f4680fa1e065fa72";
|
2017-10-04 18:41:16 +02:00
|
|
|
};
|
|
|
|
|
2016-06-07 20:42:51 +02: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"
|
2018-01-16 13:17:40 +01:00
|
|
|
else if stdenv.system == "armv7l-linux"
|
|
|
|
then "armv7-unknown-linux-gnueabihf"
|
2017-12-02 13:46:33 +01:00
|
|
|
else if stdenv.system == "aarch64-linux"
|
|
|
|
then "aarch64-unknown-linux-gnu"
|
2016-06-07 20:42:51 +02: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 02:37:14 +01:00
|
|
|
else throw "missing bootstrap url for platform ${stdenv.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
|
|
|
};
|
|
|
|
|
2017-11-01 15:37:04 +01:00
|
|
|
in callPackage ./binaryBuild.nix
|
|
|
|
{ inherit version src platform;
|
2017-05-30 15:48:06 +02:00
|
|
|
buildRustPackage = null;
|
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|