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-09-26 13:51:12 +01:00
|
|
|
version = "1.37.0";
|
2017-10-04 17:41:16 +01:00
|
|
|
|
2019-09-26 13:51:12 +01:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.37.0`
|
2017-10-04 17:41:16 +01:00
|
|
|
hashes = {
|
2019-09-26 13:51:12 +01:00
|
|
|
i686-unknown-linux-gnu = "74510e0e52a55e65a9f716673c2cda4d2bd427e2453541c6993c77c3ec04acf9";
|
|
|
|
x86_64-unknown-linux-gnu = "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb";
|
|
|
|
armv7-unknown-linux-gnueabihf = "5b87b877f0ed20c6a09ce26e7a15d8c61b26b62484b97e78a51099d0efefec98";
|
|
|
|
aarch64-unknown-linux-gnu = "263ef98fa3a6b2911b56f89c06615cdebf6ef676eb9b2493ad1539602f79b6ba";
|
|
|
|
i686-apple-darwin = "e45d0c4d882fc6c404ffa6fe790294f4ea96384a2b48804adbf723f3635477a8";
|
|
|
|
x86_64-apple-darwin = "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d";
|
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";
|
2019-08-13 22:52:01 +01:00
|
|
|
sha256 = hashes.${platform};
|
2016-06-07 19:42:51 +01:00
|
|
|
};
|
|
|
|
|
2019-08-15 16:50:28 +01:00
|
|
|
in callPackage ./binary.nix
|
2017-11-01 14:37:04 +00:00
|
|
|
{ inherit version src platform;
|
2017-05-30 14:48:06 +01:00
|
|
|
versionType = "bootstrap";
|
|
|
|
}
|