11 suffix = lib.optionalString useUtf8 ".utf8";
16 , license # it's written in the beginning of each file
17 , files ? [ "SKK-JISYO.${name}" ]
19 name = lib.toLower (builtins.replaceStrings [ "." ] [ "_" ] name);
20 value = stdenvNoCC.mkDerivation {
21 pname = "skk-jisyo-" + lib.toLower name;
22 version = "0-unstable-2024-08-28";
24 src = fetchFromGitHub {
27 rev = "4eb91a3bbfef70bde940668ec60f3beae291e971";
28 sha256 = "sha256-sWz85Q6Bu2WoKsckSp5SlcuPUQN2mcq+BHMqNXQ/aho=";
31 nativeBuildInputs = lib.optionals useUtf8 [ nkf ];
37 '' + lib.concatMapStrings
40 | LC_ALL=C sed 's/coding: [^ ]\{1,\}/coding: utf-8/' \
43 (lib.optionals useUtf8 (map lib.escapeShellArg files)) + ''
49 '' + lib.concatMapStrings
52 ${lib.escapeShellArg file} \
53 $out/share/skk/${lib.escapeShellArg (baseNameOf file)}
55 (map (file: file + suffix) files) + ''
59 doInstallCheck = true;
60 installCheckPhase = ''
61 emptydict=': 0 candidates$'
62 ${skktools}/bin/skkdic-count /dev/null | grep "$emptydict"
63 ${skktools}/bin/skkdic-count $out/share/skk/* | grep -v "$emptydict"
66 passthru.updateScript = nix-update-script {
67 extraArgs = ["--version" "branch"];
71 inherit description license;
73 This package provides a kana-to-kanji conversion dictionary for the
74 SKK Japanese input method.
76 homepage = "https://github.com/skk-dev/dict";
77 maintainers = with maintainers; [ yuriaisaka midchildan ];
78 platforms = platforms.all;
83 lib.listToAttrs (map mkDictNameValue [
86 description = "The standard SKK dictionary";
87 license = lib.licenses.gpl2Plus;
91 description = "Small SKK dictionary";
92 license = lib.licenses.gpl2Plus;
96 description = "Medium sized SKK dictionary";
97 license = lib.licenses.gpl2Plus;
101 description = "Medium to large sized SKK dictionary";
102 license = lib.licenses.gpl2Plus;
106 description = "SKK dictionary for names";
107 license = lib.licenses.gpl2Plus;
111 description = "SKK dictionary for celebrities";
112 license = lib.licenses.gpl2Plus;
116 description = "SKK dictionary for locations";
117 license = lib.licenses.gpl2Plus;
121 description = "SKK dictionary for proper nouns";
122 license = lib.licenses.gpl2Plus;
126 description = "SKK dictionary for stations";
127 license = lib.licenses.gpl2Plus;
131 description = "SKK dictionary for legal terms";
132 license = lib.licenses.gpl2Plus;
136 description = "SKK dictionary for the Okinawan language";
137 license = lib.licenses.publicDomain;
140 name = "china_taiwan";
141 description = "SKK dictionary for Chinese & Taiwanese locations";
142 license = lib.licenses.gpl2Plus;
146 description = "SKK dictionary for abbreviated input";
147 license = lib.licenses.gpl2Plus;
151 description = "SKK dictionary for English to Japanese translation";
152 license = lib.licenses.cc-by-sa-30;
156 description = "SKK dictionary for Japanese zipcodes";
157 files = [ "zipcode/SKK-JISYO.zipcode" "zipcode/SKK-JISYO.office.zipcode" ];
158 license = lib.licenses.publicDomain;
162 description = "SKK dictionary for JIS level 2 kanjis";
163 license = lib.licenses.gpl2Plus;
167 description = "SKK dictionary for JIS level 3 and 4 kanjis";
168 license = lib.licenses.gpl2Plus;
173 A complementary SKK dictionary for JIS3_4 with JIS X 0213:2004 additions"
175 license = lib.licenses.gpl2Plus;
179 description = "SKK dictionary for variant kanjis";
180 license = lib.licenses.publicDomain;
183 name = "itaiji.JIS3_4";
184 description = "SKK dictionary for JIS level 3 and 4 variant kanjis";
185 license = lib.licenses.gpl2Plus;
189 description = "SKK dictionary for mazegaki";
190 license = lib.licenses.gpl2Plus;
194 description = "SKK dictionary for emojis";
195 license = lib.licenses.unicode-dfs-2016;
199 description = "SKK dictionary for pinyin to simplified Chinese input";
200 license = lib.licenses.gpl1Plus;