Skip to content

Commit f67061c

Browse files
committedNov 29, 2016
(rustc-nightly) init at 2016-11-26 - precompiled rustc nightly binary
1 parent a344b55 commit f67061c

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
 

Diff for: ‎pkgs/development/compilers/rust/nightlyBin.nix

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{ stdenv, fetchurl, makeWrapper, cacert, zlib }:
2+
3+
let
4+
inherit (stdenv.lib) optionalString;
5+
6+
platform = if stdenv.system == "x86_64-linux"
7+
then "x86_64-unknown-linux-gnu"
8+
else abort "missing boostrap url for platform ${stdenv.system}";
9+
10+
bootstrapHash =
11+
if stdenv.system == "x86_64-linux"
12+
then "1hsvf1vj18fqxkqw8jhnwahhk2q5xcl5396czr034fphmp5n4haw"
13+
else throw "missing boostrap hash for platform ${stdenv.system}";
14+
15+
needsPatchelf = stdenv.isLinux;
16+
17+
src = fetchurl {
18+
url = "https://static.rust-lang.org/dist/${version}/rustc-nightly-${platform}.tar.gz";
19+
sha256 = bootstrapHash;
20+
};
21+
22+
version = "2016-11-26";
23+
in
24+
25+
rec {
26+
rustc = stdenv.mkDerivation rec {
27+
name = "rustc-nightly-${version}";
28+
29+
inherit version;
30+
inherit src;
31+
32+
meta = with stdenv.lib; {
33+
homepage = http://www.rust-lang.org/;
34+
description = "A safe, concurrent, practical language";
35+
maintainers = with maintainers; [ qknight ];
36+
license = [ licenses.mit licenses.asl20 ];
37+
};
38+
39+
buildInputs = [ makeWrapper ];
40+
phases = ["unpackPhase" "installPhase"];
41+
42+
installPhase = ''
43+
./install.sh --prefix=$out \
44+
--components=rustc
45+
46+
${optionalString needsPatchelf ''
47+
patchelf \
48+
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
49+
"$out/bin/rustc"
50+
''}
51+
52+
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
Has conversations. Original line has conversations.
53+
# (or similar) here. It causes strange effects where rustc loads
54+
# the wrong libraries in a bootstrap-build causing failures that
55+
# are very hard to track dow. For details, see
56+
# https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
57+
'';
58+
};
59+
}

Diff for: ‎pkgs/top-level/all-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -5215,6 +5215,8 @@ in
52155215
};
52165216

52175217
rust = rustStable;
5218+
rustcNightlyBin = lowPrio(callPackage ../development/compilers/rust/nightlyBin.nix {});
5219+
rustcNightlyBin-2016-11-26 = rustcNightlyBin;
Has conversations. Original line has conversations.
52185220
rustStable = callPackage ../development/compilers/rust {};
52195221
rustBeta = callPackage ../development/compilers/rust/beta.nix {};
52205222
rustUnstable = callPackage ../development/compilers/rust/head.nix {

0 commit comments

Comments
 (0)
Please sign in to comment.