about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/gog/albion/default.nix18
-rw-r--r--pkgs/games/gog/dungeons3.nix4
-rw-r--r--pkgs/games/gog/overload.nix4
-rw-r--r--pkgs/games/gog/party-hard.nix4
-rw-r--r--pkgs/games/gog/satellite-reign.nix4
-rw-r--r--pkgs/games/gog/settlers2.nix12
-rw-r--r--pkgs/games/gog/stardew-valley.nix5
-rw-r--r--pkgs/games/gog/thimbleweed-park.nix13
-rw-r--r--pkgs/games/gog/war-for-the-overworld.nix4
-rw-r--r--pkgs/games/gog/wizard-of-legend.nix4
-rw-r--r--pkgs/games/gog/xeen.nix10
11 files changed, 26 insertions, 56 deletions
diff --git a/pkgs/games/gog/albion/default.nix b/pkgs/games/gog/albion/default.nix
index 1c03f080..a7493712 100644
--- a/pkgs/games/gog/albion/default.nix
+++ b/pkgs/games/gog/albion/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, lib, buildSandbox, fetchGog, fetchzip, innoextract, SDL2, SDL2_mixer
-, bchunk, p7zip, alsaLib, writeText, makeWrapper, libGL
+{ stdenv, lib, buildSandbox, fetchGog, gogUnpackHook, fetchzip
+, SDL2, SDL2_mixer, bchunk, p7zip, alsaLib, writeText, makeWrapper, libGL
 
 # For static recompilation
 , fetchFromGitHub, scons, judy, python, nasm, autoreconfHook
@@ -97,16 +97,12 @@ let
 
     outputs = [ "out" "dev" ];
 
-    nativeBuildInputs = [ innoextract ];
+    nativeBuildInputs = [ gogUnpackHook ];
+    innoExtractOnly = [ "game.gog" "game.ins" "MAIN.EXE" "SETUP.INI" ];
+    innoExtractKeepCase = true;
+
     phases = [ "unpackPhase" "patchPhase" "installPhase" ];
-    unpackCmd = toString [
-      "innoextract"
-      "--include" "game.gog"
-      "--include" "game.ins"
-      "--include" "MAIN.EXE"
-      "--include" "SETUP.INI"
-      "-m" "\"$curSrc\""
-    ];
+
     patchPhase = ''
       sed -i -e '
         s,^SOURCE_PATH=.*,SOURCE_PATH=C:\\,
diff --git a/pkgs/games/gog/dungeons3.nix b/pkgs/games/gog/dungeons3.nix
index 7d4c5a3d..53892f71 100644
--- a/pkgs/games/gog/dungeons3.nix
+++ b/pkgs/games/gog/dungeons3.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip, mono }:
+{ buildUnity, fetchGog, mono }:
 
 buildUnity {
   name = "dungeons3";
@@ -13,6 +13,4 @@ buildUnity {
   };
 
   buildInputs = [ mono ];
-
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
 }
diff --git a/pkgs/games/gog/overload.nix b/pkgs/games/gog/overload.nix
index 94c20bcb..00410356 100644
--- a/pkgs/games/gog/overload.nix
+++ b/pkgs/games/gog/overload.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip }:
+{ buildUnity, fetchGog }:
 
 buildUnity {
   name = "overload";
@@ -11,6 +11,4 @@ buildUnity {
     downloadName = "en3installer0";
     sha256 = "1r42ll6k2xif405rp85gn3sbhacrhf1kkpqx2ahp8j5f9alscdxm";
   };
-
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
 }
diff --git a/pkgs/games/gog/party-hard.nix b/pkgs/games/gog/party-hard.nix
index 3e0393f2..6b15580f 100644
--- a/pkgs/games/gog/party-hard.nix
+++ b/pkgs/games/gog/party-hard.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip }:
+{ buildUnity, fetchGog }:
 
 buildUnity {
   name = "party-hard";
@@ -11,6 +11,4 @@ buildUnity {
     downloadName = "en3installer2";
     sha256 = "00sb76w0v4b2izfwx1kr53frrgg8rg5d0qgpj8z3xq8frnv1fmi4";
   };
-
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
 }
