fcitx5: add patched nicola table

inky
Elnu 2 years ago
parent b97d17f92a
commit 7e17bbdb7c

@ -1,4 +1,4 @@
{ pkgs, ... }: { lib, pkgs, ... }:
with import ../theme; let with import ../theme; let
themeFolder = ".local/share/fcitx5/themes/${theme}/"; themeFolder = ".local/share/fcitx5/themes/${theme}/";
@ -6,7 +6,18 @@ in
{ {
i18n.inputMethod = { i18n.inputMethod = {
enabled = "fcitx5"; enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-anthy ]; fcitx5.addons = with pkgs; [
(fcitx5-anthy.overrideAttrs (oldAttrs: {
# bugged custom Nicola tables fixed in master
# https://github.com/fcitx/fcitx5-anthy/issues/8
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx5-anthy";
rev = "9031b56c334dd0a2da6a5b5d3ab3570e06395ca0";
hash = "sha256-a0z3OoSiiVslrTZuI5PDws+ykWFFKdev7fSpGgjNAA8=";
};
}))
];
}; };
home.file = { home.file = {
@ -19,4 +30,16 @@ in
"${themeFolder}radio.png".source = ./radio.png; "${themeFolder}radio.png".source = ./radio.png;
".config/fcitx5/conf/classicui.conf".text = "Theme=${theme}"; ".config/fcitx5/conf/classicui.conf".text = "Theme=${theme}";
}; };
# Generating patch:
# $ source="$(find /nix/store -maxdepth 1 -type d -name '*fcitx5-anthy*' | head -n 1)/share/fcitx5/anthy/nicola-j.sty"
# $ cp $source nicola.sty
# $ chmod 644 nicola.sty
# $ vim nicola.sty
# $ diff $source nicola.sty > nicola.patch
home.activation.nicola = let
target = ".local/share/fcitx5/anthy/nicola.sty";
in lib.hm.dag.entryAfter["writeBoundary"] ''
rm -f -- ${target}
patch -ruN ${pkgs.fcitx5-anthy}/share/fcitx5/anthy/nicola-j.sty ${./nicola.patch} -o ${target}
'';
} }

@ -0,0 +1,4 @@
24c24
< -=,』,』
---
> -=ー,』,』
Loading…
Cancel
Save