diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix index 1ce947361df9..d8181142c09f 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix @@ -13,17 +13,15 @@ in stdenv.mkDerivation rec { pname = "ibus-typing-booster"; - version = "2.7.5"; + version = "2.19.10"; src = fetchFromGitHub { owner = "mike-fabian"; repo = "ibus-typing-booster"; rev = version; - sha256 = "072mi8r10v78sfs81zxdwfabf87fp872c99c5iral1ywwa4iynpl"; + sha256 = "Ie3cQ1YC+LB5I5LtKyJ0RO+dyjFbVsemW110t3gPmCM="; }; - patches = [ ./hunspell-dirs.patch ]; - nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook gobject-introspection ]; buildInputs = [ python ibus gtk3 m17n_lib ]; @@ -34,8 +32,8 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://mike-fabian.github.io/ibus-typing-booster/"; license = licenses.gpl3Plus; - description = "A typing booster engine for the IBus platform"; - maintainers = with maintainers; [ ]; + description = "A completion input method for faster typing"; + maintainers = with maintainers; [ ncfavier ]; isIbusEngine = true; }; } diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/hunspell-dirs.patch b/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/hunspell-dirs.patch deleted file mode 100644 index 7b624b379a26..000000000000 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/hunspell-dirs.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/engine/itb_util.py b/engine/itb_util.py -index ded236a..633525a 100755 ---- a/engine/itb_util.py -+++ b/engine/itb_util.py -@@ -1876,14 +1876,18 @@ def find_hunspell_dictionary(language): - If no dictionary can be found for the requested language, - the return value is ('', ''). - ''' -- dirnames = [ -- '/usr/share/hunspell', -- '/usr/share/myspell', -- '/usr/share/myspell/dicts', -- '/usr/local/share/hunspell', # On FreeBSD the dictionaries are here -- '/usr/local/share/myspell', -- '/usr/local/share/myspell/dicts', -- ] -+ -+ if "NIX_HUNSPELL_DIRS" in os.environ: -+ dirnames = os.environ["NIX_HUNSPELL_DIRS"].split(":") -+ else: # fallback to the original behavior -+ dirnames = [ -+ '/usr/share/hunspell', -+ '/usr/share/myspell', -+ '/usr/share/myspell/dicts', -+ '/usr/local/share/hunspell', # On FreeBSD the dictionaries are here -+ '/usr/local/share/myspell', -+ '/usr/local/share/myspell/dicts', -+ ] - dic_path = '' - aff_path = '' - for language in expand_languages([language]): diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix index e4394028658d..4b5180f0e15c 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix @@ -1,14 +1,10 @@ { typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper -, langs ? [ "de-de" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ] +, langs ? [ "de-de" "en-gb-ise" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ] }: let - hunspellDirs = with lib; makeSearchPath ":" (flatten (forEach langs (lang: [ - "${hunspellDicts.${lang}}/share/hunspell" - "${hunspellDicts.${lang}}/share/myspell" - "${hunspellDicts.${lang}}/share/myspell/dicts" - ]))); + hunspellDirs = lib.makeSearchPath "share/hunspell" (lib.attrVals langs hunspellDicts); in @@ -20,7 +16,7 @@ symlinkJoin { postBuild = '' for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do wrapProgram "$out/$i" \ - --prefix NIX_HUNSPELL_DIRS : ${lib.escapeShellArg hunspellDirs} + --prefix DICPATH : ${lib.escapeShellArg hunspellDirs} done sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml