From 633055a2bd74b4ed53e6130e32dead37db7ff7bf Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:05:44 +0900 Subject: [PATCH 01/18] jp-zip-codes: init at 0-unstable-2024-08-01 --- pkgs/by-name/jp/jp-zip-codes/package.nix | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/jp/jp-zip-codes/package.nix diff --git a/pkgs/by-name/jp/jp-zip-codes/package.nix b/pkgs/by-name/jp/jp-zip-codes/package.nix new file mode 100644 index 000000000000..617841bc8837 --- /dev/null +++ b/pkgs/by-name/jp/jp-zip-codes/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "jp-zip-code"; + version = "0-unstable-2024-08-01"; + + src = fetchFromGitHub { + owner = "musjj"; + repo = "jp-zip-codes"; + rev = "94139331b79d8e23cd089fb9ad511ce55079154a"; + hash = "sha256-e+wsJv2cP2wUwVNimWy0eYr32pr7YUy8pJAYDYbk0zo="; + }; + + installPhase = '' + runHook preInstall + install -Dt $out ken_all.zip + install -Dt $out jigyosyo.zip + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Zip files containing japanese zip codes"; + longDescription = "Zip files with japanese zip codes for japanese IME dictionaries"; + homepage = "https://github.com/musjj/jp-zip-codes"; + license = lib.licenses.unlicense; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 392ec6ad7aa1d0036e0996785d5922a0924a6f96 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:06:12 +0900 Subject: [PATCH 02/18] jawiki-all-titles-in-ns0: init at 0-unstable-2024-09-11 --- .../ja/jawiki-all-titles-in-ns0/package.nix | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/ja/jawiki-all-titles-in-ns0/package.nix diff --git a/pkgs/by-name/ja/jawiki-all-titles-in-ns0/package.nix b/pkgs/by-name/ja/jawiki-all-titles-in-ns0/package.nix new file mode 100644 index 000000000000..3c79b955f99c --- /dev/null +++ b/pkgs/by-name/ja/jawiki-all-titles-in-ns0/package.nix @@ -0,0 +1,48 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "jawiki-all-titles-in-ns0"; + version = "0-unstable-2024-09-11"; + + src = fetchFromGitHub { + owner = "musjj"; + repo = "jawiki-archive"; + rev = "d205f63665e351ea853edc72157f14daa22a227f"; + hash = "sha256-Jj2vH8UMhgSzWv+RnOipnVNSdeOF6jttcLN/kVYa4D4="; + }; + + installPhase = '' + runHook preInstall + + mkdir $out + cp jawiki-latest-all-titles-in-ns0.gz $out/jawiki-all-titles-in-ns0.gz + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "A jawiki dump list of page titles in main namespace"; + homepage = "https://dumps.wikimedia.org/backup-index.html"; + license = with lib.licenses; [ + fdl13Only + cc-by-sa-30 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides a dump gz file + hydraPlatforms = [ ]; + }; +} From 78b3a6b434348703379e54705a938fd7804846be Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:06:32 +0900 Subject: [PATCH 03/18] mozcdic-ut-alt-cannadic: init at 0-unstable-2024-07-28 --- .../mo/mozcdic-ut-alt-cannadic/package.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-alt-cannadic/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-alt-cannadic/package.nix b/pkgs/by-name/mo/mozcdic-ut-alt-cannadic/package.nix new file mode 100644 index 000000000000..40295db08ce5 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-alt-cannadic/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-alt-cannadic"; + version = "0-unstable-2024-07-28"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-alt-cannadic"; + rev = "50fee0397b87fe508f9edd45bac56f5290d8ce66"; + hash = "sha256-KKUj3d9yR2kTTTFbroZQs+OZR4KUyAUYE/X3z9/vQvM="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-alt-cannadic.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT Alt-Cannadic Dictionary is a dictionary converted from Alt-Cannadic for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-alt-cannadic"; + license = with lib.licenses; [ + asl20 + gpl2 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From d148df37bbe4348c4bfab2ceeb19f905fc4e1d99 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:06:57 +0900 Subject: [PATCH 04/18] mozcdic-ut-edict2: init at 0-unstable-2024-07-28 --- pkgs/by-name/mo/mozcdic-ut-edict2/package.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-edict2/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-edict2/package.nix b/pkgs/by-name/mo/mozcdic-ut-edict2/package.nix new file mode 100644 index 000000000000..37551d7e0d04 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-edict2/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-edict2"; + version = "0-unstable-2024-07-28"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-edict2"; + rev = "b2112277d0d479b9218f42772356da3601b3e8cf"; + hash = "sha256-DIIp8FooWxyHMrQmq+2KUGEmYHKy+H6NtHrvRldxXqc="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-edict2.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT EDICT2 Dictionary is a dictionary converted from EDICT2 for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-sudachidict"; + license = with lib.licenses; [ + asl20 + cc-by-sa-40 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 6d471318dd50db95726484e7b9772ac45f7fc2e1 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:07:20 +0900 Subject: [PATCH 05/18] mozcdic-ut-jawiki: init at 0-unstable-2024-08-23 --- pkgs/by-name/mo/mozcdic-ut-jawiki/package.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-jawiki/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-jawiki/package.nix b/pkgs/by-name/mo/mozcdic-ut-jawiki/package.nix new file mode 100644 index 000000000000..6dcc2f803106 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-jawiki/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-jawiki"; + version = "0-unstable-2024-08-23"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-jawiki"; + rev = "08814f70cc0cc9b0f4757fa46f40d918dfd7073d"; + hash = "sha256-Sfw5cNXuno3aSUUPy9c3HODIu9cVSmskTwibD8w8jaM="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-jawiki.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT Jawiki Dictionary is a dictionary generated from the Japanese Wikipedia for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-jawiki"; + license = with lib.licenses; [ + asl20 + cc-by-sa-40 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 57f2fc98888af0070f57cde65789cec6fcff931c Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:07:36 +0900 Subject: [PATCH 06/18] mozcdic-ut-neologd: init at 0-unstable-2024-07-28 --- .../by-name/mo/mozcdic-ut-neologd/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-neologd/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-neologd/package.nix b/pkgs/by-name/mo/mozcdic-ut-neologd/package.nix new file mode 100644 index 000000000000..686fe1e9fefb --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-neologd/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-neologd"; + version = "0-unstable-2024-07-28"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-neologd"; + rev = "b7035b88db25ad1a933f05a33f193711c6c3b2db"; + hash = "sha256-JPTrWaDtdNs/Z0uLRwaS8Qc/l4/Y7NtwLanivyefXnk="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-neologd.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT NEologd Dictionary is a dictionary converted from mecab-ipadic-NEologd for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-neologd"; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From ee06c044df50df174b74a492125b74ad878e9c9b Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:07:52 +0900 Subject: [PATCH 07/18] mozcdic-ut-personal-names: init at 0-unstable-2024-08-06 --- .../mo/mozcdic-ut-personal-names/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-personal-names/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-personal-names/package.nix b/pkgs/by-name/mo/mozcdic-ut-personal-names/package.nix new file mode 100644 index 000000000000..96ee392c19d4 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-personal-names/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-personal-names"; + version = "0-unstable-2024-08-06"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-personal-names"; + rev = "79e1192de922bba74ce45f59fd591f1cd9a061f5"; + hash = "sha256-5cfoeQS7H4uMRi7CQGFwdwDetihWKNVdFdON+/syvDA="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-personal-names.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT Personal Name Dictionary is a dictionary for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-personal-names"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 6201a2761c04a6e3e6e04bc15fa22cb4c3fada7e Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:08:10 +0900 Subject: [PATCH 08/18] mozcdic-ut-place-names: init at 0-unstable-2024-08-06 --- .../mo/mozcdic-ut-place-names/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-place-names/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-place-names/package.nix b/pkgs/by-name/mo/mozcdic-ut-place-names/package.nix new file mode 100644 index 000000000000..b666aa027909 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-place-names/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-place-names"; + version = "0-unstable-2024-08-06"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-place-names"; + rev = "e606f2336b79bf0fa7fad3a0eb6a1a9baebafcb9"; + hash = "sha256-IKn5ge8OiAidAmqr5+F7f4b1nUPa0ZT0n+5PfvkJKAs="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-place-names.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT Place Name Dictionary is a dictionary converted from the Japan Post's ZIP code data for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-place-names"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 58a342c6375eae7531d05b87b53aff9ccf83ef9b Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:08:25 +0900 Subject: [PATCH 09/18] mozcdic-ut-skk-jisyo: init at 0-unstable-2024-07-27 --- .../mo/mozcdic-ut-skk-jisyo/package.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix b/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix new file mode 100644 index 000000000000..a88036c4cec6 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-skk-jisyo"; + version = "0-unstable-2024-07-27"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-skk-jisyo"; + rev = "7300f19e6a3f27334ed7af64589de8782549a13f"; + hash = "sha256-LJ1rP+uyh8K3IWCgKMDYt0EwEDiQqQL+wBdQCFbZM/k="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-skk-jisyo.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT SKK-JISYO Dictionary is a dictionary converted from SKK-JISYO for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-sudachidict"; + license = with lib.licenses; [ + asl20 + gpl2 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From 4441c635e4fa7ba4ae959febaa2d204bfd20ae10 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:08:43 +0900 Subject: [PATCH 10/18] mozcdic-ut-sudachidict: init at 0-unstable-2024-07-28 --- .../mo/mozcdic-ut-sudachidict/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/mo/mozcdic-ut-sudachidict/package.nix diff --git a/pkgs/by-name/mo/mozcdic-ut-sudachidict/package.nix b/pkgs/by-name/mo/mozcdic-ut-sudachidict/package.nix new file mode 100644 index 000000000000..2ddb8fe5d2b5 --- /dev/null +++ b/pkgs/by-name/mo/mozcdic-ut-sudachidict/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation { + pname = "mozcdic-ut-sudachidict"; + version = "0-unstable-2024-07-28"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "mozcdic-ut-sudachidict"; + rev = "a754f1fff5fded62cc066aa6be0ab0169059a144"; + hash = "sha256-WzhWNpqtiG9TtFHEOSbHG1mbb4ak0zCkO13g9ZWqyBE="; + }; + + installPhase = '' + runHook preInstall + + install -Dt $out mozcdic-ut-sudachidict.txt.tar.bz2 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT SudachiDict Dictionary is a dictionary converted from SudachiDict for Mozc."; + homepage = "https://github.com/utuhiro78/mozcdic-ut-sudachidict"; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides some zip files + hydraPlatforms = [ ]; + }; +} From bbb9b4bb379b0284a4d7e1a071072e9db5263ef5 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:09:07 +0900 Subject: [PATCH 11/18] merge-ut-dictionaries: init at 0-unstable-2024-08-28 --- .../me/merge-ut-dictionaries/package.nix | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 pkgs/by-name/me/merge-ut-dictionaries/package.nix diff --git a/pkgs/by-name/me/merge-ut-dictionaries/package.nix b/pkgs/by-name/me/merge-ut-dictionaries/package.nix new file mode 100644 index 000000000000..4f2e87466754 --- /dev/null +++ b/pkgs/by-name/me/merge-ut-dictionaries/package.nix @@ -0,0 +1,96 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, + python3, + jawiki-all-titles-in-ns0, + ibus-engines, + + mozcdic-ut-jawiki, + mozcdic-ut-personal-names, + mozcdic-ut-place-names, + mozcdic-ut-sudachidict, + + dictionaries ? [ + mozcdic-ut-jawiki + mozcdic-ut-personal-names + mozcdic-ut-place-names + mozcdic-ut-sudachidict + ], +}: + +stdenvNoCC.mkDerivation { + pname = "merge-ut-dictionaries"; + version = "0-unstable-2024-08-28"; + + src = fetchFromGitHub { + owner = "utuhiro78"; + repo = "merge-ut-dictionaries"; + rev = "9cacaadfc4a199914726687ad6545bfd7152c001"; + hash = "sha256-AdcwXl+33pyN8Q95EDNwMps3ObCzys8nicege6yeRk8="; + }; + + nativeBuildInputs = [ python3 ]; + + preConfigure = + if (dictionaries == [ ]) then + throw "merge-ut-dictionaries needs at least one dictionary" + else + '' + cd src + + substituteInPlace make.sh \ + --replace-fail "git" "true #" \ + --replace-fail "mv mozcdic-ut" "#" + + substituteInPlace count_word_hits.py \ + --replace-fail 'subprocess.run' "#" \ + --replace-fail "jawiki-latest-all-titles-in-ns0.gz" "${jawiki-all-titles-in-ns0}/jawiki-all-titles-in-ns0.gz" + + substituteInPlace remove_duplicate_ut_entries.py \ + --replace-fail "url =" 'url = "${ibus-engines.mozc.src}/src/data/dictionary_oss/id.def"#' \ + --replace-fail "urllib.request.urlopen" "open" \ + --replace-fail "read().decode()" "read()" + + for dir in ${builtins.toString dictionaries}; do + cp -v $dir/mozcdic-ut-*.txt.tar.bz2 . + done + ''; + + buildPhase = '' + runHook preBuild + + bash make.sh + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + install -Dt $out mozcdic-ut.txt + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version" + "branch" + ]; + }; + + meta = { + description = "Mozc UT dictionaries are additional dictionaries for Mozc."; + homepage = "https://github.com/utuhiro78/merge-ut-dictionaries"; + license = with lib.licenses; [ + cc-by-sa-40 + bsd3 + asl20 + ]; + maintainers = with lib.maintainers; [ pineapplehunter ]; + platforms = lib.platforms.all; + # this does not need to be separately built + # it only provides a dictionary + hydraPlatforms = [ ]; + }; +} From c99947bd69f932d6a3c7f93745be0ccef0e5e551 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 24 May 2024 19:09:37 +0900 Subject: [PATCH 12/18] ibus-engines.mozc-ut: init at 2.30.5544.102 --- .../ibus-engines/ibus-mozc/default.nix | 78 +++++++++++-------- pkgs/top-level/all-packages.nix | 11 +++ 2 files changed, 58 insertions(+), 31 deletions(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix index 4c19fd9abc01..b374329d23ff 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix @@ -1,36 +1,43 @@ -{ lib -, buildBazelPackage -, fetchFromGitHub -, qt6 -, pkg-config -, bazel -, ibus -, unzip -, xdg-utils +{ + lib, + buildBazelPackage, + fetchFromGitHub, + qt6, + pkg-config, + bazel, + ibus, + unzip, + xdg-utils, + jp-zip-codes, + dictionaries ? [ ], + merge-ut-dictionaries, }: + let - zip-codes = fetchFromGitHub { - owner = "musjj"; - repo = "jp-zip-codes"; - rev = "119c888a38032a92e139c52cd26f45bb495c4d54"; - hash = "sha256-uyAL2TcFJsYZACFDAxIQ4LE40Hi4PVrQRnJl5O5+RmU="; - }; + ut-dictionary = merge-ut-dictionaries.override { inherit dictionaries; }; in buildBazelPackage rec { pname = "ibus-mozc"; - version = "2.29.5374.102"; + version = "2.30.5544.102"; src = fetchFromGitHub { owner = "google"; repo = "mozc"; rev = version; - hash = "sha256-AcIN5sWPBe4JotAUYv1fytgQw+mJzdFhKuVPLR48soA="; + hash = "sha256-w0bjoMmq8gL7DSehEG7cKqp5e4kNOXnCYLW31Zl9FRs="; fetchSubmodules = true; }; - nativeBuildInputs = [ qt6.wrapQtAppsHook pkg-config unzip ]; + nativeBuildInputs = [ + qt6.wrapQtAppsHook + pkg-config + unzip + ]; - buildInputs = [ ibus qt6.qtbase ]; + buildInputs = [ + ibus + qt6.qtbase + ]; dontAddBazelOpts = true; removeRulesCC = false; @@ -38,7 +45,7 @@ buildBazelPackage rec { inherit bazel; fetchAttrs = { - sha256 = "sha256-ToBLVJpAQErL/P1bfWJca2FjhDW5XTrwuJQLquwlrhA="; + sha256 = "sha256-+N7AhSemcfhq6j0IUeWZ0DyVvr1l5FbAkB+kahTy3pM="; # remove references of buildInputs and zip code files preInstall = '' @@ -46,7 +53,12 @@ buildBazelPackage rec { ''; }; - bazelFlags = [ "--config" "oss_linux" "--compilation_mode" "opt" ]; + bazelFlags = [ + "--config" + "oss_linux" + "--compilation_mode" + "opt" + ]; bazelTargets = [ "package" ]; @@ -55,13 +67,17 @@ buildBazelPackage rec { --replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open" \ --replace-fail "/usr" "$out" substituteInPlace src/WORKSPACE.bazel \ - --replace-fail "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip" "file://${zip-codes}/ken_all.zip" \ - --replace-fail "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip" "file://${zip-codes}/jigyosyo.zip" + --replace-fail "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip" "file://${jp-zip-codes}/ken_all.zip" \ + --replace-fail "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip" "file://${jp-zip-codes}/jigyosyo.zip" ''; - preConfigure = '' - cd src - ''; + preConfigure = + '' + cd src + '' + + lib.optionalString (dictionaries != [ ]) '' + cat ${ut-dictionary}/mozcdic-ut.txt >> data/dictionary_oss/dictionary00.txt + ''; buildAttrs.installPhase = '' runHook preInstall @@ -78,10 +94,6 @@ buildBazelPackage rec { runHook postInstall ''; - passthru = { - inherit zip-codes; - }; - meta = with lib; { isIbusEngine = true; description = "Japanese input method from Google"; @@ -89,6 +101,10 @@ buildBazelPackage rec { homepage = "https://github.com/google/mozc"; license = licenses.free; platforms = platforms.linux; - maintainers = with maintainers; [ gebner ericsagnes pineapplehunter ]; + maintainers = with maintainers; [ + gebner + ericsagnes + pineapplehunter + ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0cd1bd429c47..372ec4fffdd3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6692,6 +6692,17 @@ with pkgs; mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { }; + mozc-ut = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { dictionaries = [ + mozcdic-ut-alt-cannadic + mozcdic-ut-edict2 + mozcdic-ut-jawiki + mozcdic-ut-neologd + mozcdic-ut-personal-names + mozcdic-ut-place-names + mozcdic-ut-skk-jisyo + mozcdic-ut-sudachidict + ]; }; + openbangla-keyboard = libsForQt5.callPackage ../applications/misc/openbangla-keyboard { withIbusSupport = true; }; pinyin = callPackage ../tools/inputmethods/ibus-engines/ibus-pinyin { }; From 47bf9f19a428b4076d426e559b99463c8336b752 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 21:57:52 +0900 Subject: [PATCH 13/18] fixup! merge-ut-dictionaries: init at 0-unstable-2024-08-28 --- pkgs/by-name/me/merge-ut-dictionaries/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/me/merge-ut-dictionaries/package.nix b/pkgs/by-name/me/merge-ut-dictionaries/package.nix index 4f2e87466754..e6b5b6fb51e9 100644 --- a/pkgs/by-name/me/merge-ut-dictionaries/package.nix +++ b/pkgs/by-name/me/merge-ut-dictionaries/package.nix @@ -20,6 +20,8 @@ ], }: +assert lib.assertMsg (dictionaries != [ ]) "merge-ut-dictionaries needs at least one dictionary."; + stdenvNoCC.mkDerivation { pname = "merge-ut-dictionaries"; version = "0-unstable-2024-08-28"; @@ -53,7 +55,7 @@ stdenvNoCC.mkDerivation { --replace-fail "urllib.request.urlopen" "open" \ --replace-fail "read().decode()" "read()" - for dir in ${builtins.toString dictionaries}; do + for dir in ${lib.concatStringsSep " " dictionaries}; do cp -v $dir/mozcdic-ut-*.txt.tar.bz2 . done ''; From 867f358e06a31c24a7fa3887e0962091847855e4 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 22:02:27 +0900 Subject: [PATCH 14/18] fixup! jp-zip-codes: init at 0-unstable-2024-08-01 --- pkgs/by-name/jp/jp-zip-codes/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/jp/jp-zip-codes/package.nix b/pkgs/by-name/jp/jp-zip-codes/package.nix index 617841bc8837..84141d46b154 100644 --- a/pkgs/by-name/jp/jp-zip-codes/package.nix +++ b/pkgs/by-name/jp/jp-zip-codes/package.nix @@ -9,6 +9,8 @@ stdenvNoCC.mkDerivation { pname = "jp-zip-code"; version = "0-unstable-2024-08-01"; + # This package uses a mirror as the source because the + # original provider uses the same URL for updated content. src = fetchFromGitHub { owner = "musjj"; repo = "jp-zip-codes"; From c1a8c57988abfad4688377fb543f3e3188adb83d Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 22:29:18 +0900 Subject: [PATCH 15/18] fixup! mozcdic-ut-skk-jisyo: init at 0-unstable-2024-07-27 --- pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix b/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix index a88036c4cec6..264490ad6126 100644 --- a/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix +++ b/pkgs/by-name/mo/mozcdic-ut-skk-jisyo/package.nix @@ -36,7 +36,7 @@ stdenvNoCC.mkDerivation { homepage = "https://github.com/utuhiro78/mozcdic-ut-sudachidict"; license = with lib.licenses; [ asl20 - gpl2 + gpl2Plus ]; maintainers = with lib.maintainers; [ pineapplehunter ]; platforms = lib.platforms.all; From 3049c67f73694e1e464b74041b670e3577af0676 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 22:45:32 +0900 Subject: [PATCH 16/18] fixup! fixup! merge-ut-dictionaries: init at 0-unstable-2024-08-28 --- .../me/merge-ut-dictionaries/package.nix | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/me/merge-ut-dictionaries/package.nix b/pkgs/by-name/me/merge-ut-dictionaries/package.nix index e6b5b6fb51e9..198cdb27e9ce 100644 --- a/pkgs/by-name/me/merge-ut-dictionaries/package.nix +++ b/pkgs/by-name/me/merge-ut-dictionaries/package.nix @@ -35,30 +35,26 @@ stdenvNoCC.mkDerivation { nativeBuildInputs = [ python3 ]; - preConfigure = - if (dictionaries == [ ]) then - throw "merge-ut-dictionaries needs at least one dictionary" - else - '' - cd src + preConfigure = '' + cd src - substituteInPlace make.sh \ - --replace-fail "git" "true #" \ - --replace-fail "mv mozcdic-ut" "#" + substituteInPlace make.sh \ + --replace-fail "git" "true #" \ + --replace-fail "mv mozcdic-ut" "#" - substituteInPlace count_word_hits.py \ - --replace-fail 'subprocess.run' "#" \ - --replace-fail "jawiki-latest-all-titles-in-ns0.gz" "${jawiki-all-titles-in-ns0}/jawiki-all-titles-in-ns0.gz" + substituteInPlace count_word_hits.py \ + --replace-fail 'subprocess.run' "#" \ + --replace-fail "jawiki-latest-all-titles-in-ns0.gz" "${jawiki-all-titles-in-ns0}/jawiki-all-titles-in-ns0.gz" - substituteInPlace remove_duplicate_ut_entries.py \ - --replace-fail "url =" 'url = "${ibus-engines.mozc.src}/src/data/dictionary_oss/id.def"#' \ - --replace-fail "urllib.request.urlopen" "open" \ - --replace-fail "read().decode()" "read()" + substituteInPlace remove_duplicate_ut_entries.py \ + --replace-fail "url =" 'url = "${ibus-engines.mozc.src}/src/data/dictionary_oss/id.def"#' \ + --replace-fail "urllib.request.urlopen" "open" \ + --replace-fail "read().decode()" "read()" - for dir in ${lib.concatStringsSep " " dictionaries}; do - cp -v $dir/mozcdic-ut-*.txt.tar.bz2 . - done - ''; + for dir in ${lib.concatStringsSep " " dictionaries}; do + cp -v $dir/mozcdic-ut-*.txt.tar.bz2 . + done + ''; buildPhase = '' runHook preBuild @@ -84,11 +80,7 @@ stdenvNoCC.mkDerivation { meta = { description = "Mozc UT dictionaries are additional dictionaries for Mozc."; homepage = "https://github.com/utuhiro78/merge-ut-dictionaries"; - license = with lib.licenses; [ - cc-by-sa-40 - bsd3 - asl20 - ]; + license = lib.licenses.asl20; maintainers = with lib.maintainers; [ pineapplehunter ]; platforms = lib.platforms.all; # this does not need to be separately built From dda629ddc87c0a86658f27b6cc387aef416f26aa Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 22:50:29 +0900 Subject: [PATCH 17/18] fixup! jp-zip-codes: init at 0-unstable-2024-08-01 --- pkgs/by-name/jp/jp-zip-codes/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/jp/jp-zip-codes/package.nix b/pkgs/by-name/jp/jp-zip-codes/package.nix index 84141d46b154..71e20fb4c831 100644 --- a/pkgs/by-name/jp/jp-zip-codes/package.nix +++ b/pkgs/by-name/jp/jp-zip-codes/package.nix @@ -36,7 +36,7 @@ stdenvNoCC.mkDerivation { description = "Zip files containing japanese zip codes"; longDescription = "Zip files with japanese zip codes for japanese IME dictionaries"; homepage = "https://github.com/musjj/jp-zip-codes"; - license = lib.licenses.unlicense; + license = lib.licenses.publicDomain; maintainers = with lib.maintainers; [ pineapplehunter ]; platforms = lib.platforms.all; # this does not need to be separately built From 5566c5f66615af6e349acf159f49ff9506cd5bba Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 19 Sep 2024 23:07:09 +0900 Subject: [PATCH 18/18] fixup! ibus-engines.mozc-ut: init at 2.30.5544.102 --- .../ibus-mozc => by-name/mo/mozc}/ibus-setup-mozc-jp.desktop | 0 .../ibus-mozc/default.nix => by-name/mo/mozc/package.nix} | 0 pkgs/top-level/all-packages.nix | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename pkgs/{tools/inputmethods/ibus-engines/ibus-mozc => by-name/mo/mozc}/ibus-setup-mozc-jp.desktop (100%) rename pkgs/{tools/inputmethods/ibus-engines/ibus-mozc/default.nix => by-name/mo/mozc/package.nix} (100%) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/ibus-setup-mozc-jp.desktop b/pkgs/by-name/mo/mozc/ibus-setup-mozc-jp.desktop similarity index 100% rename from pkgs/tools/inputmethods/ibus-engines/ibus-mozc/ibus-setup-mozc-jp.desktop rename to pkgs/by-name/mo/mozc/ibus-setup-mozc-jp.desktop diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/pkgs/by-name/mo/mozc/package.nix similarity index 100% rename from pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix rename to pkgs/by-name/mo/mozc/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 372ec4fffdd3..f81f1ed394fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6690,9 +6690,9 @@ with pkgs; m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n { }; - mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { }; + inherit mozc; - mozc-ut = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { dictionaries = [ + mozc-ut = mozc.override { dictionaries = [ mozcdic-ut-alt-cannadic mozcdic-ut-edict2 mozcdic-ut-jawiki