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-10-26 08:13:37 +00:00
|
|
|
version = "1.29.2";
|
2017-10-04 16:41:16 +00:00
|
|
|
|
2018-10-26 08:13:37 +00:00
|
|
|
# fetch hashes by running `print-hashes.sh 1.29.2`
|
2017-10-04 16:41:16 +00:00
|
|
|
hashes = {
|
2018-10-26 08:13:37 +00:00
|
|
|
i686-unknown-linux-gnu = "fd67338c32348fc0cf09dd066975acc221e062fdc3b052912baef93b39a0b27e";
|
|
|
|
x86_64-unknown-linux-gnu = "e9809825c546969a9609ff94b2793c9107d7d9bed67d557ed9969e673137e8d8";
|
|
|
|
armv7-unknown-linux-gnueabihf = "943ee757d96be97baccb84b0c2a5da368f8f3adf082805b0f0323240e80975c0";
|
|
|
|
aarch64-unknown-linux-gnu = "e11461015ca7106ef8ebf00859842bf4be518ee170226cb8eedaaa666946509f";
|
|
|
|
i686-apple-darwin = "aadec39efcbc476e00722b527dcc587003ab05194efd06ba1b91c1e0f7512d3f";
|
|
|
|
x86_64-apple-darwin = "63f54e3013406b39fcb5b84bcf5e8ce85860d0b97a1e156700e467bf5fb5d5f2";
|
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";
|
|
|
|
}
|