treewide: convert 17 fonts to stdenvNoCC.mkDerivation

This commit is contained in:
Weijia Wang 2023-01-30 13:22:54 +01:00
parent 0125b49eeb
commit d694e0b0f6
17 changed files with 243 additions and 192 deletions

View file

@ -1,23 +1,26 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "arkpandora";
version = "2.04"; version = "2.04";
in fetchurl {
name = "arkpandora-${version}";
urls = [ src = fetchurl {
"http://distcache.FreeBSD.org/ports-distfiles/ttf-arkpandora-${version}.tgz" urls = [
"ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ttf-arkpandora-${version}.tgz" "http://distcache.FreeBSD.org/ports-distfiles/ttf-arkpandora-${version}.tgz"
"http://www.users.bigpond.net.au/gavindi/ttf-arkpandora-${version}.tgz" "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ttf-arkpandora-${version}.tgz"
]; "http://www.users.bigpond.net.au/gavindi/ttf-arkpandora-${version}.tgz"
downloadToTemp = true; ];
recursiveHash = true; hash = "sha256-ofyVPJjQD8w+8WgETF2UcJlfbSsKQgBsH3ob+yjvrpo=";
postFetch = '' };
tar -xzvf $downloadedFile --strip-components=1
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype cp *.ttf $out/share/fonts/truetype
runHook postInstall
''; '';
sha256 = "177k0fbs0787al0snkl8w68d2qkg7snnnq6qp28j9s98vaabs04k";
meta = { meta = {
description = "Font, metrically identical to Arial and Times New Roman"; description = "Font, metrically identical to Arial and Times New Roman";

View file

@ -1,23 +1,24 @@
{ lib, fetchurl, unzip }: { lib, stdenvNoCC, fetchurl, unzip }:
let stdenvNoCC.mkDerivation rec {
pname = "ccsymbols"; pname = "ccsymbols";
version = "2020-04-19"; version = "2020-04-19";
in
fetchurl rec { src = fetchurl {
name = "${pname}-${version}"; url = "https://www.ctrl.blog/file/${version}_cc-symbols.zip";
hash = "sha256-hkARhb8T6VgGAybYkVuPuebjhuk1dwiBJ1bZMwvYpMY=";
};
url = "https://www.ctrl.blog/file/${version}_cc-symbols.zip"; sourceRoot = ".";
sha256 = "sha256-mrNgTS6BAVJrIz9fHOjf8pkSbZtZ55UjyoL9tQ1fiA8=";
recursiveHash = true;
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];
downloadToTemp = true; installPhase = ''
postFetch = '' runHook preInstall
mkdir -p "$out/share/fonts/ccsymbols"
unzip -d "$out/share/fonts/ccsymbols" "$downloadedFile" install -Dm644 CCSymbols.* -t $out/share/fonts/ccsymbols
runHook postInstall
''; '';
passthru = { inherit pname version; }; passthru = { inherit pname version; };

View file

@ -1,21 +1,24 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "cnstrokeorder";
version = "0.0.4.7"; version = "0.0.4.7";
in fetchurl {
name = "cnstrokeorder-${version}";
url = "http://rtega.be/chmn/CNstrokeorder-${version}.ttf"; src = fetchurl {
url = "http://rtega.be/chmn/CNstrokeorder-${version}.ttf";
hash = "sha256-YYtOcUvt1V0DwAs/vf9KltcmYCFJNirvwjGyOK4JpIY=";
};
recursiveHash = true; dontUnpack = true;
downloadToTemp = true;
postFetch = '' installPhase = ''
install -D $downloadedFile $out/share/fonts/truetype/CNstrokeorder-${version}.ttf runHook preInstall
install -D $src $out/share/fonts/truetype/CNstrokeorder-${version}.ttf
runHook postInstall
''; '';
sha256 = "0cizgfdgbq9av5c8234mysr2q54iw9pkxrmq5ga8gv32hxhl5bx4";
meta = with lib; { meta = with lib; {
description = "Chinese font that shows stroke order for HSK 1-4"; description = "Chinese font that shows stroke order for HSK 1-4";
homepage = "http://rtega.be/chmn/index.php?subpage=68"; homepage = "http://rtega.be/chmn/index.php?subpage=68";

View file

@ -1,22 +1,23 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "curie";
version = "1.0"; version = "1.0";
in fetchurl rec {
name = "curie-${version}";
url = "https://github.com/NerdyPepper/curie/releases/download/v${version}/curie-v${version}.tar.gz"; src = fetchurl {
url = "https://github.com/NerdyPepper/curie/releases/download/v${version}/curie-v${version}.tar.gz";
hash = "sha256-B89GNbOmm3lY/cRWQJEFu/5morCM/WrRQb/m6covbt8=";
};
downloadToTemp = true; sourceRoot = ".";
recursiveHash = true; installPhase = ''
runHook preInstall
sha256 = "sha256-twPAzsbTveYW0rQd7FYZz5AMZgvPbNmn5c7Nfzn7B0A=";
postFetch = ''
tar xzf $downloadedFile
mkdir -p $out/share/fonts/misc mkdir -p $out/share/fonts/misc
install *.otb $out/share/fonts/misc install *.otb $out/share/fonts/misc
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,22 +1,21 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "edwin";
version = "0.52"; version = "0.52";
in fetchurl {
name = "edwin-${version}";
url = "https://github.com/MuseScoreFonts/Edwin/archive/refs/tags/v${version}.tar.gz"; src = fetchurl {
url = "https://github.com/MuseScoreFonts/Edwin/archive/refs/tags/v${version}.tar.gz";
hash = "sha256-7yQUiLZupGc+RCZdhyO08JWqhROYqMOZ9wRdGJ6uixU=";
};
downloadToTemp = true; installPhase = ''
runHook preInstall
recursiveHash = true;
sha256 = "sha256-e0ADK72ECl+QMvLWtFJfeHBmuEwzr9M+Kqvkd5Z2mmo=";
postFetch = ''
tar xzf $downloadedFile
mkdir -p $out/share/fonts/opentype mkdir -p $out/share/fonts/opentype
install Edwin-${version}/*.otf $out/share/fonts/opentype install *.otf $out/share/fonts/opentype
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,20 +1,24 @@
{ lib, fetchurl } : { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "fixedsys-excelsior";
version = "3.00"; version = "3.00";
in fetchurl rec {
name = "fixedsys-excelsior-${version}";
url = "https://raw.githubusercontent.com/chrissimpkins/codeface/master/fonts/fixed-sys-excelsior/FSEX300.ttf"; src = fetchurl {
url = "https://raw.githubusercontent.com/chrissimpkins/codeface/master/fonts/fixed-sys-excelsior/FSEX300.ttf";
hash = "sha256-buDzVzvF4z6TthbvYoL0m8DiJ6Map1Osdu0uPz0CBW0=";
};
downloadToTemp = true; dontUnpack = true;
recursiveHash = true;
postFetch = '' installPhase = ''
install -m444 -D $downloadedFile $out/share/fonts/truetype/${name}.ttf runHook preInstall
install -m444 -D $src $out/share/fonts/truetype/${pname}-${version}.ttf
runHook postInstall
''; '';
sha256 = "32d6f07f1ff08c764357f8478892b2ba5ade23427af99759f34a0ba24bcd2e37";
meta = { meta = {
homepage = "http://www.fixedsysexcelsior.com/"; homepage = "http://www.fixedsysexcelsior.com/";
description = "Pan-unicode version of Fixedsys, a classic DOS font"; description = "Pan-unicode version of Fixedsys, a classic DOS font";

View file

@ -1,17 +1,22 @@
{ lib, fetchurl, writeScript }: { lib, stdenvNoCC, fetchurl, writeScript }:
let stdenvNoCC.mkDerivation rec {
pname = "i.ming";
version = "8.00"; version = "8.00";
in
fetchurl {
name = "i.ming-${version}";
url = "https://raw.githubusercontent.com/ichitenfont/I.Ming/${version}/${version}/I.Ming-${version}.ttf";
hash = "sha256-JGu9H0+IdJL6QQtLwvqlFLEaJdq1JVRiqLm5zptwjyE=";
recursiveHash = true; src = fetchurl {
downloadToTemp = true; url = "https://raw.githubusercontent.com/ichitenfont/I.Ming/${version}/${version}/I.Ming-${version}.ttf";
postFetch = '' hash = "sha256-6345629OdKz6lTnD3Vjtp6DzsYy0ojaL0naXGrtdZvw=";
install -DT -m444 $downloadedFile $out/share/fonts/truetype/I.Ming/I.Ming.ttf };
dontUnpack = true;
installPhase = ''
runHook preInstall
install -DT -m444 $src $out/share/fonts/truetype/I.Ming/I.Ming.ttf
runHook postInstall
''; '';
passthru = { passthru = {

View file

@ -1,20 +1,24 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "last-resort";
version = "15.000"; version = "15.000";
in fetchurl {
name = "last-resort-${version}";
url = "https://github.com/unicode-org/last-resort-font/releases/download/${version}/LastResortHE-Regular.ttf"; src = fetchurl {
downloadToTemp = true; url = "https://github.com/unicode-org/last-resort-font/releases/download/${version}/LastResortHE-Regular.ttf";
hash = "sha256-Qyo/tuBvBHnG/LW8sUAy62xpeqlXfyfwjUCbr4vJEag=";
};
postFetch = '' dontUnpack = true;
install -D -m 0644 $downloadedFile $out/share/fonts/truetype/LastResortHE-Regular.ttf
installPhase = ''
runHook preInstall
install -D -m 0644 $src $out/share/fonts/truetype/LastResortHE-Regular.ttf
runHook postInstall
''; '';
recursiveHash = true;
sha256 = "sha256-mkRIA6Hajl5e9j/qb3WSKaIaHmekjl5wGUSszWMfmjw=";
meta = with lib; { meta = with lib; {
description = "Fallback font of last resort"; description = "Fallback font of last resort";
homepage = "https://github.com/unicode-org/last-resort-font"; homepage = "https://github.com/unicode-org/last-resort-font";

View file

@ -1,18 +1,20 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "libertinus";
version = "7.040"; version = "7.040";
in fetchurl rec {
name = "libertinus-${version}";
url = "https://github.com/alerque/libertinus/releases/download/v${version}/Libertinus-${version}.tar.xz";
sha256 = "0z658r88p52dyrcslv0wlccw0sw7m5jz8nbqizv95nf7bfw96iyk";
downloadToTemp = true; src = fetchurl {
recursiveHash = true; url = "https://github.com/alerque/libertinus/releases/download/v${version}/Libertinus-${version}.tar.xz";
hash = "sha256-f+nwInItHBzGfcLCihELO7VbrjV1GWFg0kIsiTM7OFA=";
};
installPhase = ''
runHook preInstall
postFetch = ''
tar xf $downloadedFile --strip=1
install -m644 -Dt $out/share/fonts/opentype static/OTF/*.otf install -m644 -Dt $out/share/fonts/opentype static/OTF/*.otf
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,16 +1,22 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
fetchurl { stdenvNoCC.mkDerivation {
pname = "linja-pi-pu-lukin"; pname = "linja-pi-pu-lukin";
version = "unstable-2021-10-29"; version = "unstable-2021-10-29";
url = "https://web.archive.org/web/20211029000000/https://jansa-tp.github.io/linja-pi-pu-lukin/PuLukin.otf"; src = fetchurl {
hash = "sha256-VPdrMHWpiokFYON4S8zT+pSs4TsB17S8TZRtkjqIqU8="; url = "https://web.archive.org/web/20211029000000/https://jansa-tp.github.io/linja-pi-pu-lukin/PuLukin.otf";
hash = "sha256-Mf7P9fLGiG7L555Q3wRaI/PRv/TIs0njLq2IzIbc5Wo=";
};
downloadToTemp = true; dontUnpack = true;
recursiveHash = true;
postFetch = '' installPhase = ''
install -D $downloadedFile $out/share/fonts/opentype/linja-pi-pu-lukin.otf runHook preInstall
install -D $src $out/share/fonts/opentype/linja-pi-pu-lukin.otf
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -230,15 +230,22 @@ rec {
pname = "noto-fonts-emoji-blob-bin"; pname = "noto-fonts-emoji-blob-bin";
version = "14.0.1"; version = "14.0.1";
in in
fetchurl { stdenvNoCC.mkDerivation {
name = "${pname}-${version}"; inherit pname version;
url = "https://github.com/C1710/blobmoji/releases/download/v${version}/Blobmoji.ttf";
sha256 = "sha256-wSH9kRJ8y2i5ZDqzeT96dJcEJnHDSpU8bOhmxaT+UCg=";
downloadToTemp = true; src = fetchurl {
recursiveHash = true; url = "https://github.com/C1710/blobmoji/releases/download/v${version}/Blobmoji.ttf";
postFetch = '' hash = "sha256-w9s7uF6E6nomdDmeKB4ATcGB/5A4sTwDvwHT3YGXz8g=";
install -Dm 444 $downloadedFile $out/share/fonts/blobmoji/Blobmoji.ttf };
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm 444 $src $out/share/fonts/blobmoji/Blobmoji.ttf
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,21 +1,21 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "open-fonts"; pname = "open-fonts";
version = "0.7.0"; version = "0.7.0";
in
fetchurl {
name = "${pname}-${version}";
url = "https://github.com/kiwi0fruit/open-fonts/releases/download/${version}/open-fonts.tar.xz"; src = fetchurl {
downloadToTemp = true; url = "https://github.com/kiwi0fruit/open-fonts/releases/download/${version}/open-fonts.tar.xz";
recursiveHash = true; hash = "sha256-NJKbdrvgZz9G7mjAJYzN7rU/fo2xRFZA2BbQ+A56iPw=";
sha256 = "sha256-bSP9Flotoo3E5vRU3eKOUAPD2fmkWseWYWG4y0S07+4="; };
installPhase = ''
runHook preInstall
postFetch = ''
tar xf $downloadedFile
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
install open-fonts/*.ttf $out/share/fonts/truetype install *.ttf $out/share/fonts/truetype
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,29 +1,30 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation {
pname = "pecita";
version = "5.4"; version = "5.4";
in
fetchurl { src = fetchurl {
name = "pecita-${version}"; url = "http://pecita.eu/b/Pecita.otf";
hash = "sha256-D9IZ+p4UFHUNt9me7D4vv0x6rMK9IaViKPliCEyX6t4=";
};
url = "http://pecita.eu/b/Pecita.otf"; dontUnpack = true;
downloadToTemp = true; installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/opentype mkdir -p $out/share/fonts/opentype
cp -v $downloadedFile $out/share/fonts/opentype/Pecita.otf cp -v $src $out/share/fonts/opentype/Pecita.otf
'';
recursiveHash = true; runHook postInstall
sha256 = "0pwm20f38lcbfkdqkpa2ydpc9kvmdg0ifc4h2dmipsnwbcb5rfwm"; '';
meta = with lib; { meta = with lib; {
homepage = "http://pecita.eu/police-en.php"; homepage = "http://pecita.eu/police-en.php";
description = "Handwritten font with connected glyphs"; description = "Handwritten font with connected glyphs";
license = licenses.ofl; license = licenses.ofl;
platforms = platforms.all; platforms = platforms.all;
maintainers = [maintainers.rycee]; maintainers = [ maintainers.rycee ];
}; };
} }

View file

@ -1,21 +1,27 @@
{ lib, fetchurl, libarchive }: { lib, stdenvNoCC, fetchurl, p7zip }:
let stdenvNoCC.mkDerivation rec {
pname = "sarasa-gothic";
version = "0.38.0"; version = "0.38.0";
in fetchurl {
name = "sarasa-gothic-${version}";
# Use the 'ttc' files here for a smaller closure size. src = fetchurl {
# (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.) # Use the 'ttc' files here for a smaller closure size.
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z"; # (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.)
sha256 = "sha256-lGkb3e2EFHkDLm+/KArfOQ50qBFRThlpcID06g0t4aI="; url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z";
hash = "sha256-UXWstk1vIoaFqa8nVxfJcAtN7BzWevzgfMx1gyXu0k8=";
};
recursiveHash = true; sourceRoot = ".";
downloadToTemp = true;
nativeBuildInputs = [ p7zip ];
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
${libarchive}/bin/bsdtar -xf $downloadedFile -C $out/share/fonts/truetype cp *.ttc $out/share/fonts/truetype
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,25 +1,24 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "scientifica";
version = "2.3"; version = "2.3";
in fetchurl rec {
name = "scientifica-${version}";
url = "https://github.com/NerdyPepper/scientifica/releases/download/v${version}/scientifica.tar"; src = fetchurl {
url = "https://github.com/NerdyPepper/scientifica/releases/download/v${version}/scientifica.tar";
hash = "sha256-8IV4aaDoRsbxddy4U90fEZ6henUhjmO38HNtWo4ein8=";
};
downloadToTemp = true; installPhase = ''
runHook preInstall
recursiveHash = true;
sha256 = "sha256-pVWkj/2lFpmWk0PPDrIMU4Gey7/m/9tzUsuD3ZDUAdc=";
postFetch = ''
tar xf $downloadedFile
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/fonts/misc mkdir -p $out/share/fonts/misc
install scientifica/ttf/*.ttf $out/share/fonts/truetype install ttf/*.ttf $out/share/fonts/truetype
install scientifica/otb/*.otb $out/share/fonts/misc install otb/*.otb $out/share/fonts/misc
install scientifica/bdf/*.bdf $out/share/fonts/misc install bdf/*.bdf $out/share/fonts/misc
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,25 +1,31 @@
{ lib, fetchurl, xorg }: { lib, stdenvNoCC, fetchurl, xorg }:
let stdenvNoCC.mkDerivation rec {
pname = "spleen"; pname = "spleen";
version = "1.9.1"; version = "1.9.1";
in fetchurl {
name = "${pname}-${version}";
url = "https://github.com/fcambus/spleen/releases/download/${version}/spleen-${version}.tar.gz";
downloadToTemp = true; src = fetchurl {
recursiveHash = true; url = "https://github.com/fcambus/spleen/releases/download/${version}/spleen-${version}.tar.gz";
postFetch = '' hash = "sha256-fvWcTgKkXp3e1ryhi1Oc3w8OtJ5svLJXhY2lasXapiI=";
tar xvf $downloadedFile --strip=1 };
nativeBuildInputs = [ xorg.mkfontscale ];
dontBuild = true;
installPhase = ''
runHook preInstall
d="$out/share/fonts/misc" d="$out/share/fonts/misc"
install -D -m 644 *.{pcf,bdf,otf} -t "$d" install -D -m 644 *.{pcf,bdf,otf} -t "$d"
install -D -m 644 *.psfu -t "$out/share/consolefonts" install -D -m 644 *.psfu -t "$out/share/consolefonts"
install -m644 fonts.alias-spleen $d/fonts.alias install -m644 fonts.alias-spleen $d/fonts.alias
# create fonts.dir so NixOS xorg module adds to fp # create fonts.dir so NixOS xorg module adds to fp
${xorg.mkfontscale}/bin/mkfontdir "$d" mkfontdir "$d"
runHook postInstall
''; '';
sha256 = "sha256-6Imsa0ku8On63di0DOo0QxBa0t+tbtPRxM531EIiG94=";
meta = with lib; { meta = with lib; {
description = "Monospaced bitmap fonts"; description = "Monospaced bitmap fonts";

View file

@ -1,19 +1,23 @@
{ lib, fetchurl }: { lib, stdenvNoCC, fetchurl }:
let stdenvNoCC.mkDerivation rec {
pname = "unifont_upper";
version = "15.0.01"; version = "15.0.01";
in fetchurl rec {
name = "unifont_upper-${version}";
url = "mirror://gnu/unifont/unifont-${version}/${name}.ttf"; src = fetchurl {
url = "mirror://gnu/unifont/unifont-${version}/${pname}-${version}.ttf";
hash = "sha256-o6ItW9fME+f4t2cvhj96r3ZG9nKLAUznn/pdukFYnxw=";
};
downloadToTemp = true; dontUnpack = true;
recursiveHash = true; installPhase = ''
runHook preInstall
postFetch = "install -Dm644 $downloadedFile $out/share/fonts/truetype/unifont_upper.ttf"; install -Dm644 $src $out/share/fonts/truetype/unifont_upper.ttf
hash = "sha256-cGX9umTGRfrQT3gwPgNqxPHB7Un3ZT3b7hPy4IP45Fk="; runHook postInstall
'';
meta = with lib; { meta = with lib; {
description = "Unicode font for glyphs above the Unicode Basic Multilingual Plane"; description = "Unicode font for glyphs above the Unicode Basic Multilingual Plane";