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/crosscode.nix29
-rw-r--r--pkgs/games/gog/default.nix1
-rw-r--r--pkgs/games/gog/overload.nix4
-rw-r--r--pkgs/games/gog/stardew-valley.nix4
-rw-r--r--pkgs/games/gog/war-for-the-overworld.nix4
-rw-r--r--pkgs/games/humblebundle/default.nix2
-rw-r--r--pkgs/games/humblebundle/the_bridge.nix37
-rw-r--r--pkgs/games/humblebundle/trine2.nix97
-rw-r--r--pkgs/games/itch/invisigun-heroes.nix4
9 files changed, 174 insertions, 8 deletions
diff --git a/pkgs/games/gog/crosscode.nix b/pkgs/games/gog/crosscode.nix
new file mode 100644
index 00000000..d3915895
--- /dev/null
+++ b/pkgs/games/gog/crosscode.nix
@@ -0,0 +1,29 @@
+{ lib, buildGame, fetchGog, makeWrapper, nwjs }:
+
+buildGame rec {
+  name = "crosscode-${version}";
+  version = "1.0.1.1";
+
+  src = fetchGog {
+    productId = 1252295864;
+    downloadName = "en3installer0";
+    sha256 = "0v5vh4fazkjgaxxffad7k230wzdgwd6dnymf3i72d25pwaqdsssd";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildPhase = ''
+    substituteInPlace package.json --replace assets/ ""
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/share" "$out/bin"
+    cp -r assets "$out/share/crosscode"
+    install -vD -m 0644 package.json "$out/share/crosscode/package.json"
+
+    makeWrapper ${lib.escapeShellArg "${nwjs}/bin/nw"} "$out/bin/crosscode" \
+      --run "cd '$out/share/crosscode'" --add-flags .
+  '';
+
+  sandbox.paths.required = [ "$XDG_CONFIG_HOME/CrossCode" ];
+}
diff --git a/pkgs/games/gog/default.nix b/pkgs/games/gog/default.nix
index edd81bc4..1ef58c30 100644
--- a/pkgs/games/gog/default.nix
+++ b/pkgs/games/gog/default.nix
@@ -12,6 +12,7 @@ let
     };
 
     albion = callPackage_i686 ./albion {};
+    crosscode = callPackage ./crosscode.nix {};
     dungeons3 = callPackage ./dungeons3.nix {};
     epistory = callPackage ./epistory.nix { };
     overload = callPackage ./overload.nix {};
diff --git a/pkgs/games/gog/overload.nix b/pkgs/games/gog/overload.nix
index 00410356..f1807931 100644
--- a/pkgs/games/gog/overload.nix
+++ b/pkgs/games/gog/overload.nix
@@ -4,11 +4,11 @@ buildUnity {
   name = "overload";
   fullName = "Overload";
   saveDir = "Revival/Overload";
-  version = "1.0.1839";
+  version = "1.0.1854";
 
   src = fetchGog {
     productId = 1309632191;
     downloadName = "en3installer0";
-    sha256 = "1r42ll6k2xif405rp85gn3sbhacrhf1kkpqx2ahp8j5f9alscdxm";
+    sha256 = "1qyd78xzd39763dmrb5rb8g0v0qi45jjkb9id9gjvvmh41m0731i";
   };
 }