diff --git a/pkgs/games/gog/satellite-reign.nix b/pkgs/games/gog/satellite-reign.nix
index ec8c6db3..63f0c8b5 100644
--- a/pkgs/games/gog/satellite-reign.nix
+++ b/pkgs/games/gog/satellite-reign.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip }:
+{ buildUnity, fetchGog }:
 
 buildUnity {
   name = "satellite-reign";
@@ -12,7 +12,5 @@ buildUnity {
     sha256 = "0wpkpqrcli2772g6l9yab38vbjh1by4cbpa397fqvhny247qdz5k";
   };
 
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
-
   sandbox.paths.required = [ "$XDG_DATA_HOME/SatelliteReign" ];
 }
diff --git a/pkgs/games/gog/settlers2.nix b/pkgs/games/gog/settlers2.nix
index 1d4497b9..4f0ac193 100644
--- a/pkgs/games/gog/settlers2.nix
+++ b/pkgs/games/gog/settlers2.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildSandbox, fetchGog, innoextract, bchunk, p7zip
+{ stdenv, lib, buildSandbox, fetchGog, gogUnpackHook, bchunk, p7zip
 
 , fetchFromGitHub, cmake, gettext, boost, miniupnpc, bzip2
 , SDL, SDL_mixer, libpulseaudio, alsaLib, libGL, lua5_2
@@ -15,14 +15,10 @@ let
       sha256 = "19c88h972ydfpdbay61lz6pi4gnlm2lq5dcya5im9mmlin2nvyr7";
     };
 
-    unpackCmd = toString [
-      "innoextract"
-      "--include" "/app/DATA"
-      "--include" "/app/GFX"
-      "-m" "\"$curSrc\""
-    ];
+    nativeBuildInputs = [ gogUnpackHook ];
+    innoExtractOnly = [ "/app/DATA" "/app/GFX" ];
+    innoExtractKeepCase = true;
 
-    nativeBuildInputs = [ innoextract ];
     phases = [ "unpackPhase" "patchPhase" "installPhase" ];
 
     installPhase = ''
diff --git a/pkgs/games/gog/stardew-valley.nix b/pkgs/games/gog/stardew-valley.nix
index 6408c342..1756da3e 100644
--- a/pkgs/games/gog/stardew-valley.nix
+++ b/pkgs/games/gog/stardew-valley.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, buildGame, fetchGog, unzip, makeWrapper
+{ lib, stdenv, buildGame, fetchGog, makeWrapper
 , mono50, SDL2, libGL, openal
 
 , beta ? false
@@ -20,9 +20,6 @@ buildGame rec {
     sha256 = "199xf008cxm6ywb4d8c3dz0h7iiv9d0ka5k93gq0jqj3ga3fjn3i";
   });
 
-  unpackCmd = lib.optionalString (!beta)
-    "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
-
   nativeBuildInputs = [ makeWrapper ];
 
   buildPhase = let
