From ceabfcfc35f7a0be6bef3c41dbd4affa5147b31c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 12 Jun 2021 12:44:12 +0200 Subject: [PATCH 1/3] harfbuzz: Remove cairo dependency Upstream recommends cairo, but it is only used for development purposes and is not part of the library. This removes transitive (build) dependencies on various X11 or other GUI-related libraries, which is desirable for minimizing rebuilds and maximizing parallellism. This also adds fontconfig to buildInputs, because this direct lib dependency was previously found via cairo's propagatedBuildInputs. --- pkgs/development/libraries/harfbuzz/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 7376611e1db9..d4c69ac5d574 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -4,7 +4,7 @@ , pkg-config , glib , freetype -, cairo +, fontconfig , libintl , meson , ninja @@ -57,6 +57,11 @@ stdenv.mkDerivation { (mesonFeatureFlag "graphite" withGraphite2) (mesonFeatureFlag "icu" withIcu) (mesonFeatureFlag "coretext" withCoreText) + # upstream recommends cairo, but it is only used for development purposes + # and is not part of the library. + # Cairo causes transitive (build) dependencies on various X11 or other + # GUI-related libraries, so it shouldn't be re-added lightly. + (mesonFeatureFlag "cairo" false) (mesonFeatureFlag "introspection" isNativeCompilation) ]; @@ -72,7 +77,7 @@ stdenv.mkDerivation { docbook_xml_dtd_43 ]; - buildInputs = [ glib freetype cairo ] # recommended by upstream + buildInputs = [ glib freetype fontconfig ] ++ lib.optionals withCoreText [ ApplicationServices CoreText ] ++ lib.optionals isNativeCompilation [ gobject-introspection ]; From c2806a6f94bd97d9d58d05651a49f4eb99e20ba8 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 12 Jun 2021 22:18:35 +0200 Subject: [PATCH 2/3] harfbuzz: 2.8.0 -> 2.8.1 This update removed a redundant fontconfig check from the configure script. --- pkgs/development/libraries/harfbuzz/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index d4c69ac5d574..9095e4872382 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -24,7 +24,7 @@ }: let - version = "2.8.0"; + version = "2.8.1"; inherit (lib) optional optionals optionalString; mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}"; @@ -38,7 +38,7 @@ stdenv.mkDerivation { owner = "harfbuzz"; repo = "harfbuzz"; rev = version; - sha256 = "sha256-JnvOFGK2HWIpzuwgZtyt0IfKfnoXD1LMeVb3RzMmyY4="; + sha256 = "107l9jhvwy6pnq5032kr7r21md65qg09j7iikr4jihf9pvh7gn5w"; }; postPatch = '' @@ -63,6 +63,8 @@ stdenv.mkDerivation { # GUI-related libraries, so it shouldn't be re-added lightly. (mesonFeatureFlag "cairo" false) (mesonFeatureFlag "introspection" isNativeCompilation) + # chafa is only used in a development utility, not in the library + (mesonFeatureFlag "chafa" false) ]; nativeBuildInputs = [ @@ -77,7 +79,7 @@ stdenv.mkDerivation { docbook_xml_dtd_43 ]; - buildInputs = [ glib freetype fontconfig ] + buildInputs = [ glib freetype ] ++ lib.optionals withCoreText [ ApplicationServices CoreText ] ++ lib.optionals isNativeCompilation [ gobject-introspection ]; From b60636c8c07865dfccb032b7e0ccf0f32dd25864 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 12 Jun 2021 22:20:51 +0200 Subject: [PATCH 3/3] harfbuzz: Sort mesonFlags --- pkgs/development/libraries/harfbuzz/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 9095e4872382..db142286fe4e 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -54,17 +54,17 @@ stdenv.mkDerivation { outputBin = "dev"; mesonFlags = [ - (mesonFeatureFlag "graphite" withGraphite2) - (mesonFeatureFlag "icu" withIcu) - (mesonFeatureFlag "coretext" withCoreText) # upstream recommends cairo, but it is only used for development purposes # and is not part of the library. # Cairo causes transitive (build) dependencies on various X11 or other # GUI-related libraries, so it shouldn't be re-added lightly. (mesonFeatureFlag "cairo" false) - (mesonFeatureFlag "introspection" isNativeCompilation) # chafa is only used in a development utility, not in the library (mesonFeatureFlag "chafa" false) + (mesonFeatureFlag "coretext" withCoreText) + (mesonFeatureFlag "graphite" withGraphite2) + (mesonFeatureFlag "icu" withIcu) + (mesonFeatureFlag "introspection" isNativeCompilation) ]; nativeBuildInputs = [