about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-03-28 14:50:21 +0100
committerGitHub <noreply@github.com>2020-03-28 14:50:21 +0100
commitd83420f5e181a27919395a8a8b74e3604dbd5407 (patch)
treec3452facb262ca828f77d0ae268536f58c7769a4 /pkgs/applications/networking
parent3af756fce3b5690c8340f2cfb0a38fd20ad5a48b (diff)
parentb3e1a1bbbb5b96f40994944849e5e634d1d9034d (diff)
downloadnixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar.gz
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar.bz2
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar.lz
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar.xz
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.tar.zst
nixlib-d83420f5e181a27919395a8a8b74e3604dbd5407.zip
Merge pull request #82919 from artemist/chromium-ozone
chromium: Add option to enable ozone (for Wayland)
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix15
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix3
2 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 83c492e1e651..53d6e145dbf8 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -21,9 +21,11 @@
 # optional dependencies
 , libgcrypt ? null # gnomeSupport || cupsSupport
 , libva ? null # useVaapi
+, libdrm ? null, wayland ? null, mesa_drivers ? null, libxkbcommon ? null # useOzone
 
 # package customization
 , useVaapi ? false
+, useOzone ? false
 , gnomeSupport ? false, gnome ? null
 , gnomeKeyringSupport ? false, libgnome-keyring3 ? null
 , proprietaryCodecs ? true
@@ -129,7 +131,8 @@ let
       ++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
       ++ optionals cupsSupport [ libgcrypt cups ]
       ++ optional useVaapi libva
-      ++ optional pulseSupport libpulseaudio;
+      ++ optional pulseSupport libpulseaudio
+      ++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
 
     patches = [
       ./patches/nix_plugin_paths_68.patch
@@ -261,6 +264,16 @@ let
     } // optionalAttrs pulseSupport {
       use_pulseaudio = true;
       link_pulseaudio = true;
+    } // optionalAttrs useOzone {
+      use_ozone = true;
+      ozone_platform_gbm = false;
+      use_xkbcommon = true;
+      use_glib = true;
+      use_gtk = true;
+      use_system_libwayland = true;
+      use_system_minigbm = true;
+      use_system_libdrm = true;
+      system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
     } // (extraAttrs.gnFlags or {}));
 
     configurePhase = ''
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 8968a10bed00..b3ca9a79ad30 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -13,6 +13,7 @@
 , enablePepperFlash ? false
 , enableWideVine ? false
 , useVaapi ? false # test video on radeon, before enabling this
+, useOzone ? false
 , cupsSupport ? true
 , pulseSupport ? config.pulseaudio or stdenv.isLinux
 , commandLineArgs ? ""
@@ -32,7 +33,7 @@ let
     upstream-info = (callPackage ./update.nix {}).getChannel channel;
 
     mkChromiumDerivation = callPackage ./common.nix {
-      inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi;
+      inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi useOzone;
     };
 
     browser = callPackage ./browser.nix { inherit channel enableWideVine; };