| 22 Feb 2024 |
Philip Taron (UTC-8) | I'm on X11, not Wayland though... | 21:16:11 |
vcunat | I am getting a hand. | 21:16:18 |
vcunat | * I am getting a hand (on Wayland). | 21:16:29 |
Philip Taron (UTC-8) | I'm going to try reverting my flake.lock back to 122 and see if it's a Firefox or other (possibly my own!) regression. | 21:17:07 |
Philip Taron (UTC-8) | You know, I bet it's me futzing with the environment.pathsToLink setting. | 21:35:33 |
hexa | c8h4: https://github.com/NixOS/nixpkgs/pull/290699 can you test it? | 22:22:25 |
c8h4 | In reply to @hexa:lossy.network c8h4: https://github.com/NixOS/nixpkgs/pull/290699 can you test it? Sure thing, building atm | 22:26:04 |
| 23 Feb 2024 |
hexa | merged | 00:04:20 |
| 5 Mar 2024 |
hexa | https://github.com/NixOS/nixpkgs/pull/293356 | 00:08:06 |
| 6 Mar 2024 |
Xandor Schiefer | Hey all, long time FF user on Nix. For the longest time it's been difficult to install different versions of FF side-by-side, as the binary names collide.
I'm a web dev, so early on in my Nix journey I switched to using https://github.com/mozilla/nixpkgs-mozilla. | 07:25:32 |
Xandor Schiefer | * Hey all, long time FF user on Nix. For the longest time it's been difficult to install different versions of FF side-by-side, as the binary names collide.
I'm a web dev, so early on in my Nix journey I switched to using https://github.com/mozilla/nixpkgs-mozilla, so I could use Nightly ✨ | 07:25:51 |
Xandor Schiefer | I still had issues with installing different versions side-by-side, so I opened an issue with them: https://github.com/mozilla/nixpkgs-mozilla/issues/296. The response was that Mozilla just uses the same wrapFirefox wrapper from Nixpkgs, but their own firefox-bin-unwrapped (and variants). | 07:26:58 |
Xandor Schiefer | I worked around this with my own wrapper that renamed the binaries. I see that in nixpkgs-unstable this is now effectively also done for the nixpkgs versions of FF | 07:27:43 |
Xandor Schiefer | (I finally moved my config to flakes, so can't use the Mozilla overlay anymore). | 07:28:04 |
Xandor Schiefer | And this does work fine in NixOS. | 07:28:25 |
Xandor Schiefer | But not for standalone Home Manager, because it's buildEnv call disallows collisions, while NixOS's allows them. | 07:28:50 |
Xandor Schiefer | While the wrapper names are now different, the unwrapped names are still not, for the non-bin variants | 07:29:55 |
Xandor Schiefer | So there's still collisions on .firefox-old in a standalone Home Manager install. | 07:31:01 |
Xandor Schiefer | Since the Mozilla overlay's (and also the nixpkgs -bin variants) do have different unwrapped binary names, they don't have this issue. | 07:31:57 |
Xandor Schiefer | But the nixpkgs non-bin versions do. The only fix I've been able to find is to actually build FF with different binary names | 07:32:29 |
Xandor Schiefer | I.e. something like this:
modified pkgs/applications/networking/browsers/firefox/packages.nix
@@ -33,6 +33,7 @@
firefox-beta = buildMozillaMach rec {
pname = "firefox-beta";
+ binaryName = "firefox-beta";
version = "124.0b2";
applicationName = "Mozilla Firefox Beta";
src = fetchurl {
@@ -40,6 +41,8 @@
sha512 = "a98bedcf2bb6e58a20b4ab49d53db0899ed7c6589b20266522521c3db5c583807be1d536a580a1b42dd5783c0d81d95c4f42be6a157fb08a588447ca4fa21dde";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.versions.majorMinor version}beta/releasenotes/";
description = "A web browser built from Firefox Beta Release source tree";
@@ -51,7 +54,7 @@
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115)
license = lib.licenses.mpl20;
- mainProgram = "firefox";
+ mainProgram = binaryName;
};
tests = [ nixosTests.firefox-beta ];
updateScript = callPackage ./update.nix {
@@ -62,6 +65,7 @@
firefox-devedition = buildMozillaMach rec {
pname = "firefox-devedition";
+ binaryName = "firefox-developer-edition";
version = "124.0b2";
applicationName = "Mozilla Firefox Developer Edition";
requireSigning = false;
@@ -71,6 +75,8 @@
sha512 = "a65a522130d95ef5ffd4ee351c79a64517abdd60a80a74e66b147f6b179613240ab2abd6eb9cd939dfe31dd5b971773e882eb234a358e9546ab0272d8ed94145";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.versions.majorMinor version}beta/releasenotes/";
description = "A web browser built from Firefox Developer Edition source tree";
@@ -82,7 +88,7 @@
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115)
license = lib.licenses.mpl20;
- mainProgram = "firefox";
+ mainProgram = binaryName;
};
tests = [ nixosTests.firefox-devedition ];
updateScript = callPackage ./update.nix {
@@ -94,6 +100,7 @@
firefox-esr-115 = buildMozillaMach rec {
pname = "firefox-esr-115";
+ binaryName = "firefox-esr";
version = "115.8.0esr";
applicationName = "Mozilla Firefox ESR";
src = fetchurl {
@@ -101,6 +108,8 @@
sha512 = "4b8c06b5eb3617700a72aaad8831d703a537fe600740f1acb8377bd0ce198a199938603fd7e6b2007671a578dfb24aa8f5c031c6c1ccf15d4a34562679eaa883";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.removeSuffix "esr" version}/releasenotes/";
description = "A web browser built from Firefox Extended Support Release source tree";
| 07:35:22 |
vcunat | You can always create a tiny package that produces just a set of symlinks named exactly like you want them, pointing to firefoxes that you want.
| 07:35:27 |
Xandor Schiefer | Nope, I have to change the build, this is—as far as I can tell—fundamentally unfixable in the wrapper stage. | 07:35:57 |
Xandor Schiefer | * I.e. something like this:
modified pkgs/applications/networking/browsers/firefox/packages.nix
@@ -33,6 +33,7 @@
firefox-beta = buildMozillaMach rec {
pname = "firefox-beta";
+ binaryName = "firefox-beta";
version = "124.0b2";
applicationName = "Mozilla Firefox Beta";
src = fetchurl {
@@ -40,6 +41,8 @@
sha512 = "a98bedcf2bb6e58a20b4ab49d53db0899ed7c6589b20266522521c3db5c583807be1d536a580a1b42dd5783c0d81d95c4f42be6a157fb08a588447ca4fa21dde";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.versions.majorMinor version}beta/releasenotes/";
description = "A web browser built from Firefox Beta Release source tree";
@@ -51,7 +54,7 @@
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115)
license = lib.licenses.mpl20;
- mainProgram = "firefox";
+ mainProgram = binaryName;
};
tests = [ nixosTests.firefox-beta ];
updateScript = callPackage ./update.nix {
@@ -62,6 +65,7 @@
firefox-devedition = buildMozillaMach rec {
pname = "firefox-devedition";
+ binaryName = "firefox-developer-edition";
version = "124.0b2";
applicationName = "Mozilla Firefox Developer Edition";
requireSigning = false;
@@ -71,6 +75,8 @@
sha512 = "a65a522130d95ef5ffd4ee351c79a64517abdd60a80a74e66b147f6b179613240ab2abd6eb9cd939dfe31dd5b971773e882eb234a358e9546ab0272d8ed94145";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.versions.majorMinor version}beta/releasenotes/";
description = "A web browser built from Firefox Developer Edition source tree";
@@ -82,7 +88,7 @@
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115)
license = lib.licenses.mpl20;
- mainProgram = "firefox";
+ mainProgram = binaryName;
};
tests = [ nixosTests.firefox-devedition ];
updateScript = callPackage ./update.nix {
@@ -94,6 +100,7 @@
firefox-esr-115 = buildMozillaMach rec {
pname = "firefox-esr-115";
+ binaryName = "firefox-esr";
version = "115.8.0esr";
applicationName = "Mozilla Firefox ESR";
src = fetchurl {
@@ -101,6 +108,8 @@
sha512 = "4b8c06b5eb3617700a72aaad8831d703a537fe600740f1acb8377bd0ce198a199938603fd7e6b2007671a578dfb24aa8f5c031c6c1ccf15d4a34562679eaa883";
};
+ extraConfigureFlags = [ "--with-app-name=${binaryName}" ];
+
meta = {
changelog = "https://www.mozilla.org/en-US/firefox/${lib.removeSuffix "esr" version}/releasenotes/";
description = "A web browser built from Firefox Extended Support Release source tree";
(and then also not setting nameSuffix for these in the wrapFirefox call)
| 07:36:50 |
vcunat | Then I'm missing the nature of the collision. | 07:36:51 |
vcunat | I thought it's the usual thing about env having files with the same path. | 07:37:08 |
Xandor Schiefer | When a file is wrapped, its pre-wrapped version is usually moved to ".${name}.old", and that's still part of the package's /bin output. | 07:38:30 |
Xandor Schiefer | Because the original binary names for the nixpkgs non-bin versions are all just firefox, they all get a .firefox-old file, too | 07:39:26 |
vcunat | The tiny package that I suggested would only contain files that you want with names that you want, nothing else. | 07:39:26 |
Xandor Schiefer | And those collide | 07:39:29 |