summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorFree Potion <42352817+freepotion@users.noreply.github.com>2018-10-03 03:23:23 +0300
committerFree Potion <42352817+freepotion@users.noreply.github.com>2018-10-03 03:23:23 +0300
commitaf08956950a3aa017d99fce8bb00ebbaa9e7b492 (patch)
tree6a532b9577860738e3866556ca340828069bf79a /pkgs/games
parent9bfd864c592a0e1d04e0224fb4427965cba1d78d (diff)
downloadnixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar.gz
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar.bz2
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar.lz
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar.xz
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.tar.zst
nixlib-af08956950a3aa017d99fce8bb00ebbaa9e7b492.zip
boohu: init at 0.10.0
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/boohu/default.nix38
-rw-r--r--pkgs/games/boohu/deps.nix20
2 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/games/boohu/default.nix b/pkgs/games/boohu/default.nix
new file mode 100644
index 000000000000..6d4129edbd00
--- /dev/null
+++ b/pkgs/games/boohu/default.nix
@@ -0,0 +1,38 @@
+{stdenv, lib, fetchurl, buildGoPackage, ansiTag ? false}:
+
+buildGoPackage rec {
+
+  name = if ansiTag then "boohu-ansi-${version}" else "boohu-${version}";
+  version = "0.10.0";
+
+  goPackagePath = "git.tuxfamily.org/boohu/boohu.git";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/boohu/downloads/boohu-${version}.tar.gz";
+    sha256 = "a4d1fc488cfeecbe0a5e9be1836d680951941014f926351692a8dbed9042eba6";
+  };
+
+  goDeps = ./deps.nix;
+
+  # If ansiTag is true, the "--tags ansi" will be passed
+  buildFlags = if ansiTag then "--tags ansi" else "";
+
+  # If ansiTag is true, binary output file name will be "boohu-ansi".
+  # Otherwise it will be "boohu".
+  postInstall = if ansiTag then "mv $bin/bin/boohu.git $bin/bin/boohu-ansi"
+                else "mv $bin/bin/boohu.git $bin/bin/boohu";
+
+  meta = with stdenv.lib; {
+    description = "A new roguelike game";
+    longDescription = ''
+      Break Out Of Hareka's Underground (Boohu) is a roguelike game mainly
+      inspired from DCSS and its tavern, with some ideas from Brogue, but
+      aiming for very short games, almost no character building, and a
+      simplified inventory.
+    '';
+    homepage = https://download.tuxfamily.org/boohu/index.html;
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [freepotion];
+  };
+}
diff --git a/pkgs/games/boohu/deps.nix b/pkgs/games/boohu/deps.nix
new file mode 100644
index 000000000000..8b6b32811938
--- /dev/null
+++ b/pkgs/games/boohu/deps.nix
@@ -0,0 +1,20 @@
+[
+  {
+    goPackagePath = "github.com/nsf/termbox-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/nsf/termbox-go";
+      rev = "b66b20ab708e289ff1eb3e218478302e6aec28ce";
+      sha256 = "0wrgnwfdxrspni5q15vzr5q1bxnzb7m6q4xjhllcyddgn2zqprsa";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev = "ce7b0b5c7b45a81508558cd1dba6bb1e4ddb51bb";
+      sha256 = "0lc39b6xrxv7h3v3y1kgz49cgi5qxwlygs715aam6ba35m48yi7g";
+    };
+  }
+]