qq: add libGL to runtime path

`libEGL.so.1` is missing. Electron is using it by dlopen.
This causes electron fallback to software rendering in X11 and crash directly under wayland.
Beacuse it's a unfree software from a debian package. the path to `libEGL.so.1` is hard-coded so we should just wrapping it.
This commit is contained in:
ChaosAttractor 2023-12-05 20:41:14 +08:00
parent 4abe534795
commit 7e3940735a

View File

@ -11,6 +11,7 @@
, libgcrypt
, libkrb5
, mesa # for libgbm
, libGL
, nss
, xorg
, systemd
@ -75,6 +76,7 @@ stdenv.mkDerivation {
--replace "/opt/QQ/qq" "$out/bin/qq" \
--replace "/usr/share" "$out/share"
makeWrapper $out/opt/QQ/qq $out/bin/qq \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
--prefix PATH : "${lib.makeBinPath [ gjs ]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"