treewide: convert 30 fonts

This commit is contained in:
Weijia Wang 2023-01-25 15:45:31 +01:00
parent fb10665231
commit 3a183c353d
6 changed files with 140 additions and 107 deletions

View file

@ -1,32 +1,36 @@
{ fetchzip, lib }: { lib, stdenvNoCC, fetchzip }:
let let
fonts = { fonts = {
aegan = { version = "13.00"; file = "Aegean.zip"; sha256 = "sha256-1DnbfL6bKn8Upht/ZYfKIp9kuDHq7y9E+jkt2Yhr38A="; description = "Aegean"; }; aegan = { version = "13.00"; file = "Aegean.zip"; hash = "sha256-3HmCqCMZLN6zF1N/EirQOPnHKTGHoc4aHKoZxFYTB34="; description = "Aegean"; };
aegyptus = { version = "13.00"; file = "Aegyptus.zip"; sha256 = "sha256-tObgHlhaquq6Akn/HdYKNfnKHHJP42yAT7lIn5qdCzY="; description = "Egyptian Hieroglyphs, Coptic, Meroitic"; }; aegyptus = { version = "13.00"; file = "Aegyptus.zip"; hash = "sha256-SSAK707xhpsUTq8tSBcrzNGunCYad58amtCqAWuevnY="; description = "Egyptian Hieroglyphs, Coptic, Meroitic"; };
akkadian = { version = "13.00"; file = "Akkadian.zip"; sha256 = "sha256-iHiXfxMS9FIlrRgT23MfxzCqYJMQrKuKYDShrqB74vU="; description = "Sumero-Akkadian Cuneiform"; }; akkadian = { version = "13.00"; file = "Akkadian.zip"; hash = "sha256-wXiDYyfujAs6fklOCqXq7Ms7wP5RbPlpNVwkUy7CV4k="; description = "Sumero-Akkadian Cuneiform"; };
assyrian = { version = "13.00"; file = "Assyrian.zip"; sha256 = "sha256-YjTQjv1Vybr14Sn9pUdbGYVf4ZIjGT+cpB1qCIg1NNQ="; description = "Neo-Assyrian in Unicode with OpenType"; }; assyrian = { version = "13.00"; file = "Assyrian.zip"; hash = "sha256-CZj1sc89OexQ0INb7pbEu5GfE/w2E5JmhjT8cosoLSg="; description = "Neo-Assyrian in Unicode with OpenType"; };
eemusic = { version = "13.00"; file = "EEMusic.zip"; sha256 = "sha256-PaYBJOV+dmRV1ehY7TwDNL9dz1jPo58I3N8lWX1Vmy8="; description = "Byzantine Musical Notation in Unicode with OpenType"; }; eemusic = { version = "13.00"; file = "EEMusic.zip"; hash = "sha256-LxOcQOPEImw0wosxJotbOJRbe0qlK5dR+kazuhm99Kg="; description = "Byzantine Musical Notation in Unicode with OpenType"; };
maya = { version = "13.00"; file = "Maya%20Hieroglyphs.zip"; sha256 = "sha256-9uqGo4hweV1ydI+pEp76IqmHslWvxr87rTvziQs35bQ="; description = "Maya Hieroglyphs"; }; maya = { version = "13.00"; file = "Maya%20Hieroglyphs.zip"; hash = "sha256-PAwF1lGqm6XVf4NQCA8AFLGU40N0Xsn5Q8x9ikHJDhY="; description = "Maya Hieroglyphs"; };
symbola = { version = "13.00"; file = "Symbola.zip"; sha256 = "sha256-C9HmforXr/Hqopb3go+bzqRFcWPv+0rz0JZsXc3mcxw="; description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode"; }; symbola = { version = "13.00"; file = "Symbola.zip"; hash = "sha256-TsHWmzkEyMa8JOZDyjvk7PDhm239oH/FNllizNFf398="; description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode"; };
textfonts = { version = "13.00"; file = "Textfonts.zip"; sha256 = "sha256-1bDi5mwrT2I8gx6QdhnWjXATFdNAU9nt77BiFIci6C8="; description = "Aroania, Anaktoria, Alexander, Avdira and Asea"; }; textfonts = { version = "13.00"; file = "Textfonts.zip"; hash = "sha256-7S3NiiyDvyYoDrLPt2z3P9bEEFOEZACv2sIHG1Tn6yI="; description = "Aroania, Anaktoria, Alexander, Avdira and Asea"; };
unidings = { version = "13.00"; file = "Unidings.zip"; sha256 = "sha256-6lSkDb603XIrBGy4fZhY7xYDd3x0qA0PRQOlQ9Roig0="; description = "Glyphs and Icons for blocks of The Unicode Standard"; }; unidings = { version = "13.00"; file = "Unidings.zip"; hash = "sha256-WUY+Ylphep6WuzqLQ3Owv+vK5Yuu/aAkn4GOFXL0uQY="; description = "Glyphs and Icons for blocks of The Unicode Standard"; };
}; };
mkpkg = name_: {version, file, sha256, description}: fetchzip rec { mkpkg = pname: { version, file, hash, description }: stdenvNoCC.mkDerivation rec {
name = "${name_}-${version}"; inherit pname version;
url = "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/${file}";
stripRoot = false; src = fetchzip {
postFetch = '' url = "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/${file}";
mkdir -p $out/share/{fonts/opentype,doc/${name_}} stripRoot = false;
mv $out/*.otf -t "$out/share/fonts/opentype" inherit hash;
mv $out/*.{odt,ods,pdf,xlsx} -t "$out/share/doc/${name_}" || true # install docs if any };
find $out -type d -empty -delete
shopt -s extglob dotglob installPhase = ''
rm -rf $out/!(share) runHook preInstall
shopt -u extglob dotglob
mkdir -p $out/share/{fonts/opentype,doc/${pname}}
mv *.otf -t "$out/share/fonts/opentype"
mv *.{odt,ods,pdf,xlsx} -t "$out/share/doc/${pname}" || true # install docs if any
runHook postInstall
''; '';
inherit sha256;
meta = { meta = {
inherit description; inherit description;
@ -39,4 +43,4 @@ let
}; };
}; };
in in
lib.mapAttrs mkpkg fonts lib.mapAttrs mkpkg fonts

View file

@ -1,19 +1,24 @@
{ lib, fetchzip }: { lib, stdenvNoCC, fetchzip }:
let stdenvNoCC.mkDerivation rec {
pname = "hanazono";
version = "20170904"; version = "20170904";
in fetchzip {
name = "hanazono-${version}";
url = "mirror://osdn/hanazono-font/68253/hanazono-${version}.zip"; src = fetchzip {
url = "mirror://osdn/hanazono-font/68253/hanazono-${version}.zip";
stripRoot = false;
hash = "sha256-qd0q4wQnHBGLT7C+UQIiOHnxCnRCscMZcj3P5RRxD1U=";
};
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/{doc,fonts} mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype install -Dm644 *.ttf -t $out/share/fonts/truetype
unzip -j $downloadedFile \*.txt -d $out/share/doc/hanazono install -Dm644 *.txt -t $out/share/doc/hanazono
'';
sha256 = "0qiyd1vk3w8kqmwc6xi5d390wdr4ln8xhfbx3n8r1hhad9iz14p6"; runHook postInstall
'';
meta = with lib; { meta = with lib; {
description = "Japanese Mincho-typeface TrueType font"; description = "Japanese Mincho-typeface TrueType font";

View file

@ -1,24 +1,24 @@
{ lib, fetchzip }: { lib, stdenvNoCC, fetchzip }:
let version = "20030809"; stdenvNoCC.mkDerivation rec {
in pname = "kochi-substitute-naga10";
fetchzip { version = "20030809";
name = "kochi-substitute-naga10-${version}";
url = "mirror://osdn/efont/5411/kochi-substitute-${version}.tar.bz2"; src = fetchzip {
url = "mirror://osdn/efont/5411/kochi-substitute-${version}.tar.bz2";
stripRoot = false;
hash = "sha256-dRJAxeVGYcNjLWqJJ+9Z2FW3BHrgyGRzlgM2x5YG3AM=";
};
stripRoot = false; installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
mv $out/*/kochi-gothic-subst.ttf $out/share/fonts/truetype/kochi-gothic-subst-naga10.ttf mv */kochi-gothic-subst.ttf $out/share/fonts/truetype/kochi-gothic-subst-naga10.ttf
mv $out/*/kochi-mincho-subst.ttf $out/share/fonts/truetype/kochi-mincho-subst-naga10.ttf mv */kochi-mincho-subst.ttf $out/share/fonts/truetype/kochi-mincho-subst-naga10.ttf
shopt -s extglob dotglob
rm -rf $out/!(share)
shopt -u extglob dotglob
'';
sha256 = "sha256-SZ7ZJYuCYU0NxWHlEszbvFmyZxWeBtmPL204PjIrS64="; runHook postInstall
'';
meta = { meta = {
description = "Japanese font, non-free replacement for MS Gothic and MS Mincho"; description = "Japanese font, non-free replacement for MS Gothic and MS Mincho";

View file

@ -1,35 +1,38 @@
{ fetchzip, lib }: { lib, stdenvNoCC, fetchurl }:
let let
fonts = { fonts = {
assamese = { label = "Assamese"; version = "2.91.5"; sha256 = "06cw416kgw0m6883n5ixmpniinsd747rdmacf06z83w1hqwj2js6"; }; assamese = { label = "Assamese"; version = "2.91.5"; hash = "sha256-Oo/hHHFg/Nu3eaZLMdBclY90lKU2AMFUclyXHxGaAgg="; };
bengali = { label = "Bengali"; version = "2.91.5"; sha256 = "1j7gfmkzzyk9mivy09a9yfqxpidw52hw48dyh4qkci304mspcbvr"; }; bengali = { label = "Bengali"; version = "2.91.5"; hash = "sha256-QGf94TdQS2c9+wSSDK4Mknw5ubCGTuvg0xoNaJdirBc="; };
devanagari = { label = "Devanagari script"; version = "2.95.4"; sha256 = "1c17xirzx5rf7xpmkrm94jf9xrzckyagwnqn3pyag28lyj8x67m5"; }; devanagari = { label = "Devanagari script"; version = "2.95.4"; hash = "sha256-6CbOCqOei5eO1zwNQZvB+fFDkqxvJnK82z+zmClhRAE="; };
gujarati = { label = "Gujarati"; version = "2.92.4"; sha256 = "0xdgmkikz532zxj239wr73l24qnzxhra88f52146x7fsb7gpvfb1"; }; gujarati = { label = "Gujarati"; version = "2.92.4"; hash = "sha256-BpwibF0/HXDvXpDEek0fj73cxo2QC1hSfQ49Q/ZOZg8="; };
gurmukhi = { label = "Gurmukhi script"; version = "2.91.2"; sha256 = "1xk1qvc0xwcmjcavj9zmy4bbphffdlv7sldmqlk30ch5fy5r0ypb"; }; # renamed from Punjabi gurmukhi = { label = "Gurmukhi script"; version = "2.91.2"; hash = "sha256-5iLFW2FEE5LBqoALi+3sUjwC0ADntsp259TP+bYwR9g="; }; # renamed from Punjabi
kannada = { label = "Kannada"; version = "2.5.4" ; sha256 = "0sax56xg98p2nf0nsvba42hhz946cs7q0gidiz9zfpb6pbgwxdgg"; }; kannada = { label = "Kannada"; version = "2.5.4" ; hash = "sha256-7y2u0tBdNYCeY7Y+aqhxXP7Qv6GglJeVO1wvM9CzyIQ="; };
malayalam = { label = "Malayalam"; version = "2.92.2"; sha256 = "18sca59fj9zvqhagbix35i4ld2n4mwv57q04pijl5gvpyfb1abs8"; }; malayalam = { label = "Malayalam"; version = "2.92.2"; hash = "sha256-SzM38vuAlP9OMC8kUuHQylmH8TUjCeg1y/Zcu2I2bjA="; };
marathi = { label = "Marathi"; version = "2.94.2"; sha256 = "0cjjxxlhqmdmhr35s4ak0ma89456daik5rqrn6pdzj39098lmci7"; }; marathi = { label = "Marathi"; version = "2.94.2"; hash = "sha256-jK1Gwcr5gqzRNkbIxs4V/OYgUlUEpU0OYzKDTkiMlqM="; };
nepali = { label = "Nepali"; version = "2.94.2"; sha256 = "1p7lif136xakfqkbv6p1lb56rs391b25vn4bxrjdfvsk0r0h0ry3"; }; nepali = { label = "Nepali"; version = "2.94.2"; hash = "sha256-OX1ekxeSbVGOrdbZ3Jvu4nii0zkgbuij10JIzqRcFx4="; };
odia = { label = "Odia"; version = "2.91.2"; sha256 = "0z5rc4f9vfrfm8h2flzf5yx44x50jqdmmzifkmjwczib3hpg2ila"; }; # renamed from Oriya odia = { label = "Odia"; version = "2.91.2"; hash = "sha256-3/eczBGGZj4QPs7KY0as9zk5HaBfhgz6YgU0qmwpVcA="; }; # renamed from Oriya
tamil-classical = { label = "Classical Tamil"; version = "2.5.4" ; sha256 = "0svmj3dhk0195mhdwjhi3qgwa83223irb32fp12782sj9njdvyi2"; }; tamil-classical = { label = "Classical Tamil"; version = "2.5.4" ; hash = "sha256-6SsddTCEUHMoF7X4+i7eXimmMuktfFAl8uz95RwM+yg="; };
tamil = { label = "Tamil"; version = "2.91.3"; sha256 = "0qyw9p8alyvjryyw8a25q3gfyrhby49mjb0ydgggf5ckd07kblcm"; }; tamil = { label = "Tamil"; version = "2.91.3"; hash = "sha256-8lcNw87o9lhQsKwCqwBSfx7rhcrH/eEqac7EsA9/w/E="; };
telugu = { label = "Telugu"; version = "2.5.5" ; sha256 = "07p41686ypmclj9d3njp01lvrgssqxa4s5hsbrqfjrnwd3rjspzr"; }; telugu = { label = "Telugu"; version = "2.5.5" ; hash = "sha256-cZh93NfEB+5S1JeEowtBMJ0nbZsFGpbEp2WAtzxrA8A="; };
}; };
gplfonts = { gplfonts = {
# GPL fonts removed from later releases # GPL fonts removed from later releases
kashmiri = { label = "Kashmiri"; version = "2.4.3" ; sha256 = "0c6whklad9bscymrlcbxj4fdvh4cdf40vb61ykbp6mapg6dqxwhn"; }; kashmiri = { label = "Kashmiri"; version = "2.4.3" ; hash = "sha256-6T2QaWnt3+e5nr4vbk44FouqmeWKzia1lSf8S/bvqCs="; };
konkani = { label = "Konkani"; version = "2.4.3" ; sha256 = "0pcb5089dabac1k6ymqnbnlyk7svy2wnb5glvhsd8glycjhrcp70"; }; konkani = { label = "Konkani"; version = "2.4.3" ; hash = "sha256-hVy2rxrUTPDeNnugi3Bk7z0JqGmk4/yeUsAoI/4R7A8="; };
maithili = { label = "Maithili"; version = "2.4.3" ; sha256 = "1yfwv7pcj7k4jryz0s6mb56bq7fs15g56y7pi5yd89q1f8idk6bc"; }; maithili = { label = "Maithili"; version = "2.4.3" ; hash = "sha256-ikDcpJqdizAYRpgoebzqxOEeodJ6C3fO2rsqGzC0HCs="; };
sindhi = { label = "Sindhi"; version = "2.4.3" ; sha256 = "1iywzyy185bvfsfi5pp11c8bzrp40kni2cpwcmxqwha7c9v8brlc"; }; sindhi = { label = "Sindhi"; version = "2.4.3" ; hash = "sha256-wU3B9fh+8E1bFBMnakzmajY7eNKzed9+eYL5AOxyNQI="; };
}; };
mkpkg = license: name: {label, version, sha256}: fetchzip { mkpkg = license: pname: {label, version, hash}: stdenvNoCC.mkDerivation {
name = "lohit-${name}-${version}"; inherit pname version;
url = "https://releases.pagure.org/lohit/lohit-${name}-ttf-${version}.tar.gz"; src = fetchurl {
url = "https://releases.pagure.org/lohit/lohit-${pname}-ttf-${version}.tar.gz";
inherit hash;
};
postFetch = '' installPhase = ''
tar -xzf $downloadedFile --strip-components=1 runHook preInstall
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
cp -v *.ttf $out/share/fonts/truetype/ cp -v *.ttf $out/share/fonts/truetype/
@ -37,11 +40,11 @@ let
mkdir -p $out/etc/fonts/conf.d mkdir -p $out/etc/fonts/conf.d
cp -v *.conf $out/etc/fonts/conf.d cp -v *.conf $out/etc/fonts/conf.d
mkdir -p "$out/share/doc/lohit-${name}" mkdir -p "$out/share/doc/lohit-${pname}"
cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${name}/" cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${pname}/"
'';
inherit sha256; runHook postInstall
'';
meta = { meta = {
inherit license; inherit license;

View file

@ -1,16 +1,23 @@
{ lib, fetchzip, fetchFromGitHub }: { lib, stdenvNoCC, fetchurl, fetchFromGitHub }:
let pname = "mplus-outline-fonts"; let pname = "mplus-outline-fonts";
in { in
osdnRelease = fetchzip { {
name = "${pname}-osdn"; osdnRelease = stdenvNoCC.mkDerivation {
url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz"; pname = "${pname}-osdn";
sha256 = "sha256-+VN+aFx5hMlWwtk+FM+vL6G07+yEi9kYYsoQLSfMUZo="; version = "063a";
postFetch = ''
install -m444 -Dt $out/share/fonts/truetype/${pname} $out/*.ttf src = fetchurl {
shopt -s extglob dotglob url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz";
rm -rf $out/!(share) hash = "sha256-ROuXO0tq/1dN5FTbEF3cI+Z0nCKUc0vZyx4Nc05M3Xk=";
shopt -u extglob dotglob };
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype/${pname} *.ttf
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
@ -22,19 +29,25 @@ in {
}; };
}; };
githubRelease = fetchFromGitHub { githubRelease = stdenvNoCC.mkDerivation {
name = "${pname}-github"; pname = "${pname}-github";
owner = "coz-m"; version = "unstable-2022-05-19";
repo = "MPLUS_FONTS";
rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932"; src = fetchFromGitHub {
sha256 = "sha256-LSIyrstJOszll72mxXIC7EW4KEMTFCaQwWs59j0UScE="; owner = "coz-m";
postFetch = '' repo = "MPLUS_FONTS";
rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932";
hash = "sha256-jzDDUs1dKjqNjsMeTA2/4vm+akIisnOuE2mPQS7IDSA=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/{truetype,opentype}/${pname} mkdir -p $out/share/fonts/{truetype,opentype}/${pname}
mv $out/fonts/ttf/* $out/share/fonts/truetype/${pname} mv fonts/ttf/* $out/share/fonts/truetype/${pname}
mv $out/fonts/otf/* $out/share/fonts/opentype/${pname} mv fonts/otf/* $out/share/fonts/opentype/${pname}
shopt -s extglob dotglob
rm -rf $out/!(share) runHook postInstall
shopt -u extglob dotglob
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,17 +1,25 @@
{ lib, fetchzip, p7zip }: { lib, stdenvNoCC, fetchurl, p7zip }:
let stdenvNoCC.mkDerivation rec {
pname = "rounded-mgenplus"; pname = "rounded-mgenplus";
version = "20150602"; version = "20150602";
in fetchzip rec {
name = "${pname}-${version}";
url = "https://osdn.jp/downloads/users/8/8598/${name}.7z"; src = fetchurl {
postFetch = '' url = "https://osdn.jp/downloads/users/8/8598/${pname}-${version}.7z";
${p7zip}/bin/7z x $downloadedFile hash = "sha256-7OpnZJc9k5NiOPHAbtJGMQvsMg9j81DCvbfo0f7uJcw=";
};
sourceRoot = ".";
nativeBuildInputs = [ p7zip ];
installPhase = ''
runHook preInstall
install -m 444 -D -t $out/share/fonts/${pname} ${pname}-*.ttf install -m 444 -D -t $out/share/fonts/${pname} ${pname}-*.ttf
runHook postInstall
''; '';
sha256 = "0vwdknagdrl5dqwpb1x5lxkbfgvbx8dpg7cb6yamgz71831l05v1";
meta = with lib; { meta = with lib; {
description = "A Japanese font based on Rounded M+ and Noto Sans Japanese"; description = "A Japanese font based on Rounded M+ and Noto Sans Japanese";