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

thunderbird: darwin cleanup #6531

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions modules/programs/thunderbird.nix
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ in {
type = types.package;
default = pkgs.thunderbird;
defaultText = literalExpression "pkgs.thunderbird";
example = literalExpression "pkgs.thunderbird-91";
description = "The Thunderbird package to use.";
};

Expand Down Expand Up @@ -347,11 +346,11 @@ in {
type = types.bool;
default = true;
example = false;
visible = isDarwin;
visible = false;
readOnly = !isDarwin;
description = ''
Warn to set environment variables before using this module. Only
relevant on Darwin.
Using programs.thunderbird.darwinSetupWarning is deprecated. The
module is compatible with all Thunderbird installations.
'';
};
};
Expand Down Expand Up @@ -414,6 +413,11 @@ in {
};

config = mkIf cfg.enable {
warnings = lib.optional (!cfg.darwinSetupWarning) [''
Using programs.thunderbird.darwinSetupWarning is deprecated and will be
removed in the future. Thunderbird is now supported on Darwin.
''];

assertions = [
(let defaults = catAttrs "name" (filter (a: a.isDefault) profilesWithId);
in {
Expand All @@ -437,13 +441,6 @@ in {
})
];

warnings = optional (isDarwin && cfg.darwinSetupWarning) ''
Thunderbird packages are not yet supported on Darwin. You can still use
this module to manage your accounts and profiles by setting
'programs.thunderbird.package' to a dummy value, for example using
'pkgs.runCommand'.
'';

home.packages = [ cfg.package ]
++ optional (any (p: p.withExternalGnupg) (attrValues cfg.profiles))
pkgs.gpgme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
lib.recursiveUpdate (import ./thunderbird.nix { inherit lib realPkgs; }) {
programs.firefox = {
enable = true;
# Darwin doesn't support wrapped Firefox, using unwrapped instead
package = realPkgs.firefox-unwrapped;
package = realPkgs.firefox;
};
}
7 changes: 1 addition & 6 deletions tests/modules/programs/thunderbird/thunderbird.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
programs.thunderbird = {
enable = true;

# Disable warning so that platforms' behavior is the same
darwinSetupWarning = false;

# Darwin doesn't support wrapped Thunderbird, using unwrapped instead;
# using -latest- because ESR is currently broken on Darwin
package = realPkgs.thunderbird-latest-unwrapped;
package = realPkgs.thunderbird;

profiles = {
first = {
Expand Down
Loading