summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/rust/beta.nix27
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix78
-rw-r--r--pkgs/development/compilers/rust/cargo.nix64
-rw-r--r--pkgs/development/compilers/rust/default.nix33
-rw-r--r--pkgs/development/compilers/rust/head.nix27
-rw-r--r--pkgs/development/compilers/rust/patches/disable-lockfile-check.patch (renamed from pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch)0
-rw-r--r--pkgs/development/compilers/rust/patches/grsec.patch (renamed from pkgs/development/compilers/rustc/patches/grsec.patch)0
-rw-r--r--pkgs/development/compilers/rust/patches/remove-uneeded-git.patch (renamed from pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch)0
-rw-r--r--pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch (renamed from pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch)0
-rwxr-xr-xpkgs/development/compilers/rust/print-hashes.sh (renamed from pkgs/development/compilers/rustc/print-hashes.sh)2
-rw-r--r--pkgs/development/compilers/rust/rustc.nix (renamed from pkgs/development/compilers/rustc/generic.nix)9
-rw-r--r--pkgs/development/compilers/rust/snapshot.nix (renamed from pkgs/development/compilers/rustc/snapshot.nix)34
-rw-r--r--pkgs/development/compilers/rustc/beta.nix14
-rw-r--r--pkgs/development/compilers/rustc/bootstrap.nix47
-rw-r--r--pkgs/development/compilers/rustc/default.nix15
-rw-r--r--pkgs/development/compilers/rustc/head.nix15
16 files changed, 254 insertions, 111 deletions
diff --git a/pkgs/development/compilers/rust/beta.nix b/pkgs/development/compilers/rust/beta.nix
new file mode 100644
index 000000000000..4b4ee89f981b
--- /dev/null
+++ b/pkgs/development/compilers/rust/beta.nix
@@ -0,0 +1,27 @@
+{ stdenv, callPackage, rustPlatform,
+  targets ? [], targetToolchains ? [], targetPatches ? [] }:
+
+rec {
+  rustc = callPackage ./rustc.nix {
+    shortVersion = "beta-1.10.0";
+    forceBundledLLVM = false;
+    configureFlags = [ "--release-channel=beta" ];
+    srcRev = "d18e321abeecc69e4d1bf9cafba4fba53ddf267d";
+    srcSha = "1ck8mbjrq0bzq5xzwgaqdilakwm2ab0xpzqibjycds62ad4yw774";
+    patches = [ ./patches/disable-lockfile-check.patch ]
+      ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    inherit targets;
+    inherit targetPatches;
+    inherit targetToolchains;
+    inherit rustPlatform;
+  };
+
+  cargo = callPackage ./cargo.nix rec {
+    version = "0.10.0";
+    srcRev = "refs/tags/${version}";
+    srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
+    depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
+    inherit rustc; # the rustc that will be wrapped by cargo
+    inherit rustPlatform; # used to build cargo
+  };
+}
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
new file mode 100644
index 000000000000..300f69294532
--- /dev/null
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -0,0 +1,78 @@
+{ stdenv, fetchurl, makeWrapper, cacert, zlib }:
+
+let
+  platform =
+    if stdenv.system == "i686-linux"
+    then "i686-unknown-linux-gnu"
+    else if stdenv.system == "x86_64-linux"
+    then "x86_64-unknown-linux-gnu"
+    else if stdenv.system == "i686-darwin"
+    then "i686-apple-darwin"
+    else if stdenv.system == "x86_64-darwin"
+    then "x86_64-apple-darwin"
+    else abort "missing boostrap url for platform ${stdenv.system}";
+
+  # fetch hashes by running `print-hashes.sh 1.9.0`
+  bootstrapHash =
+    if stdenv.system == "i686-linux"
+    then "dd4d9bf1b9393867eb18d00431e8fb733894984f2c7b5154bc1b64d045077b45"
+    else if stdenv.system == "x86_64-linux"
+    then "288ff13efa2577e81c77fc2cb6e2b49b1ed0ceab51b4fa12f7efb87039ac49b7"
+    else if stdenv.system == "i686-darwin"
+    then "4d4d4b256d6bd6ae2527cf61007b2553de200f0a1910b7ad41e4f51d2b21e536"
+    else if stdenv.system == "x86_64-darwin"
+    then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6"
+    else throw "missing boostrap hash for platform ${stdenv.system}";
+
+  src = fetchurl {
+     url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
+     sha256 = bootstrapHash;
+  };
+
+  version = "1.9.0";
+in
+
+rec {
+  rustc = stdenv.mkDerivation rec {
+    name = "rustc-bootstrap-${version}";
+
+    inherit version;
+    inherit src;
+
+    buildInputs = [ makeWrapper ];
+    phases = ["unpackPhase" "installPhase"];
+
+    installPhase = ''
+      ./install.sh --prefix=$out \
+        --components=rustc,rust-std-${platform},rust-docs
+
+      patchelf \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        "$out/bin/rustc"
+
+      wrapProgram "$out/bin/rustc"
+    '';
+  };
+
+  cargo = stdenv.mkDerivation rec {
+    name = "cargo-bootstrap-${version}";
+
+    inherit version;
+    inherit src;
+
+    buildInputs = [ makeWrapper zlib rustc ];
+    phases = ["unpackPhase" "installPhase"];
+
+    installPhase = ''
+      ./install.sh --prefix=$out \
+        --components=cargo
+
+      patchelf \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        "$out/bin/cargo"
+
+      wrapProgram "$out/bin/cargo" \
+        --suffix PATH : "${rustc}/bin"
+    '';
+  };
+}
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
new file mode 100644
index 000000000000..fc4bf732cf6b
--- /dev/null
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchgit, file, curl, pkgconfig, python, openssl, cmake, zlib
+, makeWrapper, libiconv, cacert, rustPlatform, rustc
+, version, srcRev, srcSha, depsSha256 }:
+
+rustPlatform.buildRustPackage rec {
+  name = "cargo-${version}";
+  inherit version;
+
+  src = fetchgit {
+    url = "https://github.com/rust-lang/cargo";
+    rev = srcRev;
+    sha256 = srcSha;
+  };
+
+  inherit depsSha256;
+
+  passthru.rustc = rustc;
+
+  buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ]
+    ++ stdenv.lib.optional stdenv.isDarwin libiconv;
+
+  configurePhase = ''
+    ./configure --enable-optimize --prefix=$out --local-cargo=${rustPlatform.rust.cargo}/bin/cargo
+  '';
+
+  buildPhase = "make";
+
+  installPhase = ''
+    make install
+    ${postInstall}
+  '';
+
+  postInstall = ''
+    rm "$out/lib/rustlib/components" \
+       "$out/lib/rustlib/install.log" \
+       "$out/lib/rustlib/rust-installer-version" \
+       "$out/lib/rustlib/uninstall.sh" \
+       "$out/lib/rustlib/manifest-cargo"
+
+    wrapProgram "$out/bin/cargo" \
+      --suffix PATH : "${rustc}/bin" \
+      --run "export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" \
+      ${stdenv.lib.optionalString stdenv.isDarwin ''--suffix DYLD_LIBRARY_PATH : "${rustc}/lib"''}
+  '';
+
+  checkPhase = ''
+    # Export SSL_CERT_FILE as without it one test fails with SSL verification error
+    export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
+    # Disable cross compilation tests
+    export CFG_DISABLE_CROSS_TESTS=1
+    cargo test
+  '';
+
+  # Disable check phase as there are failures (author_prefers_cargo test fails)
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = http://crates.io;
+    description = "Downloads your Rust project's dependencies and builds your project";
+    maintainers = with maintainers; [ wizeman retrry ];
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
new file mode 100644
index 000000000000..d1e7460fa54c
--- /dev/null
+++ b/pkgs/development/compilers/rust/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform,
+  targets ? [], targetToolchains ? [], targetPatches ? [] }:
+
+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";
+    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;
+    inherit targets;
+    inherit targetPatches;
+    inherit targetToolchains;
+    rustPlatform = rustSnapshotPlatform;
+  };
+
+  cargo = callPackage ./cargo.nix rec {
+    version = "0.10.0";
+    srcRev = "refs/tags/${version}";
+    srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
+    depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
+    inherit rustc; # the rustc that will be wrapped by cargo
+    inherit rustPlatform; # used to build cargo
+  };
+}
diff --git a/pkgs/development/compilers/rust/head.nix b/pkgs/development/compilers/rust/head.nix
new file mode 100644
index 000000000000..bbfe5c9a1529
--- /dev/null
+++ b/pkgs/development/compilers/rust/head.nix
@@ -0,0 +1,27 @@
+{ stdenv, callPackage, rustPlatform,
+  targets ? [], targetToolchains ? [], targetPatches ? [] }:
+
+rec {
+  rustc = callPackage ./rustc.nix {
+    shortVersion = "master-1.11.0";
+    forceBundledLLVM = false;
+    srcRev = "298730e7032cd55809423773da397cd5c7d827d4";
+    srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1";
+    patches = [ ./patches/disable-lockfile-check.patch
+                ./patches/use-rustc-1.9.0.patch ]
+      ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    inherit targets;
+    inherit targetPatches;
+    inherit targetToolchains;
+    inherit rustPlatform;
+  };
+
+  cargo = callPackage ./cargo.nix rec {
+    version = "2016.06.07";
+    srcRev = "3e70312a2a4ebedace131fc63bb8f27463c5db28";
+    srcSha = "0nibzyfjkiqfnq0c00hhqvs856l5qls8wds252p97q5q92yvp40f";
+    depsSha256 = "1xbb33aqnf5yyws6gjys9w8kznbh9rh6hw8mpg1hhq1ahipc2j1f";
+    inherit rustc; # the rustc that will be wrapped by cargo
+    inherit rustPlatform; # used to build cargo
+  };
+}
diff --git a/pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch b/pkgs/development/compilers/rust/patches/disable-lockfile-check.patch
index 0c01cb1a7f19..0c01cb1a7f19 100644
--- a/pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch
+++ b/pkgs/development/compilers/rust/patches/disable-lockfile-check.patch
diff --git a/pkgs/development/compilers/rustc/patches/grsec.patch b/pkgs/development/compilers/rust/patches/grsec.patch
index b97b40c24091..b97b40c24091 100644
--- a/pkgs/development/compilers/rustc/patches/grsec.patch
+++ b/pkgs/development/compilers/rust/patches/grsec.patch
diff --git a/pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch b/pkgs/development/compilers/rust/patches/remove-uneeded-git.patch
index 3c68d777f885..3c68d777f885 100644
--- a/pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch
+++ b/pkgs/development/compilers/rust/patches/remove-uneeded-git.patch
diff --git a/pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch b/pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch
index 150306744be6..150306744be6 100644
--- a/pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch
+++ b/pkgs/development/compilers/rust/patches/use-rustc-1.9.0.patch
diff --git a/pkgs/development/compilers/rustc/print-hashes.sh b/pkgs/development/compilers/rust/print-hashes.sh
index 710d4c0b585c..4d1d20066b85 100755
--- a/pkgs/development/compilers/rustc/print-hashes.sh
+++ b/pkgs/development/compilers/rust/print-hashes.sh
@@ -12,6 +12,6 @@ fi
 
 for PLATFORM in $PLATFORMS
 do
