2021-08-21 18:57:52 +03:00
|
|
|
_: prev:
|
|
|
|
let
|
|
|
|
pkgs = prev;
|
|
|
|
lib = pkgs.lib;
|
|
|
|
chromiumWayland =
|
|
|
|
let
|
|
|
|
flags = [
|
|
|
|
"--flag-switches-begin"
|
2021-08-21 21:17:51 +03:00
|
|
|
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist"
|
2021-08-21 18:57:52 +03:00
|
|
|
"--flag-switches-end"
|
|
|
|
"--ozone-platform=wayland"
|
|
|
|
"--enable-webrtc-pipewire-capturer"
|
|
|
|
"--ignore-gpu-blocklist"
|
|
|
|
"--enable-gpu-rasterization"
|
|
|
|
"--enable-zero-copy"
|
|
|
|
"--disable-gpu-driver-bug-workarounds"
|
2021-10-16 12:56:36 +03:00
|
|
|
"--force-dark-mode"
|
2021-08-21 18:57:52 +03:00
|
|
|
];
|
|
|
|
in
|
|
|
|
pkgs.writeScriptBin "chromium-wayland" ''
|
|
|
|
#!${pkgs.stdenv.shell}
|
|
|
|
${pkgs.chromium}/bin/chromium ${lib.concatStringsSep " " flags}
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
chromiumWayland =
|
|
|
|
let
|
|
|
|
pname = "chromium";
|
|
|
|
desktop = pkgs.makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
exec = pname;
|
|
|
|
icon = "chromium-browser";
|
|
|
|
desktopName = "Chromium Wayland";
|
|
|
|
genericName = "Web Browser";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.hiPrio (pkgs.stdenv.mkDerivation {
|
|
|
|
inherit pname;
|
|
|
|
version = pkgs.chromium.version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m755 ${chromiumWayland}/bin/${pname}-wayland $out/bin/${pname}
|
|
|
|
cp -r ${desktop}/share $out/share
|
|
|
|
'';
|
|
|
|
/*fixupPhase = ''
|
2021-08-21 21:17:51 +03:00
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader libGL ])} \
|
|
|
|
--prefix VK_ICD_FILENAMES : "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json"
|
2021-08-21 18:57:52 +03:00
|
|
|
'';*/
|
|
|
|
});
|
|
|
|
}
|