git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #16920 from the-kenny/rust-1.10.0

rust: 1.9.0 -> 1.10.0

commitc1bcfd740575d03b12c9be46f6fb3fdfa450b1da authorMoritz Ulrich <moritz@tarn-vedra.de> dateWed 13 Jul 2016, 23:56 (10 years ago) parent19a4935eec7eaf
6 files changed+19−123
pkgs/development/compilers/rust/bootstrap.nix+5−1 pkgs/development/compilers/rust/default.nix+10−10 pkgs/development/compilers/rust/patches/remove-uneeded-git.patch−19 pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch−25 pkgs/development/compilers/rust/snapshot.nix−65 pkgs/top-level/rust-packages.nix+4−3
pkgs/development/compilers/rust/bootstrap.nix+5−1
@@ -50,7 +50,11 @@ rec {
5050 --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
5151 "$out/bin/rustc"
5252
53− wrapProgram "$out/bin/rustc"
53+ # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
54+ # (or similar) here. It causes strange effects where rustc loads
55+ # the wrong libraries in a bootstrap-build causing failures that
56+ # are very hard to track dow. For details, see
57+ # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
5458 '';
5559 };
5660
pkgs/development/compilers/rust/default.nix+10−10
@@ -3,30 +3,30 @@
33
44let
55 rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}) rustPlatform);
6− rustSnapshotPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./snapshot.nix {}) rustPlatform);
76in
87
98rec {
109 rustc = callPackage ./rustc.nix {
11− shortVersion = "1.9.0";
10+ shortVersion = "1.10.0";
1211 isRelease = true;
1312 forceBundledLLVM = false;
1413 configureFlags = [ "--release-channel=stable" ];
15− srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779";
16− srcSha = "1pz4qx70mqv78fxm4w1mq7csk5pssq4qmr2vwwb5v8hyx03caff8";
17− patches = [ ./patches/remove-uneeded-git.patch ]
18− ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
14+ srcRev = "cfcb716cf0961a7e3a4eceac828d94805cf8140b";
15+ srcSha = "15i81ybh32xymmkyz3bkb5bdgi9hx8nb0sh00ac6qba6w8ljpii9";
16+ patches = [
17+ ./patches/disable-lockfile-check.patch
18+ ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
1919 inherit targets;
2020 inherit targetPatches;
2121 inherit targetToolchains;
22− rustPlatform = rustSnapshotPlatform;
22+ inherit rustPlatform;
2323 };
2424
2525 cargo = callPackage ./cargo.nix rec {
26− version = "0.10.0";
26+ version = "0.11.0";
2727 srcRev = "refs/tags/${version}";
28− srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
29− depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
28+ srcSha = "0ic2093bmwiw6vl2l9yhip87ni6dbz7dhrizy9wdx61229k16hc4";
29+ depsSha256 = "0690sgn6fcay7sazlmrbbn4jbhnvmznrpz5z3rvkbaifkjrg4w6d";
3030 inherit rustc; # the rustc that will be wrapped by cargo
3131 inherit rustPlatform; # used to build cargo
3232 };
pkgs/development/compilers/rust/patches/remove-uneeded-git.patchdeleted−19
@@ -1,19 +0,0 @@
1−diff --git a/src/etc/tidy.py b/src/etc/tidy.py
2−index 9f5f919..a607180 100644
3−--- a/src/etc/tidy.py
4−+++ b/src/etc/tidy.py
5−@@ -66,13 +66,9 @@ def interesting_file(f):
6− return any(os.path.splitext(f)[1] == ext for ext in interesting_files)
7−
8−
9−-# Be careful to support Python 2.4, 2.6, and 3.x here!
10−-config_proc = subprocess.Popen(["git", "config", "core.autocrlf"],
11−- stdout=subprocess.PIPE)
12−-result = config_proc.communicate()[0]
13−
14− true = "true".encode('utf8')
15−-autocrlf = result.strip() == true if result is not None else False
16−+autocrlf = False
17−
18− current_name = ""
19− current_contents = ""
pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patchdeleted−25
@@ -1,25 +0,0 @@
1−From 2710f3c8ae142abe1720b3476cd1ca60cee0c077 Mon Sep 17 00:00:00 2001
2−From: David Craven <david@craven.ch>
3−Date: Wed, 1 Jun 2016 00:12:35 +0200
4−Subject: [PATCH] Patch stage0.txt to use rustc 1.9.0
5−
6−---
7− src/stage0.txt | 4 ++--
8− 1 file changed, 2 insertions(+), 2 deletions(-)
9−
10−diff --git a/src/stage0.txt b/src/stage0.txt
11−index 58b7f8f..3c84cab 100644
12−--- a/src/stage0.txt
13−+++ b/src/stage0.txt
14−@@ -12,6 +12,6 @@
15− # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
16− # released on `$date`
17−
18−-rustc: beta-2016-04-13
19−-rustc_key: c2743eb4
20−+rustc: 1.9.0-2016-05-24
21−+rustc_key: d16b8f0e
22− cargo: nightly-2016-04-10
23−--
24−2.8.3
25−
pkgs/development/compilers/rust/snapshot.nixdeleted−65
@@ -1,65 +0,0 @@
1−/* NOTE: Rust 1.9.0 is the last version that uses snapshots
2− This file can be deleted after the 1.10.0 release and bootstrap.nix
3− can be used instead
4−*/
5−{ stdenv, fetchurl, callPackage }:
6−
7−let
8− platform = if stdenv.system == "i686-linux"
9− then "linux-i386"
10− else if stdenv.system == "x86_64-linux"
11− then "linux-x86_64"
12− else if stdenv.system == "i686-darwin"
13− then "macos-i386"
14− else if stdenv.system == "x86_64-darwin"
15− then "macos-x86_64"
16− else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
17−
18− /* Rust is bootstrapped from an earlier built version. We need
19− to fetch these earlier versions, which vary per platform.
20− The shapshot info you want can be found at
21− https://github.com/rust-lang/rust/blob/{$shortVersion}/src/snapshots.txt
22− with the set you want at the top. Make sure this is the latest snapshot
23− for the tagged release and not a snapshot in the current HEAD.
24− */
25−
26− snapshotHashLinux686 = "0e0e4448b80d0a12b75485795244bb3857a0a7ef";
27− snapshotHashLinux64 = "1273b6b6aed421c9e40c59f366d0df6092ec0397";
28− snapshotHashDarwin686 = "9f9c0b4a2db09acbce54b792fb8839a735585565";
29− snapshotHashDarwin64 = "52570f6fd915b0210a9be98cfc933148e16a75f8";
30− snapshotDate = "2016-03-18";
31− snapshotRev = "235d774";
32−
33− snapshotHash = if stdenv.system == "i686-linux"
34− then snapshotHashLinux686
35− else if stdenv.system == "x86_64-linux"
36− then snapshotHashLinux64
37− else if stdenv.system == "i686-darwin"
38− then snapshotHashDarwin686
39− else if stdenv.system == "x86_64-darwin"
40− then snapshotHashDarwin64
41− else abort "no snapshot for platform ${stdenv.system}";
42−
43− snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
44−in
45−
46−rec {
47− rustc = stdenv.mkDerivation {
48− name = "rustc-snapshot";
49− src = fetchurl {
50− url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
51− sha1 = snapshotHash;
52− };
53− dontStrip = true;
54− installPhase = ''
55− mkdir -p "$out"
56− cp -r bin "$out/bin"
57− '' + stdenv.lib.optionalString stdenv.isLinux ''
58− patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
59− --set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \
60− "$out/bin/rustc"
61− '';
62− };
63−
64− cargo = null;
65−}
pkgs/top-level/rust-packages.nix+4−3
@@ -7,15 +7,16 @@
77{ runCommand, fetchFromGitHub, git }:
88
99let
10− version = "2016-06-26";
11− rev = "eb6b06424a5cdc5dd0f41f06cda69714b3a0577b";
10+ version = "2016-07-13";
11+ rev = "8c0d367a18349078cc33df1eed7394fbaa2d602e";
12+ sha256 = "1r59qvzrr1rmjbq8al0qwkc65nd3n512i4pgn9688192d68cjnl8";
1213
1314 src = fetchFromGitHub {
1415 inherit rev;
16+ inherit sha256;
1517
1618 owner = "rust-lang";
1719 repo = "crates.io-index";
18− sha256 = "0iyqyyd5070whfgsg74bqk0f6rk7d2r4spb2ih9jy594ds2qinv4";
1920 };
2021
2122in