diff --git a/pkgs/games/gog/stardew-valley.nix b/pkgs/games/gog/stardew-valley.nix
index 815e37ed..820e98de 100644
--- a/pkgs/games/gog/stardew-valley.nix
+++ b/pkgs/games/gog/stardew-valley.nix
@@ -4,12 +4,12 @@
 
 buildGame rec {
   name = "stardew-valley-${version}";
-  version = "1.3.27";
+  version = "1.3.32";
 
   src = fetchGog {
     productId = 1453375253;
     downloadName = "en3installer0";
-    sha256 = "0i4wq6ii8r82gan1j8j9zd5f0cqs7by0s7h9axnb5zi2j0pxlk2i";
+    sha256 = "1j6zzdjif2xbihcmpf66af4mbnxnvzjnfn0sq597i9a26h3caia2";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/games/gog/war-for-the-overworld.nix b/pkgs/games/gog/war-for-the-overworld.nix
index 8e46ec32..fb139fd8 100644
--- a/pkgs/games/gog/war-for-the-overworld.nix
+++ b/pkgs/games/gog/war-for-the-overworld.nix
@@ -4,12 +4,12 @@ buildUnity {
   name = "war-for-the-overworld";
   fullName = "WFTOGame";
   saveDir = "Subterranean Games/War For The Overworld";
-  version = "2.0.3f1";
+  version = "2.0.4";
 
   src = fetchGog {
     productId = 1964276929;
     downloadName = "en3installer0";
-    sha256 = "07yj9clf3hmy7z67ck9sqf3gnrazx5rzifg91jas77z774vwdg8k";
+    sha256 = "0p54dhd2j7zvc78444jnjmkjv7kf6sskbphxkj5vlxmfcrmbd2xq";
   };
 
   nativeBuildInputs = [ mono monogamePatcher ];
diff --git a/pkgs/games/humblebundle/default.nix b/pkgs/games/humblebundle/default.nix
index 4a0792c4..c5ec988a 100644
--- a/pkgs/games/humblebundle/default.nix
+++ b/pkgs/games/humblebundle/default.nix
@@ -31,6 +31,8 @@ let
     spaz = callPackage ./spaz.nix {};
     starbound = callPackage ./starbound.nix {};
     swordsandsoldiers = callPackage ./swordsandsoldiers.nix {};
+    the_bridge = callPackage_i686 ./the_bridge.nix {};
+    trine2 = callPackage_i686 ./trine2.nix {};
     unepic = callPackage ./unepic.nix {};
   };
 in with lib; {
diff --git a/pkgs/games/humblebundle/the_bridge.nix b/pkgs/games/humblebundle/the_bridge.nix
new file mode 100644
index 00000000..92e5b691
--- /dev/null
+++ b/pkgs/games/humblebundle/the_bridge.nix
@@ -0,0 +1,37 @@
+{ buildUnity, fetchHumbleBundle
+, libGLU
+}:
+
+buildUnity rec {
+  fullName = "TheBridge";
+  name = fullName;
+  version = "20140908"; # 1410197597, or 1410196636 (same date).
+
+  src = fetchHumbleBundle {
+    name = "TheBridgeLinux_1410196636.zip";
+    machineName = "thebridge_linux";
+    downloadName = "Download";
+    md5 = "6d3f5e7ff8d10d47f04ffabb8b9a031e";
+  };
+
+  buildInputs = [ libGLU ];
+
+  meta = {
+    homepage = [
+      http://thebridgeisblackandwhite.com
+      https://www.humblebundle.com/store/the-bridge
+    ];
+    #editor = "The Quantum Astrophysicists Guild";
+    description = "A 2D logic puzzle game that plays with physics and perspective";
+    longDescription = ''
+      The Bridge is a 2D logic puzzle game that forces the player to reevaluate
+      their preconceptions of physics and perspective. It is Isaac Newton meets
+      M. C. Escher. Manipulate gravity to redefine the ceiling as the floor
+      while venturing through impossible architectures. Explore increasingly
+      difficult worlds, each uniquely detailed and designed to leave the player
+      with a pronounced sense of intellectual accomplishment. The Bridge
+      exemplifies games as an art form, with beautifully hand-drawn art in the
+      style of a black-and-white lithograph.
+    '';
+  };
+}
diff --git a/pkgs/games/humblebundle/trine2.nix b/pkgs/games/humblebundle/trine2.nix
new file mode 100644
index 00000000..a6cef22d
--- /dev/null
+++ b/pkgs/games/humblebundle/trine2.nix
@@ -0,0 +1,97 @@
+{ buildGame, fetchHumbleBundle, makeWrapper, runCommandCC, writeText
+, coreutils, openal, libvorbis, libGLU, SDL2, freetype, alsaLib
+}:
+
+buildGame rec {
+  name = "trine2-${version}";
+  version = "2.01";
+
+  src = fetchHumbleBundle {
+    machineName = "trine2complete_linux";
+    suffix = "zip";
+    md5 = "82049b65c1bce6841335935bc05139c8";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ openal libvorbis libGLU freetype alsaLib ];
+
+  patchPhase = ''
+    patchelf --replace-needed libSDL-1.3.so.0 libSDL.so \
+      bin/trine2_linux_32bit
+    patchelf --replace-needed libPhysXLoader.so.1 libPhysXLoader.so \
+      bin/trine2_linux_32bit
+  '';
+
+  getResolutionArgs = runCommandCC "get-resolution-args" {
+    buildInputs = [ SDL2 ];
+    src = writeText "get-resolution-args.c" ''
+      #include <SDL.h>
+
+      int main(void)
+      {
+        int width = 0, height = 0;
+        SDL_DisplayMode current;
+
+        SDL_Init(SDL_INIT_VIDEO);
+
+        int displays = SDL_GetNumVideoDisplays();
+
+        for (int i = 0; i < displays; ++i) {
+          if (SDL_GetCurrentDisplayMode(i, &current) != 0)
+            goto err;
+
+          if (current.w * current.h > width * height) {
+            width = current.w;
+            height = current.h;
+          }
+        }
+
+        if (width == 0 && height == 0)
+          goto err;
+
+        SDL_Quit();
+        printf("-RenderingModule:DetectedFullscreenWidth=%d\n", width);
+        printf("-RenderingModule:DetectedFullscreenHeight=%d\n", height);
+        return EXIT_SUCCESS;
+
+      err:
+        fputs("Unable to get current display mode.\n", stderr);
+        SDL_Quit();
+        return EXIT_FAILURE;
+      }
+    '';
+  } "gcc -Wall $(sdl2-config --cflags --libs) -o \"$out\" \"$src\"";
+
+  installPhase = ''
+    for name in Cg CgGL PhysXCooking PhysXCore PhysXLoader; do
+      install -vD "lib/lib32/lib$name.so" "$out/libexec/trine2/lib$name.so"
+    done
+
+    install -vD lib/lib32/libSDL-1.3.so.0 "$out/libexec/trine2/libSDL.so"
+
+    mkdir -p "$out/share/trine2"
+    cp -rvt "$out/share/trine2" *.fbq trine2.png data
+
+    install -vD bin/trine2_linux_32bit "$out/libexec/trine2/trine2"
+
+    rtDataPath="\''${XDG_DATA_HOME:-\$HOME/.local/share}"
+    makeWrapper "$out/libexec/trine2/trine2" "$out/bin/trine2" \
+      --run "cd '$out/share/trine2'" \
+      --run '${coreutils}/bin/ln -s "'"$rtDataPath"'" "$HOME/.frozenbyte"' \
+      --prefix LD_LIBRARY_PATH : "$out/libexec/trine2" \
+      --add-flags "\$($getResolutionArgs)"
+
+    mkdir -p "$out/share/applications"
+    cat > "$out/share/applications/trine2.desktop" <<EOF
+    [Desktop Entry]
+    Name=Trine 2
+    Type=Application
+    Version=1.1
+    Exec=$out/bin/trine2
+    Icon=$out/share/trine2/trine2.png
+    Categories=Game
+    EOF
+  '';
+
+  sandbox.paths.required = [ "$XDG_DATA_HOME/Trine2" ];
+}
diff --git a/pkgs/games/itch/invisigun-heroes.nix b/pkgs/games/itch/invisigun-heroes.nix
index cf074d66..f584db5e 100644
--- a/pkgs/games/itch/invisigun-heroes.nix
+++ b/pkgs/games/itch/invisigun-heroes.nix
@@ -4,14 +4,14 @@ buildUnity rec {
   name = "invisigun-heroes";
   fullName = "Invisigun Heroes";
   saveDir = "Sombr Studio/Invisigun Heroes";
-  version = "1.6.71";
+  version = "1.6.101";
 
   src = fetchItch {
     name = "${name}-${version}.zip";
     gameId = 25561;
     uploadId = 208583;
     version = "v${version}";
-    sha256 = "16bcyypigk0nm7ckdfxc9hkwv8dznqs936qmkzbjb22va2j4ip0s";
+    sha256 = "0l3dqkda9xxvlx5jbb5s3gp8yblzvp2k2wjsg8h9xx860c5nj3cy";
   };
 
   sandbox.paths.required = [ "$HOME/Invisigun Heroes" ];