From 7bd3a3bd55dbb1792aa3ad5b773b73f2826c450f Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Fri, 23 Nov 2018 17:45:33 +0100 Subject: [PATCH] rustfmt: 0.9.0 -> 0.99.5 rustfmt 1.0 has been released, but requires a more recent rustc. --- pkgs/development/tools/rust/rustfmt/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/rustfmt/default.nix b/pkgs/development/tools/rust/rustfmt/default.nix index b8585dace54..3fddba5d08e 100644 --- a/pkgs/development/tools/rust/rustfmt/default.nix +++ b/pkgs/development/tools/rust/rustfmt/default.nix @@ -2,16 +2,25 @@ 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"; + + # 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";