From 700d6186a30e9e8118a6b319f12cb5cfb9d086bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 4 May 2017 22:09:15 +0200 Subject: [PATCH] wrapFirefox: fix #25505 gtk3 file dialogs Crash + icons. --- .../networking/browsers/firefox/common.nix | 2 +- .../networking/browsers/firefox/wrapper.nix | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index e926822b42aa..8d8217e33a21 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -200,6 +200,6 @@ stdenv.mkDerivation (rec { gtk = gtk2; inherit nspr; inherit ffmpegSupport; - }; + } // lib.optionalAttrs gtk3Support { inherit gtk3; }; } // overrides) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index f2ca9eaa622b..cffdfa7a97dd 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -74,7 +74,9 @@ in stdenv.mkDerivation { ]; }; - buildInputs = [makeWrapper] ++ lib.optionals (!ffmpegSupport) gst-plugins; + buildInputs = [makeWrapper] + ++ lib.optional (!ffmpegSupport) gst-plugins + ++ lib.optional (browser ? gtk3) browser.gtk3; buildCommand = '' if [ ! -x "${browser}/bin/${browserName}" ] @@ -92,7 +94,13 @@ in stdenv.mkDerivation { --prefix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))" \ --suffix PATH ':' "$out/bin" \ --set MOZ_APP_LAUNCHER "${browserName}${nameSuffix}" \ - ${lib.optionalString (!ffmpegSupport) ''--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"''} + ${lib.optionalString (!ffmpegSupport) + ''--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"'' + + lib.optionalString (browser ? gtk3) + ''--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ + --suffix XDG_DATA_DIRS : '${gnome3.defaultIconTheme}/share' + '' + } if [ -e "${browser}/share/icons" ]; then mkdir -p "$out/share"