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

View File

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