Merge pull request #82919 from artemist/chromium-ozone

chromium: Add option to enable ozone (for Wayland)
This commit is contained in:
Michael Weiss 2020-03-28 14:50:21 +01:00 committed by GitHub
commit d83420f5e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View file

@ -21,9 +21,11 @@
# optional dependencies # optional dependencies
, libgcrypt ? null # gnomeSupport || cupsSupport , libgcrypt ? null # gnomeSupport || cupsSupport
, libva ? null # useVaapi , libva ? null # useVaapi
, libdrm ? null, wayland ? null, mesa_drivers ? null, libxkbcommon ? null # useOzone
# package customization # package customization
, useVaapi ? false , useVaapi ? false
, useOzone ? false
, gnomeSupport ? false, gnome ? null , gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false, libgnome-keyring3 ? null , gnomeKeyringSupport ? false, libgnome-keyring3 ? null
, proprietaryCodecs ? true , proprietaryCodecs ? true
@ -129,7 +131,8 @@ let
++ optionals gnomeSupport [ gnome.GConf libgcrypt ] ++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optionals cupsSupport [ libgcrypt cups ] ++ optionals cupsSupport [ libgcrypt cups ]
++ optional useVaapi libva ++ optional useVaapi libva
++ optional pulseSupport libpulseaudio; ++ optional pulseSupport libpulseaudio
++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
patches = [ patches = [
./patches/nix_plugin_paths_68.patch ./patches/nix_plugin_paths_68.patch
@ -261,6 +264,16 @@ let
} // optionalAttrs pulseSupport { } // optionalAttrs pulseSupport {
use_pulseaudio = true; use_pulseaudio = true;
link_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 {})); } // (extraAttrs.gnFlags or {}));
configurePhase = '' configurePhase = ''

View file

@ -13,6 +13,7 @@
, enablePepperFlash ? false , enablePepperFlash ? false
, enableWideVine ? false , enableWideVine ? false
, useVaapi ? false # test video on radeon, before enabling this , useVaapi ? false # test video on radeon, before enabling this
, useOzone ? false
, cupsSupport ? true , cupsSupport ? true
, pulseSupport ? config.pulseaudio or stdenv.isLinux , pulseSupport ? config.pulseaudio or stdenv.isLinux
, commandLineArgs ? "" , commandLineArgs ? ""
@ -32,7 +33,7 @@ let
upstream-info = (callPackage ./update.nix {}).getChannel channel; upstream-info = (callPackage ./update.nix {}).getChannel channel;
mkChromiumDerivation = callPackage ./common.nix { 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; }; browser = callPackage ./browser.nix { inherit channel enableWideVine; };