mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
272bb3dfa6
The go toolchain calls pkg-config using "--" to separate flags and packages. For example: pkg-config --cflags -- zlib This breaks if addFlags are appended. This commit therefore prepends the addFlags to the command.
24 lines
539 B
Bash
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
|