forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / data / fonts / tex-gyre-math / default.nix
blob95038d3f9cfe6c81ff5634144d782ec4a0a3a24e
1 { lib, stdenv, fetchzip }:
3 let
4   variants = {
5     bonum = {
6       displayName = "Bonum";
7       version = "1.005";
8       sha256 = "1b6x7siypyxp1lhq7xxdqafwbn6p2p3xm3jb38q999sv8cgslxz8";
9       outputHash = "1zjaxkzidqmxakh9d61n0by9mi8hrmir45jppjj6hzwhm3rvknff";
10     };
11     pagella = {
12       displayName = "Pagella";
13       version = "1.632";
14       sha256 = "0f4cgq9w0lc1fbcbfqiv19mdhivbsscl13jmb0ln685641ci2sjr";
15       outputHash = "0wz2n1dpx9b8a0qgqy8vl712fxhi87mhcda281xaad62chndwf6k";
16     };
17     schola = {
18       displayName = "Schola";
19       version = "1.533";
20       sha256 = "0caqgkz7gz700h5a1mai0gq8hv7skrgs5nnrs1f7zw1mb9g53ya9";
21       outputHash = "0jk4bpxki95a9lmfj4cgpnv1jwlkh8qixbkf498n1x7hkaz03f5n";
22     };
23     termes = {
24       displayName = "Termes";
25       version = "1.543";
26       sha256 = "10ayqfpryfn1l35hy0vwyjzw3a6mfsnzgf78vsnccgk2gz1g9vhz";
27       outputHash = "0pa433cgshlypbyrrlp3qq0wg972rngcp37pr8pxdfshgz13q1mm";
28     };
29   };
31   mkVariant = variant: {displayName, version, sha256, outputHash}:
32     let dotless_version = builtins.replaceStrings ["."] [""] version; in
33     stdenv.mkDerivation rec {
34       name = "tex-gyre-${variant}-math-${version}";
35       inherit version;
37       src = fetchzip {
38         url = "http://www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
39         inherit sha256;
40       };
42       installPhase = ''
43         install -m444 -Dt $out/share/fonts/opentype opentype/*.otf
44         install -m444 -Dt $out/share/doc/${name}    doc/*.txt
45       '';
47       outputHashAlgo = "sha256";
48       outputHashMode = "recursive";
49       inherit outputHash;
51       meta = with lib; {
52         longDescription = ''
53           TeX Gyre ${displayName} Math is a math companion for the TeX Gyre
54           ${displayName} family of fonts (see
55           http://www.gust.org.pl/projects/e-foundry/tex-gyre/) in the OpenType format.
56         '';
57         homepage = "http://www.gust.org.pl/projects/e-foundry/tg-math";
58         # "The TeX Gyre Math fonts are licensed under the GUST Font License (GFL),
59         # which is a free license, legally equivalent to the LaTeX Project Public
60         # License (LPPL), version 1.3c or later." - GUST website
61         license = licenses.lppl13c;
62         maintainers = with maintainers; [ siddharthist ];
63         platforms = platforms.all;
64       };
65     };
67   lib.mapAttrs mkVariant variants