pkg-config-wrapper: Init

This fixes longstanding build issues
This commit is contained in:
John Ericson
2020-05-16 00:21:21 +00:00
parent 27edd9efb3
commit c71ab32a67
9 changed files with 208 additions and 12 deletions
@@ -0,0 +1,21 @@
#! @shell@
set -eu -o pipefail +o posix
shopt -s nullglob
if (( "${NIX_DEBUG:-0}" >= 7 )); then
set -x
fi
source @out@/nix-support/utils.bash
if [ -z "${NIX_PKG_CONFIG_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then
source @out@/nix-support/add-flags.sh
fi
if (( ${#role_suffixes[@]} > 0 )); then
# replace env var with nix-modified one
PKG_CONFIG_PATH=$PKG_CONFIG_PATH_@suffixSalt@ exec @prog@ "$@"
else
# pkg-config isn't a bonafied dependency so ignore setup hook entirely
exec @prog@ "$@"
fi