@@ -1,65 +0,0 @@
1−/* NOTE: Rust 1.9.0 is the last version that uses snapshots
2− This file can be deleted after the 1.10.0 release and bootstrap.nix
3− can be used instead
4−*/
5−{ stdenv, fetchurl, callPackage }:
6−
7−let
8− platform = if stdenv.system == "i686-linux"
9− then "linux-i386"
10− else if stdenv.system == "x86_64-linux"
11− then "linux-x86_64"
12− else if stdenv.system == "i686-darwin"
13− then "macos-i386"
14− else if stdenv.system == "x86_64-darwin"
15− then "macos-x86_64"
16− else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
17−
18− /* Rust is bootstrapped from an earlier built version. We need
19− to fetch these earlier versions, which vary per platform.
20− The shapshot info you want can be found at
21− https://github.com/rust-lang/rust/blob/{$shortVersion}/src/snapshots.txt
22− with the set you want at the top. Make sure this is the latest snapshot
23− for the tagged release and not a snapshot in the current HEAD.
24− */
25−
26− snapshotHashLinux686 = "0e0e4448b80d0a12b75485795244bb3857a0a7ef";
27− snapshotHashLinux64 = "1273b6b6aed421c9e40c59f366d0df6092ec0397";
28− snapshotHashDarwin686 = "9f9c0b4a2db09acbce54b792fb8839a735585565";
29− snapshotHashDarwin64 = "52570f6fd915b0210a9be98cfc933148e16a75f8";
30− snapshotDate = "2016-03-18";
31− snapshotRev = "235d774";
32−
33− snapshotHash = if stdenv.system == "i686-linux"
34− then snapshotHashLinux686
35− else if stdenv.system == "x86_64-linux"
36− then snapshotHashLinux64
37− else if stdenv.system == "i686-darwin"
38− then snapshotHashDarwin686
39− else if stdenv.system == "x86_64-darwin"
40− then snapshotHashDarwin64
41− else abort "no snapshot for platform ${stdenv.system}";
42−
43− snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
44−in
45−
46−rec {
47− rustc = stdenv.mkDerivation {
48− name = "rustc-snapshot";
49− src = fetchurl {
50− url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
51− sha1 = snapshotHash;
52− };
53− dontStrip = true;
54− installPhase = ''
55− mkdir -p "$out"
56− cp -r bin "$out/bin"
57− '' + stdenv.lib.optionalString stdenv.isLinux ''
58− patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
59− --set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \
60− "$out/bin/rustc"
61− '';
62− };
63−
64− cargo = null;
65−}