Best way to add lang packs for libreoffice?

UPDATE: I looked into have dictionary packages are structured and might have found a solution. Will update this post within a week.

I want to add language packs for libreoffice-fresh/still but are looking for the best/proper way to do this.

I tried adding this: (libreoffice.override { langs = [ da ]; }) to configuration.nix but it failed:

error: anonymous function at /nix/store/v48f3llcmb33xrb0ssmf0889imbqwjsq-nixos-20.03pre210078.90441b4b47f/nixos/pkgs/applications/office/libreoffice/wrapper.nix:1:1 called with unexpected argument 'langs', at /nix/store/v48f3llcmb33xrb0ssmf0889imbqwjsq-nixos-20.03pre210078.90441b4b47f/nixos/lib/customisation.nix:69:16
(use '--show-trace' to show detailed location information)

Adding all langs would be a bad idea. Is there a way to add langs so that they’ll only get installed if non-English locale is specified in configuration.nix or can I add it in some other way like a separate option for each language? Is wrapper.nix the best place?

I’m familiar with bash but new to the Nix language.

1 Like