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/dwarf-fortress/wrapper/default.nix65
-rw-r--r--pkgs/games/openxcom/default.nix6
-rw-r--r--pkgs/games/steam/runtime-wrapped.nix1
3 files changed, 35 insertions, 37 deletions
diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix
index 8d9f06ffe143..058bb5f72ae6 100644
--- a/pkgs/games/dwarf-fortress/wrapper/default.nix
+++ b/pkgs/games/dwarf-fortress/wrapper/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildEnv, substituteAll
+{ stdenv, lib, buildEnv, substituteAll, runCommand
 , dwarf-fortress, dwarf-fortress-unfuck
 , dwarf-therapist
 , enableDFHack ? false, dfhack
@@ -33,44 +33,41 @@ let
          ++ lib.optional enableTWBT twbt.art
          ++ [ dwarf-fortress ];
 
+  fixup = lib.singleton (runCommand "fixup" {} ''
+    mkdir -p $out/data/init
+    cp ${dwarf-fortress}/data/init/init.txt $out/data/init/init.txt
+  '' + lib.optionalString enableDFHack ''
+    mkdir -p $out/hack
+
+    # Patch the MD5
+    orig_md5=$(cat "${dwarf-fortress}/hash.md5.orig")
+    patched_md5=$(cat "${dwarf-fortress}/hash.md5")
+    input_file="${dfhack_}/hack/symbols.xml"
+    output_file="$out/hack/symbols.xml"
+
+    echo "[DFHack Wrapper] Fixing Dwarf Fortress MD5:"
+    echo "  Input:   $input_file"
+    echo "  Search:  $orig_md5"
+    echo "  Output:  $output_file"
+    echo "  Replace: $patched_md5"
+
+    substitute "$input_file" "$output_file" --replace "$orig_md5" "$patched_md5"
+  '' + lib.optionalString enableTWBT ''
+    substituteInPlace $out/data/init/init.txt \
+      --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TWBT]'
+  '' + ''
+    substituteInPlace $out/data/init/init.txt \
+      --replace '[INTRO:YES]' '[INTRO:${unBool enableIntro}]' \
+      --replace '[TRUETYPE:YES]' '[TRUETYPE:${unBool enableTruetype}]' \
+      --replace '[FPS:NO]' '[FPS:${unBool enableFPS}]'
+  '');
+
   env = buildEnv {
     name = "dwarf-fortress-env-${dwarf-fortress.dfVersion}";
 
-    paths = themePkg ++ pkgs;
+    paths = fixup ++ themePkg ++ pkgs;
     pathsToLink = [ "/" "/hack" "/hack/scripts" ];
 
-    postBuild = ''
-      # De-symlink init.txt
-      cp $out/data/init/init.txt init.txt
-      rm -f $out/data/init/init.txt
-      mv init.txt $out/data/init/init.txt
-    '' + lib.optionalString enableDFHack ''
-      # De-symlink symbols.xml
-      rm $out/hack/symbols.xml
-
-      # Patch the MD5
-      orig_md5=$(cat "${dwarf-fortress}/hash.md5.orig")
-      patched_md5=$(cat "${dwarf-fortress}/hash.md5")
-      input_file="${dfhack_}/hack/symbols.xml"
-      output_file="$out/hack/symbols.xml"
-
-      echo "[DFHack Wrapper] Fixing Dwarf Fortress MD5:"
-      echo "  Input:   $input_file"
-      echo "  Search:  $orig_md5"
-      echo "  Output:  $output_file"
-      echo "  Replace: $patched_md5"
-
-      substitute "$input_file" "$output_file" --replace "$orig_md5" "$patched_md5"
-    '' + lib.optionalString enableTWBT ''
-      substituteInPlace $out/data/init/init.txt \
-        --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TWBT]'
-    '' + ''
-      substituteInPlace $out/data/init/init.txt \
-        --replace '[INTRO:YES]' '[INTRO:${unBool enableIntro}]' \
-        --replace '[TRUETYPE:YES]' '[TRUETYPE:${unBool enableTruetype}]' \
-        --replace '[FPS:NO]' '[FPS:${unBool enableFPS}]'
-    '';
-
     ignoreCollisions = true;
   };
 in
diff --git a/pkgs/games/openxcom/default.nix b/pkgs/games/openxcom/default.nix
index 9a82c678f370..211172cee203 100644
--- a/pkgs/games/openxcom/default.nix
+++ b/pkgs/games/openxcom/default.nix
@@ -1,14 +1,14 @@
 {stdenv, fetchFromGitHub, cmake, libGLU_combined, zlib, openssl, libyamlcpp, boost
 , SDL, SDL_image, SDL_mixer, SDL_gfx }:
 
-let version = "1.0.0.2018.01.28"; in
+let version = "1.0.0.2018.10.08"; in
 stdenv.mkDerivation {
   name = "openxcom-${version}";
   src = fetchFromGitHub {
     owner = "SupSuper";
     repo = "OpenXcom";
-    rev = "b148916268a6ce104c3b6b7eb4d9e0487cba5487";
-    sha256 = "1128ip3g4aw59f3f23mvlyhl8xckhwjjw9rd7wn7xv51hxdh191c";
+    rev = "13049d617fe762b91893faaf7c14ddefa49e2f1d";
+    sha256 = "0vpcfk3g1bnwwmrln14jkj2wvw2z8igxw2mdb7c3y66466wm93ig";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix
index a0ed5aaf210c..1cde38058e7c 100644
--- a/pkgs/games/steam/runtime-wrapped.nix
+++ b/pkgs/games/steam/runtime-wrapped.nix
@@ -14,6 +14,7 @@ let
     gcc.cc
     nss
     nspr
+    xorg.libxcb
   ]);
 
   allPkgs = overridePkgs ++ [ steam-runtime ];