eduli: use installFonts hook

This commit is contained in:
Edward
2026-04-10 14:48:03 +08:00
parent 8d03b42f15
commit c59b0caf17
+12 -14
View File
@@ -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
];
};
}
})