git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'rustfmt' of https://github.com/symphorien/nixpkgs
commitab33df13ac8ff0d923cf9869414682af17285186 authorEelco Dolstra <edolstra@gmail.com> dateThu 10 Jan 2019, 16:35 (8 years ago) parent4d68e821d63496
2 files changed+22−6
pkgs/development/tools/rust/bindgen/default.nix+5−1 pkgs/development/tools/rust/rustfmt/default.nix+17−5
pkgs/development/tools/rust/bindgen/default.nix+5−1
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
2929 chmod +x $out/bin/bindgen
3030 '';
3131
32− doCheck = false; # half the tests fail because our rustfmt is not nightly enough
32+ doCheck = true;
3333 checkInputs =
3434 let fakeRustup = writeScriptBin "rustup" ''
3535 #!${stdenv.shell}
@@ -42,6 +42,10 @@ rustPlatform.buildRustPackage rec {
4242 fakeRustup # the test suite insists in calling `rustup run nightly rustfmt`
4343 clang
4444 ];
45+ preCheck = ''
46+ # for the ci folder, notably
47+ patchShebangs .
48+ '';
4549
4650 meta = with stdenv.lib; {
4751 description = "C and C++ binding generator";
pkgs/development/tools/rust/rustfmt/default.nix+17−5
@@ -1,17 +1,29 @@
1−{ stdenv, fetchFromGitHub, rustPlatform }:
1+{ stdenv, fetchFromGitHub, rustPlatform, darwin }:
22
33rustPlatform.buildRustPackage rec {
44 name = "rustfmt-${version}";
5− version = "0.9.0";
5+ version = "0.99.5";
66
77 src = fetchFromGitHub {
8− owner = "rust-lang-nursery";
8+ owner = "rust-lang";
99 repo = "rustfmt";
1010 rev = "${version}";
11− sha256 = "12l3ff0s0pzhcf5jbs8wqawjk4jghhhz8j6dq1n5201yvny12jlr";
11+ sha256 = "1gx1bsyb0f94r3f88f1j3b4rcm2x6zppcfab1c5vgpsr2dr6ch28";
1212 };
1313
14− cargoSha256 = "0gppki9mgx99xipapg36ydwk1bplygnz6sbyzbg46vhn10iggfwm";
14+ cargoSha256 = "1rs6jjm75ixxhrf8b3zn991xa5kfayxlf0b70zdx6wd4r6by7w2y";
15+
16+ buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
17+
18+
19+ # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
20+ RUSTC_BOOTSTRAP = 1;
21+
22+ # we run tests in debug mode so tests look for a debug build of
23+ # rustfmt. Anyway this adds nearly no compilation time.
24+ preCheck = ''
25+ cargo build
26+ '';
1527
1628 meta = with stdenv.lib; {
1729 description = "A tool for formatting Rust code according to style guidelines";