Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenvNoCC,
4 fetchgit,
5 fontforge,
6 gitUpdater,
7}:
8
9stdenvNoCC.mkDerivation (finalAttrs: {
10 pname = "newcomputermodern";
11 version = "7.0.4";
12
13 src = fetchgit {
14 url = "https://git.gnu.org.ua/newcm.git";
15 rev = finalAttrs.version;
16 hash = "sha256-KPuU0O5Lbh/guDv+HRgWbp712bdfx8mZaPDolaDFlws=";
17 };
18
19 nativeBuildInputs = [ fontforge ];
20
21 dontConfigure = true;
22
23 buildPhase = ''
24 runHook preBuild
25 for i in sfd/*.sfd; do
26 fontforge -lang=ff -c \
27 'Open($1);
28 Generate($1:r + ".otf");
29 ' $i;
30 done
31 runHook postBuild
32 '';
33
34 installPhase = ''
35 runHook preInstall
36 install -m444 -Dt $out/share/fonts/opentype/public sfd/*.otf
37 runHook postInstall
38 '';
39
40 passthru.updateScript = gitUpdater { };
41
42 meta = {
43 description = "Computer Modern fonts including matching non-latin alphabets";
44 homepage = "https://ctan.org/pkg/newcomputermodern";
45 changelog = "https://mirrors.rit.edu/CTAN/fonts/newcomputermodern/README";
46 # "The GUST Font License (GFL), which is a free license, legally
47 # equivalent to the LaTeX Project Public License (LPPL), version 1.3c or
48 # later." - GUST website
49 license = lib.licenses.lppl13c;
50 maintainers = [ lib.maintainers.drupol ];
51 platforms = lib.platforms.all;
52 };
53})