mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
77d8f5c040
This has been postponed[1] because of an unclear state of the french dictionary provided by hunspell[2]. [1] https://github.com/NixOS/nixpkgs/pull/46779#issuecomment-422764601 [2] https://github.com/NixOS/nixpkgs/issues/46940#issuecomment-423288963
31 lines
831 B
Nix
31 lines
831 B
Nix
{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
|
|
, langs ? [ "de-de" "en-us" "es-es" "fr-moderne" "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;
|
|
}
|