This commit is contained in:
2026-07-30 16:45:45 +09:00
parent ecabb8b630
commit ee9ce66d55
+40 -1
View File
@@ -1,4 +1,43 @@
{ pkgs, ... }: { pkgs, ... }:
let
# CC-BY-SA 3.0: https://github.com/jiro-aqua/aquamozc-dictionary
kanaengDictionary =
pkgs.runCommandNoCC "mozcdic-ut-kanaeng"
{
nativeBuildInputs = with pkgs; [
gawk
gnutar
bzip2
];
}
''
mkdir -p "$out"
awk -F '\t' 'NF == 3 { print $1 "\t0000\t0000\t8000\t" $2; }' \
${
pkgs.fetchurl {
url = "https://raw.githubusercontent.com/jiro-aqua/aquamozc-dictionary/ae7fae40b18f1500d97e3e4531fdff22abdc6a39/edict-katakana-english/kanaeng.mozc.txt";
hash = "sha256-rw8AlE2YAc3d4B6qQ6+LYchDiGwm6TesIfOozzZBGXo=";
}
} > mozcdic-ut-kanaeng.txt
tar -cjf "$out/mozcdic-ut-kanaeng.txt.tar.bz2" mozcdic-ut-kanaeng.txt
'';
mozcWithKanaeng = pkgs.mozc.override {
dictionaries = with pkgs; [
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
kanaengDictionary
];
};
in
{ {
i18n.inputMethod = { i18n.inputMethod = {
enable = true; enable = true;
@@ -7,7 +46,7 @@
fcitx5 = { fcitx5 = {
waylandFrontend = true; waylandFrontend = true;
addons = with pkgs; [ addons = with pkgs; [
fcitx5-mozc-ut (fcitx5-mozc.override { mozc = mozcWithKanaeng; })
fcitx5-gtk fcitx5-gtk
kdePackages.fcitx5-qt kdePackages.fcitx5-qt
qt6Packages.fcitx5-configtool qt6Packages.fcitx5-configtool