about summary refs log tree commit diff
path: root/pkgs/build-support/rust
diff options
context:
space:
mode:
authorWinter <winter@winter.cafe>2023-02-06 23:55:27 -0500
committerWinter <winter@winter.cafe>2023-02-07 00:04:19 -0500
commite2b092fc52c7d28a15241ae78bf10b7b66b4f405 (patch)
tree4db3675957db51ef5076910a7fd118a077368090 /pkgs/build-support/rust
parentbf9771c95fcf8241b9f2a6d00ccb3afe6ddd078c (diff)
Revert "rustPlatform.bindgenHook: use the same clang/libclang as rustc"
This reverts commit 46ee37ca1d9cd3bb18633b4104ef21d9035aac89, as it breaks
anything that uses libcxx on Darwin, as well as cross-compilation to at
least armv6l.

As there's no clear solution at this time, reverting it is the best
option, as this only reduces build time closure size (something we can
arguably live with).

https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441
https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1420124250
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r--pkgs/build-support/rust/hooks/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix
index 13562acd54925..9989e582d2e9a 100644
--- a/pkgs/build-support/rust/hooks/default.nix
+++ b/pkgs/build-support/rust/hooks/default.nix
@@ -2,6 +2,7 @@
 , callPackage
 , cargo
 , cargo-nextest
+, clang
 , lib
 , makeSetupHook
 , maturin
@@ -126,8 +127,8 @@ in {
     bindgenHook = callPackage ({}: makeSetupHook {
       name = "rust-bindgen-hook";
       substitutions = {
-        libclang = rustc.llvmPackages.clang.cc.lib;
-        clang = rustc.llvmPackages.clang;
+        libclang = clang.cc.lib;
+        inherit clang;
       };
     }
     ./rust-bindgen-hook.sh) {};