This commit is contained in:
dusk 2021-05-28 18:30:15 +03:00
parent 2b9d655c98
commit 764c4e6398
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
2 changed files with 25 additions and 21 deletions

View File

@ -14,6 +14,7 @@ final: prev: rec {
"--ignore-gpu-blocklist" "--ignore-gpu-blocklist"
"--enable-gpu-rasterization" "--enable-gpu-rasterization"
"--enable-zero-copy" "--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
]; ];
}); });
mkDiscord = mkDiscord =
@ -132,7 +133,9 @@ final: prev: rec {
]; ];
flags = (lib.optionals isWayland [ flags = (lib.optionals isWayland [
"--enable-features=UseOzonePlatform" "--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
"--flag-switches-end"
"--ozone-platform=wayland" "--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer" "--enable-webrtc-pipewire-capturer"
]) ++ extraOptions; ]) ++ extraOptions;

View File

@ -121,42 +121,43 @@ in
chromiumWayland = chromiumWayland =
let let
flags = [ flags = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--enable-vulkan" "--enable-vulkan"
"--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist"
"--flag-switches-end"
"--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer" "--enable-webrtc-pipewire-capturer"
"--ignore-gpu-blocklist" "--ignore-gpu-blocklist"
"--enable-gpu-rasterization" "--enable-gpu-rasterization"
"--enable-zero-copy" "--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
# "--enable-features=VaapiVideoDecoder" # "--enable-features=VaapiVideoDecoder"
# "--use-gl=egl" # "--use-gl=egl"
# "--disable-gpu-driver-bug-workarounds"
]; ];
in in
pkgs.writeScriptBin "chromium-wayland" '' pkgs.writeScriptBin "chromium-wayland" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
chromium ${lib.concatStringsSep " " flags} chromium ${lib.concatStringsSep " " flags}
''; '';
chromiumWaylandPkg = with pkgs; chromiumWaylandPkg =
let name = "chromium-wayland"; in let
stdenv.mkDerivation { name = "chromium-wayland";
pname = name; desktop = pkgs.makeDesktopItem {
version = chromium.version;
nativeBuildInputs = [ copyDesktopItems ];
desktopItems = [
(makeDesktopItem {
inherit name; inherit name;
exec = name; exec = name;
icon = "chromium-browser";
desktopName = "Chromium Wayland"; desktopName = "Chromium Wayland";
genericName = "Web Browser"; genericName = "Web Browser";
}) };
]; in
pkgs.stdenv.mkDerivation {
name = name;
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir $out
ln -s ${chromiumWayland}/bin/chromium-wayland $out/bin/chromium-wayland ln -s ${chromiumWayland}/bin $out/bin
ln -s ${desktop}/share $out/share
''; '';
}; };