google-chrome: fix hardware acceleration on Wayland (#155447)

Fix #103049.
This commit is contained in:
Brandon Weeks 2022-01-19 11:50:11 -08:00 committed by GitHub
parent 66d044d117
commit c3e8270c3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
, libXcursor, libXext, libXfixes, libXrender, libXScrnSaver, libXcomposite, libxcb
, alsa-lib, libXdamage, libXtst, libXrandr, libxshmfence, expat, cups
, dbus, gtk3, gdk-pixbuf, gcc-unwrapped, at-spi2-atk, at-spi2-core
, libkrb5, libdrm, mesa
, libkrb5, libdrm, libglvnd, mesa
, libxkbcommon, pipewire, wayland # ozone/wayland
# Command line programs
@ -66,7 +66,7 @@ let
liberation_ttf curl util-linux xdg-utils wget
flac harfbuzz icu libpng opusWithCustomModes snappy speechd
bzip2 libcap at-spi2-atk at-spi2-core
libkrb5 libdrm mesa coreutils
libkrb5 libdrm libglvnd mesa coreutils
libxkbcommon pipewire wayland
] ++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva
@ -119,12 +119,6 @@ in stdenv.mkDerivation {
cp -a opt/* $out/share
cp -a usr/share/* $out/share
# To fix --use-gl=egl:
test -e $out/share/google/$appname/libEGL.so
ln -s libEGL.so $out/share/google/$appname/libEGL.so.1
test -e $out/share/google/$appname/libGLESv2.so
ln -s libGLESv2.so $out/share/google/$appname/libGLESv2.so.2
substituteInPlace $out/share/applications/google-$appname.desktop \
--replace /usr/bin/google-chrome-$dist $exe
substituteInPlace $out/share/gnome-control-center/default-apps/google-$appname.xml \