Merge branch 'rustfmt' of https://github.com/symphorien/nixpkgs
This commit is contained in:
commit
ab33df13ac
@ -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}
|
||||
@ -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";
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user