diff options
author | sternenseemann <sternenseemann@systemli.org> | 2021-11-13 13:51:56 +0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-11-15 22:39:45 +0100 |
commit | 7adb11cf580fc75faa864a640f1204e7fb874463 (patch) | |
tree | e3093f0d9c957b01720c5310aea62dd5ecfb17d3 /pkgs/development | |
parent | 2e19c4dacfc1b7fdcf6532ed1c820336cbb8c318 (diff) |
fcft: 2.4.5 -> 2.5.0
https://codeberg.org/dnkl/fcft/releases/tag/2.4.6 https://codeberg.org/dnkl/fcft/releases/tag/2.5.0 Replace withHarfBuzz with withShapingTypes which allows us to more accurately represent the current feature flag situation upstream. Additionally test all non-default configurations via passthru.tests. Settings for shapingType: * `[ "grapheme" ]`: depend on HarfBuzz, like withHarfBuzz before * `[ "grapheme" "run" ]`: depend on HarfBuzz and utf8proc. This is the same as `[ "run" ]` at the moment which may change in the future. * `[]`: No text shaping support, no additional dependencies
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/fcft/default.nix | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index 8f2d56fad285f..2101ee6dd42be 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -1,39 +1,54 @@ { stdenv, lib, fetchFromGitea, pkg-config, meson, ninja, scdoc , freetype, fontconfig, pixman, tllist, check -, withHarfBuzz ? true -, harfbuzz +# Text shaping methods to enable, empty list disables all text shaping. +# See `availableShapingTypes` or upstream meson_options.txt for available types. +, withShapingTypes ? [ "grapheme" "run" ] +, harfbuzz, utf8proc +, fcft # for passthru.tests }: let + # Needs to be reflect upstream meson_options.txt + availableShapingTypes = [ + "grapheme" + "run" + ]; + # Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54 mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}"; in stdenv.mkDerivation rec { pname = "fcft"; - version = "2.4.5"; + version = "2.5.0"; src = fetchFromGitea { domain = "codeberg.org"; owner = "dnkl"; repo = "fcft"; rev = version; - sha256 = "0z4bqap88pydkgcxrsvm3fmcyhi9x7z8knliarvdcvqlk7qnyzfh"; + sha256 = "0agqldh68hn898d3f6k99kjbz8had5j5k0jyvi71d4k9vhx8cy7c"; }; depsBuildBuild = [ pkg-config ]; nativeBuildInputs = [ pkg-config meson ninja scdoc ]; buildInputs = [ freetype fontconfig pixman tllist ] - ++ lib.optional withHarfBuzz harfbuzz; + ++ lib.optionals (withShapingTypes != []) [ harfbuzz ] + ++ lib.optionals (builtins.elem "run" withShapingTypes) [ utf8proc ]; checkInputs = [ check ]; mesonBuildType = "release"; - mesonFlags = [ - (mesonFeatureFlag "text-shaping" withHarfBuzz) - ]; + mesonFlags = builtins.map (t: + mesonFeatureFlag "${t}-shaping" (lib.elem t withShapingTypes) + ) availableShapingTypes; doCheck = true; + passthru.tests = { + noShaping = fcft.override { withShapingTypes = []; }; + onlyGraphemeShaping = fcft.override { withShapingTypes = [ "grapheme" ]; }; + }; + meta = with lib; { homepage = "https://codeberg.org/dnkl/fcft"; changelog = "https://codeberg.org/dnkl/fcft/releases/tag/${version}"; |