From f65b692a07bbfc83a43244bca73fd658e618be73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 1 Sep 2015 14:30:35 +0200 Subject: [PATCH] firefox: fix argv0 with enableGTK3 (/cc #9562) Also add a simple test detecting such problems. --- pkgs/applications/networking/browsers/firefox/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix index ff206c50f34a..a8ca59d0ed48 100644 --- a/pkgs/applications/networking/browsers/firefox/default.nix +++ b/pkgs/applications/networking/browsers/firefox/default.nix @@ -97,10 +97,16 @@ stdenv.mkDerivation rec { # Remove SDK cruft. FIXME: move to a separate output? rm -rf $out/share/idl $out/include $out/lib/firefox-devel-* '' + lib.optionalString enableGTK3 + # argv[0] must point to firefox itself '' wrapProgram "$out/bin/firefox" \ + --argv0 "$out/bin/.firefox-wrapped" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:" \ --suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS" + '' + + # some basic testing + '' + "$out/bin/firefox" --version ''; meta = {