treewide: convert 16 fonts

This commit is contained in:
Weijia Wang 2023-01-25 12:34:24 +01:00
parent dc985b7f90
commit 948a25ffd3
16 changed files with 245 additions and 173 deletions

View file

@ -1,31 +1,29 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "liberastika";
version = "1.1.5";
in fetchzip rec {
name = "liberastika-${version}";
url = "mirror://sourceforge/project/lib-ka/liberastika-ttf-${version}.zip";
src = fetchzip {
url = "mirror://sourceforge/project/lib-ka/liberastika-ttf-${version}.zip";
stripRoot = false;
hash = "sha256-woUpOmxhj6eEw7PKJ8EyRcs3ORj0gCZhxHP5a5dy5z0=";
};
stripRoot = false;
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts
install -Dm644 $out/*.ttf -t $out/share/fonts/truetype
shopt -s extglob dotglob
rm -rf $out/!(share)
shopt -u extglob dotglob
install -Dm644 *.ttf -t $out/share/fonts/truetype
runHook postInstall
'';
sha256 = "sha256-1hoETOjPRUIzzM+NUR+g/Ph16jXmH2ARSlZHjgEwoeM=";
meta = with lib; {
description = "Liberation Sans fork with improved cyrillic support";
homepage = "https://sourceforge.net/projects/lib-ka/";
license = licenses.gpl2;
platforms = platforms.all;
hydraPlatforms = [];
maintainers = [ ];
};
}

View file

@ -1,17 +1,21 @@
{ fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
fetchzip {
name = "MPH-2B-Damase-2";
stdenvNoCC.mkDerivation rec {
pname = "mph-2b-damase";
version = "2";
url = "http://www.wazu.jp/downloads/damase_v.2.zip";
src = fetchzip {
url = "https://web.archive.org/web/20160322114946/http://www.wazu.jp/downloads/damase_v.2.zip";
hash = "sha256-4x78D+c3ZBxfhTQQ4+gyxvrsuztHF2ItXLh4uA0PxvU=";
};
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
runHook postInstall
'';
sha256 = "0yzf12z6fpbgycqwiz88f39iawdhjabadfa14wxar3nhl9n434ql";
meta = {
};
meta = { };
}

View file

@ -1,13 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchurl }:
fetchzip {
name = "mro-unicode-2013-05-25";
stdenvNoCC.mkDerivation {
pname = "mro-unicode";
version = "unstable-2013-05-25";
url = "https://github.com/phjamr/MroUnicode/raw/f297de070f7eba721a47c850e08efc119d3bfbe8/MroUnicode-Regular.ttf";
src = fetchurl {
url = "https://github.com/phjamr/MroUnicode/raw/f297de070f7eba721a47c850e08efc119d3bfbe8/MroUnicode-Regular.ttf";
hash = "sha256-hcQmTuRWxaU5KEMXg/O0b1olE8YxXWz0PAlqAJknR/0=";
};
postFetch = "install -Dm644 $downloadedFile $out/share/fonts/truetype/MroUnicode-Regular.ttf";
dontUnpack = true;
sha256 = "1i71bjd9gdyn8ladfncbfhz6xz1h8xx8yf876j1z8lh719410c8g";
installPhase = ''
runHook preInstall
install -Dm644 $src $out/share/fonts/truetype/MroUnicode-Regular.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/phjamr/MroUnicode";

View file

@ -1,21 +1,24 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
version = "1.3.3";
mkPretendard = { pname, typeface, sha256 }:
fetchzip {
name = "${pname}-${version}";
mkPretendard = { pname, typeface, hash }:
stdenvNoCC.mkDerivation {
inherit pname version;
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
inherit sha256;
src = fetchzip {
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
stripRoot = false;
inherit hash;
};
stripRoot = false;
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/
install -Dm644 $out/public/static/*.otf -t $out/share/fonts/opentype
rm -rf $out/{public,web,LICENSE.txt}
install -Dm644 public/static/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
meta = with lib; {
@ -32,18 +35,18 @@ in
pretendard = mkPretendard {
pname = "pretendard";
typeface = "Pretendard";
sha256 = "sha256-lRHRdCAg3i3+3Y6j0dCXUgwLdeS/VeI6KNkbDKchNEY=";
hash = "sha256-xCEZlwTPhrNIO6WODl55wo2oin+iMYOL/rVaEybpzr0=";
};
pretendard-jp = mkPretendard {
pname = "pretendard-jp";
typeface = "PretendardJP";
sha256 = "sha256-VgGt/WoaaJJDAzw+gUQVgTQ+q34bdAaKUB4cA9eU0dQ=";
hash = "sha256-x0G7ULzkIJqZlK995+wWKHXZdWryUTRouGTa5LsJQzk=";
};
pretendard-std = mkPretendard {
pname = "pretendard-std";
typeface = "PretendardStd";
sha256 = "sha256-FOlZrr6CHPfUm9Q+Yoi0HLQUI7cAhQYq6P6sJGXBIWg=";
hash = "sha256-/I8LZhFB86/+o+IzUP+bSIq7scKPOL7k/6/Bom0ZSqg=";
};
}

View file

@ -1,19 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
fetchzip rec {
stdenvNoCC.mkDerivation rec {
pname = "ruwudu";
version = "2.000";
url = "https://software.sil.org/downloads/r/ruwudu/Ruwudu-${version}.zip";
src = fetchzip {
url = "https://software.sil.org/downloads/r/ruwudu/Ruwudu-${version}.zip";
hash = "sha256-FP+ZHm1fKlozAAI2PbJ4r4v5OwRxBtYMRLmRwPbqx2I=";
};
installPhase = ''
runHook preInstall
postFetch = ''
rm -rf $out/web $out/manifest.json
mkdir -p $out/share/{doc/${pname},fonts/truetype}
mv $out/*.ttf $out/share/fonts/truetype/
mv $out/*.txt $out/documentation $out/share/doc/${pname}/
'';
mv *.ttf $out/share/fonts/truetype/
mv *.txt documentation $out/share/doc/${pname}/
sha256 = "sha256-JCvVPbAFBWHL2eEnEUSgdTZ+Vkw3wkS3aS85xQZKNQs=";
runHook postInstall
'';
meta = with lib; {
homepage = "https://software.sil.org/ruwudu/";

View file

@ -1,16 +1,26 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchurl }:
fetchzip {
name = "sampradaya-2015-05-26";
stdenvNoCC.mkDerivation rec {
pname = "sampradaya";
version = "0.5.0";
url = "https://bitbucket.org/OorNaattaan/sampradaya/raw/afa9f7c6ab17e14bd7dd74d0acaec2f75454dfda/Sampradaya.ttf";
src = fetchurl {
url = "https://github.com/deepestblue/sampradaya/releases/download/v${version}/Sampradaya.ttf";
hash = "sha256-ygKMNzHvbLR2A5HHrfY2C9ZUg0yng+JL3cyg6sBKqeQ=";
};
postFetch = "install -Dm644 $downloadedFile $out/share/fonts/truetype/Sampradaya.ttf";
dontUnpack = true;
sha256 = "1pqyj5r5jc7dk8yyzl7i6qq2m9zvahcjj49a66wwzdby5zyw8dqv";
installPhase = ''
runHook preInstall
install -Dm644 $src $out/share/fonts/truetype/Sampradaya.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://bitbucket.org/OorNaattaan/sampradaya/";
homepage = "https://github.com/deepestblue/sampradaya";
description = "Unicode-compliant Grantha font";
maintainers = with maintainers; [ mathnerd314 ];
license = licenses.ofl; # See font metadata

View file

@ -1,15 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchurl }:
let
version = "2016-03-03";
in fetchzip {
name = "shrikhand-${version}";
stdenvNoCC.mkDerivation {
pname = "shrikhand";
version = "unstable-2016-03-03";
url = "https://github.com/jonpinhorn/shrikhand/raw/c11c9b0720fba977fad7cb4f339ebacdba1d1394/build/Shrikhand-Regular.ttf";
src = fetchurl {
url = "https://github.com/jonpinhorn/shrikhand/raw/c11c9b0720fba977fad7cb4f339ebacdba1d1394/build/Shrikhand-Regular.ttf";
hash = "sha256-wHP1Bwu5Yw3a+RwDOHrmthsnuvwyCV4l6ma5EjA6EMA=";
};
postFetch = "install -D -m644 $downloadedFile $out/share/fonts/truetype/Shrikhand-Regular.ttf";
dontUnpack = true;
sha256 = "0s54k9cs1g2yz6lwg5gakqb12vg5qkfdz3pc8mh7mib2s6q926hs";
installPhase = ''
runHook preInstall
install -D -m644 $src $out/share/fonts/truetype/Shrikhand-Regular.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://jonpinhorn.github.io/shrikhand/";

View file

@ -1,18 +1,22 @@
{ fetchzip, lib }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "sil-abyssinica";
version = "2.200";
in
fetchzip rec {
name = "sil-abyssinica-${version}";
url = "https://software.sil.org/downloads/r/abyssinica/AbyssinicaSIL-${version}.zip";
sha256 = "sha256-Kvswqzw8remcu36QaVjeyk03cR4wW5BKQMDihiaxJoE=";
postFetch = ''
rm -rf $out/web
mkdir -p $out/share/{fonts/truetype,doc/${name}}
mv $out/*.ttf $out/share/fonts/truetype/
mv $out/*.txt $out/documentation $out/share/doc/${name}/
src = fetchzip {
url = "https://software.sil.org/downloads/r/abyssinica/AbyssinicaSIL-${version}.zip";
hash = "sha256-IdWMZHm9VoLVDO0//ISujxlXUxe0O6+aEcdP63YRmPg=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/{fonts/truetype,doc/${pname}-${version}}
mv *.ttf $out/share/fonts/truetype/
mv *.txt documentation $out/share/doc/${pname}-${version}/
runHook postInstall
'';
meta = with lib; {

View file

@ -1,19 +1,23 @@
{ fetchzip, lib }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "sil-padauk";
version = "5.001";
in
fetchzip rec {
name = "sil-padauk-${version}";
url = "https://software.sil.org/downloads/r/padauk/Padauk-${version}.zip";
sha256 = "sha256-6H9EDmXr1Ox2fgLw9sG5JrCAllK3tbjvMfLi8DTF1f0=";
postFetch = ''
src = fetchzip {
url = "https://software.sil.org/downloads/r/padauk/Padauk-${version}.zip";
hash = "sha256-rLzuDUd+idjTN0xQxblXQ9V2rQtJPN2EtWGmTRY1R7U=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
rm -rf $out/{manifest.json,web/}
mv $out/*.ttf $out/share/fonts/truetype/
mkdir -p $out/share/doc/${name}
mv $out/*.txt $out/documentation/ $out/share/doc/${name}/
mv *.ttf $out/share/fonts/truetype/
mkdir -p $out/share/doc/${pname}-${version}
mv *.txt documentation/ $out/share/doc/${pname}-${version}/
runHook postInstall
'';
meta = with lib; {

View file

@ -1,20 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
rev = "69132c99873894746c9710707aaeb2cea2609709";
in
fetchzip {
stdenvNoCC.mkDerivation {
pname = "sitelen-seli-kiwen";
version = "unstable-2022-06-28";
url = "https://raw.githubusercontent.com/kreativekorp/sitelen-seli-kiwen/${rev}/sitelenselikiwen.zip";
hash = "sha256-63sl/Ha2QAe8pVKCpLNs//DB0kjLdW01u6tVMrGquIU=";
stripRoot = false;
src = fetchzip {
url = "https://raw.githubusercontent.com/kreativekorp/sitelen-seli-kiwen/69132c99873894746c9710707aaeb2cea2609709/sitelenselikiwen.zip";
stripRoot = false;
hash = "sha256-viOLAj9Rn60bcQkkDHVuKHCE8KPnIz/L0hIJhum1SSQ=";
};
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/{opentype,truetype}
mv $out/*.eot $out/share/fonts/opentype/
mv $out/*.ttf $out/share/fonts/truetype/
mv *.eot $out/share/fonts/opentype/
mv *.ttf $out/share/fonts/truetype/
runHook postInstall
'';
meta = with lib; {

View file

@ -1,24 +1,28 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "stix-otf";
version = "1.1.1";
in fetchzip {
name = "stix-otf-${version}";
url = "http://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/STIXv${version}-word.zip";
src = fetchzip {
url = "https://sources.debian.org/src/fonts-stix/1.1.1-4.1/STIXv${version}-word.zip";
stripRoot = false;
hash = "sha256-M3STue+RPHi8JgZZupV0dVLZYKBiFutbBOlanuKkD08=";
};
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
installPhase = ''
runHook preInstall
install -Dm644 Fonts/STIX-Word/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
sha256 = "04d4qxq3i9fyapsmxk6d9v1xirjam8c74fyxs6n24d3gf2945zmw";
meta = with lib; {
homepage = "http://www.stixfonts.org/";
description = "Fonts for Scientific and Technical Information eXchange";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [maintainers.rycee];
maintainers = [ maintainers.rycee ];
};
}

View file

@ -1,24 +1,34 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchurl }:
{
tai-ahom = fetchzip {
name = "tai-ahom-2015-07-06";
tai-ahom = stdenvNoCC.mkDerivation rec {
pname = "tai-ahom";
version = "unstable-2015-07-06";
url = "https://github.com/enabling-languages/tai-languages/blob/b57a3ea4589af69bb8e87c6c4bb7cd367b52f0b7/ahom/.fonts/ttf/.original/AhomUnicode_FromMartin.ttf?raw=true";
src = fetchurl {
url = "https://github.com/enabling-languages/tai-languages/raw/b57a3ea4589af69bb8e87c6c4bb7cd367b52f0b7/ahom/.fonts/ttf/.original/AhomUnicode_FromMartin.ttf";
hash = "sha256-U1vcVf/VgXhvK1f2Iw2JKkd2EzJgz7KbHAwnUanX8n4=";
};
postFetch = "install -Dm644 $downloadedFile $out/share/fonts/truetype/AhomUnicode.ttf";
dontUnpack = true;
sha256 = "03h8ql9d5bzq4j521j0cz08ddf717bzim1nszh2aar6kn0xqnp9q";
installPhase = ''
runHook preInstall
meta = with lib; {
homepage = "https://github.com/enabling-languages/tai-languages";
description = "Unicode-compliant Tai Ahom font";
maintainers = with maintainers; [ mathnerd314 ];
license = licenses.ofl; # See font metadata
platforms = platforms.all;
install -Dm644 $src $out/share/fonts/truetype/AhomUnicode.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/enabling-languages/tai-languages";
description = "Unicode-compliant Tai Ahom font";
maintainers = with maintainers; [ mathnerd314 ];
license = licenses.ofl; # See font metadata
platforms = platforms.all;
};
};
};
# TODO: package others (Khamti Shan, Tai Aiton, Tai Phake, and/or Assam Tai)
# TODO: package others (Khamti Shan, Tai Aiton, Tai Phake, and/or Assam Tai)
}

View file

@ -1,21 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "ttf-envy-code-r";
version = "PR7";
in fetchzip {
name = "${pname}-0.${version}";
url = "http://download.damieng.com/fonts/original/EnvyCodeR-${version}.zip";
src = fetchzip {
url = "http://download.damieng.com/fonts/original/EnvyCodeR-${version}.zip";
hash = "sha256-pJqC/sbNjxEwbVf2CVoXMBI5zvT3DqzRlKSqFT8I2sM=";
};
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*.txt -d "$out/share/doc/${pname}"
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
install -Dm644 *.txt -t $out/share/doc/${pname}
runHook postInstall
'';
sha256 = "0x0r07nax68cmz7490x2crzzgdg4j8fg63wppcmjqm0230bggq2z";
meta = with lib; {
homepage = "https://damieng.com/blog/tag/envy-code-r";
description = "Free scalable coding font by DamienG";

View file

@ -1,19 +1,22 @@
{ lib, fetchzip }:
let
{ lib, stdenvNoCC, fetchzip }:
stdenvNoCC.mkDerivation rec {
pname = "ttf-tw-moe";
version = "2020-11-14";
in
fetchzip {
name = "ttf-tw-moe";
url = "https://github.com/Jiehong/TW-fonts/archive/${version}.zip";
src = fetchzip {
url = "https://github.com/Jiehong/TW-fonts/archive/${version}.zip";
hash = "sha256-9gy8xO93ViIPmpg1du0DbXVCR2FowourLH8nP9d6HK0=";
};
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile TW-fonts-${version}/\*.ttf -d $out/share/fonts/truetype
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
runHook postInstall
'';
sha256 = "1jd3gjjfa4vadp6d499n0irz5b22z611kd7q5qgqf6s2fwbxfhiz";
meta = with lib; {
homepage = "http://www.moe.gov.tw/";
description = "Set of KAI and SONG fonts from the Ministry of Education of Taiwan";

View file

@ -1,18 +1,22 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
fetchzip rec {
stdenvNoCC.mkDerivation rec {
pname = "ubuntu-font-family";
version = "0.83";
url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-${version}.zip";
src = fetchzip {
url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-${version}.zip";
hash = "sha256-FAg1xn8Gcbwmuvqtg9SquSet4oTT9nqE+Izeq7ZMVcA=";
};
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/ubuntu
mv $out/*.ttf $out/share/fonts/ubuntu
find $out -maxdepth 1 ! -type d -exec rm {} +
'';
mv *.ttf $out/share/fonts/ubuntu
sha256 = "090y665h4kf2bi623532l6wiwkwnpd0xds0jr7560xwfwys1hiqh";
runHook postInstall
'';
meta = with lib; {
description = "Ubuntu Font Family";

View file

@ -1,11 +1,8 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
stdenvNoCC.mkDerivation rec {
pname = "victor-mono";
version = "1.5.4";
in
fetchzip {
name = "victor-mono-${version}";
stripRoot = false;
# Upstream prefers we download from the website,
# but we really insist on a more versioned resource.
@ -14,19 +11,23 @@ fetchzip {
# so we extract it from the tagged release.
# Both methods produce the same file, but this way
# we can safely reason about what version it is.
url = "https://github.com/rubjo/victor-mono/raw/v${version}/public/VictorMonoAll.zip";
src = fetchzip {
url = "https://github.com/rubjo/victor-mono/raw/v${version}/public/VictorMonoAll.zip";
stripRoot = false;
hash = "sha256-E8j1bfYrM8yRtasiwgTvyE4EYx2LyAbmw3MXH1l+owk=";
};
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p "$out/share/fonts/"
mv $out/OTF $out/share/fonts/opentype
mv $out/TTF $out/share/fonts/truetype
mv OTF $out/share/fonts/opentype
mv TTF $out/share/fonts/truetype
rm -r $out/{EOT,WOFF,WOFF2,LICENSE.txt}
runHook postInstall
'';
sha256 = "sha256-1si0d2lpuXaDcSc3giVMMMbZc/eKbHKU3wmwfYHZ8o0=";
meta = with lib; {
description = "Free programming font with cursive italics and ligatures";
homepage = "https://rubjo.github.io/victor-mono";