From 18028f81d47941c3c737c22a89a9ac16aedb03b0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 4 Jan 2026 21:20:45 +0200 Subject: [PATCH] buildMozillaMach: set argv to unwrapped binary name mesa looks at the name of the executable / argv0 to determine which quirks it should apply. Example: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38845 By setting argv0 to .${binaryName}-wrapped instead of ${binaryName}, these do not apply. I'm not sure what the "Needed to find Mozilla runtime" comment was supposed to mean, but I can confirm dropping this line (which is equivalent to `--argv0 "$out/bin/${binaryName}` fixes the issue. Firefox seems to run properly, with `about:support` reporting AGX G13/G14 as intended by the mesa quirk, when running on an Asahi MacBook. Fixes #476721. --- pkgs/build-support/build-mozilla-mach/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index aefd57fbe0b4..8b86785c1586 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -658,9 +658,6 @@ buildStdenv.mkDerivation { # Remove SDK cruft. FIXME: move to a separate output? rm -rf $out/share/idl $out/include $out/lib/${binaryName}-devel-* - # Needed to find Mozilla runtime - gappsWrapperArgs+=(--argv0 "$out/bin/.${binaryName}-wrapped") - resourceDir=$out/lib/${binaryName} '' + ''