@@ -0,0 +1,38 @@
1+{stdenv, lib, fetchurl, buildGoPackage, ansiTag ? false}:
2+
3+buildGoPackage rec {
4+
5+ name = if ansiTag then "boohu-ansi-${version}" else "boohu-${version}";
6+ version = "0.10.0";
7+
8+ goPackagePath = "git.tuxfamily.org/boohu/boohu.git";
9+
10+ src = fetchurl {
11+ url = "https://download.tuxfamily.org/boohu/downloads/boohu-${version}.tar.gz";
12+ sha256 = "a4d1fc488cfeecbe0a5e9be1836d680951941014f926351692a8dbed9042eba6";
13+ };
14+
15+ goDeps = ./deps.nix;
16+
17+ # If ansiTag is true, the "--tags ansi" will be passed
18+ buildFlags = if ansiTag then "--tags ansi" else "";
19+
20+ # If ansiTag is true, binary output file name will be "boohu-ansi".
21+ # Otherwise it will be "boohu".
22+ postInstall = if ansiTag then "mv $bin/bin/boohu.git $bin/bin/boohu-ansi"
23+ else "mv $bin/bin/boohu.git $bin/bin/boohu";
24+
25+ meta = with stdenv.lib; {
26+ description = "A new roguelike game";
27+ longDescription = ''
28+ Break Out Of Hareka's Underground (Boohu) is a roguelike game mainly
29+ inspired from DCSS and its tavern, with some ideas from Brogue, but
30+ aiming for very short games, almost no character building, and a
31+ simplified inventory.
32+ '';
33+ homepage = https://download.tuxfamily.org/boohu/index.html;
34+ license = licenses.isc;
35+ platforms = platforms.unix;
36+ maintainers = with maintainers; [freepotion];
37+ };
38+}