git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitd7731c3142516cd6cc568d8deed316ff9c1bacbd authorAndreas Rammhold <andreas@rammhold.de> dateSun 3 Feb 2019, 11:34 (8 years ago) parent448b3c8
1 file changed+3−1
pkgs/applications/networking/browsers/firefox/common.nix+3−1
pkgs/applications/networking/browsers/firefox/common.nix+3−1
@@ -22,6 +22,7 @@
2222, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
2323, ffmpegSupport ? true
2424, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
25+, waylandSupport ? true, libxkbcommon
2526, gssSupport ? true, kerberos
2627
2728## privacy-related options
@@ -74,7 +75,7 @@ let
7475 flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
7576
7677 default-toolkit = if stdenv.isDarwin then "cairo-cocoa"
77− else "cairo-gtk${if gtk3Support then "3" else "2"}";
78+ else "cairo-gtk${if gtk3Support then "3${lib.optionalString waylandSupport "-wayland"}" else "2"}";
7879
7980 binaryName = if isIceCatLike then "icecat" else "firefox";
8081 binaryNameCapitalized = lib.toUpper (lib.substring 0 1 binaryName) + lib.substring 1 (-1) binaryName;
@@ -124,6 +125,7 @@ stdenv.mkDerivation rec {
124125 ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
125126 ++ lib.optional gtk3Support gtk3
126127 ++ lib.optional gssSupport kerberos
128+ ++ lib.optional waylandSupport libxkbcommon
127129 ++ lib.optionals stdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
128130 AVFoundation MediaToolbox CoreLocation
129131 Foundation libobjc AddressBook cups ];