treewide: convert 30 fonts

+140 -107
+28 -24
pkgs/data/fonts/gdouros/default.nix
··· 1 - { fetchzip, lib }: 1 + { lib, stdenvNoCC, fetchzip }: 2 2 3 3 let 4 4 fonts = { 5 - aegan = { version = "13.00"; file = "Aegean.zip"; sha256 = "sha256-1DnbfL6bKn8Upht/ZYfKIp9kuDHq7y9E+jkt2Yhr38A="; description = "Aegean"; }; 6 - aegyptus = { version = "13.00"; file = "Aegyptus.zip"; sha256 = "sha256-tObgHlhaquq6Akn/HdYKNfnKHHJP42yAT7lIn5qdCzY="; description = "Egyptian Hieroglyphs, Coptic, Meroitic"; }; 7 - akkadian = { version = "13.00"; file = "Akkadian.zip"; sha256 = "sha256-iHiXfxMS9FIlrRgT23MfxzCqYJMQrKuKYDShrqB74vU="; description = "Sumero-Akkadian Cuneiform"; }; 8 - assyrian = { version = "13.00"; file = "Assyrian.zip"; sha256 = "sha256-YjTQjv1Vybr14Sn9pUdbGYVf4ZIjGT+cpB1qCIg1NNQ="; description = "Neo-Assyrian in Unicode with OpenType"; }; 9 - eemusic = { version = "13.00"; file = "EEMusic.zip"; sha256 = "sha256-PaYBJOV+dmRV1ehY7TwDNL9dz1jPo58I3N8lWX1Vmy8="; description = "Byzantine Musical Notation in Unicode with OpenType"; }; 10 - maya = { version = "13.00"; file = "Maya%20Hieroglyphs.zip"; sha256 = "sha256-9uqGo4hweV1ydI+pEp76IqmHslWvxr87rTvziQs35bQ="; description = "Maya Hieroglyphs"; }; 11 - symbola = { version = "13.00"; file = "Symbola.zip"; sha256 = "sha256-C9HmforXr/Hqopb3go+bzqRFcWPv+0rz0JZsXc3mcxw="; description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode"; }; 12 - textfonts = { version = "13.00"; file = "Textfonts.zip"; sha256 = "sha256-1bDi5mwrT2I8gx6QdhnWjXATFdNAU9nt77BiFIci6C8="; description = "Aroania, Anaktoria, Alexander, Avdira and Asea"; }; 13 - unidings = { version = "13.00"; file = "Unidings.zip"; sha256 = "sha256-6lSkDb603XIrBGy4fZhY7xYDd3x0qA0PRQOlQ9Roig0="; description = "Glyphs and Icons for blocks of The Unicode Standard"; }; 5 + aegan = { version = "13.00"; file = "Aegean.zip"; hash = "sha256-3HmCqCMZLN6zF1N/EirQOPnHKTGHoc4aHKoZxFYTB34="; description = "Aegean"; }; 6 + aegyptus = { version = "13.00"; file = "Aegyptus.zip"; hash = "sha256-SSAK707xhpsUTq8tSBcrzNGunCYad58amtCqAWuevnY="; description = "Egyptian Hieroglyphs, Coptic, Meroitic"; }; 7 + akkadian = { version = "13.00"; file = "Akkadian.zip"; hash = "sha256-wXiDYyfujAs6fklOCqXq7Ms7wP5RbPlpNVwkUy7CV4k="; description = "Sumero-Akkadian Cuneiform"; }; 8 + assyrian = { version = "13.00"; file = "Assyrian.zip"; hash = "sha256-CZj1sc89OexQ0INb7pbEu5GfE/w2E5JmhjT8cosoLSg="; description = "Neo-Assyrian in Unicode with OpenType"; }; 9 + eemusic = { version = "13.00"; file = "EEMusic.zip"; hash = "sha256-LxOcQOPEImw0wosxJotbOJRbe0qlK5dR+kazuhm99Kg="; description = "Byzantine Musical Notation in Unicode with OpenType"; }; 10 + maya = { version = "13.00"; file = "Maya%20Hieroglyphs.zip"; hash = "sha256-PAwF1lGqm6XVf4NQCA8AFLGU40N0Xsn5Q8x9ikHJDhY="; description = "Maya Hieroglyphs"; }; 11 + symbola = { version = "13.00"; file = "Symbola.zip"; hash = "sha256-TsHWmzkEyMa8JOZDyjvk7PDhm239oH/FNllizNFf398="; description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode"; }; 12 + textfonts = { version = "13.00"; file = "Textfonts.zip"; hash = "sha256-7S3NiiyDvyYoDrLPt2z3P9bEEFOEZACv2sIHG1Tn6yI="; description = "Aroania, Anaktoria, Alexander, Avdira and Asea"; }; 13 + unidings = { version = "13.00"; file = "Unidings.zip"; hash = "sha256-WUY+Ylphep6WuzqLQ3Owv+vK5Yuu/aAkn4GOFXL0uQY="; description = "Glyphs and Icons for blocks of The Unicode Standard"; }; 14 14 }; 15 15 16 - mkpkg = name_: {version, file, sha256, description}: fetchzip rec { 17 - name = "${name_}-${version}"; 18 - url = "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/${file}"; 19 - stripRoot = false; 20 - postFetch = '' 21 - mkdir -p $out/share/{fonts/opentype,doc/${name_}} 22 - mv $out/*.otf -t "$out/share/fonts/opentype" 23 - mv $out/*.{odt,ods,pdf,xlsx} -t "$out/share/doc/${name_}" || true # install docs if any 24 - find $out -type d -empty -delete 25 - shopt -s extglob dotglob 26 - rm -rf $out/!(share) 27 - shopt -u extglob dotglob 16 + mkpkg = pname: { version, file, hash, description }: stdenvNoCC.mkDerivation rec { 17 + inherit pname version; 18 + 19 + src = fetchzip { 20 + url = "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/${file}"; 21 + stripRoot = false; 22 + inherit hash; 23 + }; 24 + 25 + installPhase = '' 26 + runHook preInstall 27 + 28 + mkdir -p $out/share/{fonts/opentype,doc/${pname}} 29 + mv *.otf -t "$out/share/fonts/opentype" 30 + mv *.{odt,ods,pdf,xlsx} -t "$out/share/doc/${pname}" || true # install docs if any 31 + 32 + runHook postInstall 28 33 ''; 29 - inherit sha256; 30 34 31 35 meta = { 32 36 inherit description; ··· 39 43 }; 40 44 }; 41 45 in 42 - lib.mapAttrs mkpkg fonts 46 + lib.mapAttrs mkpkg fonts
+15 -10
pkgs/data/fonts/hanazono/default.nix
··· 1 - { lib, fetchzip }: 1 + { lib, stdenvNoCC, fetchzip }: 2 2 3 - let 3 + stdenvNoCC.mkDerivation rec { 4 + pname = "hanazono"; 4 5 version = "20170904"; 5 - in fetchzip { 6 - name = "hanazono-${version}"; 6 + 7 + src = fetchzip { 8 + url = "mirror://osdn/hanazono-font/68253/hanazono-${version}.zip"; 9 + stripRoot = false; 10 + hash = "sha256-qd0q4wQnHBGLT7C+UQIiOHnxCnRCscMZcj3P5RRxD1U="; 11 + }; 7 12 8 - url = "mirror://osdn/hanazono-font/68253/hanazono-${version}.zip"; 13 + installPhase = '' 14 + runHook preInstall 9 15 10 - postFetch = '' 11 16 mkdir -p $out/share/{doc,fonts} 12 - unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype 13 - unzip -j $downloadedFile \*.txt -d $out/share/doc/hanazono 14 - ''; 17 + install -Dm644 *.ttf -t $out/share/fonts/truetype 18 + install -Dm644 *.txt -t $out/share/doc/hanazono 15 19 16 - sha256 = "0qiyd1vk3w8kqmwc6xi5d390wdr4ln8xhfbx3n8r1hhad9iz14p6"; 20 + runHook postInstall 21 + ''; 17 22 18 23 meta = with lib; { 19 24 description = "Japanese Mincho-typeface TrueType font";
+15 -15
pkgs/data/fonts/kochi-substitute-naga10/default.nix
··· 1 - { lib, fetchzip }: 1 + { lib, stdenvNoCC, fetchzip }: 2 2 3 - let version = "20030809"; 4 - in 5 - fetchzip { 6 - name = "kochi-substitute-naga10-${version}"; 3 + stdenvNoCC.mkDerivation rec { 4 + pname = "kochi-substitute-naga10"; 5 + version = "20030809"; 7 6 8 - url = "mirror://osdn/efont/5411/kochi-substitute-${version}.tar.bz2"; 7 + src = fetchzip { 8 + url = "mirror://osdn/efont/5411/kochi-substitute-${version}.tar.bz2"; 9 + stripRoot = false; 10 + hash = "sha256-dRJAxeVGYcNjLWqJJ+9Z2FW3BHrgyGRzlgM2x5YG3AM="; 11 + }; 9 12 10 - stripRoot = false; 13 + installPhase = '' 14 + runHook preInstall 11 15 12 - postFetch = '' 13 16 mkdir -p $out/share/fonts/truetype 14 - mv $out/*/kochi-gothic-subst.ttf $out/share/fonts/truetype/kochi-gothic-subst-naga10.ttf 15 - mv $out/*/kochi-mincho-subst.ttf $out/share/fonts/truetype/kochi-mincho-subst-naga10.ttf 16 - shopt -s extglob dotglob 17 - rm -rf $out/!(share) 18 - shopt -u extglob dotglob 17 + mv */kochi-gothic-subst.ttf $out/share/fonts/truetype/kochi-gothic-subst-naga10.ttf 18 + mv */kochi-mincho-subst.ttf $out/share/fonts/truetype/kochi-mincho-subst-naga10.ttf 19 + 20 + runHook postInstall 19 21 ''; 20 - 21 - sha256 = "sha256-SZ7ZJYuCYU0NxWHlEszbvFmyZxWeBtmPL204PjIrS64="; 22 22 23 23 meta = { 24 24 description = "Japanese font, non-free replacement for MS Gothic and MS Mincho";
+30 -27
pkgs/data/fonts/lohit-fonts/default.nix
··· 1 - { fetchzip, lib }: 1 + { lib, stdenvNoCC, fetchurl }: 2 2 let 3 3 fonts = { 4 - assamese = { label = "Assamese"; version = "2.91.5"; sha256 = "06cw416kgw0m6883n5ixmpniinsd747rdmacf06z83w1hqwj2js6"; }; 5 - bengali = { label = "Bengali"; version = "2.91.5"; sha256 = "1j7gfmkzzyk9mivy09a9yfqxpidw52hw48dyh4qkci304mspcbvr"; }; 6 - devanagari = { label = "Devanagari script"; version = "2.95.4"; sha256 = "1c17xirzx5rf7xpmkrm94jf9xrzckyagwnqn3pyag28lyj8x67m5"; }; 7 - gujarati = { label = "Gujarati"; version = "2.92.4"; sha256 = "0xdgmkikz532zxj239wr73l24qnzxhra88f52146x7fsb7gpvfb1"; }; 8 - gurmukhi = { label = "Gurmukhi script"; version = "2.91.2"; sha256 = "1xk1qvc0xwcmjcavj9zmy4bbphffdlv7sldmqlk30ch5fy5r0ypb"; }; # renamed from Punjabi 9 - kannada = { label = "Kannada"; version = "2.5.4" ; sha256 = "0sax56xg98p2nf0nsvba42hhz946cs7q0gidiz9zfpb6pbgwxdgg"; }; 10 - malayalam = { label = "Malayalam"; version = "2.92.2"; sha256 = "18sca59fj9zvqhagbix35i4ld2n4mwv57q04pijl5gvpyfb1abs8"; }; 11 - marathi = { label = "Marathi"; version = "2.94.2"; sha256 = "0cjjxxlhqmdmhr35s4ak0ma89456daik5rqrn6pdzj39098lmci7"; }; 12 - nepali = { label = "Nepali"; version = "2.94.2"; sha256 = "1p7lif136xakfqkbv6p1lb56rs391b25vn4bxrjdfvsk0r0h0ry3"; }; 13 - odia = { label = "Odia"; version = "2.91.2"; sha256 = "0z5rc4f9vfrfm8h2flzf5yx44x50jqdmmzifkmjwczib3hpg2ila"; }; # renamed from Oriya 14 - tamil-classical = { label = "Classical Tamil"; version = "2.5.4" ; sha256 = "0svmj3dhk0195mhdwjhi3qgwa83223irb32fp12782sj9njdvyi2"; }; 15 - tamil = { label = "Tamil"; version = "2.91.3"; sha256 = "0qyw9p8alyvjryyw8a25q3gfyrhby49mjb0ydgggf5ckd07kblcm"; }; 16 - telugu = { label = "Telugu"; version = "2.5.5" ; sha256 = "07p41686ypmclj9d3njp01lvrgssqxa4s5hsbrqfjrnwd3rjspzr"; }; 4 + assamese = { label = "Assamese"; version = "2.91.5"; hash = "sha256-Oo/hHHFg/Nu3eaZLMdBclY90lKU2AMFUclyXHxGaAgg="; }; 5 + bengali = { label = "Bengali"; version = "2.91.5"; hash = "sha256-QGf94TdQS2c9+wSSDK4Mknw5ubCGTuvg0xoNaJdirBc="; }; 6 + devanagari = { label = "Devanagari script"; version = "2.95.4"; hash = "sha256-6CbOCqOei5eO1zwNQZvB+fFDkqxvJnK82z+zmClhRAE="; }; 7 + gujarati = { label = "Gujarati"; version = "2.92.4"; hash = "sha256-BpwibF0/HXDvXpDEek0fj73cxo2QC1hSfQ49Q/ZOZg8="; }; 8 + gurmukhi = { label = "Gurmukhi script"; version = "2.91.2"; hash = "sha256-5iLFW2FEE5LBqoALi+3sUjwC0ADntsp259TP+bYwR9g="; }; # renamed from Punjabi 9 + kannada = { label = "Kannada"; version = "2.5.4" ; hash = "sha256-7y2u0tBdNYCeY7Y+aqhxXP7Qv6GglJeVO1wvM9CzyIQ="; }; 10 + malayalam = { label = "Malayalam"; version = "2.92.2"; hash = "sha256-SzM38vuAlP9OMC8kUuHQylmH8TUjCeg1y/Zcu2I2bjA="; }; 11 + marathi = { label = "Marathi"; version = "2.94.2"; hash = "sha256-jK1Gwcr5gqzRNkbIxs4V/OYgUlUEpU0OYzKDTkiMlqM="; }; 12 + nepali = { label = "Nepali"; version = "2.94.2"; hash = "sha256-OX1ekxeSbVGOrdbZ3Jvu4nii0zkgbuij10JIzqRcFx4="; }; 13 + odia = { label = "Odia"; version = "2.91.2"; hash = "sha256-3/eczBGGZj4QPs7KY0as9zk5HaBfhgz6YgU0qmwpVcA="; }; # renamed from Oriya 14 + tamil-classical = { label = "Classical Tamil"; version = "2.5.4" ; hash = "sha256-6SsddTCEUHMoF7X4+i7eXimmMuktfFAl8uz95RwM+yg="; }; 15 + tamil = { label = "Tamil"; version = "2.91.3"; hash = "sha256-8lcNw87o9lhQsKwCqwBSfx7rhcrH/eEqac7EsA9/w/E="; }; 16 + telugu = { label = "Telugu"; version = "2.5.5" ; hash = "sha256-cZh93NfEB+5S1JeEowtBMJ0nbZsFGpbEp2WAtzxrA8A="; }; 17 17 }; 18 18 gplfonts = { 19 19 # GPL fonts removed from later releases 20 - kashmiri = { label = "Kashmiri"; version = "2.4.3" ; sha256 = "0c6whklad9bscymrlcbxj4fdvh4cdf40vb61ykbp6mapg6dqxwhn"; }; 21 - konkani = { label = "Konkani"; version = "2.4.3" ; sha256 = "0pcb5089dabac1k6ymqnbnlyk7svy2wnb5glvhsd8glycjhrcp70"; }; 22 - maithili = { label = "Maithili"; version = "2.4.3" ; sha256 = "1yfwv7pcj7k4jryz0s6mb56bq7fs15g56y7pi5yd89q1f8idk6bc"; }; 23 - sindhi = { label = "Sindhi"; version = "2.4.3" ; sha256 = "1iywzyy185bvfsfi5pp11c8bzrp40kni2cpwcmxqwha7c9v8brlc"; }; 20 + kashmiri = { label = "Kashmiri"; version = "2.4.3" ; hash = "sha256-6T2QaWnt3+e5nr4vbk44FouqmeWKzia1lSf8S/bvqCs="; }; 21 + konkani = { label = "Konkani"; version = "2.4.3" ; hash = "sha256-hVy2rxrUTPDeNnugi3Bk7z0JqGmk4/yeUsAoI/4R7A8="; }; 22 + maithili = { label = "Maithili"; version = "2.4.3" ; hash = "sha256-ikDcpJqdizAYRpgoebzqxOEeodJ6C3fO2rsqGzC0HCs="; }; 23 + sindhi = { label = "Sindhi"; version = "2.4.3" ; hash = "sha256-wU3B9fh+8E1bFBMnakzmajY7eNKzed9+eYL5AOxyNQI="; }; 24 24 }; 25 25 26 - mkpkg = license: name: {label, version, sha256}: fetchzip { 27 - name = "lohit-${name}-${version}"; 26 + mkpkg = license: pname: {label, version, hash}: stdenvNoCC.mkDerivation { 27 + inherit pname version; 28 28 29 - url = "https://releases.pagure.org/lohit/lohit-${name}-ttf-${version}.tar.gz"; 29 + src = fetchurl { 30 + url = "https://releases.pagure.org/lohit/lohit-${pname}-ttf-${version}.tar.gz"; 31 + inherit hash; 32 + }; 30 33 31 - postFetch = '' 32 - tar -xzf $downloadedFile --strip-components=1 34 + installPhase = '' 35 + runHook preInstall 33 36 34 37 mkdir -p $out/share/fonts/truetype 35 38 cp -v *.ttf $out/share/fonts/truetype/ ··· 37 40 mkdir -p $out/etc/fonts/conf.d 38 41 cp -v *.conf $out/etc/fonts/conf.d 39 42 40 - mkdir -p "$out/share/doc/lohit-${name}" 41 - cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${name}/" 43 + mkdir -p "$out/share/doc/lohit-${pname}" 44 + cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${pname}/" 45 + 46 + runHook postInstall 42 47 ''; 43 - 44 - inherit sha256; 45 48 46 49 meta = { 47 50 inherit license;
+36 -23
pkgs/data/fonts/mplus-outline-fonts/default.nix
··· 1 - { lib, fetchzip, fetchFromGitHub }: 1 + { lib, stdenvNoCC, fetchurl, fetchFromGitHub }: 2 2 3 3 let pname = "mplus-outline-fonts"; 4 - in { 5 - osdnRelease = fetchzip { 6 - name = "${pname}-osdn"; 7 - url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz"; 8 - sha256 = "sha256-+VN+aFx5hMlWwtk+FM+vL6G07+yEi9kYYsoQLSfMUZo="; 9 - postFetch = '' 10 - install -m444 -Dt $out/share/fonts/truetype/${pname} $out/*.ttf 11 - shopt -s extglob dotglob 12 - rm -rf $out/!(share) 13 - shopt -u extglob dotglob 4 + in 5 + { 6 + osdnRelease = stdenvNoCC.mkDerivation { 7 + pname = "${pname}-osdn"; 8 + version = "063a"; 9 + 10 + src = fetchurl { 11 + url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz"; 12 + hash = "sha256-ROuXO0tq/1dN5FTbEF3cI+Z0nCKUc0vZyx4Nc05M3Xk="; 13 + }; 14 + 15 + installPhase = '' 16 + runHook preInstall 17 + 18 + install -m444 -Dt $out/share/fonts/truetype/${pname} *.ttf 19 + 20 + runHook postInstall 14 21 ''; 15 22 16 23 meta = with lib; { ··· 22 29 }; 23 30 }; 24 31 25 - githubRelease = fetchFromGitHub { 26 - name = "${pname}-github"; 27 - owner = "coz-m"; 28 - repo = "MPLUS_FONTS"; 29 - rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932"; 30 - sha256 = "sha256-LSIyrstJOszll72mxXIC7EW4KEMTFCaQwWs59j0UScE="; 31 - postFetch = '' 32 + githubRelease = stdenvNoCC.mkDerivation { 33 + pname = "${pname}-github"; 34 + version = "unstable-2022-05-19"; 35 + 36 + src = fetchFromGitHub { 37 + owner = "coz-m"; 38 + repo = "MPLUS_FONTS"; 39 + rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932"; 40 + hash = "sha256-jzDDUs1dKjqNjsMeTA2/4vm+akIisnOuE2mPQS7IDSA="; 41 + }; 42 + 43 + installPhase = '' 44 + runHook preInstall 45 + 32 46 mkdir -p $out/share/fonts/{truetype,opentype}/${pname} 33 - mv $out/fonts/ttf/* $out/share/fonts/truetype/${pname} 34 - mv $out/fonts/otf/* $out/share/fonts/opentype/${pname} 35 - shopt -s extglob dotglob 36 - rm -rf $out/!(share) 37 - shopt -u extglob dotglob 47 + mv fonts/ttf/* $out/share/fonts/truetype/${pname} 48 + mv fonts/otf/* $out/share/fonts/opentype/${pname} 49 + 50 + runHook postInstall 38 51 ''; 39 52 40 53 meta = with lib; {
+16 -8
pkgs/data/fonts/rounded-mgenplus/default.nix
··· 1 - { lib, fetchzip, p7zip }: 1 + { lib, stdenvNoCC, fetchurl, p7zip }: 2 2 3 - let 3 + stdenvNoCC.mkDerivation rec { 4 4 pname = "rounded-mgenplus"; 5 5 version = "20150602"; 6 - in fetchzip rec { 7 - name = "${pname}-${version}"; 8 6 9 - url = "https://osdn.jp/downloads/users/8/8598/${name}.7z"; 10 - postFetch = '' 11 - ${p7zip}/bin/7z x $downloadedFile 7 + src = fetchurl { 8 + url = "https://osdn.jp/downloads/users/8/8598/${pname}-${version}.7z"; 9 + hash = "sha256-7OpnZJc9k5NiOPHAbtJGMQvsMg9j81DCvbfo0f7uJcw="; 10 + }; 11 + 12 + sourceRoot = "."; 13 + 14 + nativeBuildInputs = [ p7zip ]; 15 + 16 + installPhase = '' 17 + runHook preInstall 18 + 12 19 install -m 444 -D -t $out/share/fonts/${pname} ${pname}-*.ttf 20 + 21 + runHook postInstall 13 22 ''; 14 - sha256 = "0vwdknagdrl5dqwpb1x5lxkbfgvbx8dpg7cb6yamgz71831l05v1"; 15 23 16 24 meta = with lib; { 17 25 description = "A Japanese font based on Rounded M+ and Noto Sans Japanese";