freetype: makeWrapper doesn't cross compile to windows

Issue #120726
This commit is contained in:
Artturin
2023-07-27 06:50:46 +03:00
parent c516ad1ee1
commit 93f79d3d95
@@ -38,7 +38,8 @@ stdenv.mkDerivation (finalAttrs: {
propagatedBuildInputs = [ zlib bzip2 brotli libpng ]; # needed when linking against freetype
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkg-config which makeWrapper ]
nativeBuildInputs = [ pkg-config which ]
++ lib.optional (!stdenv.hostPlatform.isWindows) makeWrapper
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ lib.optional (!stdenv.isLinux) gnumake;
@@ -63,6 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = glib.flattenInclude + ''
substituteInPlace $dev/bin/freetype-config \
--replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config}
'' + lib.optionalString (!stdenv.hostPlatform.isWindows) ''
wrapProgram "$dev/bin/freetype-config" \
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"