From 08fa5394e3a7a9a06358bd3dbdfe918ce554c4b6 Mon Sep 17 00:00:00 2001 From: Sean Link Date: Tue, 5 Dec 2023 11:09:23 -0700 Subject: [PATCH 1/2] freetype: ran nixpkgs-fmt --- .../libraries/freetype/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 1687bf5c516b..c7da5daffd5f 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,14 +1,24 @@ -{ lib, stdenv, fetchurl -, buildPackages, pkgsHostHost -, pkg-config, which, makeWrapper -, zlib, bzip2, brotli, libpng, gnumake, glib +{ lib +, stdenv +, fetchurl +, buildPackages +, pkgsHostHost +, pkg-config +, which +, makeWrapper +, zlib +, bzip2 +, brotli +, libpng +, gnumake +, glib , # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering). # LCD filtering is also known as ClearType and covered by several Microsoft patents. # This option allows it to be disabled. See http://www.freetype.org/patents.html. useEncumberedCode ? true -# for passthru.tests + # for passthru.tests , cairo , fontforge , ghostscript From cea7115f2753c6f93dccb0517c4837b97779ece2 Mon Sep 17 00:00:00 2001 From: Sean Link Date: Thu, 7 Dec 2023 09:21:41 -0700 Subject: [PATCH 2/2] freetype: Add mingw32 hostPlatform build support --- pkgs/development/libraries/freetype/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index c7da5daffd5f..68e08a1a8b5f 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -75,9 +75,10 @@ stdenv.mkDerivation (finalAttrs: { postInstall = glib.flattenInclude # pkgsCross.mingwW64.pkg-config doesn't build # makeWrapper doesn't cross-compile to windows #120726 - + lib.optionalString (!stdenv.hostPlatform.isMinGW) '' + + '' substituteInPlace $dev/bin/freetype-config \ --replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config} + '' + lib.optionalString (!stdenv.hostPlatform.isMinGW) '' wrapProgram "$dev/bin/freetype-config" \ --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"