Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Lookup hunspell dictionaries in XDG_DATA_DIRS #65349
Adds a patch to support XDG_DATA_DIRS in hunspell.
Motivation for this change
aspell uses NIX_PROFILES, which has a similar effect, but less standardized than XDG_DATA_DIRS. You can always unset XDG_DATA_DIRS if you don't want hunspell to look there (also need to unset DICPATH and DICTIONARY)
Builds and works as intended on NixOS and removes the need to set $DICPATH or $DICTIONARY for hunspell to find the installed dictionaries on my machine.
Using $NIX_PROFILE may be slightly better to match aspell, or alter the patch so it will use both and not be reliant on XDG. Or even only check in the Nix specific directories (i.e. ~/.nix-profile/share/hunspell, etc.).
Commit ed06097 is not properly documented. It's some slight QoL improvements, unrelated to the purpose of this PR and mostly useless.