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/ferium/default.nix28
-rw-r--r--pkgs/games/graphwar/default.nix66
-rw-r--r--pkgs/games/infra-arcana/default.nix60
-rw-r--r--pkgs/games/legendary-gl/default.nix4
-rw-r--r--pkgs/games/sil-q/default.nix9
-rw-r--r--pkgs/games/sil/default.nix34
-rw-r--r--pkgs/games/srb2/default.nix6
-rw-r--r--pkgs/games/umoria/default.nix24
-rw-r--r--pkgs/games/vintagestory/default.nix4
9 files changed, 204 insertions, 31 deletions
diff --git a/pkgs/games/ferium/default.nix b/pkgs/games/ferium/default.nix
new file mode 100644
index 0000000000000..b542ae3451e74
--- /dev/null
+++ b/pkgs/games/ferium/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "ferium";
+  version = "4.1.1";
+
+  src = fetchFromGitHub {
+    owner = "gorilla-devs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "5DYdeK6JdA7oLBkjP3WkwLwlBitdf4Yt2dNP7P0INN0=";
+  };
+
+  buildInputs = lib.optionals stdenv.isDarwin [ Security ];
+
+  cargoSha256 = "7rpxHfe+pWarPJ72WSXjgr63YctZ5+RrsEgmw7o66VI=";
+
+  buildNoDefaultFeatures = true; # by default pulls in GTK 3 just for its directory picker
+
+  doCheck = false; # requires internet
+
+  meta = with lib; {
+    description = "A CLI Minecraft mod manager for mods from Modrinth, CurseForge, and Github Releases";
+    homepage = "https://github.com/theRookieCoder/ferium";
+    license = licenses.mpl20;
+    maintainers = [ maintainers.leo60228 ];
+  };
+}
diff --git a/pkgs/games/graphwar/default.nix b/pkgs/games/graphwar/default.nix
new file mode 100644
index 0000000000000..3586979292e6c
--- /dev/null
+++ b/pkgs/games/graphwar/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, copyDesktopItems
+, jdk
+, makeDesktopItem
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "graphwar";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "catabriga";
+    repo = "graphwar";
+    rev = version;
+    sha256 = "sha256-t3Y576dXWp2Mj6OSQN5cm9FuNBWNqKq6xxkVRbjIBgE=";
+  };
+
+  nativeBuildInputs = [ copyDesktopItems makeWrapper ];
+  buildInputs = [ jdk ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    mkdir -p out/
+    javac -d out/ -sourcepath src/ -classpath out/ -encoding utf8 src/**/*.java
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/
+    mv out $out/lib/graphwar
+    cp -r rsc $out/lib/graphwar/rsc
+
+    makeWrapper ${jdk}/bin/java $out/bin/graphwar \
+      --add-flags "-classpath $out/lib/graphwar Graphwar.Graphwar"
+    makeWrapper ${jdk}/bin/java $out/bin/graphwar-roomserver \
+      --add-flags "-classpath $out/lib/graphwar RoomServer.RoomServer"
+    makeWrapper ${jdk}/bin/java $out/bin/graphwar-globalserver \
+      --add-flags "-classpath $out/lib/graphwar GlobalServer.GlobalServer"
+
+    runHook postInstall
+  '';
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "graphwar";
+      exec = "graphwar";
+      desktopName = "Graphwar";
+      categories = [ "Game" ];
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.graphwar.com/";
+    description = "An artillery game in which you must hit your enemies using mathematical functions";
+    license = licenses.gpl3Plus;
+    platforms = jdk.meta.platforms;
+    maintainers = with maintainers; [ yrd ];
+  };
+}
diff --git a/pkgs/games/infra-arcana/default.nix b/pkgs/games/infra-arcana/default.nix
new file mode 100644
index 0000000000000..e48c69a2cf333
--- /dev/null
+++ b/pkgs/games/infra-arcana/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+, makeWrapper
+, SDL2
+, SDL2_image
+, SDL2_mixer
+}:
+
+stdenv.mkDerivation rec {
+  pname = "infra-arcana";
+  version = "21.0.1";
+
+  src = fetchFromGitLab {
+    owner = "martin-tornqvist";
+    repo = "ia";
+    rev = "v${version}";
+    sha256 = "sha256-E2ssxdYa27qRk5cCmM7A5VqXGExwXHblR34y+rOUBRI=";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ SDL2 SDL2_image SDL2_mixer ];
+
+  # Some parts of the game don't compile with glibc 2.34. As soon as
+  # this is fixed upstream we can switch to the default build flags.
+  buildFlags = [ "ia" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{opt/ia,bin}
+
+    # Remove build artifacts
+    rm -rf CMake* cmake* compile_commands.json CTest* Makefile
+    cp -ra * $out/opt/ia
+
+    # Uses relative paths when looking for assets
+    wrapProgram $out/opt/ia/ia --run "cd $out/opt/ia"
+    ln -s $out/opt/ia/ia $out/bin/infra-arcana
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://sites.google.com/site/infraarcana";
+    description = "A Lovecraftian single-player roguelike game";
+    longDescription = ''
+      Infra Arcana is a Roguelike set in the early 20th century. The goal is to
+      explore the lair of a dreaded cult called The Church of Starry Wisdom.
+
+      Buried deep beneath their hallowed grounds lies an artifact called The
+      Shining Trapezohedron - a window to all secrets of the universe. Your
+      ultimate goal is to unearth this artifact.
+    '';
+    platforms = platforms.linux;
+    maintainers = [ maintainers.kenran ];
+    license = licenses.agpl3Plus;
+  };
+}
diff --git a/pkgs/games/legendary-gl/default.nix b/pkgs/games/legendary-gl/default.nix
index 7025a9cb66eb3..6b81593c8af14 100644
--- a/pkgs/games/legendary-gl/default.nix
+++ b/pkgs/games/legendary-gl/default.nix
@@ -7,13 +7,13 @@
 
 buildPythonApplication rec {
   pname = "legendary-gl"; # Name in pypi
-  version = "0.20.26";
+  version = "0.20.27";
 
   src = fetchFromGitHub {
     owner = "derrod";
     repo = "legendary";
     rev = "refs/tags/${version}";
-    sha256 = "sha256-NqAdS5PN7Qj/HdZ2quemb0xJQsD3Ox1a/TVXj3QMq9c=";
+    sha256 = "sha256-h9WmeVONX19/pUBfE1T/OSMI/HkTKJiTfyyEJV/noB8=";
   };
 
   propagatedBuildInputs = [ requests ];
diff --git a/pkgs/games/sil-q/default.nix b/pkgs/games/sil-q/default.nix
index 1676f8da55a90..e4299bd8aca73 100644
--- a/pkgs/games/sil-q/default.nix
+++ b/pkgs/games/sil-q/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }:
+{ pkgs, lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }:
 
 let
   setup = writeScript "setup" ''
@@ -47,6 +47,13 @@ in stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
+  passthru.tests = {
+    saveDirCreation = pkgs.runCommand "save-dir-creation" {} ''
+      HOME=$(pwd) ${lib.getExe pkgs.sil-q} --help
+      test -d .sil && touch $out
+    '';
+  };
+
   meta = {
     description = "A roguelike game set in the First Age of Middle-earth";
     longDescription = ''
diff --git a/pkgs/games/sil/default.nix b/pkgs/games/sil/default.nix
index 2e6c50daa8236..7d446a684aae0 100644
--- a/pkgs/games/sil/default.nix
+++ b/pkgs/games/sil/default.nix
@@ -1,4 +1,6 @@
-{ lib, stdenv, fetchzip, ncurses, libX11, libXaw, libXt, libXext, libXmu, makeWrapper, writeScript, ... }:
+{ pkgs, lib, stdenv, fetchzip, ncurses, libX11, libXaw, libXt, libXext, libXmu
+, makeWrapper, writeScript }:
+
 let
   setup = writeScript "setup" ''
     mkdir -p "$ANGBAND_PATH"
@@ -15,7 +17,7 @@ stdenv.mkDerivation rec {
   src = fetchzip {
     url = "http://www.amirrorclear.net/flowers/game/sil/Sil-130-src.zip";
     sha256 = "1amp2mr3fxascra0k76sdsvikjh8g76nqh46kka9379zd35lfq8w";
-    stripRoot=false;
+    stripRoot = false;
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -25,7 +27,7 @@ stdenv.mkDerivation rec {
 
   makefile = "Makefile.std";
 
-  prePatch = ''
+  postPatch = ''
     # Allow usage of ANGBAND_PATH
     substituteInPlace config.h --replace "#define FIXED_PATHS" ""
   '';
@@ -41,30 +43,42 @@ stdenv.mkDerivation rec {
   NIX_CFLAGS_COMPILE = "-fcommon";
 
   installPhase = ''
-    # the makefile doesn't have a sensible install target, so we hav to do it ourselves
+    runHook preInstall
+
+    # the makefile doesn't have a sensible install target, so we have to do it ourselves
     mkdir -p $out/bin
     cp sil $out/bin/sil
-    # Wrap the program to set a user-local ANGBAND_PATH, and run the setup script to copy files into place
+
+    # Wrap the program to set a user-local ANGBAND_PATH, and run the setup script to copy files into place.
     # We could just use the options for a user-local save and scores dir, but it tried to write to the
     # lib directory anyway, so we might as well give everyone a copy
     wrapProgram $out/bin/sil \
-      --run "set -u" \
       --run "export ANGBAND_PATH=\$HOME/.sil" \
       --run "${setup} ${src}/Sil/lib"
+
+    runHook postInstall
   '';
 
+  passthru.tests = {
+    saveDirCreation = pkgs.runCommand "save-dir-creation" {} ''
+      HOME=$(pwd) ${lib.getExe pkgs.sil} --help
+      test -d .sil && touch $out
+    '';
+  };
+
   meta = {
-    description = "A rouge-like game set in the first age of Middle-earth";
+    description = "A rogue-like game set in the First Age of Middle-earth";
     longDescription = ''
-      A game of adventure set in the first age of Middle-earth, when the world still
-      rang with elven song and gleamed with dwarven mail.
+      A game of adventure set in the First Age of Middle-earth, when the world still
+      rang with Elven song and gleamed with Dwarven mail.
 
       Walk the dark halls of Angband.  Slay creatures black and fell.  Wrest a shining
       Silmaril from Morgoth’s iron crown.
     '';
     homepage = "http://www.amirrorclear.net/flowers/game/sil/index.html";
     license = lib.licenses.gpl2;
-    maintainers = [ lib.maintainers.michaelpj ];
+    maintainers = with lib.maintainers; [ michaelpj kenran ];
     platforms = lib.platforms.linux;
+    mainProgram = "sil";
   };
 }
diff --git a/pkgs/games/srb2/default.nix b/pkgs/games/srb2/default.nix
index ff5e0f4303628..1a4862904abea 100644
--- a/pkgs/games/srb2/default.nix
+++ b/pkgs/games/srb2/default.nix
@@ -6,7 +6,7 @@
 , cmake
 , curl
 , nasm
-, openmpt123
+, libopenmpt
 , p7zip
 , libgme
 , libpng
@@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
     curl
     libgme
     libpng
-    openmpt123
+    libopenmpt
     SDL2
     SDL2_mixer
     zlib
@@ -59,7 +59,7 @@ in stdenv.mkDerivation rec {
   cmakeFlags = [
     "-DSRB2_ASSET_DIRECTORY=/build/source/assets"
     "-DGME_INCLUDE_DIR=${libgme}/include"
-    "-DOPENMPT_INCLUDE_DIR=${openmpt123}/include"
+    "-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
     "-DSDL2_MIXER_INCLUDE_DIR=${SDL2_mixer}/include/SDL2"
     "-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2"
   ];
diff --git a/pkgs/games/umoria/default.nix b/pkgs/games/umoria/default.nix
index 1114d47b7be56..13ec037afba78 100644
--- a/pkgs/games/umoria/default.nix
+++ b/pkgs/games/umoria/default.nix
@@ -8,7 +8,7 @@
 }:
 
 let
-  savesDir = "~/.umoria/";
+  savesDir = "~/.umoria";
 in
 gcc9Stdenv.mkDerivation rec {
   pname = "umoria";
@@ -38,24 +38,22 @@ gcc9Stdenv.mkDerivation rec {
 
     RUNDIR=\$(mktemp -d)
 
-    cleanup() {
-      rm -rf \$RUNDIR
-    }
-
-    trap cleanup EXIT
+    # Print the directory, so users have access to dumps, and let the system
+    # take care of cleaning up temp files.
+    echo "Running umoria in \$RUNDIR"
 
     cd \$RUNDIR
-    mkdir data
-
-    for i in $out/data/*; do
-      ln -s \$i "data/\$(basename \$i)"
-    done
+    ln -sn $out/data \$RUNDIR/data
 
     mkdir -p ${savesDir}
     [[ ! -f ${savesDir}/scores.dat ]] && touch ${savesDir}/scores.dat
     ln -s ${savesDir}/scores.dat scores.dat
 
-    $out/.umoria-unwrapped
+    if [ \$# -eq 0 ]; then
+       $out/.umoria-unwrapped ${savesDir}/game.sav
+    else
+       $out/.umoria-unwrapped "\$@"
+    fi
     EOF
 
     chmod +x $out/bin/umoria
@@ -74,7 +72,7 @@ gcc9Stdenv.mkDerivation rec {
     '';
     platforms = platforms.unix;
     badPlatforms = [ "aarch64-darwin" ];
-    maintainers = [ maintainers.aciceri ];
+    maintainers = with maintainers; [ aciceri kenran ];
     license = licenses.gpl3Plus;
   };
 }
diff --git a/pkgs/games/vintagestory/default.nix b/pkgs/games/vintagestory/default.nix
index e6e7d28e17bd6..4c94fa4f1ae3b 100644
--- a/pkgs/games/vintagestory/default.nix
+++ b/pkgs/games/vintagestory/default.nix
@@ -17,11 +17,11 @@
 
 stdenv.mkDerivation rec {
   pname = "vintagestory";
-  version = "1.16.4";
+  version = "1.16.5";
 
   src = fetchurl {
     url = "https://cdn.vintagestory.at/gamefiles/stable/vs_archive_${version}.tar.gz";
-    sha256 = "sha256-wdwQ1Dv0872nEOYIB+rEzYtG5rnSw8DZgoSlSvCvtrI=";
+    sha256 = "sha256-qqrQ+cs/ujzeXAa0xX5Yee3l5bo9DaH+kS1pkCt/UoU=";
   };
 
   nativeBuildInputs = [ makeWrapper copyDesktopItems ];