-    URL="$BASEURL/rustc-$VERSION-$PLATFORM.tar.gz.sha256"
+    URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
     curl $URL
 done
diff --git a/pkgs/development/compilers/rustc/generic.nix b/pkgs/development/compilers/rust/rustc.nix
index a08843f494e9..b1b33d57bb25 100644
--- a/pkgs/development/compilers/rustc/generic.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
-, llvm, jemalloc, ncurses, darwin, binutils, rustc, git
+, llvm, jemalloc, ncurses, darwin, binutils, rustPlatform, git
 
 , isRelease ? false
 , shortVersion
@@ -8,6 +8,7 @@
 , configureFlags ? []
 , patches
 , targets
+, targetPatches
 , targetToolchains
 } @ args:
 
@@ -51,14 +52,14 @@ stdenv.mkDerivation {
 
   # We need rust to build rust. If we don't provide it, configure will try to download it.
   configureFlags = configureFlags
-                ++ [ "--enable-local-rust" "--local-rust-root=${rustc}" "--enable-rpath" ]
+                ++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ]
                 # ++ [ "--jemalloc-root=${jemalloc}/lib"
                 ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ]
                 ++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang"
                 ++ stdenv.lib.optional (targets != []) "--target=${target}"
                 ++ stdenv.lib.optional (!forceBundledLLVM) "--llvm-root=${llvmShared}";
 
