Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libreoffice: wrapper: add hunspell dirs to DICPATH #80353

Merged
merged 1 commit into from Feb 25, 2020

Conversation

mmilata
Copy link
Member

@mmilata mmilata commented Feb 17, 2020

LibreOffice doesn't know where to look for hunspell dictionaries on NixOS but we can use the DICPATH env var to point to them. Now spellchecking with system dictionaries (nixpkgs.hunspellDicts.xx-yy) works.

Note that some of these dictionaries are built from LibreOffice repos - this is preferable to building them as part of LO as other applications can use them.

Motivation for this change

Spellchecking with hunspell dictionaries doesn't work.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mmilata
Copy link
Member Author

mmilata commented Feb 17, 2020

Please note that installing dictionaries using environment.systemPackages may not work (#80329), this can be worked around by adding environment.pathsToLink = [ "/share/hunspell" ]; to your configuration.nix.

@7c6f434c
Copy link
Member

Maybe replace the TODO comment with a mention of «dictionaries are provided via DICPATH» for better discoverability? Not everything goes to NIX_PROFILES.

@mmilata mmilata force-pushed the libreoffice-spellcheck-dicpath branch from a82d1c4 to 7803c2a Compare February 18, 2020 13:47
@mmilata
Copy link
Member Author

mmilata commented Feb 18, 2020

Added a comment, let me know if you can think of better wording. Not sure whether it helps discoverability much, perhaps it's time to add LibreOffice section to NixOS manual? Then again, not everyone who uses nixpkgs uses NixOS ...

@mmilata mmilata closed this Feb 18, 2020
@mmilata mmilata reopened this Feb 18, 2020
LibreOffice doesn't know where to look for hunspell dictionaries on
NixOS but we can use the DICPATH env var to point to them. Now
spellchecking with system dictionaries works.

Note that some of these dictionaries are built from LibreOffice repos -
this is preferable to building them as part of LO as other applications
can use them.
@mmilata mmilata force-pushed the libreoffice-spellcheck-dicpath branch from 7803c2a to c95bfd2 Compare February 18, 2020 13:55
@7c6f434c
Copy link
Member

Technically speaking, we even have a Nixpkgs manual. Not everyone knows it exists, and right now the package-specific notes are in the wrong place #77555

@7c6f434c 7c6f434c merged commit fcf9e23 into NixOS:master Feb 25, 2020
@mmilata mmilata deleted the libreoffice-spellcheck-dicpath branch February 25, 2020 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants