rust: 1.17.0 -> 1.20.0
simplify the boostrap hashes a bit build with bundled llvm: the rust project has forked the llvm compiler to solve some issues. With pkgs.llvm the test suite fails. See https://github.com/rust-lang/rust/pull/43026 And PR #30088
This commit is contained in:
parent
e30e201027
commit
7bd191df6a
4 changed files with 42 additions and 39 deletions
|
@ -1,6 +1,18 @@
|
|||
{ stdenv, fetchurl, makeWrapper, cacert, zlib, curl }:
|
||||
|
||||
let
|
||||
# Note: the version MUST be one version prior to the version we're
|
||||
# building
|
||||
version = "1.19.0";
|
||||
|
||||
# fetch hashes by running `print-hashes.sh 1.19.0`
|
||||
hashes = {
|
||||
i686-unknown-linux-gnu = "657b78f3c1a1b4412e12f7278e20cc318022fa276a58f0d38a0d15b515e39713";
|
||||
x86_64-unknown-linux-gnu = "30ff67884464d32f6bbbde4387e7557db98868e87fb2afbb77c9b7716e3bff09";
|
||||
i686-apple-darwin = "bdfd2189245dc5764c9f26bdba1429c2bf9d57477d8e6e3f0ba42ea0dc63edeb";
|
||||
x86_64-apple-darwin = "5c668fb60a3ba3e97dc2cb8967fc4bb9422b629155284dcb89f94d116bb17820";
|
||||
};
|
||||
|
||||
platform =
|
||||
if stdenv.system == "i686-linux"
|
||||
then "i686-unknown-linux-gnu"
|
||||
|
@ -12,27 +24,11 @@ let
|
|||
then "x86_64-apple-darwin"
|
||||
else throw "missing bootstrap url for platform ${stdenv.system}";
|
||||
|
||||
# fetch hashes by patching print-hashes.sh to not use the "$DATE" variable
|
||||
# then running `print-hashes.sh 1.16.0`
|
||||
bootstrapHash =
|
||||
if stdenv.system == "i686-linux"
|
||||
then "b5859161ebb182d3b75fa14a5741e5de87b088146fb0ef4a30f3b2439c6179c5"
|
||||
else if stdenv.system == "x86_64-linux"
|
||||
then "48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd"
|
||||
else if stdenv.system == "i686-darwin"
|
||||
then "26356b14164354725bd0351e8084f9b164abab134fb05cddb7758af35aad2065"
|
||||
else if stdenv.system == "x86_64-darwin"
|
||||
then "2d08259ee038d3a2c77a93f1a31fc59e7a1d6d1bbfcba3dba3c8213b2e5d1926"
|
||||
else throw "missing bootstrap hash for platform ${stdenv.system}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
||||
sha256 = bootstrapHash;
|
||||
sha256 = hashes."${platform}";
|
||||
};
|
||||
|
||||
# Note: the version MUST be one version prior to the version we're
|
||||
# building
|
||||
version = "1.16.0";
|
||||
in import ./binaryBuild.nix
|
||||
{ inherit stdenv fetchurl makeWrapper cacert zlib curl;
|
||||
buildRustPackage = null;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchgit, file, curl, pkgconfig, python, openssl, cmake, zlib
|
||||
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
|
||||
, version, srcRev, srcSha, depsSha256
|
||||
, version, srcSha, depsSha256
|
||||
, patches ? []}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
|
@ -9,7 +9,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/rust-lang/cargo";
|
||||
rev = srcRev;
|
||||
rev = version;
|
||||
sha256 = srcSha;
|
||||
};
|
||||
|
||||
|
|
|
@ -6,17 +6,19 @@
|
|||
|
||||
let
|
||||
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
|
||||
version = "1.17.0";
|
||||
version = "1.20.0";
|
||||
in
|
||||
rec {
|
||||
rustc = callPackage ./rustc.nix {
|
||||
inherit llvm targets targetPatches targetToolchains rustPlatform version;
|
||||
|
||||
forceBundledLLVM = true;
|
||||
|
||||
configureFlags = [ "--release-channel=stable" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
|
||||
sha256 = "4baba3895b75f2492df6ce5a28a916307ecd1c088dc1fd02dbfa8a8e86174f87";
|
||||
sha256 = "0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -26,10 +28,9 @@ rec {
|
|||
};
|
||||
|
||||
cargo = callPackage ./cargo.nix rec {
|
||||
version = "0.18.0";
|
||||
srcRev = "fe7b0cdcf5ca7aab81630706ce40b70f6aa2e666";
|
||||
srcSha = "164iywv1l3v87b0pznf5kkzxigd6w19myv9d7ka4c65zgrk9n9px";
|
||||
depsSha256 = "1mrgd8ib48vxxbhkvsqqq4p19sc6b74x3cd8p6lhhlm6plrajrvm";
|
||||
version = "0.21.1";
|
||||
srcSha = "a64iywv1l3v87b0pznf5kkzxigd6w19myv9d7ka4c65zgrk9n9px";
|
||||
depsSha256 = "amrgd8ib48vxxbhkvsqqq4p19sc6b74x3cd8p6lhhlm6plrajrvm";
|
||||
|
||||
inherit rustc; # the rustc that will be wrapped by cargo
|
||||
inherit rustPlatform; # used to build cargo
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# All rust-related downloads can be found at
|
||||
# https://static.rust-lang.org/dist/index.html. To find the date on
|
||||
|
@ -6,25 +7,30 @@
|
|||
# file, e.g.
|
||||
# https://static.rust-lang.org/dist/channel-rust-beta-date.txt
|
||||
|
||||
PLATFORMS="i686-unknown-linux-gnu x86_64-unknown-linux-gnu i686-apple-darwin x86_64-apple-darwin"
|
||||
BASEURL="https://static.rust-lang.org/dist"
|
||||
DATE=$1
|
||||
VERSION=$2
|
||||
PLATFORMS=(
|
||||
i686-unknown-linux-gnu
|
||||
x86_64-unknown-linux-gnu
|
||||
i686-apple-darwin
|
||||
x86_64-apple-darwin
|
||||
)
|
||||
BASEURL=https://static.rust-lang.org/dist
|
||||
VERSION=${1:-}
|
||||
DATE=${2:-}
|
||||
|
||||
if [[ -z $DATE ]]
|
||||
then
|
||||
echo "No date supplied"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [[ -z $VERSION ]]
|
||||
if [[ -z $VERSION ]]
|
||||
then
|
||||
echo "No version supplied"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
for PLATFORM in $PLATFORMS
|
||||
if [[ -n $DATE ]]
|
||||
then
|
||||
BASEURL=$BASEURL/$DATE
|
||||
fi
|
||||
|
||||
for PLATFORM in "${PLATFORMS[@]}"
|
||||
do
|
||||
URL="$BASEURL/$DATE/rust-$VERSION-$PLATFORM.tar.gz.sha256"
|
||||
curl $URL
|
||||
URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
|
||||
SHA256=$(curl -sSfL $URL | cut -d ' ' -f 1)
|
||||
echo "$PLATFORM = \"$SHA256\";"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue