Merge pull request #73365 from colemickens/nixpkgs-firefox-libglvnd

firefox-wrapper: rename gdkWayland->forceWayland; always use libglvnd
This commit is contained in:
Florian Klink 2020-07-11 13:49:39 +02:00 committed by GitHub
commit 1b78e0eeec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -27,11 +27,12 @@ let
, nameSuffix ? "" , nameSuffix ? ""
, icon ? browserName , icon ? browserName
, extraNativeMessagingHosts ? [] , extraNativeMessagingHosts ? []
, gdkWayland ? false , forceWayland ? false
, useGlvnd ? true
, cfg ? config.${browserName} or {} , cfg ? config.${browserName} or {}
}: }:
assert gdkWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used assert forceWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used
let let
enableAdobeFlash = cfg.enableAdobeFlash or false; enableAdobeFlash = cfg.enableAdobeFlash or false;
@ -69,7 +70,7 @@ let
libs = lib.optionals stdenv.isLinux [ udev libva mesa ] libs = lib.optionals stdenv.isLinux [ udev libva mesa ]
++ lib.optional ffmpegSupport ffmpeg ++ lib.optional ffmpegSupport ffmpeg
++ lib.optional gssSupport kerberos ++ lib.optional gssSupport kerberos
++ lib.optional gdkWayland libglvnd ++ lib.optional useGlvnd libglvnd
++ lib.optionals (cfg.enableQuakeLive or false) ++ lib.optionals (cfg.enableQuakeLive or false)
(with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ]) (with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ])
++ lib.optional (enableAdobeFlash && (cfg.enableAdobeFlashDRM or false)) hal-flash ++ lib.optional (enableAdobeFlash && (cfg.enableAdobeFlashDRM or false)) hal-flash
@ -84,7 +85,7 @@ let
exec = "${browserName}${nameSuffix} %U"; exec = "${browserName}${nameSuffix} %U";
inherit icon; inherit icon;
comment = ""; comment = "";
desktopName = "${desktopName}${nameSuffix}${lib.optionalString gdkWayland " (Wayland)"}"; desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}";
genericName = "Web Browser"; genericName = "Web Browser";
categories = "Network;WebBrowser;"; categories = "Network;WebBrowser;";
mimeType = stdenv.lib.concatStringsSep ";" [ mimeType = stdenv.lib.concatStringsSep ";" [
@ -125,8 +126,8 @@ let
--set SNAP_NAME "firefox" \ --set SNAP_NAME "firefox" \
--set MOZ_LEGACY_PROFILES 1 \ --set MOZ_LEGACY_PROFILES 1 \
--set MOZ_ALLOW_DOWNGRADE 1 \ --set MOZ_ALLOW_DOWNGRADE 1 \
${lib.optionalString gdkWayland '' ${lib.optionalString forceWayland ''
--set GDK_BACKEND "wayland" \ --set MOZ_ENABLE_WAYLAND "1" \
''}${lib.optionalString (browser ? gtk3) ''}${lib.optionalString (browser ? gtk3)
''--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ ''--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : '${gnome3.adwaita-icon-theme}/share' --suffix XDG_DATA_DIRS : '${gnome3.adwaita-icon-theme}/share'

View File

@ -19934,7 +19934,7 @@ in
firefox-unwrapped = firefoxPackages.firefox; firefox-unwrapped = firefoxPackages.firefox;
firefox-esr-68-unwrapped = firefoxPackages.firefox-esr-68; firefox-esr-68-unwrapped = firefoxPackages.firefox-esr-68;
firefox = wrapFirefox firefox-unwrapped { }; firefox = wrapFirefox firefox-unwrapped { };
firefox-wayland = wrapFirefox firefox-unwrapped { gdkWayland = true; }; firefox-wayland = wrapFirefox firefox-unwrapped { forceWayland = true; };
firefox-esr-68 = wrapFirefox firefox-esr-68-unwrapped { }; firefox-esr-68 = wrapFirefox firefox-esr-68-unwrapped { };
firefox-esr = firefox-esr-68; firefox-esr = firefox-esr-68;