2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
2024-01-25 14:12:00 +00:00
|
|
|
, nix-update-script
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
|
|
pname = "nomnatong";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.10";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nomfoundation";
|
|
|
|
repo = "font";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-e7LT6lwm4jbqL+mtvfZsCC7F6KOVYD/lAGRPAgyyMxc=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.afdko
|
|
|
|
python3Packages.fonttools
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
makeotf -r -f font.pfa -omitMacNames -ff features.txt -mf FontMenuNameDB -ga -ci UnicodeVariationSequences.txt
|
|
|
|
otf2ttf NomNaTong-Regular.otf
|
|
|
|
sfntedit -d DSIG NomNaTong-Regular.otf
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "http://nomfoundation.org/nom-tools/Nom-Font";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Hán-Nôm Coded Character Set and Nom Na Tong Regular Reference Font";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ eclairevoyant ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
})
|