Nixpkgs: Evolution doesn’t see installed Aspell dictionaries

Created on 1 Sep 2017  Â·  4Comments  Â·  Source: NixOS/nixpkgs

Issue description

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.

Steps to reproduce

  1. Install the following packages: gnome3.evolution, aspell, aspellDicts.en, aspellDicts.de.
  2. Open Evolution and go to Edit → Preferences → Editor → Spell checking.
  3. There, you can only see Hebrew.

Technical details

  • System: 17.03.1700.51a83266d1 (Gorilla)
  • Nix version: nix-env (Nix) 1.11.13
  • Nixpkgs version: "17.03.1700.51a83266d1"
  • Sandboxing enabled: yes

Most helpful comment

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.

All 4 comments

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. :/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vaibhavsagar picture vaibhavsagar  Â·  3Comments

sid-kap picture sid-kap  Â·  3Comments

rzetterberg picture rzetterberg  Â·  3Comments

matthiasbeyer picture matthiasbeyer  Â·  3Comments

yawnt picture yawnt  Â·  3Comments