diff --git a/pkgs/development/tools/rust/bindgen/unwrapped.nix b/pkgs/development/tools/rust/bindgen/unwrapped.nix index 65ce8e20bc0e..5e52c851eab4 100644 --- a/pkgs/development/tools/rust/bindgen/unwrapped.nix +++ b/pkgs/development/tools/rust/bindgen/unwrapped.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, rustPlatform, clang, rustfmt, writeTextFile +{ lib, fetchFromGitHub, rustPlatform, clang, rustfmt-nightly , runtimeShell , bash }: @@ -25,23 +25,11 @@ rustPlatform.buildRustPackage rec { ''; doCheck = true; - checkInputs = - let fakeRustup = writeTextFile { - name = "fake-rustup"; - executable = true; - destination = "/bin/rustup"; - text = '' - #!${runtimeShell} - shift - shift - exec "$@" - ''; - }; - in [ - rustfmt - fakeRustup # the test suite insists in calling `rustup run nightly rustfmt` - clang - ]; + checkInputs = [ clang ]; + + # bindgen hardcodes rustfmt outputs that use nightly features + RUSTFMT = "${rustfmt-nightly}/bin/rustfmt"; + preCheck = '' # for the ci folder, notably patchShebangs .