blob: 5f2b3f69b7196e2284f77a0a0489a548941b0920 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{ lib
, stdenvNoCC
, fetchFromGitHub
, python3Packages
, nix-update-script
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nomnatong";
version = "5.10";
src = fetchFromGitHub {
owner = "nomfoundation";
repo = "font";
rev = "v${finalAttrs.version}";
hash = "sha256-e7LT6lwm4jbqL+mtvfZsCC7F6KOVYD/lAGRPAgyyMxc=";
};
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
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "http://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 = with lib.maintainers; [ eclairevoyant ];
platforms = lib.platforms.all;
};
})
|