summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/nightlyBin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/rust/nightlyBin.nix')
-rw-r--r--pkgs/development/compilers/rust/nightlyBin.nix78
1 files changed, 7 insertions, 71 deletions
diff --git a/pkgs/development/compilers/rust/nightlyBin.nix b/pkgs/development/compilers/rust/nightlyBin.nix
index d8d0681a0c24..bdb11bd5b52e 100644
--- a/pkgs/development/compilers/rust/nightlyBin.nix
+++ b/pkgs/development/compilers/rust/nightlyBin.nix
@@ -1,87 +1,23 @@
 { stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage, curl }:
 
 let
-  inherit (stdenv.lib) optionalString;
-
   platform = if stdenv.system == "x86_64-linux"
     then "x86_64-unknown-linux-gnu"
     else throw "missing bootstrap url for platform ${stdenv.system}";
 
   bootstrapHash =
     if stdenv.system == "x86_64-linux"
-    then "1d5h34dkm1r1ff562szygn9xk2qll1pjryvypl0lazzanxdh5gv5"
+    then "21f38f46bf16373d3240a38b775e1acff9bb429f1570a4d4da8b3000315d0085"
     else throw "missing bootstrap hash for platform ${stdenv.system}";
 
-  needsPatchelf = stdenv.isLinux;
-
   src = fetchurl {
      url = "https://static.rust-lang.org/dist/${version}/rust-nightly-${platform}.tar.gz";
      sha256 = bootstrapHash;
   };
 
-  version = "2017-03-16";
-in
-
-rec {
-  inherit buildRustPackage;
-
-  rustc = stdenv.mkDerivation rec {
-    name = "rustc-nightly-${version}";
-
-    inherit version;
-    inherit src;
-
-    meta = with stdenv.lib; {
-      homepage = http://www.rust-lang.org/;
-      description = "A safe, concurrent, practical language";
-      maintainers = with maintainers; [ qknight ];
-      license = [ licenses.mit licenses.asl20 ];
-    };
-
-    buildInputs = [ makeWrapper ];
-    phases = ["unpackPhase" "installPhase"];
-
-    installPhase = ''
-      ./install.sh --prefix=$out \
-        --components=rustc,rust-std-x86_64-unknown-linux-gnu
-
-      ${optionalString needsPatchelf ''
-        patchelf \
-          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-          "$out/bin/rustc"
-        patchelf \
-          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-          "$out/bin/rustdoc"
-      ''}
-    '';
-
-  };
-  cargo = stdenv.mkDerivation rec {
-    name = "cargo-nightly-${version}";
-
-    inherit version;
-    inherit src;
-
-    meta = with stdenv.lib; {
-      homepage = http://www.rust-lang.org/;
-      description = "A safe, concurrent, practical language";
-      maintainers = with maintainers; [ qknight ];
-      license = [ licenses.mit licenses.asl20 ];
-    };
-
-    buildInputs = [ makeWrapper curl ];
-    phases = ["unpackPhase" "installPhase"];
-
-    installPhase = ''
-      ./install.sh --prefix=$out \
-        --components=cargo
-
-      ${optionalString needsPatchelf ''
-        patchelf \
-          --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \
-          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-          "$out/bin/cargo"
-      ''}
-    '';
-  };
-}
+  version = "2017-05-30";
+in import ./binaryBuild.nix
+  { inherit stdenv fetchurl makeWrapper cacert zlib buildRustPackage curl;
+    inherit version src platform;
+    versionType = "nightly";
+  }