From 4aa3cf41e589b6857dfafabde6ed93563f3c57b6 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 5 Dec 2025 20:23:25 -0500 Subject: [PATCH] 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. --- .../applications/networking/browsers/firefox/wrapper.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index a8f86d0bdd8f..72bdbf5398e0 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -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 =