From 9df487993daabd4a7b126c87ec7e3b2d7be455a5 Mon Sep 17 00:00:00 2001 From: Ryan Hendrickson Date: Sun, 5 Jan 2025 21:27:45 -0500 Subject: [PATCH] firefox-{beta,devedition}: make binaryName match desktop file This branches off of the unmerged PR #294971, which had the goal of distinguishing between the various Firefox packages by giving them all unique binaryNames. The goal of this PR, by contrast, is making the names of the XDG desktop files that we generate match the name by which Firefox will identify itself over D-Bus. Co-authored-by: Xandor Schiefer --- pkgs/applications/networking/browsers/firefox/common.nix | 1 + .../networking/browsers/firefox/packages/firefox-beta.nix | 3 ++- .../browsers/firefox/packages/firefox-devedition.nix | 3 ++- pkgs/applications/networking/browsers/floorp/default.nix | 1 - .../networking/browsers/librewolf/librewolf.nix | 1 - pkgs/top-level/all-packages.nix | 6 ------ 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 80ba8f6c32e0..bd853b8fd10b 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -425,6 +425,7 @@ buildStdenv.mkDerivation { "--disable-updater" "--enable-application=${application}" "--enable-default-toolkit=${toolkit}" + "--with-app-name=${binaryName}" "--with-distribution-id=org.nixos" "--with-libclang-path=${lib.getLib llvmPackagesBuildBuild.libclang}/lib" "--with-wasi-sysroot=${wasiSysRoot}" diff --git a/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix b/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix index dc2aad33c03a..131820b3164b 100644 --- a/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix +++ b/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix @@ -9,6 +9,7 @@ buildMozillaMach rec { pname = "firefox-beta"; + binaryName = pname; version = "135.0b9"; applicationName = "Mozilla Firefox Beta"; src = fetchurl { @@ -27,7 +28,7 @@ buildMozillaMach rec { # 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 = { inherit (nixosTests) firefox-beta; diff --git a/pkgs/applications/networking/browsers/firefox/packages/firefox-devedition.nix b/pkgs/applications/networking/browsers/firefox/packages/firefox-devedition.nix index ae63bc7d9d87..e44a8c40e6d1 100644 --- a/pkgs/applications/networking/browsers/firefox/packages/firefox-devedition.nix +++ b/pkgs/applications/networking/browsers/firefox/packages/firefox-devedition.nix @@ -9,6 +9,7 @@ buildMozillaMach rec { pname = "firefox-devedition"; + binaryName = pname; version = "135.0b9"; applicationName = "Mozilla Firefox Developer Edition"; requireSigning = false; @@ -29,7 +30,7 @@ buildMozillaMach rec { # 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 = { inherit (nixosTests) firefox-devedition; diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix index 90ee49000ba6..3158a1819263 100644 --- a/pkgs/applications/networking/browsers/floorp/default.nix +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -28,7 +28,6 @@ }; extraConfigureFlags = [ - "--with-app-name=${pname}" "--with-app-basename=${applicationName}" "--with-unsigned-addon-scopes=app,system" "--enable-proxy-bypass-protection" diff --git a/pkgs/applications/networking/browsers/librewolf/librewolf.nix b/pkgs/applications/networking/browsers/librewolf/librewolf.nix index 9ca55de722c8..b7d80bfdd221 100644 --- a/pkgs/applications/networking/browsers/librewolf/librewolf.nix +++ b/pkgs/applications/networking/browsers/librewolf/librewolf.nix @@ -9,7 +9,6 @@ rec { extraPatches = [ "${source}/patches/pref-pane/pref-pane-small.patch" ]; extraConfigureFlags = [ - "--with-app-name=librewolf" "--with-unsigned-addon-scopes=app,system" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aa6cdc64dc4f..1c55e6b460dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13457,16 +13457,10 @@ with pkgs; firefox = wrapFirefox firefox-unwrapped { }; firefox-beta = wrapFirefox firefox-beta-unwrapped { - nameSuffix = "-beta"; desktopName = "Firefox Beta"; - wmClass = "firefox-beta"; - icon = "firefox-beta"; }; firefox-devedition = wrapFirefox firefox-devedition-unwrapped { - nameSuffix = "-devedition"; desktopName = "Firefox Developer Edition"; - wmClass = "firefox-devedition"; - icon = "firefox-devedition"; }; firefox-mobile = callPackage ../applications/networking/browsers/firefox/mobile-config.nix { };