diff options
author | huantian | 2022-11-06 17:49:20 -0700 |
---|---|---|
committer | Yt | 2022-11-09 10:32:06 -0500 |
commit | cc3ea17877fb86989a83a57570ca09400ac4e584 (patch) | |
tree | 59e2d6b2bcda67e468867530d845bcbac518fd28 | |
parent | 3a73976c74cac8b4f4c8a061fef5b206d0fd1fea (diff) |
tetrio-desktop: cleanup, fix GApps wrapping
gappsWrapperArgs must be added to wrapProgram in fixup phase
-rw-r--r-- | pkgs/games/tetrio-desktop/default.nix | 27 |
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; { |