Merge branch 'rustc-update' into staging

Closes #12304.
This commit is contained in:
Nikolay Amiantov 2016-01-13 13:48:31 +03:00
commit 255901152c
4 changed files with 57 additions and 15 deletions

View File

@ -2,11 +2,11 @@
{ stdenv, callPackage }:
callPackage ./generic.nix {
shortVersion = "2015-12-09";
shortVersion = "2016-01-10";
isRelease = false;
forceBundledLLVM = true;
srcRev = "462ec0576";
srcSha = "1mci0hxwnqb24j4k68rgffqk8ccznz2iddfmyhi8wxa094hqgghp";
forceBundledLLVM = false;
srcRev = "d70ab2bdf16c22b9f3ff0230089b44855e3f1593";
srcSha = "13ssis1bdgg8sdkgrvxcbd1qcfmf7q6bv4akfxrjgdm44l1n1l97";
/* Rust is bootstrapped from an earlier built version. We need
to fetch these earlier versions, which vary per platform.
@ -15,12 +15,12 @@ callPackage ./generic.nix {
with the set you want at the top.
*/
snapshotHashLinux686 = "e2553bf399cd134a08ef3511a0a6ab0d7a667216";
snapshotHashLinux64 = "7df8ba9dec63ec77b857066109d4b6250f3d222f";
snapshotHashDarwin686 = "29750870c82a0347f8b8b735a4e2e0da26f5098d";
snapshotHashDarwin64 = "c9f2c588238b4c6998190c3abeb33fd6164099a2";
snapshotDate = "2015-08-11";
snapshotRev = "1af31d4";
snapshotHashLinux686 = "a09c4a4036151d0cb28e265101669731600e01f2";
snapshotHashLinux64 = "97e2a5eb8904962df8596e95d6e5d9b574d73bf4";
snapshotHashDarwin686 = "ca52d2d3ba6497ed007705ee3401cf7efc136ca1";
snapshotHashDarwin64 = "3c44ffa18f89567c2b81f8d695e711c86d81ffc7";
snapshotDate = "2015-12-18";
snapshotRev = "3391630";
patches = [ ./patches/remove-uneeded-git.patch ]
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;

View File

@ -0,0 +1,39 @@
{ stdenv, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl
, cmake, zlib, makeWrapper }:
with rustPlatform;
with ((import ./common.nix) {
inherit stdenv rustc;
version = "2016-01-10";
});
buildRustPackage rec {
inherit name version meta passthru;
# Needs to use fetchgit instead of fetchFromGitHub to fetch submodules
src = fetchgit {
url = "git://github.com/rust-lang/cargo";
rev = "ca373452de159491354cf38279dbc19308c91e72";
sha256 = "0fx88b3ndvzhfwq159xavs0z5c7jww231kd65cbzyih9g0ab9x65";
};
depsSha256 = "0csagk2dnwg5z0vbxilz1kzcygd4llw7s81ka0xn1g05x30jqrnn";
buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ];
configurePhase = ''
./configure --enable-optimize --prefix=$out --local-cargo=${cargo}/bin/cargo
'';
buildPhase = "make";
# Disable check phase as there are lots of failures (some probably due to
# trying to access the network).
doCheck = false;
installPhase = ''
make install
${postInstall}
'';
}

View File

@ -4878,8 +4878,7 @@ let
rustPlatform = rustStable;
rustStable = recurseIntoAttrs (makeRustPlatform cargo rustStable);
rustUnstable = recurseIntoAttrs (makeRustPlatform
(cargo.override { rustPlatform = rustUnstableCargoPlatform; }) rustUnstable);
rustUnstable = recurseIntoAttrs (makeRustPlatform cargoUnstable rustUnstable);
# rust platform to build cargo itself (with cargoSnapshot)
rustCargoPlatform = makeRustPlatform (cargoSnapshot rustc) rustCargoPlatform;
@ -5533,6 +5532,10 @@ let
rustPlatform = rustCargoPlatform;
};
cargoUnstable = callPackage ../development/tools/build-managers/cargo/head.nix {
rustPlatform = rustUnstableCargoPlatform;
};
cargoSnapshot = rustc:
callPackage ../development/tools/build-managers/cargo/snapshot.nix {
inherit rustc;

View File

@ -7,15 +7,15 @@
{ runCommand, fetchFromGitHub, git }:
let
version = "2015-12-23";
rev = "0fd482d73d5a13fd49a36d2940ad7a069a6fc049";
version = "2016-01-10";
rev = "d4120073882c5520f66ed56729b38af2063c2d28";
src = fetchFromGitHub {
inherit rev;
owner = "rust-lang";
repo = "crates.io-index";
sha256 = "18g69d7npky31rbd4bfcps9180bhfnddg2vhp9w1w0smvgzmg0i3";
sha256 = "1xxsaz3inxpkn25afbi8ncwnhns2vpr2f845wk2vs3vv7qpyr0a4";
};
in