From c93660a7a434246da36ed4913f235092f2f25a7c Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 25 Apr 2018 20:30:22 +0200 Subject: [PATCH] harfbuzz: add CoreText support --- pkgs/development/libraries/harfbuzz/default.nix | 13 ++++++++++--- pkgs/top-level/all-packages.nix | 6 ++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index f75d08022c6..ff60afc1f2b 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,5 +1,7 @@ { stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintl , 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 , python @@ -27,12 +29,17 @@ stdenv.mkDerivation { outputBin = "dev"; configureFlags = [ - ( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default - ( "--with-icu=" + (if withIcu then "yes" else "no") ) + # not auto-detected by default + "--with-coretext=${if withCoreText then "yes" else "no"}" + "--with-graphite2=${if withGraphite2 then "yes" else "no"}" + "--with-icu=${if withIcu then "yes" else "no"}" ]; nativeBuildInputs = [ pkgconfig libintl ]; - buildInputs = [ glib freetype cairo ]; # recommended by upstream + + buildInputs = [ glib freetype cairo ] # recommended by upstream + ++ stdenv.lib.optionals withCoreText [ ApplicationServices CoreText ]; + propagatedBuildInputs = [] ++ optional withGraphite2 graphite2 ++ optionals withIcu [ icu harfbuzz ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 302ff26ed40..a859fd56fa4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9767,10 +9767,12 @@ with pkgs; }; libheimdal = heimdal.override { type = "lib"; }; - harfbuzz = callPackage ../development/libraries/harfbuzz { }; + harfbuzz = callPackage ../development/libraries/harfbuzz { + inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreText; + }; harfbuzz-icu = harfbuzz.override { - withIcu = true; withGraphite2 = true; + withIcu = true; }; harfbuzz-icu-58 = harfbuzz-icu.override { icu = icu58;