rustNightlyBin: 2016-12-05 -> 2016-12-29 (#21618)

- add cargo (hence the renaming)
- also allow to built nix packages
This commit is contained in:
Jörg Thalheim 2017-01-03 16:50:56 +01:00 committed by Joachim Schiele
parent 82b0ae1223
commit fd152db8f7
2 changed files with 39 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, cacert, zlib }:
{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage }:
let
inherit (stdenv.lib) optionalString;
@ -19,10 +19,12 @@ let
sha256 = bootstrapHash;
};
version = "2016-12-05";
version = "2016-12-29";
in
rec {
inherit buildRustPackage;
rustc = stdenv.mkDerivation rec {
name = "rustc-nightly-${version}";
@ -49,5 +51,33 @@ rec {
"$out/bin/rustc"
''}
'';
};
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 ];
phases = ["unpackPhase" "installPhase"];
installPhase = ''
./install.sh --prefix=$out \
--components=cargo
${optionalString needsPatchelf ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
'';
};
}

View File

@ -5290,12 +5290,17 @@ in
};
rust = rustStable;
rustcNightlyBin = lowPrio (callPackage ../development/compilers/rust/nightlyBin.nix {});
rustStable = callPackage ../development/compilers/rust {};
rustBeta = callPackage ../development/compilers/rust/beta.nix {};
rustNightly = callPackage ../development/compilers/rust/nightly.nix {
rustPlatform = recurseIntoAttrs (makeRustPlatform rustBeta);
};
rustNightlyBin = callPackage ../development/compilers/rust/nightlyBin.nix {
buildRustPackage = callPackage ../build-support/rust {
rust = rustNightlyBin;
rustRegistry = callPackage ./rust-packages.nix { };
};
};
cargo = rust.cargo;
rustc = rust.rustc;