about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/games/tetrio-desktop/default.nix27
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/games/tetrio-desktop/default.nix b/pkgs/games/tetrio-desktop/default.nix
index 93d80314c661..66480855547a 100644
--- a/pkgs/games/tetrio-desktop/default.nix
+++ b/pkgs/games/tetrio-desktop/default.nix
@@ -2,16 +2,17 @@
 , lib
 , fetchurl
 , autoPatchelfHook
+, wrapGAppsHook
 , alsa-lib
 , cups
-, libpulseaudio
 , libX11
 , libXScrnSaver
 , libXtst
 , mesa
 , nss
+, gtk3
+, libpulseaudio
 , systemd
-, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
@@ -37,19 +38,13 @@ stdenv.mkDerivation rec {
     libXtst
     mesa
     nss
+    gtk3
   ];
 
   dontWrapGApps = true;
 
   libPath = lib.makeLibraryPath [
-    alsa-lib
-    cups
     libpulseaudio
-    libX11
-    libXScrnSaver
-    libXtst
-    mesa
-    nss
     systemd
   ];
 
@@ -61,15 +56,21 @@ stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
-    cp -R $TMP/tetrio-desktop/{usr/share,opt} $out/
-
-    wrapProgram $out/opt/TETR.IO/tetrio-desktop \
-      --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO
+    runHook preInstall
 
+    cp -R $TMP/tetrio-desktop/{usr/share,opt} $out/
     ln -s $out/opt/TETR.IO/tetrio-desktop $out/bin/
 
     substituteInPlace $out/share/applications/tetrio-desktop.desktop \
       --replace "Exec=\"/opt/TETR.IO/tetrio-desktop\"" "Exec=\"$out/opt/TETR.IO/tetrio-desktop\""
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/opt/TETR.IO/tetrio-desktop \
+      --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO \
+      ''${gappsWrapperArgs[@]}
   '';
 
   meta = with lib; {