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

firefox, thunderbird: enable wrapped derivations for darwin #377863

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

booxter
Copy link
Contributor

@booxter booxter commented Jan 30, 2025

It also aligns application names for wrapped and unwrapped flavors of
the same derivations; and uses unique application names for each flavor,
so it's now possible to install multiple versions on the same Darwin
machine.

One visible change now is that About Firefox window now shows:

Firefox for NixOS instead of Mozilla Firefox for NixOS

...in the distribution field. I think it's fine and doesn't infringe
on any trademarks because this field is not required to mention Mozilla at
all, as per: https://wiki.mozilla.org/Distribution_INI_File

While at it, also changed the branding for Darwin builds to list:

Firefox for Nix on MacOS instead of Firefox for NixOS

The telemetry and distribution ids (nixos) are left intact.

Note: it's still not possible to install both source-based and -bin
Darwin derivations in the same profile. It would require renaming
applicationNames for these two different types to use unique names (e.g.
Firefox (Official) or Firefox (Binary), which doesn't seem optimal.

Closes: #378433
Closes: #366581


In addition, the PR includes a patch to mark midori as broken because it is; and to mark firefoxpwa as linux only, because it's not currently implemented for Darwin.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jan 30, 2025
@booxter booxter marked this pull request as draft January 30, 2025 01:41
@nix-owners nix-owners bot requested a review from mweinelt January 30, 2025 01:42
@booxter
Copy link
Contributor Author

booxter commented Jan 30, 2025

This currently crashes tabs for firefox; need to investigate, hence in draft.

@booxter booxter force-pushed the firefox-wrapped-for-darwin branch 2 times, most recently from c246787 to 086fbec Compare January 31, 2025 04:49
@booxter booxter marked this pull request as ready for review January 31, 2025 04:50
@booxter booxter marked this pull request as draft January 31, 2025 05:05
@booxter
Copy link
Contributor Author

booxter commented Jan 31, 2025

There are still some issues with permissions and desktopNames that contain spaces.

error: builder for '/nix/store/330b864hl8jvvrlwd8ndpzjjiz6w8psv-firefox-135.0b9.drv' failed with exit code 127;
       last 2 log lines:
       > structuredAttrs is enabled
       > /nix/store/5i17z2h5x7k2cwas12hyx0q88mz4ddfz-stdenv-darwin/setup: line 1758: Developer: command not found
       
error: builder for '/nix/store/gqlbj1mxiphkfbddd63wkrirvchkkm63-thunderbird-128.6.0esr.drv' failed with exit code 1;
       last 3 log lines:
       > structuredAttrs is enabled
       > strings: error: unknown argument '-d'
       > mv: cannot move '/nix/store/lcm4y9xbrnnz9xi621xyhwpl9l1zwq8k-thunderbird-128.6.0esr/Applications/Thunderbird.app/Contents/MacOS/thunderbird' to '/nix/store/lcm4y9xbrnnz9xi621xyhwpl9l1zwq8k-thunderbird-128.6.0esr/Applications/Thunderbird.app/Contents/MacOS/.thunderbird-old': Permission denied

@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from 086fbec to 460f143 Compare January 31, 2025 05:27
@booxter booxter marked this pull request as ready for review January 31, 2025 05:27
@booxter
Copy link
Contributor Author

booxter commented Jan 31, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-linux

❌ 1 package failed to build:
  • midori
✅ 12 packages built:
  • eyewitness
  • firefox
  • firefox-beta
  • firefox-devedition
  • firefox-esr
  • firefox-mobile
  • floorp
  • librewolf
  • sitespeed-io
  • thunderbird (thunderbird-128 ,thunderbird-esr)
  • thunderbird-latest
  • vimb

x86_64-darwin

❌ 2 packages failed to build:
  • firefox-beta
  • firefox-esr
✅ 7 packages built:
  • firefox
  • firefox-devedition
  • firefox-mobile
  • floorp
  • librewolf
  • thunderbird (thunderbird-128 ,thunderbird-esr)
  • thunderbird-latest

aarch64-darwin

❌ 2 packages failed to build:
  • firefox-beta
  • firefox-esr
✅ 7 packages built:
  • firefox
  • firefox-devedition
  • firefox-mobile
  • floorp
  • librewolf
  • thunderbird (thunderbird-128 ,thunderbird-esr)
  • thunderbird-latest

@booxter booxter force-pushed the firefox-wrapped-for-darwin branch 4 times, most recently from de7f9fd to fa0c455 Compare February 1, 2025 17:11
@booxter booxter marked this pull request as draft February 1, 2025 17:12
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Feb 1, 2025
@nix-owners nix-owners bot requested a review from lovesegfault February 1, 2025 17:19
@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from 6f21e10 to ea0ee33 Compare February 15, 2025 21:34
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Feb 15, 2025
@booxter
Copy link
Contributor Author

booxter commented Feb 15, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-linux

⏩ 1 package marked as broken and skipped:
  • midori
❌ 1 package failed to build:
  • sitespeed-io
✅ 31 packages built:
  • adoptopenjdk-icedtea-web
  • eyewitness
  • firefox
  • firefox-beta
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.debug
  • firefox-beta-unwrapped.symbols
  • firefox-devedition
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.debug
  • firefox-devedition-unwrapped.symbols
  • firefox-esr
  • firefox-esr-128-unwrapped
  • firefox-esr-128-unwrapped.debug
  • firefox-esr-128-unwrapped.symbols
  • firefox-mobile
  • firefox-unwrapped
  • firefox-unwrapped.debug
  • firefox-unwrapped.symbols
  • firefoxpwa
  • floorp
  • librewolf
  • thunderbird (thunderbird-128, thunderbird-esr)
  • thunderbird-128-unwrapped
  • thunderbird-128-unwrapped.debug
  • thunderbird-128-unwrapped.symbols
  • thunderbird-latest
  • thunderbird-latest-unwrapped
  • thunderbird-latest-unwrapped.debug
  • thunderbird-latest-unwrapped.symbols
  • vimb

@booxter
Copy link
Contributor Author

booxter commented Feb 16, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-darwin

⏩ 1 package marked as broken and skipped:
  • lua54Packages.neorg
❌ 3 packages failed to build:
  • thunderbird (thunderbird-128, thunderbird-esr)
  • thunderbird-128-unwrapped
  • thunderbird-128-unwrapped.symbols
✅ 136 packages built:
  • firefox
  • firefox-beta
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.symbols
  • firefox-devedition
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.symbols
  • firefox-esr
  • firefox-esr-128-unwrapped
  • firefox-esr-128-unwrapped.symbols
  • firefox-mobile
  • firefox-unwrapped
  • firefox-unwrapped.symbols
  • floorp
  • floorp-unwrapped
  • librewolf
  • librewolf-unwrapped
  • lua51Packages.commons-nvim
  • lua51Packages.fidget-nvim
  • lua51Packages.fzf-lua
  • lua51Packages.haskell-tools-nvim
  • lua51Packages.ldbus
  • lua51Packages.llscheck
  • lua51Packages.lua-resty-jwt
  • lua51Packages.lua-resty-openidc
  • lua51Packages.lua-resty-openssl
  • lua51Packages.lua-resty-session
  • lua51Packages.lz-n
  • lua51Packages.lzn-auto-require
  • lua51Packages.neorg
  • lua51Packages.orgmode
  • lua51Packages.rest-nvim
  • lua51Packages.rocks-config-nvim
  • lua51Packages.rocks-dev-nvim
  • lua51Packages.rocks-git-nvim
  • lua51Packages.rocks-nvim
  • lua51Packages.rustaceanvim
  • lua52Packages.commons-nvim
  • lua52Packages.fidget-nvim
  • lua52Packages.fzf-lua
  • lua52Packages.haskell-tools-nvim
  • lua52Packages.ldbus
  • lua52Packages.llscheck
  • lua52Packages.lua-resty-jwt
  • lua52Packages.lua-resty-openidc
  • lua52Packages.lua-resty-openssl
  • lua52Packages.lua-resty-session
  • lua52Packages.lz-n
  • lua52Packages.lzn-auto-require
  • lua52Packages.neorg
  • lua52Packages.orgmode
  • lua52Packages.rest-nvim
  • lua52Packages.rocks-config-nvim
  • lua52Packages.rocks-dev-nvim
  • lua52Packages.rocks-git-nvim
  • lua52Packages.rocks-nvim
  • lua52Packages.rustaceanvim
  • lua53Packages.commons-nvim
  • lua53Packages.fidget-nvim
  • lua53Packages.fzf-lua
  • lua53Packages.haskell-tools-nvim
  • lua53Packages.ldbus
  • lua53Packages.llscheck
  • lua53Packages.lua-resty-jwt
  • lua53Packages.lua-resty-openidc
  • lua53Packages.lua-resty-openssl
  • lua53Packages.lua-resty-session
  • lua53Packages.lz-n
  • lua53Packages.lzn-auto-require
  • lua53Packages.neorg
  • lua53Packages.orgmode
  • lua53Packages.rest-nvim
  • lua53Packages.rocks-config-nvim
  • lua53Packages.rocks-dev-nvim
  • lua53Packages.rocks-git-nvim
  • lua53Packages.rocks-nvim
  • lua53Packages.rustaceanvim
  • lua54Packages.commons-nvim
  • lua54Packages.fidget-nvim
  • lua54Packages.fzf-lua
  • lua54Packages.haskell-tools-nvim
  • lua54Packages.ldbus
  • lua54Packages.llscheck
  • lua54Packages.lua-resty-jwt
  • lua54Packages.lua-resty-openidc
  • lua54Packages.lua-resty-openssl
  • lua54Packages.lua-resty-session
  • lua54Packages.lz-n
  • lua54Packages.lzn-auto-require
  • lua54Packages.orgmode
  • lua54Packages.rest-nvim
  • lua54Packages.rocks-config-nvim
  • lua54Packages.rocks-dev-nvim
  • lua54Packages.rocks-git-nvim
  • lua54Packages.rocks-nvim
  • lua54Packages.rustaceanvim
  • luajitPackages.commons-nvim
  • luajitPackages.fidget-nvim
  • luajitPackages.fzf-lua
  • luajitPackages.haskell-tools-nvim
  • luajitPackages.ldbus
  • luajitPackages.llscheck
  • luajitPackages.lua-resty-jwt
  • luajitPackages.lua-resty-openidc
  • luajitPackages.lua-resty-openssl
  • luajitPackages.lua-resty-session
  • luajitPackages.lz-n
  • luajitPackages.lzn-auto-require
  • luajitPackages.neorg
  • luajitPackages.orgmode
  • luajitPackages.rest-nvim
  • luajitPackages.rocks-config-nvim
  • luajitPackages.rocks-dev-nvim
  • luajitPackages.rocks-git-nvim
  • luajitPackages.rocks-nvim
  • luajitPackages.rustaceanvim
  • thunderbird-latest
  • thunderbird-latest-unwrapped
  • thunderbird-latest-unwrapped.symbols
  • vimPlugins.CopilotChat-nvim
  • vimPlugins.advanced-git-search-nvim
  • vimPlugins.easy-dotnet-nvim
  • vimPlugins.fidget-nvim
  • vimPlugins.fzf-lua
  • vimPlugins.haskell-tools-nvim
  • vimPlugins.lz-n
  • vimPlugins.lzn-auto-require
  • vimPlugins.neorg
  • vimPlugins.neorg-telescope
  • vimPlugins.obsidian-nvim
  • vimPlugins.octo-nvim
  • vimPlugins.orgmode
  • vimPlugins.rest-nvim
  • vimPlugins.rocks-config-nvim
  • vimPlugins.rocks-nvim
  • vimPlugins.rustaceanvim

@booxter
Copy link
Contributor Author

booxter commented Feb 16, 2025

Eval / Tag failed with:

  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=2 origin 63f06a6847bf3518d14f886deeaa90d95889f1e2
  Error: fatal: remote error: upload-pack: not our ref 63f06a6847bf3518d14f886deeaa90d95889f1e2
  The process '/usr/bin/git' failed with exit code 128
  Waiting 10 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=2 origin 63f06a6847bf3518d14f886deeaa90d95889f1e2
  Error: fatal: remote error: upload-pack: not our ref 63f06a6847bf3518d14f886deeaa90d95889f1e2
  The process '/usr/bin/git' failed with exit code 128
  Waiting 11 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=2 origin 63f06a6847bf3518d14f886deeaa90d95889f1e2
  Error: fatal: remote error: upload-pack: not our ref 63f06a6847bf3518d14f886deeaa90d95889f1e2
  Error: The process '/usr/bin/git' failed with exit code 128

I believe it's an issue with the runner itself, not this PR. I will have to rebase to retrigger it.

@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from ea0ee33 to ff86950 Compare February 16, 2025 14:42
@booxter
Copy link
Contributor Author

booxter commented Feb 16, 2025

@mweinelt @lovesegfault would you mind reviewing this PR? Thank you.

@booxter booxter marked this pull request as draft February 17, 2025 01:50
@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from ff86950 to 07de93a Compare February 17, 2025 02:32
@booxter

This comment was marked as outdated.

@booxter

This comment was marked as outdated.

@booxter booxter marked this pull request as ready for review February 17, 2025 03:53
@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from 103ae49 to cd92f32 Compare February 17, 2025 03:56
@booxter
Copy link
Contributor Author

booxter commented Feb 17, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-linux

⏩ 1 package marked as broken and skipped:
  • midori
❌ 1 package failed to build:
  • sitespeed-io
✅ 31 packages built:
  • adoptopenjdk-icedtea-web
  • eyewitness
  • firefox
  • firefox-beta
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.debug
  • firefox-beta-unwrapped.symbols
  • firefox-devedition
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.debug
  • firefox-devedition-unwrapped.symbols
  • firefox-esr
  • firefox-esr-128-unwrapped
  • firefox-esr-128-unwrapped.debug
  • firefox-esr-128-unwrapped.symbols
  • firefox-mobile
  • firefox-unwrapped
  • firefox-unwrapped.debug
  • firefox-unwrapped.symbols
  • firefoxpwa
  • floorp
  • librewolf
  • thunderbird (thunderbird-128, thunderbird-esr)
  • thunderbird-128-unwrapped
  • thunderbird-128-unwrapped.debug
  • thunderbird-128-unwrapped.symbols
  • thunderbird-latest
  • thunderbird-latest-unwrapped
  • thunderbird-latest-unwrapped.debug
  • thunderbird-latest-unwrapped.symbols
  • vimb

@booxter
Copy link
Contributor Author

booxter commented Feb 17, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-darwin

❌ 2 packages failed to build:
  • thunderbird-unwrapped (thunderbird-128-unwrapped, thunderbirdPackages.thunderbird, thunderbirdPackages.thunderbird-128, thunderbirdPackages.thunderbird-esr)
  • thunderbird-unwrapped.symbols (thunderbird-128-unwrapped.symbols, thunderbirdPackages.thunderbird-128.symbols, thunderbirdPackages.thunderbird-esr.symbols, thunderbirdPackages.thunderbird.symbols)
✅ 12 packages built:
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.symbols
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.symbols
  • firefox-esr-unwrapped (firefox-esr-128-unwrapped)
  • firefox-esr-unwrapped.symbols (firefox-esr-128-unwrapped.symbols)
  • firefox-unwrapped
  • firefox-unwrapped.symbols
  • floorp-unwrapped
  • librewolf-unwrapped
  • thunderbird-latest-unwrapped (thunderbirdPackages.thunderbird-latest)
  • thunderbird-latest-unwrapped.symbols (thunderbirdPackages.thunderbird-latest.symbols)

@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from cd92f32 to a383af4 Compare February 19, 2025 22:19
Related-Bug: NixOS#374354

Signed-off-by: Ihar Hrachyshka <[email protected]>
It's not implemented for Darwin.

Signed-off-by: Ihar Hrachyshka <[email protected]>
It also aligns application names for wrapped and unwrapped flavors of
the same derivations; and uses unique application names for each flavor,
so it's now possible to install multiple versions on the same Darwin
machine.

One visible change now is that `About Firefox` window now shows:

`Firefox for NixOS` instead of `Mozilla Firefox for NixOS`

...in the `distribution` field. I think it's fine and doesn't infringe
on any trademarks because this field is not required to mention Mozilla at
all, as per: https://wiki.mozilla.org/Distribution_INI_File

While at it, also changed the branding for Darwin builds to list:

`Firefox for Nix on MacOS` instead of `Firefox for NixOS`

The telemetry and distribution ids (`nixos`) are left intact.

Note: it's still not possible to install both source-based and -bin
Darwin derivations in the same profile. It would require renaming
applicationNames for these two different types to use unique names (e.g.
`Firefox (Official)` or `Firefox (Binary)`, which doesn't seem optimal.

Closes: NixOS#378433
Closes: NixOS#366581
Signed-off-by: Ihar Hrachyshka <[email protected]>
Without this, plugin-container fails to start.

Signed-off-by: Ihar Hrachyshka <[email protected]>
@booxter booxter force-pushed the firefox-wrapped-for-darwin branch from a383af4 to 2c5b253 Compare February 21, 2025 01:55
@booxter
Copy link
Contributor Author

booxter commented Feb 21, 2025

@jopejoe1 can I get some attention to this PR? It conflicts a lot with other PRs being merged, and it's not easy to rebuild everything affected by it locally to validate the patch doesn't break anything (for both platforms). We are talking about all Firefox derivatives plus Thunderbird flavors... Thanks in advance.

@booxter
Copy link
Contributor Author

booxter commented Feb 21, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-darwin

✅ 14 packages built:
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.symbols
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.symbols
  • firefox-esr-unwrapped (firefox-esr-128-unwrapped)
  • firefox-esr-unwrapped.symbols (firefox-esr-128-unwrapped.symbols)
  • firefox-unwrapped
  • firefox-unwrapped.symbols
  • floorp-unwrapped
  • librewolf-unwrapped
  • thunderbird-unwrapped (thunderbird-128-unwrapped, thunderbirdPackages.thunderbird, thunderbirdPackages.thunderbird-128, thunderbirdPackages.thunderbird-esr)
  • thunderbird-unwrapped.symbols (thunderbird-128-unwrapped.symbols, thunderbirdPackages.thunderbird-128.symbols, thunderbirdPackages.thunderbird-esr.symbols, thunderbirdPackages.thunderbird.symbols)
  • thunderbird-latest-unwrapped (thunderbirdPackages.thunderbird-latest)
  • thunderbird-latest-unwrapped.symbols (thunderbirdPackages.thunderbird-latest.symbols)

@booxter
Copy link
Contributor Author

booxter commented Feb 21, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 377863


aarch64-linux

⏩ 1 package marked as broken and skipped:
  • midori
❌ 1 package failed to build:
  • sitespeed-io
✅ 31 packages built:
  • adoptopenjdk-icedtea-web
  • eyewitness
  • firefox
  • firefox-beta
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.debug
  • firefox-beta-unwrapped.symbols
  • firefox-devedition
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.debug
  • firefox-devedition-unwrapped.symbols
  • firefox-esr
  • firefox-esr-128-unwrapped
  • firefox-esr-128-unwrapped.debug
  • firefox-esr-128-unwrapped.symbols
  • firefox-mobile
  • firefox-unwrapped
  • firefox-unwrapped.debug
  • firefox-unwrapped.symbols
  • firefoxpwa
  • floorp
  • librewolf
  • thunderbird (thunderbird-128, thunderbird-esr)
  • thunderbird-128-unwrapped
  • thunderbird-128-unwrapped.debug
  • thunderbird-128-unwrapped.symbols
  • thunderbird-latest
  • thunderbird-latest-unwrapped
  • thunderbird-latest-unwrapped.debug
  • thunderbird-latest-unwrapped.symbols
  • vimb

Copy link
Member

@jopejoe1 jopejoe1 left a comment

Choose a reason for hiding this comment

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

We generally call an attribute directly instead of calling it over passthru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants