summary refs log tree commit diff
path: root/pkgs/development/compilers/rust
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2016-07-10 22:45:58 +0200
committerMoritz Ulrich <moritz@tarn-vedra.de>2016-07-13 20:08:05 +0200
commit8c45378cdea615b9f364837a212e88f2a7594413 (patch)
treecdb125278bac03b1fad020148000e14212de72a9 /pkgs/development/compilers/rust
parentd2435933c0a2c8981992fa73a10523af4d15b96b (diff)
downloadnixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar.gz
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar.bz2
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar.lz
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar.xz
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.tar.zst
nixpkgs-8c45378cdea615b9f364837a212e88f2a7594413.zip
rustc: 1.9.0 -> 1.10.0, cargo: 0.10.0 -> 0.11.0
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix6
-rw-r--r--pkgs/development/compilers/rust/default.nix20
-rw-r--r--pkgs/development/compilers/rust/patches/remove-uneeded-git.patch19
-rw-r--r--pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch25
-rw-r--r--pkgs/development/compilers/rust/snapshot.nix65
5 files changed, 15 insertions, 120 deletions
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index 300f6929453..bfc82c4317d 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -50,7 +50,11 @@ rec {
         --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
         "$out/bin/rustc"
 
-      wrapProgram "$out/bin/rustc"
+      # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
+      # (or similar) here. It causes strange effects where rustc loads
+      # the wrong libraries in a bootstrap-build causing failures that
+      # are very hard to track dow. For details, see
+      # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
     '';
   };
 
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index d1e7460fa54..44b9471784c 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -3,30 +3,30 @@
 
 let
   rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}) rustPlatform);
