nixpkgs/pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh
Alyssa Ross 4760a907ea pkg-config: make comment clearer for non-natives
Suggested-by: Jörg Thalheim <joerg@thalheim.io>
2021-12-02 16:11:43 -08:00

24 lines
539 B
Bash

#! @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
set -- "$@" @addFlags@
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 real dependency so ignore setup hook entirely
exec @prog@ "$@"
fi