nixpkgs/pkgs/development/libraries/fcft/default.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitea, pkg-config, meson, ninja, scdoc
, freetype, fontconfig, pixman, tllist, check
, withHarfBuzz ? true
, harfbuzz
}:
2020-07-06 03:07:05 +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";
version = "2.4.5";
2020-07-06 03:07:05 +00:00
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "fcft";
rev = version;
sha256 = "0z4bqap88pydkgcxrsvm3fmcyhi9x7z8knliarvdcvqlk7qnyzfh";
2020-07-06 03:07:05 +00:00
};
2021-07-07 21:12:54 +00:00
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ pkg-config meson ninja scdoc ];
buildInputs = [ freetype fontconfig pixman tllist ]
++ lib.optional withHarfBuzz harfbuzz;
checkInputs = [ check ];
mesonBuildType = "release";
mesonFlags = [
(mesonFeatureFlag "text-shaping" withHarfBuzz)
];
doCheck = true;
2020-07-06 03:07:05 +00:00
meta = with lib; {
homepage = "https://codeberg.org/dnkl/fcft";
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;
};
}