From 32cd7e0587ba8be5d3f42d1f3adff0d5a3204132 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Tue, 31 Mar 2026 13:53:33 +1000 Subject: [PATCH] fix bad BINDGEN_EXTRA_CLANG_ARGS --- flake.nix | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/flake.nix b/flake.nix index 49560e3..c55f9e7 100644 --- a/flake.nix +++ b/flake.nix @@ -96,32 +96,6 @@ nixForBindings ]; - # bindgen uses clang to generate bindings, but it doesn't know where to - # find our stdenv cc's headers, so when it's gcc, we need to tell it. - postConfigure = lib.optionalString pkgs.stdenv.cc.isGNU '' - #!/usr/bin/env bash - # REF: https://github.com/nixops4/nix-bindings-rust/blob/main/bindgen-gcc.sh - # Rust bindgen uses Clang to generate bindings, but that means that it can't - # find the "system" or compiler headers when the stdenv compiler is GCC. - # This script tells it where to find them. - - echo "Extending BINDGEN_EXTRA_CLANG_ARGS with system include paths..." 2>&1 - BINDGEN_EXTRA_CLANG_ARGS="$${BINDGEN_EXTRA_CLANG_ARGS:-}" - export BINDGEN_EXTRA_CLANG_ARGS - include_paths=$( - echo | $NIX_CC_UNWRAPPED -v -E -x c - 2>&1 \ - | awk '/#include <...> search starts here:/{flag=1;next} \ - /End of search list./{flag=0} \ - flag==1 {print $1}' - ) - for path in $include_paths; do - echo " - $path" 2>&1 - BINDGEN_EXTRA_CLANG_ARGS="$BINDGEN_EXTRA_CLANG_ARGS -I$path" - done - ''; - - shellHook = postConfigure; - env = let inherit (llvmPackages) llvm libclang; in {