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