ieda: init at 0-unstable-2024-10-11 (#338769)
[NixPkgs.git] / pkgs / by-name / no / nomnatong / package.nix
blobc4e2fe59218d20f6e90660c6fe3a64e681248560
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   python3Packages,
6   nix-update-script,
7 }:
9 stdenvNoCC.mkDerivation (finalAttrs: {
10   pname = "nomnatong";
11   version = "5.13";
13   src = fetchFromGitHub {
14     owner = "nomfoundation";
15     repo = "font";
16     rev = "v${finalAttrs.version}";
17     hash = "sha256-OGJJpvjrHqP6P5eoazrezRVhQ9Hj3xDYi/pYTUG2edw=";
18   };
20   nativeBuildInputs = [
21     python3Packages.afdko
22     python3Packages.fonttools
23   ];
25   sourceRoot = "${finalAttrs.src.name}/src";
27   buildPhase = ''
28     runHook preBuild
30     makeotf -r -f font.pfa -omitMacNames -ff features.txt -mf FontMenuNameDB -ga -ci UnicodeVariationSequences.txt
31     otf2ttf NomNaTong-Regular.otf
32     sfntedit -d DSIG NomNaTong-Regular.otf
34     runHook postBuild
35   '';
37   installPhase = ''
38     runHook preInstall
40     install -Dm444 NomNaTong-Regular.otf -t $out/share/fonts/opentype/
41     install -Dm444 NomNaTong-Regular.ttf -t $out/share/fonts/truetype/
43     runHook postInstall
44   '';
46   passthru.updateScript = nix-update-script { };
48   meta = {
49     homepage = "http://nomfoundation.org/nom-tools/Nom-Font";
50     description = "Hán-Nôm Coded Character Set and Nom Na Tong Regular Reference Font";
51     license = lib.licenses.mit;
52     maintainers = with lib.maintainers; [ ];
53     platforms = lib.platforms.all;
54   };