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*: file collision due to identical app bundle names used for all flavors #378433

Open
3 tasks done
booxter opened this issue Feb 1, 2025 · 0 comments · May be fixed by #377863
Open
3 tasks done

firefox*, thunderbird*: file collision due to identical app bundle names used for all flavors #378433

booxter opened this issue Feb 1, 2025 · 0 comments · May be fixed by #377863
Assignees
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin

Comments

@booxter
Copy link
Contributor

booxter commented Feb 1, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

This is what's happening when I try to install both firefox-beta-unwrapped and firefox-unwrapped into my Home Manager environment:

error: builder for '/nix/store/89h1jr4kl40slps9k48jfkmfih8p1m8g-home-manager-applications.drv' failed with exit code 255;
       last 1 log lines:
       > error: collision between `/nix/store/nn8rs5s3db8vrsaf046vl4j8fmxp2mim-firefox-beta-unwrapped-135.0b3/Applications/Firefox.app/Contents/MacOS/firefox' and `/nix/store/29b1h22xxkn70zv34s2r2r5k2hkppgwm-firefox-unwrapped-134.0.2/Applications/Firefox.app/Contents/MacOS/firefox'
       For full logs, run 'nix log /nix/store/89h1jr4kl40slps9k48jfkmfih8p1m8g-home-manager-applications.drv'.
error: 1 dependencies of derivation '/nix/store/yqsamchrfy9mhgjzaidk0nawsiknj30x-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0qfcvf179b0wq50x2y6i72985cnggyn7-home-manager-generation.drv' failed to build

MacOS bundles are independent and can be installed at the same time. We should only make sure that each derivation uses its own unique name for the bundle.

Steps to reproduce

Attempt to activate both firefox-unwrapped and firefox-beta-unwrapped on MacOS.

Expected behaviour

Both are installed (each bundle uses its own unique name).

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.7.2`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.24.11`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/store/k57w2spd3h2849h8b4dqll8k755338bl-source`

Are you using nix-darwin?

Yes, I am using nix-darwin.

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@booxter booxter added 0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin labels Feb 1, 2025
@booxter booxter self-assigned this Feb 1, 2025
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 2025
Each derivation flavor should use its own app bundle name.

Closes: NixOS#378433

TODO: confirm thunderbird is fixed too. (May need adjustment to bundle
names using applicationName argument.)

Signed-off-by: Ihar Hrachyshka <[email protected]>
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 2025
Each derivation flavor should use its own app bundle name.

Closes: NixOS#378433

TODO: confirm thunderbird is fixed too. (May need adjustment to bundle
names using applicationName argument.)

Signed-off-by: Ihar Hrachyshka <[email protected]>
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 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: NixOS#378433
Closes: NixOS#366581

Signed-off-by: Ihar Hrachyshka <[email protected]>
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 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: NixOS#378433
Closes: NixOS#366581

Signed-off-by: Ihar Hrachyshka <[email protected]>
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 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: NixOS#378433
Closes: NixOS#366581

Signed-off-by: Ihar Hrachyshka <[email protected]>
@booxter booxter linked a pull request Feb 1, 2025 that will close this issue
13 tasks
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 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: NixOS#378433
Closes: NixOS#366581

Signed-off-by: Ihar Hrachyshka <[email protected]>
booxter added a commit to booxter/nixpkgs that referenced this issue Feb 1, 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: NixOS#378433
Closes: NixOS#366581

Signed-off-by: Ihar Hrachyshka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin
Projects
None yet
1 participant