From 272bb3dfa6bfdc07d0e2ca813bc6963a65206044 Mon Sep 17 00:00:00 2001 From: Alok Parlikar Date: Thu, 22 Dec 2022 11:29:24 +0000 Subject: [PATCH] pkg-config: prepend added flags 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. --- pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh b/pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh index 1aa14cfeb7cc..1d43c8e162ab 100644 --- a/pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh +++ b/pkgs/build-support/pkg-config-wrapper/pkg-config-wrapper.sh @@ -12,7 +12,7 @@ if [ -z "${NIX_PKG_CONFIG_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then source @out@/nix-support/add-flags.sh fi -set -- "$@" @addFlags@ +set -- @addFlags@ "$@" if (( ${#role_suffixes[@]} > 0 )); then # replace env var with nix-modified one