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/freecell-solver/default.nix21
-rw-r--r--pkgs/games/opendune/default.nix32
2 files changed, 47 insertions, 6 deletions
diff --git a/pkgs/games/freecell-solver/default.nix b/pkgs/games/freecell-solver/default.nix
index a096b17b71a5..3dc9857d4552 100644
--- a/pkgs/games/freecell-solver/default.nix
+++ b/pkgs/games/freecell-solver/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, cmake
 , perl, gmp, libtap, gperf
-, perlPackages, python3Packages }:
+, perlPackages, python3 }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec{
@@ -13,11 +13,20 @@ stdenv.mkDerivation rec{
     sha256 = "1cmaib69pijmcpvgjvrdry8j4xys8l906l80b8z21vvyhdwrfdnn";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cmake perl gmp libtap gperf
-    perlPackages.TemplateToolkit perlPackages.StringShellQuote
-    perlPackages.GamesSolitaireVerify perlPackages.TaskFreecellSolverTesting
-    python3Packages.python python3Packages.random2 ];
+  nativeBuildInputs = [
+    cmake perl pkgconfig
+  ] ++ (with perlPackages; TaskFreecellSolverTesting.buildInputs ++ [
+    GamesSolitaireVerify StringShellQuote TaskFreecellSolverTesting TemplateToolkit
+  ]);
+
+  buildInputs = [
+    gmp libtap gperf
+    python3 python3.pkgs.random2
+  ];
+
+  # "ninja t/CMakeFiles/delta-states-test.t.exe.dir/__/delta_states.c.o" fails
+  # to depend on the generated "is_king.h".
+  enableParallelBuilding = false;
 
   meta = {
     description = "A FreeCell automatic solver";
diff --git a/pkgs/games/opendune/default.nix b/pkgs/games/opendune/default.nix
new file mode 100644
index 000000000000..7b848086794b
--- /dev/null
+++ b/pkgs/games/opendune/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, SDL, SDL_image, SDL_mixer, binutils }:
+
+# - set the opendune configuration at ~/.config/opendune/opendune.ini:
+#     [opendune]
+#     datadir=/path/to/opendune-data
+# - download dune2 into [datadir] http://www.bestoldgames.net/eng/old-games/dune-2.php
+
+stdenv.mkDerivation rec {
+  name = "opendune-${version}";
+  version = "0.9";
+
+  src = fetchFromGitHub {
+    owner = "OpenDUNE";
+    repo = "OpenDUNE";
+    rev = version;
+    sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
+  };
+
+  buildInputs = [ SDL SDL_image SDL_mixer ];
+
+  installPhase = ''
+    install -m 555 -D bin/opendune $out/bin/opendune
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Dune, Reinvented";
+    homepage = https://github.com/OpenDUNE/OpenDUNE;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.nand0p ];
+    platforms = platforms.linux;
+  };
+}