about summary refs log tree commit diff
path: root/nixpkgs
diff options
context:
space:
mode:
authorCole Mickens <cole.mickens@gmail.com>2020-08-13 05:30:03 +0000
committerAlyssa Ross <hi@alyssa.is>2020-09-29 11:53:39 +0000
commit2f2d19ce88e94b51149c7e1e9bb79db04f82e92c (patch)
tree90aa29782ce43ab1ce6c52724681985b177a7f5d /nixpkgs
parent8655c1ca45e363aa92b957be1d566f925aa42ef4 (diff)
downloadnixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar.gz
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar.bz2
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar.lz
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar.xz
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.tar.zst
nixlib-2f2d19ce88e94b51149c7e1e9bb79db04f82e92c.zip
firefox: enable pipewire+webrtc for wayland users
(cherry picked from commit 31e54cdde34073b3b83e9fca4434cb0cedcb2829)
Diffstat (limited to 'nixpkgs')
-rw-r--r--nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix b/nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix
index 4183623ae843..9bb8f91ef753 100644
--- a/nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix
@@ -22,7 +22,7 @@
 , ffmpegSupport ? true
 , gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
 , gssSupport ? true, kerberos
-, waylandSupport ? gtk3Support, libxkbcommon
+, waylandSupport ? gtk3Support, libxkbcommon, pipewire
 
 ## privacy-related options
 
@@ -94,6 +94,11 @@ stdenv.mkDerivation ({
 
   patches = [
     ./env_var_for_system_dir.patch
+    (fetchpatch {
+      # https://src.fedoraproject.org/rpms/firefox/blob/master/f/firefox-pipewire-0-3.patch
+      url = "https://src.fedoraproject.org/rpms/firefox/raw/e99b683a352cf5b2c9ff198756859bae408b5d9d/f/firefox-pipewire-0-3.patch";
+      sha256 = "0qc62di5823r7ly2lxkclzj9rhg2z7ms81igz44nv0fzv3dszdab";
+    })
   ]
   ++ patches;
 
@@ -124,7 +129,7 @@ stdenv.mkDerivation ({
   ++ lib.optional  gtk3Support gtk3
   ++ lib.optional  waylandSupport libxkbcommon
   ++ lib.optional  gssSupport kerberos
-  ++ lib.optional  waylandSupport libxkbcommon
+  ++ lib.optionals waylandSupport [ libxkbcommon pipewire ]
   ++ lib.optionals stdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
                                      AVFoundation MediaToolbox CoreLocation
                                      Foundation libobjc AddressBook cups ];
@@ -136,6 +141,11 @@ stdenv.mkDerivation ({
 
   postPatch = ''
     rm -rf obj-x86_64-pc-linux-gnu
+
+    # needed for enabling webrtc+pipewire
+    substituteInPlace \
+      media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build \
+      --replace /usr/include ${pipewire.dev}/include
   '' + lib.optionalString (lib.versionAtLeast ffversion "80") ''
     substituteInPlace dom/system/IOUtils.h \
       --replace '#include "nspr/prio.h"'          '#include "prio.h"'