From 7e3940735af718435c7f34cbc1f0f9c0105e8159 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Tue, 5 Dec 2023 20:41:14 +0800 Subject: [PATCH] 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. --- pkgs/applications/networking/instant-messengers/qq/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/qq/default.nix b/pkgs/applications/networking/instant-messengers/qq/default.nix index b372d708eb75..ea7f6e53fc7d 100644 --- a/pkgs/applications/networking/instant-messengers/qq/default.nix +++ b/pkgs/applications/networking/instant-messengers/qq/default.nix @@ -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}}"