-  rustSnapshotPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./snapshot.nix {}) rustPlatform);
 in
 
 rec {
   rustc = callPackage ./rustc.nix {
-    shortVersion = "1.9.0";
+    shortVersion = "1.10.0";
     isRelease = true;
     forceBundledLLVM = false;
     configureFlags = [ "--release-channel=stable" ];
-    srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779";
-    srcSha = "1pz4qx70mqv78fxm4w1mq7csk5pssq4qmr2vwwb5v8hyx03caff8";
-    patches = [ ./patches/remove-uneeded-git.patch ]
-      ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    srcRev = "cfcb716cf0961a7e3a4eceac828d94805cf8140b";
+    srcSha = "15i81ybh32xymmkyz3bkb5bdgi9hx8nb0sh00ac6qba6w8ljpii9";
+    patches = [
+      ./patches/disable-lockfile-check.patch
+    ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
     inherit targets;
     inherit targetPatches;
     inherit targetToolchains;
-    rustPlatform = rustSnapshotPlatform;
+    inherit rustPlatform;
   };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "0.10.0";
+    version = "0.11.0";
     srcRev = "refs/tags/${version}";
-    srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
-    depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
+    srcSha = "0ic2093bmwiw6vl2l9yhip87ni6dbz7dhrizy9wdx61229k16hc4";
+    depsSha256 = "0690sgn6fcay7sazlmrbbn4jbhnvmznrpz5z3rvkbaifkjrg4w6d";
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo
   };
diff --git a/pkgs/development/compilers/rust/patches/remove-uneeded-git.patch b/pkgs/development/compilers/rust/patches/remove-uneeded-git.patch
deleted file mode 100644
index 3c68d777f88..00000000000
--- a/pkgs/development/compilers/rust/patches/remove-uneeded-git.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/src/etc/tidy.py b/src/etc/tidy.py
-index 9f5f919..a607180 100644
---- a/src/etc/tidy.py
-+++ b/src/etc/tidy.py
-@@ -66,13 +66,9 @@ def interesting_file(f):
-     return any(os.path.splitext(f)[1] == ext for ext in interesting_files)
- 
- 
--# Be careful to support Python 2.4, 2.6, and 3.x here!
--config_proc = subprocess.Popen(["git", "config", "core.autocrlf"],
--                               stdout=subprocess.PIPE)
--result = config_proc.communicate()[0]
- 
- true = "true".encode('utf8')
--autocrlf = result.strip() == true if result is not None else False
-+autocrlf = False
- 
- current_name = ""
- current_contents = ""
diff --git a/pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch b/pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch
deleted file mode 100644
index 150306744be..00000000000
--- a/pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2710f3c8ae142abe1720b3476cd1ca60cee0c077 Mon Sep 17 00:00:00 2001
-From: David Craven <david@craven.ch>
-Date: Wed, 1 Jun 2016 00:12:35 +0200
-Subject: [PATCH] Patch stage0.txt to use rustc 1.9.0
-
----
- src/stage0.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/stage0.txt b/src/stage0.txt
-index 58b7f8f..3c84cab 100644
---- a/src/stage0.txt
-+++ b/src/stage0.txt
-@@ -12,6 +12,6 @@
- # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
- # released on `$date`
- 
--rustc: beta-2016-04-13
--rustc_key: c2743eb4
-+rustc: 1.9.0-2016-05-24
-+rustc_key: d16b8f0e
- cargo: nightly-2016-04-10
--- 
-2.8.3
-
diff --git a/pkgs/development/compilers/rust/snapshot.nix b/pkgs/development/compilers/rust/snapshot.nix
deleted file mode 100644
index 47f271b18e0..00000000000
--- a/pkgs/development/compilers/rust/snapshot.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-/* NOTE: Rust 1.9.0 is the last version that uses snapshots
-         This file can be deleted after the 1.10.0 release and bootstrap.nix
-         can be used instead
-*/
-{ stdenv, fetchurl, callPackage }:
-
-let
-  platform = if stdenv.system == "i686-linux"
-    then "linux-i386"
-    else if stdenv.system == "x86_64-linux"
-    then "linux-x86_64"
-    else if stdenv.system == "i686-darwin"
-    then "macos-i386"
-    else if stdenv.system == "x86_64-darwin"
-    then "macos-x86_64"
-    else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
-
-  /* Rust is bootstrapped from an earlier built version. We need
-    to fetch these earlier versions, which vary per platform.
-    The shapshot info you want can be found at
-    https://github.com/rust-lang/rust/blob/{$shortVersion}/src/snapshots.txt
-    with the set you want at the top. Make sure this is the latest snapshot
-    for the tagged release and not a snapshot in the current HEAD.
-  */
-
-  snapshotHashLinux686 = "0e0e4448b80d0a12b75485795244bb3857a0a7ef";
-  snapshotHashLinux64 = "1273b6b6aed421c9e40c59f366d0df6092ec0397";
-  snapshotHashDarwin686 = "9f9c0b4a2db09acbce54b792fb8839a735585565";
-  snapshotHashDarwin64 = "52570f6fd915b0210a9be98cfc933148e16a75f8";
-  snapshotDate = "2016-03-18";
-  snapshotRev = "235d774";
-
-  snapshotHash = if stdenv.system == "i686-linux"
-    then snapshotHashLinux686
-    else if stdenv.system == "x86_64-linux"
-    then snapshotHashLinux64
-    else if stdenv.system == "i686-darwin"
-    then snapshotHashDarwin686
-    else if stdenv.system == "x86_64-darwin"
-    then snapshotHashDarwin64
-    else abort "no snapshot for platform ${stdenv.system}";
-
-  snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
-in
-
-rec {
-  rustc = stdenv.mkDerivation {
-    name = "rustc-snapshot";
-    src = fetchurl {
-      url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
-      sha1 = snapshotHash;
-    };
-    dontStrip = true;
-    installPhase = ''
-      mkdir -p "$out"
-      cp -r bin "$out/bin"
-    '' + stdenv.lib.optionalString stdenv.isLinux ''
-      patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
-               --set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \
-               "$out/bin/rustc"
-    '';
-  };
-
-  cargo = null;
-}