about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/harfbuzz
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
commit16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch)
tree0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/development/libraries/harfbuzz
parente7caacc4c122b7641bb66a4c2595289347a4996c (diff)
parent3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff)
downloadnixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/harfbuzz')
-rw-r--r--nixpkgs/pkgs/development/libraries/harfbuzz/default.nix52
1 files changed, 37 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix b/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix
index d2287526278b..db142286fe4e 100644
--- a/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix
+++ b/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix
@@ -1,30 +1,44 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, glib, freetype, cairo, libintl
-, meson, ninja
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, glib
+, freetype
+, fontconfig
+, libintl
+, meson
+, ninja
 , gobject-introspection
-, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
-, ApplicationServices, CoreText
+, icu
+, graphite2
+, harfbuzz # The icu variant uses and propagates the non-icu one.
+, ApplicationServices
+, CoreText
 , withCoreText ? false
 , withIcu ? false # recommended by upstream as default, but most don't needed and it's big
 , withGraphite2 ? true # it is small and major distros do include it
 , python3
-, gtk-doc, docbook-xsl-nons, docbook_xml_dtd_43
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
 }:
 
 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"}";
+  isNativeCompilation = stdenv.buildPlatform == stdenv.hostPlatform;
 in
 
 stdenv.mkDerivation {
   name = "harfbuzz${optionalString withIcu "-icu"}-${version}";
 
   src = fetchFromGitHub {
-    owner  = "harfbuzz";
-    repo   = "harfbuzz";
-    rev    = version;
-    sha256 = "sha256-JnvOFGK2HWIpzuwgZtyt0IfKfnoXD1LMeVb3RzMmyY4=";
+    owner = "harfbuzz";
+    repo = "harfbuzz";
+    rev = version;
+    sha256 = "107l9jhvwy6pnq5032kr7r21md65qg09j7iikr4jihf9pvh7gn5w";
   };
 
   postPatch = ''
@@ -40,9 +54,17 @@ stdenv.mkDerivation {
   outputBin = "dev";
 
   mesonFlags = [
+    # 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)
+    # 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 "coretext" withCoreText)
+    (mesonFeatureFlag "introspection" isNativeCompilation)
   ];
 
   nativeBuildInputs = [
@@ -57,11 +79,11 @@ stdenv.mkDerivation {
     docbook_xml_dtd_43
   ];
 
-  buildInputs = [ glib freetype cairo ] # recommended by upstream
-    ++ lib.optionals withCoreText [ ApplicationServices CoreText ];
+  buildInputs = [ glib freetype ]
+    ++ lib.optionals withCoreText [ ApplicationServices CoreText ]
+    ++ lib.optionals isNativeCompilation [ gobject-introspection ];
 
-  propagatedBuildInputs = []
-    ++ optional withGraphite2 graphite2
+  propagatedBuildInputs = optional withGraphite2 graphite2
     ++ optionals withIcu [ icu harfbuzz ];
 
   doCheck = true;