about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-02-27 18:57:20 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-03-04 17:38:05 +0000
commit739381f0c1bef136ed822b15dfa7a6587d9da636 (patch)
treef30c57df78ddbfe50f30b714636014e2a5cab3f3 /pkgs
parentfc74ad444af06291f367a6d50dd70f010392cd33 (diff)
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/freetype/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index 7b5fff29a2864..adda15696e8a3 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"