From 739381f0c1bef136ed822b15dfa7a6587d9da636 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 27 Feb 2021 18:57:20 +0000 Subject: [PATCH] freetype: patch pkg-config in -config better When we have build == host != target, we don't want to patch in a prefixed pkg-config used for cross compiling. Using `pkgsHostHost` expressses the intent. Then again, per https://github.com/NixOS/nixpkgs/issues/51176 leaving `buildPackages.pkg-config` is arguably also correct, if we do further cross compilation and want to run `freetype-config`. Really, there is no good solution. --- pkgs/development/libraries/freetype/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 7b5fff29a28..adda15696e8 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl -, buildPackages +, buildPackages, pkgsHostHost , pkg-config, which, makeWrapper , zlib, bzip2, libpng, gnumake, glib @@ -64,7 +64,7 @@ in stdenv.mkDerivation rec { postInstall = glib.flattenInclude + '' substituteInPlace $dev/bin/freetype-config \ - --replace ${buildPackages.pkg-config} ${pkg-config} + --replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config} wrapProgram "$dev/bin/freetype-config" \ --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"