git.iko.soy/typeable/nixpkgs
on master help sign in
rust: Upgrade rust stable to 0.12
commit4035d9f27e3c9d9c99b48f7e47a0e4b7e21954cf authorPaul Colomiets <paul@colomiets.name> dateThu 16 Oct 2014, 23:24 (12 years ago) parent287d6d5
4 files changed+34−25
pkgs/development/compilers/rustc/0.11.nix → pkgs/development/compilers/rustc/0.12.nix+11−10 pkgs/development/compilers/rustc/hardcode_paths.patch+17−12 pkgs/development/compilers/rustc/local_stage0.patch+5−2 pkgs/top-level/all-packages.nix+1−1
pkgs/development/compilers/rustc/0.11.nix → pkgs/development/compilers/rustc/0.12.nixrenamed+11−10
@@ -16,19 +16,19 @@ assert stdenv.gcc.gcc != null;
1616
1717*/
1818
19−with ((import ./common.nix) {inherit stdenv; version = "0.11.0"; });
19+with ((import ./common.nix) {inherit stdenv; version = "0.12.0"; });
2020
2121let snapshot = if stdenv.system == "i686-linux"
22− then "84339ea0f796ae468ef86797ef4587274bec19ea"
22+ then "555aca74f9a268f80cab2df1147dc6406403e9e4"
2323 else if stdenv.system == "x86_64-linux"
24− then "bd8a6bc1f28845b7f4b768f6bfa06e7fbdcfcaae"
24+ then "6a43c2f6c8ba2cbbcb9da1f7b58f748aef99f431"
2525 else if stdenv.system == "i686-darwin"
26− then "3f25b2680efbab16ad074477a19d49dcce475977"
26+ then "331bd7ef519cbb424188c546273e8c7d738f0894"
2727 else if stdenv.system == "x86_64-darwin"
28− then "4a8c2e1b7634d73406bac32a1a97893ec3ed818d"
28+ then "2c83a79a9febfe1d326acb17c3af76ba053c6ca9"
2929 else abort "no-snapshot for platform ${stdenv.system}";
30− snapshotDate = "2014-06-21";
31− snapshotRev = "db9af1d";
30+ snapshotDate = "2014-10-04";
31+ snapshotRev = "749ff5e";
3232 snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2";
3333
3434in stdenv.mkDerivation {
@@ -37,8 +37,8 @@ in stdenv.mkDerivation {
3737 inherit meta;
3838
3939 src = fetchurl {
40− url = http://static.rust-lang.org/dist/rust-0.11.0.tar.gz;
41− sha256 = "1fhi8iiyyj5j48fpnp93sfv781z1dm0xy94h534vh4mz91jf7cyi";
40+ url = http://static.rust-lang.org/dist/rust-0.12.0.tar.gz;
41+ sha256 = "1dv9wxh41230zknbwj34zgjnh1kgvvy6k12kbiy9bnch9nr6cgl8";
4242 };
4343
4444 # We need rust to build rust. If we don't provide it, configure will try to download it.
@@ -65,7 +65,8 @@ in stdenv.mkDerivation {
6565 patches = [ ./hardcode_paths.patch ./local_stage0.patch ];
6666 postPatch = ''
6767 substituteInPlace src/librustc/back/link.rs \
68− --subst-var-by "ccPath" "${stdenv.gcc}/bin/cc" \
68+ --subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
69+ substituteInPlace src/librustc_back/archive.rs \
6970 --subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
7071 '';
7172
pkgs/development/compilers/rustc/hardcode_paths.patch+17−12
@@ -1,8 +1,8 @@
11diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
2−index 7a3e912..ced75fa 100644
2+index 1cc60fc..2e94b99 100644
33--- a/src/librustc/back/link.rs
44+++ b/src/librustc/back/link.rs
5−@@ -766,24 +766,15 @@ pub fn output_lib_filename(id: &CrateId) -> String {
5+@@ -383,18 +383,9 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
66
77 pub fn get_cc_prog(sess: &Session) -> String {
88 match sess.opts.cg.linker {
@@ -15,18 +15,23 @@ index 7a3e912..ced75fa 100644
1515- // In the future, FreeBSD will use clang as default compiler.
1616- // It would be flexible to use cc (system's default C compiler)
1717- // instead of hard-coded gcc.
18−- // For win32, there is no cc command, so we add a condition to make it use gcc.
18+- // For Windows, there is no cc command, so we add a condition to make it use gcc.
1919- match sess.targ_cfg.os {
20−- abi::OsWin32 => "gcc",
20+- abi::OsWindows => "gcc",
2121- _ => "cc",
2222- }.to_string()
2323 }
2424
25− pub fn get_ar_prog(sess: &Session) -> String {
26− match sess.opts.cg.ar {
27− Some(ref ar) => (*ar).clone(),
28−- None => "ar".to_string()
29−+ None => "@arPath@".to_string()
30− }
31− }
32−
25+ pub fn remove(sess: &Session, path: &Path) {
26+diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs
27+index 060dda5..fecf76b 100644
28+--- a/src/librustc_back/archive.rs
29++++ b/src/librustc_back/archive.rs
30+@@ -53,7 +53,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
31+ paths: &[&Path]) -> ProcessOutput {
32+ let ar = match *maybe_ar_prog {
33+ Some(ref ar) => ar.as_slice(),
34+- None => "ar"
35++ None => "@arPath@"
36+ };
37+ let mut cmd = Command::new(ar);
pkgs/development/compilers/rustc/local_stage0.patch+5−2
@@ -2,12 +2,15 @@ diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
22index e78f231..6b6773b 100755
33--- a/src/etc/local_stage0.sh
44+++ b/src/etc/local_stage0.sh
5−@@ -53,8 +53,3 @@ if [ -z $TARG_DIR ]; then
5+@@ -53,11 +53,6 @@
66 fi
7−
7+
88 cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
99-cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
1010-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
1111-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
1212-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
1313-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
14+
15+ # do not fail if one of the above fails, as all we need is a working rustc!
16+ exit 0
pkgs/top-level/all-packages.nix+1−1
@@ -3653,7 +3653,7 @@ let
36533653
36543654 roadsend = callPackage ../development/compilers/roadsend { };
36553655
3656− rustc = callPackage ../development/compilers/rustc/0.11.nix {};
3656+ rustc = callPackage ../development/compilers/rustc/0.12.nix {};
36573657 rustcMaster = callPackage ../development/compilers/rustc/head.nix {};
36583658
36593659 rust = rustc;