summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/nightly.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/rust/nightly.nix')
-rw-r--r--pkgs/development/compilers/rust/nightly.nix70
1 files changed, 24 insertions, 46 deletions
diff --git a/pkgs/development/compilers/rust/nightly.nix b/pkgs/development/compilers/rust/nightly.nix
index d9ae8c140abe..b69dffbd8b38 100644
--- a/pkgs/development/compilers/rust/nightly.nix
+++ b/pkgs/development/compilers/rust/nightly.nix
@@ -1,56 +1,34 @@
-{ stdenv, callPackage, rustPlatform, cacert, gdb,
-  targets ? [], targetToolchains ? [], targetPatches ? [] }:
+{ stdenv, callPackage, rustPlatform, llvm, fetchurl
+, targets ? []
+, targetToolchains ? []
+, targetPatches ? []
+}:
 
 rec {
-  rustc = stdenv.lib.overrideDerivation (callPackage ./rustc.nix {
-    shortVersion = "nightly-2017-01-10";
-    forceBundledLLVM = true; # TODO: figure out why linking fails without this
+  rustc = callPackage ./rustc.nix {
+    inherit llvm targets targetPatches targetToolchains rustPlatform;
+
+    version = "nightly-2017-05-30";
+
     configureFlags = [ "--release-channel=nightly" ];
-    srcRev = "7bffede97cf58f7159e261eac592f9cf88ce209d";
-    srcSha = "1784jvsf9g03cglwask1zhjmba4ghycbin3rw0hmhb41cz2y4q8v";
+
+    src = fetchurl {
+      url = "https://static.rust-lang.org/dist/2017-05-30/rustc-nightly-src.tar.gz";
+      sha256 = "90ce76db56a93f1b4532f2e62bbf12c243c4d156662b0d80c25319211ee7d0e0";
+    };
+
     patches = [
-     ./patches/disable-lockfile-check-nightly.patch
+      ./patches/darwin-disable-fragile-tcp-tests.patch
     ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
-    inherit targets;
-    inherit targetPatches;
-    inherit targetToolchains;
-    inherit rustPlatform;
-  }) (oldAttrs: {
-    nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ gdb rustPlatform.rust.cargo ];
-    postUnpack = ''
-      export CARGO_HOME="$(realpath deps)"
-      export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-    '';
-    postPatch = ''
-      ${oldAttrs.postPatch}
-
-      # Remove failing debuginfo tests because of old gdb version: https://github.com/rust-lang/rust/issues/38948#issuecomment-271443596
-      rm -vr src/test/debuginfo/borrowed-enum.rs || true
-      rm -vr src/test/debuginfo/generic-struct-style-enum.rs || true
-      rm -vr src/test/debuginfo/generic-tuple-style-enum.rs || true
-      rm -vr src/test/debuginfo/packed-struct.rs || true
-      rm -vr src/test/debuginfo/recursive-struct.rs || true
-      rm -vr src/test/debuginfo/struct-in-enum.rs || true
-      rm -vr src/test/debuginfo/struct-style-enum.rs || true
-      rm -vr src/test/debuginfo/tuple-style-enum.rs || true
-      rm -vr src/test/debuginfo/union-smoke.rs || true
-      rm -vr src/test/debuginfo/unique-enum.rs || true
-
-      # make external cargo work until https://github.com/rust-lang/rust/issues/38950 is fixed
-      sed -i "s#    def cargo(self):#    def cargo(self):\n        return \"${rustPlatform.rust.cargo}/bin/cargo\"#g" src/bootstrap/bootstrap.py
-      substituteInPlace \
-        src/bootstrap/config.rs \
-        --replace \
-        'self.cargo = Some(push_exe_path(path, &["bin", "cargo"]));' \
-        ''$'self.cargo = Some(\n                        "${rustPlatform.rust.cargo}\\\n                        /bin/cargo".into());'
-    '';
-  });
+
+    doCheck = false;
+  };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "nightly-2017-01-10";
-    srcRev = "6dd4ff0f5b59fff524762c4a7b65882adda713c0";
-    srcSha = "1x6d42qq2zhr1iaw0m0nslhv6c1w6x6schmd96max0p9xb47l9zj";
-    depsSha256 = "1sywnhzgambmqsjs2xlnzracfv7vjljha55hgf8wca2marafr5dp";
+    version = "0.18.0";
+    srcRev = "fe7b0cdcf5ca7aab81630706ce40b70f6aa2e666";
+    srcSha = "164iywv1l3v87b0pznf5kkzxigd6w19myv9d7ka4c65zgrk9n9px";
+    depsSha256 = "1mrgd8ib48vxxbhkvsqqq4p19sc6b74x3cd8p6lhhlm6plrajrvm";
 
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo