about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/qq
diff options
context:
space:
mode:
authorBu Kun <65808665+pokon548@users.noreply.github.com>2024-04-07 07:52:47 +0800
committerBu Kun <65808665+pokon548@users.noreply.github.com>2024-04-07 13:33:09 +0800
commitab64efadc67934d1b46cdea21fcd10c0ecadae02 (patch)
treee6ee4816579da67f643b564fd5b922bb1e541694 /pkgs/applications/networking/instant-messengers/qq
parent7b01c27540b2b3e013f8b8595fdafb6c96175465 (diff)
qq: use makeShellWrapper instead to wrap program
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/qq')
-rw-r--r--pkgs/applications/networking/instant-messengers/qq/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/networking/instant-messengers/qq/default.nix b/pkgs/applications/networking/instant-messengers/qq/default.nix
index 7f940312a991c..31db4b979e8af 100644
--- a/pkgs/applications/networking/instant-messengers/qq/default.nix
+++ b/pkgs/applications/networking/instant-messengers/qq/default.nix
@@ -19,7 +19,8 @@
 , vips
 , at-spi2-core
 , autoPatchelfHook
-, makeWrapper
+, makeShellWrapper
+, wrapGAppsHook
 }:
 
 let
@@ -43,7 +44,8 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [
     autoPatchelfHook
-    makeWrapper
+    makeShellWrapper
+    wrapGAppsHook
     dpkg
   ];
 
@@ -62,6 +64,8 @@ stdenv.mkDerivation {
     xorg.libXdamage
   ];
 
+  dontWrapGApps = true;
+
   runtimeDependencies = map lib.getLib [
     systemd
   ];
@@ -75,9 +79,11 @@ stdenv.mkDerivation {
     substituteInPlace $out/share/applications/qq.desktop \
       --replace "/opt/QQ/qq" "$out/bin/qq" \
       --replace "/usr/share" "$out/share"
-    makeWrapper $out/opt/QQ/qq $out/bin/qq \
+    makeShellWrapper $out/opt/QQ/qq $out/bin/qq \
+      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
       --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
-      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
+      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
+      "''${gappsWrapperArgs[@]}"
 
     # Remove bundled libraries
     rm -r $out/opt/QQ/resources/app/sharp-lib