From c59b0caf17238a8c9f0d3d059ec927da9d4c8463 Mon Sep 17 00:00:00 2001 From: Edward <9159652+winterec@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:48:03 +0800 Subject: [PATCH] eduli: use installFonts hook --- pkgs/by-name/ed/eduli/package.nix | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/ed/eduli/package.nix b/pkgs/by-name/ed/eduli/package.nix index f4f547f43ba2..d813b0c96a61 100644 --- a/pkgs/by-name/ed/eduli/package.nix +++ b/pkgs/by-name/ed/eduli/package.nix @@ -2,35 +2,33 @@ stdenvNoCC, lib, fetchzip, + installFonts, }: -stdenvNoCC.mkDerivation { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "eduli"; version = "3.0"; src = fetchzip { - url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/MoeLI-3.0.zip"; + url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/MoeLI-${finalAttrs.version}.zip"; hash = "sha256-bDQtLugYPWwJJNusBLEJrgIVufocRK4NIR0CCGaTkyw="; }; - installPhase = '' - mkdir -p $out/share/fonts/ - for name in *.ttf; do - mv "$name" "$out/share/fonts/$(echo $name | sed -r 's/(.*)\(.*\)\.ttf/\1.ttf/')" - done - ''; + nativeBuildInputs = [ installFonts ]; meta = { description = "MOE Li Font, a clerical Chinese font by the Ministry of Education, ROC (Taiwan)"; longDescription = '' - The MOE Li Font is a li (clerical srcipt) font - provided by - the Midistry of Education, Republic of China (Taiwan). + The MOE Li Font is a li (clerical script) font provided by + the Ministry of Education, Republic of China (Taiwan). It currently includes 4,808 Chinese characters. The clerical script (lishu) is an archaic style of Chinese calligraphy. ''; - homepage = "http://language.moe.gov.tw/result.aspx?classify_sn=23&subclassify_sn=436&content_sn=49"; + homepage = "https://language.moe.gov.tw/material/info?m=9fe3fb11-c3d5-41f2-b029-6d18a2c2fd0d"; license = lib.licenses.cc-by-nd-30; - maintainers = with lib.maintainers; [ ShamrockLee ]; + maintainers = with lib.maintainers; [ + ShamrockLee + winterec + ]; }; -} +})