about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/qq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/qq/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/qq/default.nix17
1 files changed, 5 insertions, 12 deletions
diff --git a/pkgs/applications/networking/instant-messengers/qq/default.nix b/pkgs/applications/networking/instant-messengers/qq/default.nix
index af5cf167a62c..e90526c0a6aa 100644
--- a/pkgs/applications/networking/instant-messengers/qq/default.nix
+++ b/pkgs/applications/networking/instant-messengers/qq/default.nix
@@ -2,7 +2,6 @@
 , cups
 , dpkg
 , fetchurl
-, gjs
 , glib
 , gtk3
 , lib
@@ -11,6 +10,7 @@
 , libgcrypt
 , libkrb5
 , mesa # for libgbm
+, libGL
 , nss
 , xorg
 , systemd
@@ -19,7 +19,6 @@
 , at-spi2-core
 , autoPatchelfHook
 , wrapGAppsHook
-, makeWrapper
 }:
 
 let
@@ -43,8 +42,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [
     autoPatchelfHook
-    # makeBinaryWrapper not support shell wrapper specifically for `NIXOS_OZONE_WL`.
-    (wrapGAppsHook.override { inherit makeWrapper; })
+    wrapGAppsHook
     dpkg
   ];
 
@@ -76,7 +74,9 @@ stdenv.mkDerivation {
     substituteInPlace $out/share/applications/qq.desktop \
       --replace "/opt/QQ/qq" "$out/bin/qq" \
       --replace "/usr/share" "$out/share"
-    ln -s $out/opt/QQ/qq $out/bin/qq
+    makeWrapper $out/opt/QQ/qq $out/bin/qq \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
+      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
 
     # Remove bundled libraries
     rm -r $out/opt/QQ/resources/app/sharp-lib
@@ -91,13 +91,6 @@ stdenv.mkDerivation {
     runHook postInstall
   '';
 
-  preFixup = ''
-    gappsWrapperArgs+=(
-      --prefix PATH : "${lib.makeBinPath [ gjs ]}"
-      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
-    )
-  '';
-
   passthru.updateScript = ./update.sh;
 
   meta = with lib; {