forked from mirrors/nixpkgs
dee2dab7c6
This package providesa completion input method for faster typing. See https://mike-fabian.github.io/ibus-typing-booster Detailed instructions how to activate this IBus engine on your desktop can be found in the upstream docs: https://mike-fabian.github.io/ibus-typing-booster/documentation.html A simple VM with the Gnome3 desktop and activated `ibus' looks like this: ```nix { emojipicker = { pkgs, ... }: { services.xserver = { enable = true; desktopManager.gnome3.enable = true; desktopManager.xterm.enable = false; }; users.extraUsers.vm = { password = "vm"; isNormalUser = true; }; i18n.inputMethod.ibus.engines = [ pkgs.ibus-engines.typing-booster ]; i18n.inputMethod.enabled = "ibus"; virtualisation.memorySize = 2048; }; } ``` Fixes #38721
31 lines
818 B
Nix
31 lines
818 B
Nix
{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
|
|
, langs ? [ "de-de" "en-us" "es-es" "it-it" "sv-se" "sv-fi" ]
|
|
}:
|
|
|
|
let
|
|
|
|
hunspellDirs = with lib; makeSearchPath ":" (flatten (flip map langs (lang: [
|
|
"${hunspellDicts.${lang}}/share/hunspell"
|
|
"${hunspellDicts.${lang}}/share/myspell"
|
|
"${hunspellDicts.${lang}}/share/myspell/dicts"
|
|
])));
|
|
|
|
in
|
|
|
|
symlinkJoin {
|
|
name = "${typing-booster.name}-with-hunspell";
|
|
paths = [ typing-booster ];
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postBuild = ''
|
|
for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do
|
|
wrapProgram "$out/$i" \
|
|
--prefix NIX_HUNSPELL_DIRS : ${hunspellDirs}
|
|
done
|
|
|
|
sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml
|
|
'';
|
|
|
|
inherit (typing-booster) meta;
|
|
}
|