about summary refs log tree commit diff
path: root/pkgs/games/gog/albion
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-07-31 01:54:47 +0200
committeraszlig <aszlig@nix.build>2018-07-31 01:54:47 +0200
commita8e406920bb11a2c53558d1398b3a66efd267e60 (patch)
treec792cbf21acf270efb39a6a914d922de022de914 /pkgs/games/gog/albion
parente5afeaad30a27e44a18c9acf78d35bc59ff98046 (diff)
games/gog: Switch everything to gogUnpackHook
For Albion, Settlers 2 and World of Xeen we need to explicitly add
gogUnpackHook, because for those the derivation containing the game data
is not created via our buildGame wrapper.

Everything else is just done by removing unpackCmd and unzip from the
package arguments. One exception is Thimbleweed Park, which relied on
custom path for unzip in order to get the desktop icon, but with our now
hook, we get that icon now in xdg-icon.png with a flat directory
structure.

I've tested this by building all the games from GOG that we have
packaged here. However, I didn't test whether every single one actually
runs.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/games/gog/albion')
-rw-r--r--pkgs/games/gog/albion/default.nix18
1 files changed, 7 insertions, 11 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:\\,