1 # populates LIBCLANG_PATH and BINDGEN_EXTRA_CLANG_ARGS for rust projects that
2 # depend on the bindgen crate
4 # if you modify this, you probably also need to modify the wrapper for the cli
5 # of bindgen in pkgs/development/tools/rust/bindgen/wrapper.sh
7 populateBindgenEnv
() {
8 export LIBCLANG_PATH
=@libclang@
/lib
9 BINDGEN_EXTRA_CLANG_ARGS
="$(< @clang@/nix-support/cc-cflags) $(< @clang@/nix-support/libc-cflags) $(< @clang@/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
10 export BINDGEN_EXTRA_CLANG_ARGS
13 postHook
="${postHook:-}"$
'\n'"populateBindgenEnv"$
'\n'