From 5fc7992364b278e2aa93914a6adccffefcf2ed67 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 3 Aug 2021 12:22:13 +0000 Subject: [PATCH] rust-bindgen: use a better drv name for fakeRustup I saw a derivation called "rustup" building and was concerned why rust-bindgen would depend on rustup. If it had been called "fake-rustup", I wouldn't have had to check the package source to see what was going on. :) --- .../tools/rust/bindgen/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/rust/bindgen/default.nix b/pkgs/development/tools/rust/bindgen/default.nix index 267cc4fcfbab..cc3907ba7f29 100644 --- a/pkgs/development/tools/rust/bindgen/default.nix +++ b/pkgs/development/tools/rust/bindgen/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, rustPlatform, clang, llvmPackages_latest, rustfmt, writeScriptBin +{ lib, fetchFromGitHub, rustPlatform, clang, llvmPackages_latest, rustfmt, writeTextFile , runtimeShell , bash }: @@ -38,12 +38,17 @@ rustPlatform.buildRustPackage rec { doCheck = true; checkInputs = - let fakeRustup = writeScriptBin "rustup" '' - #!${runtimeShell} - shift - shift - exec "$@" - ''; + 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`