eb-garamond: build from source

This commit is contained in:
Benjamin Sparks
2025-01-21 11:29:11 +01:00
parent abe4f2b275
commit a057246e1b
+18
View File
@@ -2,6 +2,8 @@
lib,
stdenvNoCC,
fetchFromGitHub,
python3,
ttfautohint,
}:
stdenvNoCC.mkDerivation rec {
pname = "eb-garamond";
@@ -14,6 +16,22 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-ajieKhTeH6yv2qiE2xqnHFoMS65//4ZKiccAlC2PXGQ=";
};
nativeBuildInputs = [
(python3.withPackages (p: [ p.fontforge ]))
ttfautohint
];
postPatch = ''
substituteInPlace Makefile \
--replace-fail "@\$(SFNTTOOL) -w \$< \$@" "@fontforge -lang=ff -c 'Open(\$\$1); Generate(\$\$2)' \$< \$@"
'';
buildPhase = ''
runHook preBuild
make WEB=build EOT="" all
runHook postBuild
'';
installPhase = ''
runHook preInstall