In the Evolution mail client, I can only see a “Hebrew” dictionary, while EN and DE are installed in the system.
Setting ASPELL_CONF="dict-dir /run/current-system/sw/lib/aspell" doesn’t help either.
gnome3.evolution, aspell, aspellDicts.en, aspellDicts.de.The ASPELL_CONF variable is used only by aspell binary and not by libaspell library.
I'm using this patch and something like this in configuration.nix
system.replaceRuntimeDependencies = with pkgs; [
{ original = aspell;
replacement = aspell.overrideAttrs (oldAttrs: rec {
patchPhase = oldAttrs.patchPhase + ''
patch -p1 < ${./dict-dir-from-nix-profiles.patch}
'';
});
}
];
It its similar to how is setup the ASPELL_CONF in Nix now, but works even for libaspell.
I cloud make pull request if anyone likes this.
♥ Awesome! Please, do!
Perhaps not using overrides, but adding this patch straight to libaspell.
Some details:
ASPELL_CONF is read by Config.read_in_settings, which is not consistently used in the libaspell API, especially not when listing dictionaries. The aspell binary always calls read_in_settings at start. So the ASPELL_CONF is partially broken in the aspell upstream.
I confirm this works on nixos-unstable.
Thank you very much, @deedrah!
Maybe you could also look at https://github.com/NixOS/nixpkgs/issues/30920 — it seems similar. For some reason LibreOffice is not picking this. :/
Most helpful comment
The
ASPELL_CONFvariable is used only byaspellbinary and not bylibaspelllibrary.I'm using this patch and something like this in
configuration.nixIt its similar to how is setup the
ASPELL_CONFin Nix now, but works even forlibaspell.I cloud make pull request if anyone likes this.