Skip to content

nixos/thunderbird: add languagePacks config#473129

Open
NicoWeio wants to merge 1 commit intoNixOS:masterfrom
NicoWeio:thunderbird-language-packs
Open

nixos/thunderbird: add languagePacks config#473129
NicoWeio wants to merge 1 commit intoNixOS:masterfrom
NicoWeio:thunderbird-language-packs

Conversation

@NicoWeio
Copy link
Contributor

@NicoWeio NicoWeio commented Dec 22, 2025

In analogy to #206698, I added a languagePacks option to Thunderbird to make it easier to set it up in another language without any manual intervention.
It would look something like this:

programs.thunderbird = {
  enable = true;
  languagePacks = [ "de" ];
  preferences = {
    "intl.locale.requested" = "de";
  };
};

This doesn't resolve the underlying issue #46569 that i18n.defaultLocale is not respected, but I imagine one could adopt something like the above code accessing the aforementioned i18n.defaultLocale into nixpkgs. I'm not sure if this is the correct way, though, as I'm too unfamiliar with Firefox/Thunderbird packaging. What I can say is that on Arch, the language packs go into usr/lib/thunderbird/extensions/langpack-de@thunderbird.mozilla.org.xpi, for example. My Arch system lists this language pack as explicitly installed, by the way; no idea how that came to be.

I hope this PR is actionable enough. As this is my first contribution to nixpkgs, any feedback would be very much appreciated!
I'll try running the tests in the coming days, though it'd be nice to know beforehand if this would even be considered.

Full disclosure: This is vibe-coded, but tested and cross-checked with #206698 as well as the current list of packs.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Maintainer pings

@booxter @lovesegfault @nbp @vcunat


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 12.first-time contribution This PR is the author's first one; please be gentle! 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 22, 2025
@NicoWeio
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 473129
Commit: 08691f35f215750413d4ed3e5fdfe2cb22e69d7f


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test

@NicoWeio
Copy link
Contributor Author

NicoWeio commented Jan 4, 2026

Not sure if editing the PR description actually sent out the @mentions, so I'll drop them once more. Sorry if this ends up pinging you a second time.

@booxter @lovesegfault @nbp @vcunat

@booxter
Copy link
Contributor

booxter commented Jan 6, 2026

I do not use the NixOS module to configure Thunderbird so I can't really comment on whether it works. But the PR seems to be an honest replication of the Firefox PR.

I'd prefer if the list of languages would be fetched with an update script instead of requiring an update if/when a new language is added or removed. But Firefox module doesn't do it this way either, so probably not a blocker.

I hope someone more knowledgeable chimes in here though.

Copy link
Contributor

@bartoostveen bartoostveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems to work and list of available language packs exactly matches the directory listing at https://releases.mozilla.org/pub/thunderbird/releases/147.0.2/linux-x86_64/xpi/

@NicoWeio
Copy link
Contributor Author

I agree that a script fetching the available languages would be nice, but it might take a while before I get around to creating one that's sufficiently reliable and satisfies Nixpkgs standards, so I'd love to see this merged before.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Feb 28, 2026
@bartoostveen
Copy link
Contributor

I mean, if you want a script, here is a simple one line proof of concept:

curl https://releases.mozilla.org/pub/thunderbird/releases/147.0.2/linux-x86_64/xpi/ | htmlq -t a | tail -n +2 | sed 's/\.xpi//g'

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Mar 1, 2026
@NicoWeio
Copy link
Contributor Author

NicoWeio commented Mar 1, 2026

@bartoostveen Thanks, I didn't know about htmlq!
I think I have built a working update script now, but the Thunderbird update.nix calls the Firefox one. Assuming we want to keep it that way, is it really fine to touch Firefox in this PR?

@bartoostveen
Copy link
Contributor

IMHO it does not really matter, but I think it's still better to make a separate PR that touches both Firefox and Thunderbird.

@nixpkgs-ci nixpkgs-ci bot removed the 12.first-time contribution This PR is the author's first one; please be gentle! label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants