diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix index 612cdcc7f88..ef6943001b9 100644 --- a/pkgs/applications/editors/mg/default.nix +++ b/pkgs/applications/editors/mg/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/pkg-config" ]; + makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/${buildPackages.pkgconfig.targetPrefix}pkg-config" ]; installPhase = '' install -m 555 -Dt $out/bin mg diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index f2542301119..cbc72f91dcc 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation { moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params for file in "$dev"/bin/*-config; do substituteInPlace "$file" --replace pkg-config \ - "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'" + "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config'" done '' + lib.optionalString (ghostscript != null) '' for la in $out/lib/*.la; do diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 0ded57b1a72..583a845c3c7 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -85,9 +85,9 @@ stdenv.mkDerivation { moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params for file in "$dev"/bin/*-config; do substituteInPlace "$file" --replace "${pkgconfig}/bin/pkg-config -config" \ - ${pkgconfig}/bin/pkg-config + ${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config substituteInPlace "$file" --replace ${pkgconfig}/bin/pkg-config \ - "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'" + "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config'" done '' + lib.optionalString (ghostscript != null) '' for la in $out/lib/*.la; do diff --git a/pkgs/applications/misc/stupidterm/default.nix b/pkgs/applications/misc/stupidterm/default.nix index 0a6e947f15c..2016059d81e 100644 --- a/pkgs/applications/misc/stupidterm/default.nix +++ b/pkgs/applications/misc/stupidterm/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp"; }; - makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/pkg-config" "binary=stupidterm" ]; + makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" "binary=stupidterm" ]; installPhase = '' install -D stupidterm $out/bin/stupidterm diff --git a/pkgs/build-support/dotnetbuildhelpers/default.nix b/pkgs/build-support/dotnetbuildhelpers/default.nix index 0edfd0b467a..809619ed55d 100644 --- a/pkgs/build-support/dotnetbuildhelpers/default.nix +++ b/pkgs/build-support/dotnetbuildhelpers/default.nix @@ -12,7 +12,7 @@ cp -v "$script" "$target"/"$scriptName" chmod 755 "$target"/"$scriptName" patchShebangs "$target"/"$scriptName" - substituteInPlace "$target"/"$scriptName" --replace pkg-config ${pkgconfig}/bin/pkg-config + substituteInPlace "$target"/"$scriptName" --replace pkg-config ${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config substituteInPlace "$target"/"$scriptName" --replace monodis ${mono}/bin/monodis done '' diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index f56447668ea..881166ef9b9 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -163,7 +163,6 @@ stdenv.mkDerivation rec { ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" - "--pkg-config=pkg-config" # Override ffmpeg's ./configure assumption that pkg-config is prefixed by the architecture. (e.g. aarch64-unknown-linux-gnu-pkg-config) ] ++ optional stdenv.cc.isClang "--cc=clang"); depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/development/libraries/gtkd/default.nix b/pkgs/development/libraries/gtkd/default.nix index a03dc51f00c..5cef820db14 100644 --- a/pkgs/development/libraries/gtkd/default.nix +++ b/pkgs/development/libraries/gtkd/default.nix @@ -117,7 +117,7 @@ in stdenv.mkDerivation rec { makeFlags = [ "prefix=${placeholder "out"}" - "PKG_CONFIG=${pkgconfig}/bin/pkg-config" + "PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" ]; # The .pc files does not declare an `includedir=`, so the multiple diff --git a/pkgs/development/python-modules/pkgconfig/default.nix b/pkgs/development/python-modules/pkgconfig/default.nix index c338f6d47e5..ff9e3cc39aa 100644 --- a/pkgs/development/python-modules/pkgconfig/default.nix +++ b/pkgs/development/python-modules/pkgconfig/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { patches = [ ./executable.patch ]; postPatch = '' - substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/pkg-config"' + substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"' ''; meta = with lib; { diff --git a/pkgs/development/python-modules/zstd/default.nix b/pkgs/development/python-modules/zstd/default.nix index 75856a88b7e..c96e08ccb51 100644 --- a/pkgs/development/python-modules/zstd/default.nix +++ b/pkgs/development/python-modules/zstd/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "/usr/bin/pkg-config" "${pkgconfig}/bin/pkg-config" + --replace "/usr/bin/pkg-config" "${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" ''; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/os-specific/linux/batman-adv/alfred.nix b/pkgs/os-specific/linux/batman-adv/alfred.nix index c1fb3ef5ee1..04217b8989b 100644 --- a/pkgs/os-specific/linux/batman-adv/alfred.nix +++ b/pkgs/os-specific/linux/batman-adv/alfred.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ gpsd libcap libnl ]; preBuild = '' - makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config" + makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" ''; meta = { diff --git a/pkgs/os-specific/linux/batman-adv/batctl.nix b/pkgs/os-specific/linux/batman-adv/batctl.nix index 5767c4aa72c..3b1cf183e08 100644 --- a/pkgs/os-specific/linux/batman-adv/batctl.nix +++ b/pkgs/os-specific/linux/batman-adv/batctl.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ libnl ]; preBuild = '' - makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/pkg-config" + makeFlags="PREFIX=$out PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" ''; meta = { diff --git a/pkgs/tools/networking/openconnect_pa/default.nix b/pkgs/tools/networking/openconnect_pa/default.nix index 2c452847aa3..4b108dc303e 100644 --- a/pkgs/tools/networking/openconnect_pa/default.nix +++ b/pkgs/tools/networking/openconnect_pa/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { }; preConfigure = '' - export PKG_CONFIG=${pkgconfig}/bin/pkg-config + export PKG_CONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2" export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2" '';