git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #110383 from ck3d/fix-rust-bindgen

rust-bindgen: Resolve "/usr/bin/env bash" to fix usage in Nix build

commitd78f0383c2c2d7ccb4fd9e9771c57f33de04aee5 authorSandro <sandro.jaeckel@gmail.com> dateFri 22 Jan 2021, 02:16 (6 years ago) parent74a524223b0a88
2 files changed+8−4
pkgs/development/tools/rust/bindgen/default.nix+7−3 pkgs/development/tools/rust/bindgen/wrapper.sh+1−1
pkgs/development/tools/rust/bindgen/default.nix+7−3
@@ -1,5 +1,7 @@
1−{ lib, stdenv, fetchFromGitHub, rustPlatform, clang, llvmPackages, rustfmt, writeScriptBin,
2− runtimeShell }:
1+{ lib, stdenv, fetchFromGitHub, rustPlatform, clang, llvmPackages, rustfmt, writeScriptBin
2+, runtimeShell
3+, bash
4+}:
35
46rustPlatform.buildRustPackage rec {
57 pname = "rust-bindgen";
@@ -16,7 +18,9 @@ rustPlatform.buildRustPackage rec {
1618
1719 cargoSha256 = "1dv1ywdy701bnc2jv5jq0hnpal1snlizaj9w6k1wxyrp9szjd48w";
1820
19− libclang = llvmPackages.libclang.lib; #for substituteAll
21+ #for substituteAll
22+ libclang = llvmPackages.libclang.lib;
23+ inherit bash;
2024
2125 buildInputs = [ libclang ];
2226
pkgs/development/tools/rust/bindgen/wrapper.sh+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/env bash
1+#!@bash@/bin/bash
22sep='--' # whether to add -- before new options
33cxx=0 # whether cxx was explicitly requested
44lastWasx=0 # whether the last argument passed was -x