commit
c8904b593d
@ -118,15 +118,13 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
configureFlags = configureFlags
|
configureFlags = configureFlags
|
||||||
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
|
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
|
||||||
|
# TODO always include starting from 1.3.0, superseeding patch and substituteInPlace below
|
||||||
|
++ stdenv.lib.optional (!isRelease) [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ]
|
||||||
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
|
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
|
||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/librustc_back/target/mod.rs \
|
|
||||||
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc" \
|
|
||||||
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
|
|
||||||
|
|
||||||
substituteInPlace src/rust-installer/gen-install-script.sh \
|
substituteInPlace src/rust-installer/gen-install-script.sh \
|
||||||
--replace /bin/echo "${coreutils}/bin/echo"
|
--replace /bin/echo "${coreutils}/bin/echo"
|
||||||
substituteInPlace src/rust-installer/gen-installer.sh \
|
substituteInPlace src/rust-installer/gen-installer.sh \
|
||||||
@ -135,7 +133,11 @@ stdenv.mkDerivation {
|
|||||||
# Workaround for NixOS/nixpkgs#8676
|
# Workaround for NixOS/nixpkgs#8676
|
||||||
substituteInPlace mk/rustllvm.mk \
|
substituteInPlace mk/rustllvm.mk \
|
||||||
--replace "\$\$(subst /,//," "\$\$(subst /,/,"
|
--replace "\$\$(subst /,//," "\$\$(subst /,/,"
|
||||||
'';
|
'' + stdenv.lib.optionalString (isRelease) ''
|
||||||
|
substituteInPlace src/librustc_back/target/mod.rs \
|
||||||
|
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc" \
|
||||||
|
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
|
||||||
|
''; # TODO remove in 1.3.0, superseeded by configure flags
|
||||||
|
|
||||||
buildInputs = [ which file perl curl python27 makeWrapper git ]
|
buildInputs = [ which file perl curl python27 makeWrapper git ]
|
||||||
++ stdenv.lib.optionals (!stdenv.isDarwin) [ procps valgrind ];
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ procps valgrind ];
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
|
# Please make sure to check if rustfmt still builds when updating nightly
|
||||||
|
|
||||||
{ stdenv, callPackage }:
|
{ stdenv, callPackage }:
|
||||||
callPackage ./generic.nix {
|
callPackage ./generic.nix {
|
||||||
shortVersion = "2015-08-09";
|
shortVersion = "2015-09-05";
|
||||||
isRelease = false;
|
isRelease = false;
|
||||||
# src rev for 2015-08-09's nightly channel
|
# src rev for 2015-09-05's nightly channel
|
||||||
srcRev = "a5d33d891";
|
srcRev = "779b2a9847319106647dcad12fc6dc472bc0cf4d";
|
||||||
srcSha = "1iivzk9ggjh7y89rbw275apw4rfmzh4jk50kf0milljhvf72660n";
|
srcSha = "0m22lxpcjnwa68bpxhfvp07k52gyds8ykif2pf5r2x22lw28vbg3";
|
||||||
snapshotHashLinux686 = "3459275cdf3896f678e225843fa56f0d9fdbabe8";
|
snapshotHashLinux686 = "e2553bf399cd134a08ef3511a0a6ab0d7a667216";
|
||||||
snapshotHashLinux64 = "e451e3bd6e5fcef71e41ae6f3da9fb1cf0e13a0c";
|
snapshotHashLinux64 = "7df8ba9dec63ec77b857066109d4b6250f3d222f";
|
||||||
snapshotHashDarwin686 = "428944a7984c0988e77909d82ca2ef77d96a1fbd";
|
snapshotHashDarwin686 = "29750870c82a0347f8b8b735a4e2e0da26f5098d";
|
||||||
snapshotHashDarwin64 = "b0515bb7d2892b9a58282fc865fee11a885406d6";
|
snapshotHashDarwin64 = "c9f2c588238b4c6998190c3abeb33fd6164099a2";
|
||||||
snapshotDate = "2015-07-26";
|
snapshotDate = "2015-08-11";
|
||||||
snapshotRev = "a5c12f4";
|
snapshotRev = "1af31d4";
|
||||||
patches = [
|
patches = stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||||
./patches/head.patch
|
|
||||||
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
|
||||||
index 39e4291..b352bd1 100644
|
|
||||||
--- a/src/librustc_back/target/mod.rs
|
|
||||||
+++ b/src/librustc_back/target/mod.rs
|
|
||||||
@@ -179,8 +179,8 @@ impl Default for TargetOptions {
|
|
||||||
fn default() -> TargetOptions {
|
|
||||||
TargetOptions {
|
|
||||||
data_layout: String::new(),
|
|
||||||
- linker: "cc".to_string(),
|
|
||||||
- ar: "ar".to_string(),
|
|
||||||
+ linker: "@ccPath@".to_string(), // ignore-tidy-linelength
|
|
||||||
+ ar: "@arPath@".to_string(), // ignore-tidy-linelength
|
|
||||||
pre_link_args: Vec::new(),
|
|
||||||
post_link_args: Vec::new(),
|
|
||||||
cpu: "generic".to_string(),
|
|
||||||
diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs
|
diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs
|
||||||
index 2772fc8..3d37b08 100644
|
index 2772fc8..3d37b08 100644
|
||||||
--- a/src/test/run-pass/issue-20797.rs
|
--- a/src/test/run-pass/issue-20797.rs
|
||||||
|
21
pkgs/development/tools/rust/rustfmt/default.nix
Normal file
21
pkgs/development/tools/rust/rustfmt/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{stdenv, fetchgit, rustUnstable, makeWrapper }:
|
||||||
|
|
||||||
|
with rustUnstable;
|
||||||
|
|
||||||
|
buildRustPackage rec {
|
||||||
|
name = "rustfmt-git-2015-09-05";
|
||||||
|
src = fetchgit {
|
||||||
|
url = https://github.com/nrc/rustfmt;
|
||||||
|
rev = "6c5d3500bb805b37865fe961a7054f8435d176fc";
|
||||||
|
sha256 = "0y506viir1klzvspi49qawrfd2g12p9ff2fyy1ndba6zixf69a90";
|
||||||
|
};
|
||||||
|
|
||||||
|
depsSha256 = "1kfc9l176qkimaag9p650sfpaz50p263rw2021gq5kjw8cyndlx8";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A tool for formatting Rust code according to style guidelines";
|
||||||
|
homepage = https://github.com/nrc/rustfmt;
|
||||||
|
license = with licenses; [ mit asl20 ];
|
||||||
|
maintainers = [ maintainers.globin ];
|
||||||
|
};
|
||||||
|
}
|
@ -4778,6 +4778,8 @@ let
|
|||||||
buildRustPackage = callPackage ../build-support/rust { };
|
buildRustPackage = callPackage ../build-support/rust { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rustfmt = callPackage ../development/tools/rust/rustfmt { };
|
||||||
|
|
||||||
sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};
|
sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};
|
||||||
sbcl = callPackage ../development/compilers/sbcl {
|
sbcl = callPackage ../development/compilers/sbcl {
|
||||||
clisp = clisp;
|
clisp = clisp;
|
||||||
|
@ -7,15 +7,15 @@
|
|||||||
{ runCommand, fetchFromGitHub, git }:
|
{ runCommand, fetchFromGitHub, git }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "2015-08-03";
|
version = "2015-08-21";
|
||||||
rev = "dd3e0cecc30d0efbb50dfe76c83900568502af45";
|
rev = "02e31a901d5f0942466ca7730431b547477126b1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
inherit rev;
|
inherit rev;
|
||||||
|
|
||||||
owner = "rust-lang";
|
owner = "rust-lang";
|
||||||
repo = "crates.io-index";
|
repo = "crates.io-index";
|
||||||
sha256 = "0wlbaspa0mvljhkjjnglxwpp9b4mzcxpkdzrciljxwdsr8jvlz30";
|
sha256 = "0jppl2grir4wxc3da24h18h21kvh1wj0iff1b0z9vvx0a1iqp4gm";
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user