2021-08-08 15:12:06 +00:00
|
|
|
{ stdenv, lib, fetchFromGitea, pkg-config, meson, ninja, scdoc
|
2020-12-18 13:47:35 +00:00
|
|
|
, freetype, fontconfig, pixman, tllist, check
|
|
|
|
, withHarfBuzz ? true
|
|
|
|
, harfbuzz
|
|
|
|
}:
|
2020-07-06 03:07:05 +00:00
|
|
|
|
2021-08-08 15:12:06 +00:00
|
|
|
let
|
|
|
|
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
|
|
|
|
mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
|
|
|
|
in
|
|
|
|
|
2020-07-06 03:07:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcft";
|
2021-08-14 11:51:14 +00:00
|
|
|
version = "2.4.5";
|
2020-07-06 03:07:05 +00:00
|
|
|
|
2021-08-08 15:12:06 +00:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "dnkl";
|
|
|
|
repo = "fcft";
|
|
|
|
rev = version;
|
2021-08-14 11:51:14 +00:00
|
|
|
sha256 = "0z4bqap88pydkgcxrsvm3fmcyhi9x7z8knliarvdcvqlk7qnyzfh";
|
2020-07-06 03:07:05 +00:00
|
|
|
};
|
|
|
|
|
2021-07-07 21:12:54 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2020-08-14 23:31:43 +00:00
|
|
|
nativeBuildInputs = [ pkg-config meson ninja scdoc ];
|
2020-12-18 13:47:35 +00:00
|
|
|
buildInputs = [ freetype fontconfig pixman tllist ]
|
|
|
|
++ lib.optional withHarfBuzz harfbuzz;
|
2020-08-17 12:49:42 +00:00
|
|
|
checkInputs = [ check ];
|
|
|
|
|
2021-08-08 15:12:06 +00:00
|
|
|
mesonBuildType = "release";
|
2020-12-18 13:47:35 +00:00
|
|
|
mesonFlags = [
|
2021-08-08 15:12:06 +00:00
|
|
|
(mesonFeatureFlag "text-shaping" withHarfBuzz)
|
2020-12-18 13:47:35 +00:00
|
|
|
];
|
2020-08-17 12:49:42 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
2020-07-06 03:07:05 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://codeberg.org/dnkl/fcft";
|
2021-08-08 15:12:06 +00:00
|
|
|
changelog = "https://codeberg.org/dnkl/fcft/releases/tag/${version}";
|
2020-07-06 03:07:05 +00:00
|
|
|
description = "Simple library for font loading and glyph rasterization";
|
2021-04-14 15:02:45 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
fionera
|
|
|
|
sternenseemann
|
|
|
|
];
|
2020-07-06 03:07:05 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|