diff options
Diffstat (limited to 'pkgs/development/compilers/rustc')
-rw-r--r-- | pkgs/development/compilers/rustc/beta.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/bootstrap.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/generic.nix | 111 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/head.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/patches/grsec.patch | 24 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch | 25 | ||||
-rwxr-xr-x | pkgs/development/compilers/rustc/print-hashes.sh | 17 | ||||
-rw-r--r-- | pkgs/development/compilers/rustc/snapshot.nix | 61 |
11 files changed, 0 insertions, 373 deletions
diff --git a/pkgs/development/compilers/rustc/beta.nix b/pkgs/development/compilers/rustc/beta.nix deleted file mode 100644 index 363dc71c02da..000000000000 --- a/pkgs/development/compilers/rustc/beta.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ stdenv, callPackage, rustcStable, targets ? [], targetToolchains ? [] }: - -callPackage ./generic.nix { - shortVersion = "beta-1.10.0"; - forceBundledLLVM = false; - configureFlags = [ "--release-channel=beta" ]; - srcRev = "39f3c16cca889ef3f1719d9177e3315258222a65"; - srcSha = "01bx6616lslp2mbj4h8bb6m042fs0y1z8g0jgpxvbk3fbhzwafrx"; - patches = [ ./patches/disable-lockfile-check.patch ] ++ - stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; - rustc = rustcStable; - inherit targets; - inherit targetToolchains; -} diff --git a/pkgs/development/compilers/rustc/bootstrap.nix b/pkgs/development/compilers/rustc/bootstrap.nix deleted file mode 100644 index 0361bb78a9ce..000000000000 --- a/pkgs/development/compilers/rustc/bootstrap.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, fetchurl, makeWrapper }: - -let - platform = - if stdenv.system == "i686-linux" - then "i686-unknown-linux-gnu" - else if stdenv.system == "x86_64-linux" - then "x86_64-unknown-linux-gnu" - else if stdenv.system == "i686-darwin" - then "i686-apple-darwin" - else if stdenv.system == "x86_64-darwin" - then "x86_64-apple-darwin" - else abort "missing boostrap url for platform ${stdenv.system}"; - - # fetch hashes by running `print-hashes.sh 1.9.0` - bootstrapHash = - if stdenv.system == "i686-linux" - then "2951dec835827974d03c7aafbf2c969f39bb530e1c200fd46f90bc01772fae39" - else if stdenv.system == "x86_64-linux" - then "d0704d10237c66c3efafa6f7e5570c59a1d3fe5c6d99487540f90ebb37cd84c4" - else if stdenv.system == "i686-darwin" - then "c7aa93e2475aa8e65259f606ca70e98da41cf5d2b20f91703b98f9572a84f7e6" - else if stdenv.system == "x86_64-darwin" - then "7204226b42e9c380d44e722efd4a886178a1867a064c90f12e0553a21a4184c6" - else throw "missing boostrap hash for platform ${stdenv.system}"; -in -stdenv.mkDerivation rec { - name = "rustc-bootstrap-${version}"; - version = "1.9.0"; - src = fetchurl { - url = "https://static.rust-lang.org/dist/rustc-${version}-${platform}.tar.gz"; - sha256 = bootstrapHash; - }; - buildInputs = [makeWrapper]; - phases = ["unpackPhase" "installPhase"]; - - installPhase = '' - mkdir -p "$out" - ./install.sh "--prefix=$out" - - patchelf \ - --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/rustc" - - wrapProgram "$out/bin/rustc" - ''; -} diff --git a/pkgs/development/compilers/rustc/default.nix b/pkgs/development/compilers/rustc/default.nix deleted file mode 100644 index dd7fd8a88dab..000000000000 --- a/pkgs/development/compilers/rustc/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ stdenv, callPackage, targets ? [], targetToolchains ? [] }: - -callPackage ./generic.nix { - shortVersion = "1.9.0"; - isRelease = true; - forceBundledLLVM = false; - configureFlags = [ "--release-channel=stable" ]; - srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779"; - srcSha = "167rh7hs77grn895h54s7np7f0k7b6i8z4wdfinncg4chy08hxq1"; - patches = [ ./patches/remove-uneeded-git.patch ] - ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; - rustc = callPackage ./snapshot.nix {}; - inherit targets; - inherit targetToolchains; -} diff --git a/pkgs/development/compilers/rustc/generic.nix b/pkgs/development/compilers/rustc/generic.nix deleted file mode 100644 index a08843f494e9..000000000000 --- a/pkgs/development/compilers/rustc/generic.nix +++ /dev/null @@ -1,111 +0,0 @@ -{ stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps -, llvm, jemalloc, ncurses, darwin, binutils, rustc, git - -, isRelease ? false -, shortVersion -, forceBundledLLVM ? false -, srcSha, srcRev -, configureFlags ? [] -, patches -, targets -, targetToolchains -} @ args: - -let - version = if isRelease then - "${shortVersion}" - else - "${shortVersion}-g${builtins.substring 0 7 srcRev}"; - - name = "rustc-${version}"; - - procps = if stdenv.isDarwin then darwin.ps else args.procps; - - llvmShared = llvm.override { enableSharedLibraries = true; }; - - target = builtins.replaceStrings [" "] [","] (builtins.toString targets); - - meta = with stdenv.lib; { - homepage = http://www.rust-lang.org/; - description = "A safe, concurrent, practical language"; - maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington retrry ]; - license = [ licenses.mit licenses.asl20 ]; - platforms = platforms.linux ++ platforms.darwin; - }; -in - -stdenv.mkDerivation { - inherit name; - inherit version; - inherit meta; - - __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ]; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib"; - - src = fetchgit { - url = https://github.com/rust-lang/rust; - rev = srcRev; - sha256 = srcSha; - }; - - # We need rust to build rust. If we don't provide it, configure will try to download it. - configureFlags = configureFlags - ++ [ "--enable-local-rust" "--local-rust-root=${rustc}" "--enable-rpath" ] - # ++ [ "--jemalloc-root=${jemalloc}/lib" - ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ] - ++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang" - ++ stdenv.lib.optional (targets != []) "--target=${target}" - ++ stdenv.lib.optional (!forceBundledLLVM) "--llvm-root=${llvmShared}"; - - inherit patches; - passthru.target = target; - - postPatch = '' - substituteInPlace src/rust-installer/gen-install-script.sh \ - --replace /bin/echo "$(type -P echo)" - substituteInPlace src/rust-installer/gen-installer.sh \ - --replace /bin/echo "$(type -P echo)" - - # Workaround for NixOS/nixpkgs#8676 - substituteInPlace mk/rustllvm.mk \ - --replace "\$\$(subst /,//," "\$\$(subst /,/," - - # Fix dynamic linking against llvm - ${stdenv.lib.optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''} - - # Fix the configure script to not require curl as we won't use it - sed -i configure \ - -e '/probe_need CFG_CURLORWGET/d' - - # Fix the use of jemalloc prefixes which our jemalloc doesn't have - # TODO: reenable if we can figure out how to get our jemalloc to work - #[ -f src/liballoc_jemalloc/lib.rs ] && sed -i 's,je_,,g' src/liballoc_jemalloc/lib.rs - #[ -f src/liballoc/heap.rs ] && sed -i 's,je_,,g' src/liballoc/heap.rs # Remove for 1.4.0+ - - # Useful debugging parameter - #export VERBOSE=1 - ''; - - preConfigure = '' - # Needed flags as the upstream configure script has a broken prefix substitution - configureFlagsArray+=("--datadir=$out/share") - configureFlagsArray+=("--infodir=$out/share/info") - ''; - - # ps is needed for one of the test cases - nativeBuildInputs = [ file python2 procps rustc git ]; - buildInputs = [ ncurses ] ++ targetToolchains - ++ stdenv.lib.optional (!forceBundledLLVM) llvmShared; - - # https://github.com/rust-lang/rust/issues/30181 - # enableParallelBuilding = false; # missing files during linking, occasionally - - outputs = [ "out" "doc" ]; - setOutputFlags = false; - - preCheck = "export TZDIR=${tzdata}/share/zoneinfo"; - - doCheck = true; - dontSetConfigureCross = true; -} diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix deleted file mode 100644 index aa32416c6495..000000000000 --- a/pkgs/development/compilers/rustc/head.nix +++ /dev/null @@ -1,15 +0,0 @@ -# Please make sure to check if rustfmt still builds when updating nightly -{ stdenv, callPackage, rustcStable, targets ? [], targetToolchains ? [] }: - -callPackage ./generic.nix { - shortVersion = "master-1.11.0"; - forceBundledLLVM = false; - srcRev = "298730e7032cd55809423773da397cd5c7d827d4"; - srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1"; - patches = [ ./patches/disable-lockfile-check.patch - ./patches/use-rustc-1.9.0.patch ] ++ - stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; - rustc = rustcStable; - inherit targets; - inherit targetToolchains; -} diff --git a/pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch b/pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch deleted file mode 100644 index 0c01cb1a7f19..000000000000 --- a/pkgs/development/compilers/rustc/patches/disable-lockfile-check.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e7378e267bba203bd593b49705c24303b0a46cb7 Mon Sep 17 00:00:00 2001 -From: David Craven <david@craven.ch> -Date: Wed, 1 Jun 2016 01:41:35 +0200 -Subject: [PATCH] disable-lockfile-check - ---- - src/tools/tidy/src/main.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs -index 2839bbd..50142ff 100644 ---- a/src/tools/tidy/src/main.rs -+++ b/src/tools/tidy/src/main.rs -@@ -47,7 +47,7 @@ fn main() { - errors::check(&path, &mut bad); - cargo::check(&path, &mut bad); - features::check(&path, &mut bad); -- cargo_lock::check(&path, &mut bad); -+ //cargo_lock::check(&path, &mut bad); - - if bad { - panic!("some tidy checks failed"); --- -2.8.3 - diff --git a/pkgs/development/compilers/rustc/patches/grsec.patch b/pkgs/development/compilers/rustc/patches/grsec.patch deleted file mode 100644 index b97b40c24091..000000000000 --- a/pkgs/development/compilers/rustc/patches/grsec.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile -index b22f34f..c6489bd 100644 ---- a/src/test/run-make/relocation-model/Makefile -+++ b/src/test/run-make/relocation-model/Makefile -@@ -2,9 +2,11 @@ - - all: others - $(RUSTC) -C relocation-model=dynamic-no-pic foo.rs -+ paxctl -czexm $(TMPDIR)/foo - $(call RUN,foo) - - $(RUSTC) -C relocation-model=default foo.rs -+ paxctl -czexm $(TMPDIR)/foo - $(call RUN,foo) - - $(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs -@@ -16,6 +18,7 @@ others: - else - others: - $(RUSTC) -C relocation-model=static foo.rs -+ paxctl -czexm $(TMPDIR)/foo - $(call RUN,foo) - $(RUSTC) -C relocation-model=static --crate-type=dylib foo.rs - endif diff --git a/pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch b/pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch deleted file mode 100644 index 3c68d777f885..000000000000 --- a/pkgs/development/compilers/rustc/patches/remove-uneeded-git.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/etc/tidy.py b/src/etc/tidy.py -index 9f5f919..a607180 100644 ---- a/src/etc/tidy.py -+++ b/src/etc/tidy.py -@@ -66,13 +66,9 @@ def interesting_file(f): - return any(os.path.splitext(f)[1] == ext for ext in interesting_files) - - --# Be careful to support Python 2.4, 2.6, and 3.x here! --config_proc = subprocess.Popen(["git", "config", "core.autocrlf"], -- stdout=subprocess.PIPE) --result = config_proc.communicate()[0] - - true = "true".encode('utf8') --autocrlf = result.strip() == true if result is not None else False -+autocrlf = False - - current_name = "" - current_contents = "" diff --git a/pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch b/pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch deleted file mode 100644 index 150306744be6..000000000000 --- a/pkgs/development/compilers/rustc/patches/use-rustc-1.9.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2710f3c8ae142abe1720b3476cd1ca60cee0c077 Mon Sep 17 00:00:00 2001 -From: David Craven <david@craven.ch> -Date: Wed, 1 Jun 2016 00:12:35 +0200 -Subject: [PATCH] Patch stage0.txt to use rustc 1.9.0 - ---- - src/stage0.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/stage0.txt b/src/stage0.txt -index 58b7f8f..3c84cab 100644 ---- a/src/stage0.txt -+++ b/src/stage0.txt -@@ -12,6 +12,6 @@ - # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was - # released on `$date` - --rustc: beta-2016-04-13 --rustc_key: c2743eb4 -+rustc: 1.9.0-2016-05-24 -+rustc_key: d16b8f0e - cargo: nightly-2016-04-10 --- -2.8.3 - diff --git a/pkgs/development/compilers/rustc/print-hashes.sh b/pkgs/development/compilers/rustc/print-hashes.sh deleted file mode 100755 index 710d4c0b585c..000000000000 --- a/pkgs/development/compilers/rustc/print-hashes.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -PLATFORMS="i686-unknown-linux-gnu x86_64-unknown-linux-gnu i686-apple-darwin x86_64-apple-darwin" -BASEURL="https://static.rust-lang.org/dist" -VERSION=$1 - -if [[ -z $VERSION ]] -then - echo "No version supplied" - exit -1 -fi - -for PLATFORM in $PLATFORMS -do - URL="$BASEURL/rustc-$VERSION-$PLATFORM.tar.gz.sha256" - curl $URL -done diff --git a/pkgs/development/compilers/rustc/snapshot.nix b/pkgs/development/compilers/rustc/snapshot.nix deleted file mode 100644 index 8f7005dc0d76..000000000000 --- a/pkgs/development/compilers/rustc/snapshot.nix +++ /dev/null @@ -1,61 +0,0 @@ -/* NOTE: Rust 1.9.0 is the last version that uses snapshots - This file can be deleted after the 1.10.0 release and bootstrap.nix - can be used instead -*/ -{ stdenv, fetchurl }: - -let - platform = if stdenv.system == "i686-linux" - then "linux-i386" - else if stdenv.system == "x86_64-linux" - then "linux-x86_64" - else if stdenv.system == "i686-darwin" - then "macos-i386" - else if stdenv.system == "x86_64-darwin" - then "macos-x86_64" - else abort "no snapshot to bootstrap for this platform (missing platform url suffix)"; - - /* Rust is bootstrapped from an earlier built version. We need - to fetch these earlier versions, which vary per platform. - The shapshot info you want can be found at - https://github.com/rust-lang/rust/blob/{$shortVersion}/src/snapshots.txt - with the set you want at the top. Make sure this is the latest snapshot - for the tagged release and not a snapshot in the current HEAD. - */ - - snapshotHashLinux686 = "0e0e4448b80d0a12b75485795244bb3857a0a7ef"; - snapshotHashLinux64 = "1273b6b6aed421c9e40c59f366d0df6092ec0397"; - snapshotHashDarwin686 = "9f9c0b4a2db09acbce54b792fb8839a735585565"; - snapshotHashDarwin64 = "52570f6fd915b0210a9be98cfc933148e16a75f8"; - snapshotDate = "2016-03-18"; - snapshotRev = "235d774"; - - snapshotHash = if stdenv.system == "i686-linux" - then snapshotHashLinux686 - else if stdenv.system == "x86_64-linux" - then snapshotHashLinux64 - else if stdenv.system == "i686-darwin" - then snapshotHashDarwin686 - else if stdenv.system == "x86_64-darwin" - then snapshotHashDarwin64 - else abort "no snapshot for platform ${stdenv.system}"; - - snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2"; -in - -stdenv.mkDerivation { - name = "rust-bootstrap"; - src = fetchurl { - url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}"; - sha1 = snapshotHash; - }; - dontStrip = true; - installPhase = '' - mkdir -p "$out" - cp -r bin "$out/bin" - '' + stdenv.lib.optionalString stdenv.isLinux '' - patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \ - --set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \ - "$out/bin/rustc" - ''; -} |