firefox: don't touch dontFixup on darwin if it's false

To fix the wrapper for firefox-bin, we now force dontFixup == false on
Darwin: #457408

The change unnecessarily touched the attribute on a package when it's
not set, making `firefox` wrapper build its own firefox-unwrapped (with
the attribute forcefully set to false).

In addition to unnecessary duplication of nix outputs, since `firefox`
is not built in Hydra, it means that all users are now forced to build
firefox (and thunderbird) when using the wrapper.

This patch fixes the issue by forcing the attribute only when it's
present and set to true in the wrapped package.
This commit is contained in:
Ihar Hrachyshka
2025-12-05 20:28:14 -05:00
parent 4587ab1a26
commit 4aa3cf41e5
@@ -44,9 +44,12 @@ let
# original mozilla signature (like 1Password) won't work with signatures
# stripped, at least the wrapped browser will launch.
if isDarwin then
browser_.overrideAttrs (oldAttrs: {
dontFixup = false;
})
browser_.overrideAttrs (
oldAttrs:
lib.optionalAttrs (oldAttrs.dontFixup or false) {
dontFixup = false;
}
)
else
browser_;
wrapper =