-  inherit patches;
+  patches = patches ++ targetPatches;
   passthru.target = target;
 
   postPatch = ''
@@ -94,7 +95,7 @@ stdenv.mkDerivation {
   '';
 
   # ps is needed for one of the test cases
-  nativeBuildInputs = [ file python2 procps rustc git ];
+  nativeBuildInputs = [ file python2 procps rustPlatform.rust.rustc git ];
   buildInputs = [ ncurses ] ++ targetToolchains
     ++ stdenv.lib.optional (!forceBundledLLVM) llvmShared;
 
diff --git a/pkgs/development/compilers/rustc/snapshot.nix b/pkgs/development/compilers/rust/snapshot.nix
index 8f7005dc0d76..47f271b18e06 100644
--- a/pkgs/development/compilers/rustc/snapshot.nix
+++ b/pkgs/development/compilers/rust/snapshot.nix
@@ -2,7 +2,7 @@
          This file can be deleted after the 1.10.0 release and bootstrap.nix
          can be used instead
 */
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, callPackage }:
 
 let
   platform = if stdenv.system == "i686-linux"
@@ -43,19 +43,23 @@ let
   snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
 in
 
-stdenv.mkDerivation {
-  name = "rust-bootstrap";
-  src = fetchurl {
-    url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
-    sha1 = snapshotHash;
+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"
+    '';
   };
-  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;
 }
