Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.7 KiB
Nix
66 lines
1.7 KiB
Nix
{
|
||
stdenv,
|
||
lib,
|
||
fetchurl,
|
||
pkg-config,
|
||
autoreconfHook,
|
||
perl,
|
||
freetype,
|
||
harfbuzz,
|
||
libsForQt5,
|
||
enableGUI ? true,
|
||
}:
|
||
|
||
stdenv.mkDerivation (finalAttrs: {
|
||
version = "1.8.4";
|
||
pname = "ttfautohint";
|
||
|
||
src = fetchurl {
|
||
url = "mirror://savannah/freetype/ttfautohint-${finalAttrs.version}.tar.gz";
|
||
hash = "sha256-iodhF/puv9L/4bNoKpqYyALA9HGJ9X09tLmXdCBoMuE=";
|
||
};
|
||
|
||
postPatch =
|
||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||
echo "${finalAttrs.version}" > VERSION
|
||
''
|
||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||
substituteInPlace configure --replace-fail "macx-g++" "macx-clang"
|
||
'';
|
||
|
||
nativeBuildInputs = [
|
||
pkg-config
|
||
perl
|
||
]
|
||
++ lib.optionals stdenv.hostPlatform.isLinux [ autoreconfHook ]
|
||
++ lib.optionals enableGUI [ libsForQt5.qt5.wrapQtAppsHook ];
|
||
|
||
buildInputs = [
|
||
freetype
|
||
harfbuzz
|
||
]
|
||
++ lib.optionals enableGUI [ libsForQt5.qt5.qtbase ];
|
||
|
||
configureFlags = [
|
||
''--with-qt=${if enableGUI then "${libsForQt5.qt5.qtbase}/lib" else "no"}''
|
||
]
|
||
++ lib.optionals (!enableGUI) [ "--without-doc" ];
|
||
|
||
enableParallelBuilding = true;
|
||
|
||
meta = {
|
||
description = "Automatic hinter for TrueType fonts";
|
||
mainProgram = "ttfautohint";
|
||
longDescription = ''
|
||
A library and two programs which take a TrueType font as the
|
||
input, remove its bytecode instructions (if any), and return a
|
||
new font where all glyphs are bytecode hinted using the
|
||
information given by FreeType’s auto-hinting module.
|
||
'';
|
||
homepage = "https://www.freetype.org/ttfautohint";
|
||
license = lib.licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
|
||
maintainers = [ ];
|
||
platforms = lib.platforms.unix;
|
||
};
|
||
})
|