2017-05-30 15:48:06 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper, cacert, zlib, curl }:
|
2016-06-07 20:42:51 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
platform =
|
|
|
|
if stdenv.system == "i686-linux"
|
|
|
|
then "i686-unknown-linux-gnu"
|
|
|
|
else if stdenv.system == "x86_64-linux"
|
|
|
|
then "x86_64-unknown-linux-gnu"
|
|
|
|
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
|
|
|
|
2017-06-16 01:57:00 +02:00
|
|
|
# fetch hashes by patching print-hashes.sh to not use the "$DATE" variable
|
|
|
|
# then running `print-hashes.sh 1.16.0`
|
2016-06-07 20:42:51 +02:00
|
|
|
bootstrapHash =
|
|
|
|
if stdenv.system == "i686-linux"
|
2017-06-16 01:57:00 +02:00
|
|
|
then "b5859161ebb182d3b75fa14a5741e5de87b088146fb0ef4a30f3b2439c6179c5"
|
2016-06-07 20:42:51 +02:00
|
|
|
else if stdenv.system == "x86_64-linux"
|
2017-06-16 01:57:00 +02:00
|
|
|
then "48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd"
|
2016-06-07 20:42:51 +02:00
|
|
|
else if stdenv.system == "i686-darwin"
|
2017-06-16 01:57:00 +02:00
|
|
|
then "26356b14164354725bd0351e8084f9b164abab134fb05cddb7758af35aad2065"
|
2016-06-07 20:42:51 +02:00
|
|
|
else if stdenv.system == "x86_64-darwin"
|
2017-06-16 01:57:00 +02:00
|
|
|
then "2d08259ee038d3a2c77a93f1a31fc59e7a1d6d1bbfcba3dba3c8213b2e5d1926"
|
2017-03-09 02:37:14 +01:00
|
|
|
else throw "missing bootstrap hash 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";
|
|
|
|
sha256 = bootstrapHash;
|
|
|
|
};
|
|
|
|
|
2017-06-16 01:57:00 +02:00
|
|
|
# Note: the version MUST be one version prior to the version we're
|
|
|
|
# building
|
|
|
|
version = "1.16.0";
|
2017-05-30 15:48:06 +02:00
|
|
|
in import ./binaryBuild.nix
|
|
|
|
{ inherit stdenv fetchurl makeWrapper cacert zlib curl;
|
|
|
|
buildRustPackage = null;
|
|
|
|
inherit version src platform;
|
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|