firefoxPackages: enable support for wayland
This adds support for building firefox with the gtk wayland backend. It should work on all the flavors that use >=gtk3. Using the wayland still allows using the X11 backend.
This commit is contained in:
parent
448b3c8e8c
commit
d7731c3142
|
@ -22,6 +22,7 @@
|
||||||
, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
|
, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
|
||||||
, ffmpegSupport ? true
|
, ffmpegSupport ? true
|
||||||
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
|
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
|
||||||
|
, waylandSupport ? true, libxkbcommon
|
||||||
, gssSupport ? true, kerberos
|
, gssSupport ? true, kerberos
|
||||||
|
|
||||||
## privacy-related options
|
## privacy-related options
|
||||||
|
@ -74,7 +75,7 @@ let
|
||||||
flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
|
flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
|
||||||
|
|
||||||
default-toolkit = if stdenv.isDarwin then "cairo-cocoa"
|
default-toolkit = if stdenv.isDarwin then "cairo-cocoa"
|
||||||
else "cairo-gtk${if gtk3Support then "3" else "2"}";
|
else "cairo-gtk${if gtk3Support then "3${lib.optionalString waylandSupport "-wayland"}" else "2"}";
|
||||||
|
|
||||||
binaryName = if isIceCatLike then "icecat" else "firefox";
|
binaryName = if isIceCatLike then "icecat" else "firefox";
|
||||||
binaryNameCapitalized = lib.toUpper (lib.substring 0 1 binaryName) + lib.substring 1 (-1) binaryName;
|
binaryNameCapitalized = lib.toUpper (lib.substring 0 1 binaryName) + lib.substring 1 (-1) binaryName;
|
||||||
|
@ -124,6 +125,7 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
|
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
|
||||||
++ lib.optional gtk3Support gtk3
|
++ lib.optional gtk3Support gtk3
|
||||||
++ lib.optional gssSupport kerberos
|
++ lib.optional gssSupport kerberos
|
||||||
|
++ lib.optional waylandSupport libxkbcommon
|
||||||
++ lib.optionals stdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
|
++ lib.optionals stdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
|
||||||
AVFoundation MediaToolbox CoreLocation
|
AVFoundation MediaToolbox CoreLocation
|
||||||
Foundation libobjc AddressBook cups ];
|
Foundation libobjc AddressBook cups ];
|
||||||
|
|
Loading…
Reference in New Issue