about summary refs log tree commit diff
path: root/pkgs/development/libraries/harfbuzz
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-06-12 12:44:12 +0200
committerRobert Hensing <robert@roberthensing.nl>2021-06-12 21:29:08 +0200
commitceabfcfc35f7a0be6bef3c41dbd4affa5147b31c (patch)
treee861ced96c2574610114af48f133643fc1a62495 /pkgs/development/libraries/harfbuzz
parent3e6f510ca2b80a3c1563e5a80225bb81efde8ed5 (diff)
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.
Diffstat (limited to 'pkgs/development/libraries/harfbuzz')
-rw-r--r--pkgs/development/libraries/harfbuzz/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix
index 7376611e1db91..d4c69ac5d574a 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 ];