From e2b092fc52c7d28a15241ae78bf10b7b66b4f405 Mon Sep 17 00:00:00 2001 From: Winter Date: Mon, 6 Feb 2023 23:55:27 -0500 Subject: [PATCH] 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 --- pkgs/build-support/rust/hooks/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index 13562acd5492..9989e582d2e9 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) {};