summary refs log tree commit diff
path: root/pkgs/games/unnethack/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/unnethack/default.nix')
-rw-r--r--pkgs/games/unnethack/default.nix28
1 files changed, 19 insertions, 9 deletions
diff --git a/pkgs/games/unnethack/default.nix b/pkgs/games/unnethack/default.nix
index 1ac87c1d41b..03928ff48f4 100644
--- a/pkgs/games/unnethack/default.nix
+++ b/pkgs/games/unnethack/default.nix
@@ -1,18 +1,20 @@
-{ stdenv, fetchgit, utillinux, ncurses, flex, bison }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, util-linux, ncurses, flex, bison }:
 
 stdenv.mkDerivation rec {
   pname = "unnethack";
-  version = "5.2.0";
+  version = "5.3.2";
 
-  src = fetchgit {
-    url = "https://github.com/UnNetHack/UnNetHack";
-    rev = "refs/tags/${version}";
-    sha256 = "088gd2c7v95f2pm9ky38i28sz73mnsksr2p2hhhflkchxncd21f1";
+  src = fetchFromGitHub {
+    name = "UnNetHack";
+    owner = "UnNetHack";
+    repo = "UnNetHack";
+    rev = version;
+    sha256 = "1rg0mqyplgn3dfh3wz09a600qxk7aidqw4d84kyiincljvhyb7ps";
   };
 
   buildInputs = [ ncurses ];
 
-  nativeBuildInputs = [ utillinux flex bison ];
+  nativeBuildInputs = [ util-linux flex bison ];
 
   configureFlags = [ "--enable-curses-graphics"
                      "--disable-tty-graphics"
@@ -22,6 +24,14 @@ stdenv.mkDerivation rec {
                    ];
 
   makeFlags = [ "GAMEPERM=744" ];
+  patches = [
+    # fix regression with bison, merged in master
+    (fetchpatch {
+      name = "fix-bison.patch";
+      url = "https://github.com/UnNetHack/UnNetHack/commit/04f0a3a850a94eb8837ddcef31303968240d1c31.patch";
+      sha256 = "1zblbwqqz9nx16k6n31wi2hdvz775lvzmkjblmrx18nbm4ylj0n9";
+    })
+  ];
 
   enableParallelBuilding = true;
 
@@ -48,11 +58,11 @@ stdenv.mkDerivation rec {
     chmod +x $out/bin/unnethack
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Fork of NetHack";
     homepage = "https://unnethack.wordpress.com/";
     license = "nethack";
     platforms = platforms.all;
     maintainers = with maintainers; [ abbradar ];
-  }; 
+  };
 }