From 64d418def4ac3945357c958bccedb2595e8283fb Mon Sep 17 00:00:00 2001 From: x Date: Tue, 22 Apr 2025 13:07:43 +0800 Subject: [PATCH 1/3] edusong: update hash for updated upstream --- pkgs/by-name/ed/edusong/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ed/edusong/package.nix b/pkgs/by-name/ed/edusong/package.nix index 4c9901f0c766..55da46ecbde1 100644 --- a/pkgs/by-name/ed/edusong/package.nix +++ b/pkgs/by-name/ed/edusong/package.nix @@ -6,12 +6,12 @@ stdenvNoCC.mkDerivation rec { pname = "edusong"; - version = "1.0"; # The upstream doesn't provide the version + version = "4.0"; src = fetchzip { name = "${pname}-${version}"; url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/eduSong_Unicode.zip"; - hash = "sha256-pIG1EbFGf2O2AzM4+HCCvGPodBBwUt7ozpb+BpPk5Kw="; + hash = "sha256-4NBnwMrYufeZbgSiD2fAhe4tuy0aAA5u9tWwjQQjEQk="; }; installPhase = '' From be4069b7da7dfa754198bf158bd2a116ac74da25 Mon Sep 17 00:00:00 2001 From: x Date: Tue, 22 Apr 2025 13:10:13 +0800 Subject: [PATCH 2/3] edusong: harmonize description and longDescription with the other two MOE fonts --- pkgs/by-name/ed/edusong/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ed/edusong/package.nix b/pkgs/by-name/ed/edusong/package.nix index 55da46ecbde1..bdd306c9b272 100644 --- a/pkgs/by-name/ed/edusong/package.nix +++ b/pkgs/by-name/ed/edusong/package.nix @@ -20,11 +20,9 @@ stdenvNoCC.mkDerivation rec { ''; meta = { - description = "The MOE Standard Song Font, a Chinese font by the Ministry of Education, ROC (Taiwan)"; + description = "The MOE Song font, a Song-style Chinese character typeface"; longDescription = '' - The MOE Standard Song Font is a Chinese Song font provided by - the Midistry of Education, Republic of China (Taiwan). - Song or Ming is a category of CKJ typefaces in print. + A Song-style Chinese character typeface published by the Ministry of Education of the Republic of China (Taiwan). The Song style is also referred to as 宋體, 宋体, sòngtǐ, 明體, 明体, or míngtǐ, in Chinese; 명조체, 明朝體, or myeongjo in Korean; 明朝体, みんちょうたい, or minchōtai in Japanese. ''; homepage = "https://language.moe.gov.tw/result.aspx?classify_sn=23&subclassify_sn=436&content_sn=48"; license = lib.licenses.cc-by-nd-30; From 00adb0968ce8592db442d4f30bf5a3494a45e101 Mon Sep 17 00:00:00 2001 From: x Date: Tue, 22 Apr 2025 15:09:11 +0800 Subject: [PATCH 3/3] edusong: ensure correct filename in installPhase fetchzip's unzipping the file without any special options will create a file with garbled characters (mojibake) and 'invalid encoding' appended to the filename. The original filename can be seen using unzipNLS with option -O CP950. Also see https://wiki.archlinux.org/title/Character_encoding#Troubleshooting. --- pkgs/by-name/ed/edusong/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ed/edusong/package.nix b/pkgs/by-name/ed/edusong/package.nix index bdd306c9b272..dec473ccf5f0 100644 --- a/pkgs/by-name/ed/edusong/package.nix +++ b/pkgs/by-name/ed/edusong/package.nix @@ -16,7 +16,7 @@ stdenvNoCC.mkDerivation rec { installPhase = '' mkdir -p $out/share/fonts/ - mv *.ttf $out/share/fonts/ + mv eduSong_Unicode*.ttf $out/share/fonts/eduSong_Unicode\(2024年12月\).ttf ''; meta = {