Commit Graph

2 Commits

Author SHA1 Message Date
Christian Kögler
23b0a88572 rust-bindgen: Resolve "/usr/bin/env bash" to fix usage in Nix build 2021-01-21 20:16:58 +01:00
Symphorien Gibol
4c4fc2299c rust-bindgen: wrap to add required library compilation flags
The easy part is to add NIX_CFLAGS_COMPILE for "regular" libraries.
A bit more tricky is to add the required flags for libclang to find
libstdcxx. For this we parse arguments to bindgen to look for
-x c++ or -xc++ and if found add NIX_CXXSTDLIB_COMPILE to the arguments.
This variable is populated by a complex dance of setupHooks. We trigger
this by adding clang to propagatedBuildInputs. A more subtle way may
exist.
2018-08-28 18:26:42 +02:00