diff --git a/pkgs/games/gog/thimbleweed-park.nix b/pkgs/games/gog/thimbleweed-park.nix
index b9e14c32..ec48233d 100644
--- a/pkgs/games/gog/thimbleweed-park.nix
+++ b/pkgs/games/gog/thimbleweed-park.nix
@@ -1,4 +1,4 @@
-{ lib, buildGame, fetchGog, unzip, libGL, libudev
+{ lib, buildGame, fetchGog, libGL, libudev
 
 , ransomeUnbeeped ? true
 }:
@@ -17,8 +17,6 @@ buildGame rec {
     sha256 = "1cfll73qazm9nz40n963qvankqkznfjai9g88kgw6xcl40y8jrqn";
   });
 
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/*' || :";
-
   buildInputs = [ libGL ];
 
   runtimeDependencies = [ libudev ];
@@ -38,18 +36,17 @@ buildGame rec {
     }
     EOF
     patchelf --add-needed "$out/libexec/thimbleweed-park/preload.so" \
-      game/ThimbleweedPark
+      ThimbleweedPark
   '';
 
   installPhase = ''
-    install -vD game/ThimbleweedPark "$out/bin/thimbleweed-park"
+    install -vD ThimbleweedPark "$out/bin/thimbleweed-park"
     install -vD preload.so "$out/libexec/thimbleweed-park/preload.so"
-    for i in game/*.ggpack[0-9]*; do
+    for i in *.ggpack[0-9]*; do
       install -vD -m 0644 "$i" "$out/share/thimbleweed-park/$(basename "$i")"
     done
 
-    install -vD -m 0644 support/icon.png \
-      "$out/share/icons/thimbleweed-park.png"
+    install -vD -m 0644 xdg-icon.png "$out/share/icons/thimbleweed-park.png"
 
     mkdir -p "$out/share/applications"
     cat > "$out/share/applications/thimbleweed-park.desktop" <<EOF
diff --git a/pkgs/games/gog/war-for-the-overworld.nix b/pkgs/games/gog/war-for-the-overworld.nix
index 8309fa12..8e46ec32 100644
--- a/pkgs/games/gog/war-for-the-overworld.nix
+++ b/pkgs/games/gog/war-for-the-overworld.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip, mono, monogamePatcher }:
+{ buildUnity, fetchGog, mono, monogamePatcher }:
 
 buildUnity {
   name = "war-for-the-overworld";
@@ -12,8 +12,6 @@ buildUnity {
     sha256 = "07yj9clf3hmy7z67ck9sqf3gnrazx5rzifg91jas77z774vwdg8k";
   };
 
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
-
   nativeBuildInputs = [ mono monogamePatcher ];
 
   # The game tries to write stuff to its dataPath and it's even more
diff --git a/pkgs/games/gog/wizard-of-legend.nix b/pkgs/games/gog/wizard-of-legend.nix
index d8ee46cb..ab754f13 100644
--- a/pkgs/games/gog/wizard-of-legend.nix
+++ b/pkgs/games/gog/wizard-of-legend.nix
@@ -1,4 +1,4 @@
-{ buildUnity, fetchGog, unzip }:
+{ buildUnity, fetchGog }:
 
 buildUnity {
   name = "wizard-of-legend";
@@ -11,6 +11,4 @@ buildUnity {
     downloadName = "en3installer0";
     sha256 = "192fhway7ij5f4fh0vb1204f3yg3fxz08fvqlg03gskjs9krcbcz";
   };
-
-  unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :";
 }
diff --git a/pkgs/games/gog/xeen.nix b/pkgs/games/gog/xeen.nix
index d4b07c73..e5e65fc8 100644
--- a/pkgs/games/gog/xeen.nix
+++ b/pkgs/games/gog/xeen.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, buildSandbox, fetchGog, innoextract, bchunk, p7zip
+{ lib, stdenv, buildSandbox, fetchGog, gogUnpackHook, bchunk, p7zip
 , scummvm, fetchFromGitHub
 , runCommand, xvfb_run
 
@@ -20,12 +20,8 @@ let
       sha256 = "0jv9k5rcapqlk61pawa5l4m34iwllx8j6cfz69gl092h04fvfqki";
     };
 
-    unpackCmd = toString [
-      "${innoextract}/bin/innoextract"
-      "--include" "app/game1.gog"
-      "--include" "app/music"
-      "-L" "-m" "\"$curSrc\""
-    ];
+    nativeBuildInputs = [ gogUnpackHook ];
+    innoExtractOnly = [ "app/game1.gog" "app/music" ];
 
     patchPhase = ''
       cat > game1.inst <<EOF