summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/games/rogue/default.nix21
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/games/rogue/default.nix b/pkgs/games/rogue/default.nix
new file mode 100644
index 0000000000000..569c287c0510d
--- /dev/null
+++ b/pkgs/games/rogue/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl, ncurses}:
+
+stdenv.mkDerivation {
+  name = "rogue-5.4.2";
+  src = fetchurl {
+    url = http://rogue.rogueforge.net/files/rogue5.4/rogue5.4.2-src.tar.gz;
+    md5 = "bd656cb017a579eba835a0ee445a0a32";
+  };
+  setSourceRoot = "sourceRoot=.";
+  buildInputs = [ncurses];
+  preBuild = "
+    ln -s ${ncurses}/include ncurses
+    substituteInPlace Makefile --replace curses ncurses
+  ";
+  installPhase = "
+    ensureDir $out/bin
+    cp rogue54 $out/bin
+    ln -s rogue54 $out/bin/rogue
+  ";
+  NIX_CFLAGS_COMPILE = "-I.";
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 698ea765ca17d..50a201b50c5b0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2882,6 +2882,10 @@ rec {
     inherit fetchurl stdenv x11 SDL mesa openal;
   };
 
+  rogue = import ../games/rogue {
+    inherit fetchurl stdenv ncurses;
+  };
+
   scummvm = import ../games/scummvm {
     inherit fetchurl stdenv SDL;
   };