From 799e0f1a2a8fc56ebf83cab5d5fbf8140b6e7bf5 Mon Sep 17 00:00:00 2001 From: Jiehong Ma Date: Wed, 7 Oct 2020 15:40:11 +0200 Subject: [PATCH] ttf-tw-moe: first version --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/data/fonts/ttf-tw-moe/default.nix | 27 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/data/fonts/ttf-tw-moe/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8dd51baed53..a2da8f870e6 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3951,6 +3951,12 @@ githubId = 2502736; name = "James Hillyerd"; }; + jiehong = { + email = "nixos@majiehong.com"; + github = "Jiehong"; + githubId = 1061229; + name = "Jiehong Ma"; + }; jirkamarsik = { email = "jiri.marsik89@gmail.com"; github = "jirkamarsik"; diff --git a/pkgs/data/fonts/ttf-tw-moe/default.nix b/pkgs/data/fonts/ttf-tw-moe/default.nix new file mode 100644 index 00000000000..aeda5cd695d --- /dev/null +++ b/pkgs/data/fonts/ttf-tw-moe/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchzip }: + +fetchzip { + name = "ttf-tw-moe"; + + url = "https://github.com/Jiehong/TW-fonts/archive/b30ae75e9dc299afd61e31cfd43f7a0a157dfb1f.zip"; + + postFetch = '' + mkdir -p $out/share/fonts + unzip -j $downloadedFile TW-fonts-b30ae75e9dc299afd61e31cfd43f7a0a157dfb1f/\*.ttf -d $out/share/fonts/truetype + ''; + + sha256 = "0khgxih9z6pqf7pdp21xjp24wb9ygsrdcmzpjb7vr9x8n78i1fbs"; + + meta = with stdenv.lib; { + homepage = "http://www.moe.gov.tw/"; + description = "Set of KAI and SONG fonts from the Ministry of Education of Taiwan"; + longDescription = '' + Installs 2 TTF fonts: MOESongUN and TW-MOE-Std-Kai. + Both are provided by the Ministry of Education of Taiwan; each character's shape + closely follows the official recommendation, and can be used as for teaching purposes. + ''; + license = licenses.cc-by-nd-30; + maintainers = [ maintainers.jiehong ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 26f04573dde..0e7019ff2a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19476,6 +19476,8 @@ in ttf-envy-code-r = callPackage ../data/fonts/ttf-envy-code-r {}; + ttf-tw-moe = callPackage ../data/fonts/ttf-tw-moe { }; + twemoji-color-font = callPackage ../data/fonts/twemoji-color-font { inherit (nodePackages) svgo; };