ibus-engines.typing-booster: 2.7.5 -> 2.19.10

https://github.com/mike-fabian/ibus-typing-booster/blob/2.19.10/ChangeLog
This commit is contained in:
Naïm Favier 2022-12-15 14:47:16 +01:00
parent 7634c3250b
commit b5d5d71a45
No known key found for this signature in database
GPG Key ID: 95AFCE8211908325
3 changed files with 7 additions and 44 deletions

View File

@ -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;
};
}

View File

@ -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]):

View File

@ -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