2018-09-16 16:36:21 +00:00
|
|
|
{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
|
2018-09-21 19:37:09 +00:00
|
|
|
, langs ? [ "de-de" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ]
|
2018-09-16 16:36:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2019-08-05 11:03:38 +00:00
|
|
|
hunspellDirs = with lib; makeSearchPath ":" (flatten (forEach langs (lang: [
|
2018-09-16 16:36:21 +00:00
|
|
|
"${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;
|
|
|
|
}
|