Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkgs/development/tools/rust/bindgen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
chmod +x $out/bin/bindgen
'';

doCheck = false; # half the tests fail because our rustfmt is not nightly enough
doCheck = true;
checkInputs =
let fakeRustup = writeScriptBin "rustup" ''
#!${stdenv.shell}
Expand All @@ -42,6 +42,10 @@ rustPlatform.buildRustPackage rec {
fakeRustup # the test suite insists in calling `rustup run nightly rustfmt`
clang
];
preCheck = ''
# for the ci folder, notably
patchShebangs .
'';

meta = with stdenv.lib; {
description = "C and C++ binding generator";
Expand Down
22 changes: 17 additions & 5 deletions pkgs/development/tools/rust/rustfmt/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
{ stdenv, fetchFromGitHub, rustPlatform, darwin }:

rustPlatform.buildRustPackage rec {
name = "rustfmt-${version}";
version = "0.9.0";
version = "0.99.5";

src = fetchFromGitHub {
owner = "rust-lang-nursery";
owner = "rust-lang";
repo = "rustfmt";
rev = "${version}";
sha256 = "12l3ff0s0pzhcf5jbs8wqawjk4jghhhz8j6dq1n5201yvny12jlr";
sha256 = "1gx1bsyb0f94r3f88f1j3b4rcm2x6zppcfab1c5vgpsr2dr6ch28";
};

cargoSha256 = "0gppki9mgx99xipapg36ydwk1bplygnz6sbyzbg46vhn10iggfwm";
cargoSha256 = "1rs6jjm75ixxhrf8b3zn991xa5kfayxlf0b70zdx6wd4r6by7w2y";

buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;


# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1;

# we run tests in debug mode so tests look for a debug build of
# rustfmt. Anyway this adds nearly no compilation time.
preCheck = ''
cargo build
'';

meta = with stdenv.lib; {
description = "A tool for formatting Rust code according to style guidelines";
Expand Down