nom fonts: use installFonts hook (#495716)

This commit is contained in:
Yohann Boniface
2026-03-03 22:38:25 +00:00
committed by GitHub
2 changed files with 5 additions and 18 deletions
+2 -8
View File
@@ -2,6 +2,7 @@
lib,
stdenvNoCC,
fetchzip,
installFonts,
}:
stdenvNoCC.mkDerivation rec {
@@ -14,14 +15,7 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-Oh8V72tYvVA6Sk0f9UTIkRQYjdUbEB/fmCSaRYfyoP8=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
mv *.ttf -t $out/share/fonts/truetype
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
description = "UNICODE Han Nom Font Set";
+3 -10
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
python3Packages,
nix-update-script,
installFonts,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
@@ -18,6 +19,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
};
nativeBuildInputs = [
installFonts
python3Packages.afdko
python3Packages.fonttools
];
@@ -34,22 +36,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm444 NomNaTong-Regular.otf -t $out/share/fonts/opentype/
install -Dm444 NomNaTong-Regular.ttf -t $out/share/fonts/truetype/
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://nomfoundation.org/nom-tools/Nom-Font";
description = "Hán-Nôm Coded Character Set and Nom Na Tong Regular Reference Font";
license = lib.licenses.mit;
maintainers = [ ];
maintainers = [ lib.maintainers.eclairevoyant ];
platforms = lib.platforms.all;
};
})