From 7a51920367b191dab8dc185f4f9a29fd81440f8e Mon Sep 17 00:00:00 2001 From: Dmitry Belyaev Date: Sat, 11 Apr 2015 10:51:34 +1000 Subject: [PATCH 1/4] Provide rustc-1.0.0-beta as the default for rustc The patch injects full paths to utilities rather then expects to find then in the environment. Also remove alphas. --- .../compilers/rustc/1.0.0-alpha.nix | 17 ----------- .../compilers/rustc/1.0.0-alpha2.nix | 16 ----------- .../compilers/rustc/1.0.0-beta.nix | 15 ++++++++++ .../patches/{alpha2.patch => beta.patch} | 24 ++++------------ .../rustc/patches/hardcode_paths.alpha.patch | 28 ------------------- .../rustc/patches/local_stage0.alpha.patch | 16 ----------- pkgs/top-level/all-packages.nix | 5 ++-- 7 files changed, 23 insertions(+), 98 deletions(-) delete mode 100644 pkgs/development/compilers/rustc/1.0.0-alpha.nix delete mode 100644 pkgs/development/compilers/rustc/1.0.0-alpha2.nix create mode 100644 pkgs/development/compilers/rustc/1.0.0-beta.nix rename pkgs/development/compilers/rustc/patches/{alpha2.patch => beta.patch} (68%) delete mode 100644 pkgs/development/compilers/rustc/patches/hardcode_paths.alpha.patch delete mode 100644 pkgs/development/compilers/rustc/patches/local_stage0.alpha.patch diff --git a/pkgs/development/compilers/rustc/1.0.0-alpha.nix b/pkgs/development/compilers/rustc/1.0.0-alpha.nix deleted file mode 100644 index 7a2e485c9c6..00000000000 --- a/pkgs/development/compilers/rustc/1.0.0-alpha.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv, callPackage }: -callPackage ./makeRustcDerivation.nix { - shortVersion = "1.0.0-alpha"; - isRelease = true; - srcSha = "0p62gx3s087n09d2v3l9iyfx5cmsa1x91n4ysixcb7w3drr8a8is"; - snapshotHashLinux686 = "d8b73fc9aa3ad72ce1408a41e35d78dba10eb4d4"; - snapshotHashLinux64 = "697880d3640e981bbbf23284363e8e9a158b588d"; - snapshotHashDarwin686 = "a73b1fc03e8cac747aab0aa186292bb4332a7a98"; - snapshotHashDarwin64 = "e4ae2670ea4ba5c2e5b4245409c9cab45c9eeb5b"; - snapshotDate = "2015-01-07"; - snapshotRev = "9e4e524"; - patches = [ - ./patches/hardcode_paths.alpha.patch - ./patches/local_stage0.alpha.patch - ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; -} - diff --git a/pkgs/development/compilers/rustc/1.0.0-alpha2.nix b/pkgs/development/compilers/rustc/1.0.0-alpha2.nix deleted file mode 100644 index 94bdd995592..00000000000 --- a/pkgs/development/compilers/rustc/1.0.0-alpha2.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, callPackage }: -callPackage ./makeRustcDerivation.nix { - shortVersion = "1.0.0-alpha.2"; - isRelease = true; - srcSha = "1j2n34w0hdz7jrl100c9q9hl80l8nsc3xwnzizv9sh4gx52vjcd9"; - snapshotHashLinux686 = "191ed5ec4f17e32d36abeade55a1c6085e51245c"; - snapshotHashLinux64 = "acec86045632f4f3f085c072ba696f889906dffe"; - snapshotHashDarwin686 = "9d9e622584bfa318f32bcb5b9ce6a365febff595"; - snapshotHashDarwin64 = "e96c1e9860b186507cc75c186d1b96d44df12292"; - snapshotDate = "2015-02-17"; - snapshotRev = "f1bb6c2"; - patches = [ - ./patches/alpha2.patch - ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; -} - diff --git a/pkgs/development/compilers/rustc/1.0.0-beta.nix b/pkgs/development/compilers/rustc/1.0.0-beta.nix new file mode 100644 index 00000000000..371f6195cd6 --- /dev/null +++ b/pkgs/development/compilers/rustc/1.0.0-beta.nix @@ -0,0 +1,15 @@ +{ stdenv, callPackage }: +callPackage ./makeRustcDerivation.nix { + shortVersion = "1.0.0-beta"; + isRelease = true; + srcSha = "94248e30487723ac6f6c34a0db5a21085c0b1338e6a32bd12b159e1d2cd80451"; + snapshotHashLinux686 = "1ef82402ed16f5a6d2f87a9a62eaa83170e249ec"; + snapshotHashLinux64 = "ef2154372e97a3cb687897d027fd51c8f2c5f349"; + snapshotHashDarwin686 = "0310b1a970f2da7e61770fd14dbbbdca3b518234"; + snapshotHashDarwin64 = "5f35d9c920b8083a7420ef8cf5b00d5ef3085dfa"; + snapshotDate = "2015-03-27"; + snapshotRev = "5520801"; + patches = [ + ./patches/beta.patch + ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; +} diff --git a/pkgs/development/compilers/rustc/patches/alpha2.patch b/pkgs/development/compilers/rustc/patches/beta.patch similarity index 68% rename from pkgs/development/compilers/rustc/patches/alpha2.patch rename to pkgs/development/compilers/rustc/patches/beta.patch index 8165a42cf85..cffc773dd3e 100644 --- a/pkgs/development/compilers/rustc/patches/alpha2.patch +++ b/pkgs/development/compilers/rustc/patches/beta.patch @@ -1,5 +1,5 @@ diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh -index b506aff..b4b346b 100755 +index ca59b1c..65ee7bf 100755 --- a/src/etc/local_stage0.sh +++ b/src/etc/local_stage0.sh @@ -50,11 +50,6 @@ if [ -z $TARG_DIR ]; then @@ -15,11 +15,11 @@ index b506aff..b4b346b 100755 # do not fail if one of the above fails, as all we need is a working rustc! exit 0 diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs -index c45ee25..0f91672 100644 +index ed44bf8..2b84627 100644 --- a/src/librustc_back/archive.rs +++ b/src/librustc_back/archive.rs -@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option, - paths: &[&Path]) -> ProcessOutput { +@@ -57,7 +57,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option, + paths: &[&Path]) -> Output { let ar = match *maybe_ar_prog { Some(ref ar) => &ar[..], - None => "ar" @@ -28,10 +28,10 @@ index c45ee25..0f91672 100644 let mut cmd = Command::new(ar); diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs -index ef849bb..e090b99 100644 +index 3087a8e..578448f 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs -@@ -350,8 +350,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri +@@ -352,7 +352,7 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri pub fn get_cc_prog(sess: &Session) -> String { match sess.opts.cg.linker { @@ -41,15 +41,3 @@ index ef849bb..e090b99 100644 + None => "@ccPath@".to_string(), } } - -diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs -index 049e08d..30b9d2a 100644 ---- a/src/test/run-pass/issue-20797.rs -+++ b/src/test/run-pass/issue-20797.rs -@@ -90,5 +90,5 @@ impl Iterator for Subpaths { - } - - fn main() { -- let mut walker: Subpaths = Subpaths::walk(&Path::new("/home")).unwrap(); -+ let mut walker: Subpaths = Subpaths::walk(&Path::new("/tmp")).unwrap(); - } diff --git a/pkgs/development/compilers/rustc/patches/hardcode_paths.alpha.patch b/pkgs/development/compilers/rustc/patches/hardcode_paths.alpha.patch deleted file mode 100644 index 2a9cb09dcbd..00000000000 --- a/pkgs/development/compilers/rustc/patches/hardcode_paths.alpha.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs -index 7ea192b..cd5d01b 100644 ---- a/src/librustc_back/archive.rs -+++ b/src/librustc_back/archive.rs -@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option, - paths: &[&Path]) -> ProcessOutput { - let ar = match *maybe_ar_prog { - Some(ref ar) => &ar[], -- None => "ar" -+ None => "@arPath@" - }; - let mut cmd = Command::new(ar); - -diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs -index dacf620..815ce60 100644 ---- a/src/librustc_trans/back/link.rs -+++ b/src/librustc_trans/back/link.rs -@@ -348,8 +348,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri - - pub fn get_cc_prog(sess: &Session) -> String { - match sess.opts.cg.linker { -- Some(ref linker) => return linker.to_string(), -- None => sess.target.target.options.linker.clone(), -+ Some(ref linker) => linker.to_string(), -+ None => "@ccPath@".to_string(), - } - } - diff --git a/pkgs/development/compilers/rustc/patches/local_stage0.alpha.patch b/pkgs/development/compilers/rustc/patches/local_stage0.alpha.patch deleted file mode 100644 index 2f38d7c1757..00000000000 --- a/pkgs/development/compilers/rustc/patches/local_stage0.alpha.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh -index e78f231..6b6773b 100755 ---- a/src/etc/local_stage0.sh -+++ b/src/etc/local_stage0.sh -@@ -53,11 +53,6 @@ - fi - - cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/ --cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/ --cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/ --cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/ --cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/ --cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/ - - # do not fail if one of the above fails, as all we need is a working rustc! - exit 0 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ebafe4e048..534c5ba0304 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4312,10 +4312,9 @@ let ocaml = ocaml_3_08_0; }; - rustcAlpha = callPackage ../development/compilers/rustc/1.0.0-alpha.nix {}; - rustcAlpha2 = callPackage ../development/compilers/rustc/1.0.0-alpha2.nix {}; + rustcBeta = callPackage ../development/compilers/rustc/1.0.0-beta.nix {}; rustcMaster = callPackage ../development/compilers/rustc/head.nix {}; - rustc = rustcAlpha2; + rustc = rustcBeta; sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {}; From 871d11c1768bf99c55c3c19533d86184c33c1758 Mon Sep 17 00:00:00 2001 From: Dmitry Belyaev Date: Sun, 12 Apr 2015 16:14:51 +1000 Subject: [PATCH 2/4] Update cargoSnapshot to rustc-1.0.0-beta release --- .../tools/build-managers/cargo/snapshot.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/build-managers/cargo/snapshot.nix b/pkgs/development/tools/build-managers/cargo/snapshot.nix index f20f6d94f6f..64aeb0736c1 100644 --- a/pkgs/development/tools/build-managers/cargo/snapshot.nix +++ b/pkgs/development/tools/build-managers/cargo/snapshot.nix @@ -2,19 +2,19 @@ /* Cargo binary snapshot */ -let snapshotDate = "2015-02-26"; +let snapshotDate = "2015-04-02"; in with ((import ./common.nix) { inherit stdenv; version = "snapshot-${snapshotDate}"; }); let snapshotHash = if stdenv.system == "i686-linux" - then "2a28b604d09b4a76a54a05d91f7f158692427b3a" + then "ba6c162680d5509d89ba2363d7cae2047f40c034" else if stdenv.system == "x86_64-linux" - then "7367f4aca86d38e209ef7236b00175df036c03e2" + then "94f715c9a52809a639f2ce6f8b1d5215a0c272b5" else if stdenv.system == "i686-darwin" - then "e5cabb0a4a2b4e47f7b1ae9b802e2b5d0b14eac5" + then "cf333f16f89bfd50e8ce461c6f81ca30d33f7f73" else if stdenv.system == "x86_64-darwin" - then "3026c60ddd46d2bcf1cb178fc801095dbfba5286" + then "1f7008a6ec860e2bc7580e71bdf320ac518ddeb8" else throw "no snapshot for platform ${stdenv.system}"; snapshotName = "cargo-nightly-${platform}.tar.gz"; in @@ -35,6 +35,10 @@ stdenv.mkDerivation { installPhase = '' mkdir -p "$out" ./install.sh "--prefix=$out" + rm "$out/lib/rustlib/components" \ + "$out/lib/rustlib/install.log" \ + "$out/lib/rustlib/rust-installer-version" \ + "$out/lib/rustlib/uninstall.sh" '' + (if stdenv.isLinux then '' patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \ From 2a10294b74f200125f630c652da84fa228a7f61b Mon Sep 17 00:00:00 2001 From: Dmitry Belyaev Date: Mon, 13 Apr 2015 15:55:02 +1000 Subject: [PATCH 3/4] Update rustcMaster --- pkgs/development/compilers/rustc/head.nix | 18 +++++++++--------- .../compilers/rustc/patches/head.patch | 12 ------------ 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix index 2d450388669..99012ba6d94 100644 --- a/pkgs/development/compilers/rustc/head.nix +++ b/pkgs/development/compilers/rustc/head.nix @@ -2,15 +2,15 @@ callPackage ./makeRustcDerivation.nix { shortVersion = "1.0.0-dev"; isRelease = false; - # src rev for master on 2015/03/09 - srcRev = "91bdf23f504f79ed59617cde3dfebd3d5e39a476"; - srcSha = "1s1v1q630d88idz331n4m0c3ninzipmvfzmkvdaqqm28wsn69xx7"; - snapshotHashLinux686 = "50a47ef247610fb089d2c4f24e4b641eb0ba4afb"; - snapshotHashLinux64 = "ccb20709b3c984f960ddde996451be8ce2268d7c"; - snapshotHashDarwin686 = "ad263bdeadcf9bf1889426e0c1391a7cf277364e"; - snapshotHashDarwin64 = "01c8275828042264206b7acd8e86dc719a2f27aa"; - snapshotDate = "2015-03-07"; - snapshotRev = "270a677"; + # src rev for master on 2015/04/13 + srcRev = "0cf99c3e06e84d20d68da649c888d63c72f33971"; + srcSha = "0brnzsbxmidjnmvi36sz582k3kw6wk813y2y837zpmyxg9fjah0l"; + snapshotHashLinux686 = "1ef82402ed16f5a6d2f87a9a62eaa83170e249ec"; + snapshotHashLinux64 = "ef2154372e97a3cb687897d027fd51c8f2c5f349"; + snapshotHashDarwin686 = "0310b1a970f2da7e61770fd14dbbbdca3b518234"; + snapshotHashDarwin64 = "5f35d9c920b8083a7420ef8cf5b00d5ef3085dfa"; + snapshotDate = "2015-03-27"; + snapshotRev = "5520801"; patches = [ ./patches/head.patch ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; diff --git a/pkgs/development/compilers/rustc/patches/head.patch b/pkgs/development/compilers/rustc/patches/head.patch index f82f85fb162..3cbf8717cd1 100644 --- a/pkgs/development/compilers/rustc/patches/head.patch +++ b/pkgs/development/compilers/rustc/patches/head.patch @@ -41,15 +41,3 @@ index 3087a8e..578448f 100644 + None => "@ccPath@".to_string(), } } - -diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs -index 049e08d..30b9d2a 100644 ---- a/src/test/run-pass/issue-20797.rs -+++ b/src/test/run-pass/issue-20797.rs -@@ -90,5 +90,5 @@ impl Iterator for Subpaths { - } - - fn main() { -- let mut walker: Subpaths = Subpaths::walk(&Path::new("/home")).unwrap(); -+ let mut walker: Subpaths = Subpaths::walk(&Path::new("/tmp")).unwrap(); - } From 854f81da3492f755aa1169988e805f04d5d5c673 Mon Sep 17 00:00:00 2001 From: Dmitry Belyaev Date: Mon, 13 Apr 2015 15:58:41 +1000 Subject: [PATCH 4/4] Update racerRust --- pkgs/development/tools/rust/racer/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/racer/default.nix b/pkgs/development/tools/rust/racer/default.nix index 75c09987761..341088dc0f2 100644 --- a/pkgs/development/tools/rust/racer/default.nix +++ b/pkgs/development/tools/rust/racer/default.nix @@ -2,17 +2,17 @@ stdenv.mkDerivation rec { #TODO add emacs support - name = "racer-git-2015-02-28"; + name = "racer-git-2015-04-12"; src = fetchgit { url = https://github.com/phildawes/racer; - rev = "2e1d718fae21431de4493c238196466e9d4996bc"; - sha256 = "0lvp494kg2hlbbdrwxmmxkyhjw53y9wjdml9z817pwj3fwmrjsx0"; + rev = "5437e2074d87dfaab75a0f1bd2597bed61c0bbf1"; + sha256 = "0a768gvjry86l0xa5q0122iyq7zn2h9adfniglsgrbs4fan49xyn"; }; buildInputs = [ rustc cargo makeWrapper ]; buildPhase = '' - cargo build --release + CARGO_HOME="$NIX_BUILD_TOP/.cargo" cargo build --release ''; installPhase = ''