Skip to content

Commit

Permalink
freetype: patch pkg-config in -config better
Browse files Browse the repository at this point in the history
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 NixOS#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.
  • Loading branch information
Ericson2314 committed Mar 4, 2021
1 parent fc74ad4 commit 739381f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/libraries/freetype/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl
, buildPackages
, buildPackages, pkgsHostHost
, pkg-config, which, makeWrapper
, zlib, bzip2, libpng, gnumake, glib

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 739381f

Please sign in to comment.