about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/bindgen/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/bindgen/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/bindgen/default.nix19
1 files changed, 12 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/bindgen/default.nix b/nixpkgs/pkgs/development/tools/rust/bindgen/default.nix
index 267cc4fcfbab..cc3907ba7f29 100644
--- a/nixpkgs/pkgs/development/tools/rust/bindgen/default.nix
+++ b/nixpkgs/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`