diff --git a/pkgs/development/compilers/rustc/beta.nix b/pkgs/development/compilers/rustc/beta.nix
deleted file mode 100644
index 363dc71c02da..000000000000
--- a/pkgs/development/compilers/rustc/beta.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ stdenv, callPackage, rustcStable, targets ? [], targetToolchains ? [] }:
-
-callPackage ./generic.nix {
-  shortVersion = "beta-1.10.0";
-  forceBundledLLVM = false;
-  configureFlags = [ "--release-channel=beta" ];
-  srcRev = "39f3c16cca889ef3f1719d9177e3315258222a65";
-  srcSha = "01bx6616lslp2mbj4h8bb6m042fs0y1z8g0jgpxvbk3fbhzwafrx";
-  patches = [ ./patches/disable-lockfile-check.patch ] ++
-    stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
-  rustc = rustcStable;
-  inherit targets;
-  inherit targetToolchains;
-}
diff --git a/pkgs/development/compilers/rustc/bootstrap.nix b/pkgs/development/compilers/rustc/bootstrap.nix
deleted file mode 100644
index 0361bb78a9ce..000000000000
--- a/pkgs/development/compilers/rustc/bootstrap.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ stdenv, fetchurl, makeWrapper }:
-
-let
-  platform =
-    if stdenv.system == "i686-linux"
-    then "i686-unknown-linux-gnu"
-    else if stdenv.system == "x86_64-linux"
-    then "x86_64-unknown-linux-gnu"
-    else if stdenv.system == "i686-darwin"
-    then "i686-apple-darwin"
-    else if stdenv.system == "x86_64-darwin"
-    then "x86_64-apple-darwin"
-    else abort "missing boostrap url for platform ${stdenv.system}";
-
-  # fetch hashes by running `print-hashes.sh 1.9.0`
-  bootstrapHash =
-    if stdenv.system == "i686-linux"
-    then "2951dec835827974d03c7aafbf2c969f39bb530e1c200fd46f90bc01772fae39"
-    else if stdenv.system == "x86_64-linux"
-    then "d0704d10237c66c3efafa6f7e5570c59a1d3fe5c6d99487540f90ebb37cd84c4"
-    else if stdenv.system == "i686-darwin"
-    then "c7aa93e2475aa8e65259f606ca70e98da41cf5d2b20f91703b98f9572a84f7e6"
-    else if stdenv.system == "x86_64-darwin"
-    then "7204226b42e9c380d44e722efd4a886178a1867a064c90f12e0553a21a4184c6"
-    else throw "missing boostrap hash for platform ${stdenv.system}";
-in
-stdenv.mkDerivation rec {
-  name = "rustc-bootstrap-${version}";
-  version = "1.9.0";
-  src = fetchurl {
-     url = "https://static.rust-lang.org/dist/rustc-${version}-${platform}.tar.gz";
-     sha256 = bootstrapHash;
-  };
-  buildInputs = [makeWrapper];
-  phases = ["unpackPhase" "installPhase"];
-
-  installPhase = ''
-    mkdir -p "$out"
-    ./install.sh "--prefix=$out"
-
-    patchelf \
-      --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-      "$out/bin/rustc"
-
-    wrapProgram "$out/bin/rustc"
-  '';
-}
diff --git a/pkgs/development/compilers/rustc/default.nix b/pkgs/development/compilers/rustc/default.nix
deleted file mode 100644
index dd7fd8a88dab..000000000000
--- a/pkgs/development/compilers/rustc/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ stdenv, callPackage, targets ? [], targetToolchains ? [] }:
-
-callPackage ./generic.nix {
-  shortVersion = "1.9.0";
-  isRelease = true;
-  forceBundledLLVM = false;
-  configureFlags = [ "--release-channel=stable" ];
-  srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779";
-  srcSha = "167rh7hs77grn895h54s7np7f0k7b6i8z4wdfinncg4chy08hxq1";
-  patches = [ ./patches/remove-uneeded-git.patch ]
-    ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
-  rustc = callPackage ./snapshot.nix {};
-  inherit targets;
-  inherit targetToolchains;
-}
diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix
deleted file mode 100644
index aa32416c6495..000000000000
--- a/pkgs/development/compilers/rustc/head.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-# Please make sure to check if rustfmt still builds when updating nightly
-{ stdenv, callPackage, rustcStable, targets ? [], targetToolchains ? [] }:
-
-callPackage ./generic.nix {
-  shortVersion = "master-1.11.0";
-  forceBundledLLVM = false;
-  srcRev = "298730e7032cd55809423773da397cd5c7d827d4";
-  srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1";
-  patches = [ ./patches/disable-lockfile-check.patch
-              ./patches/use-rustc-1.9.0.patch ] ++
-    stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
-  rustc = rustcStable;
-  inherit targets;
-  inherit targetToolchains;
-}