diff options
author | Johannes Maier <johannes.maier@mailbox.org> | 2022-06-10 22:33:17 +0200 |
---|---|---|
committer | Johannes Maier <johannes.maier@mailbox.org> | 2022-06-11 10:46:54 +0200 |
commit | 5e8d7cb7569d4fcfddcf59fed556cf2a3c928f69 (patch) | |
tree | 1772d8a462fc8f88f15625aef163a1f09967998a /pkgs/games/angband | |
parent | c0d782e7b7b81174e056f7dbc991e82314488239 (diff) |
angband: add SDL2 frontend
This makes it possible to compile Angband against SDL2 (and its other libraries) to have a graphical frontend available, with tiles and sound. The default remains ASCII-only Angband; enable SDL2 by using an override. Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/games/angband')
-rw-r--r-- | pkgs/games/angband/default.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/games/angband/default.nix b/pkgs/games/angband/default.nix index 3f706b42c32c4..c6dbb631767f8 100644 --- a/pkgs/games/angband/default.nix +++ b/pkgs/games/angband/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 +, enableSdl2 ? false, SDL2, SDL2_image, SDL2_sound, SDL2_mixer, SDL2_ttf +}: stdenv.mkDerivation rec { pname = "angband"; @@ -11,8 +13,19 @@ stdenv.mkDerivation rec { sha256 = "sha256-Fp3BGCZYYdQCKXOLYsT4zzlibNRlbELZi26ofrbGGPQ="; }; + nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ ncurses5 ]; + buildInputs = [ ncurses5 ] + ++ lib.optionals enableSdl2 [ + SDL2 + SDL2_image + SDL2_sound + SDL2_mixer + SDL2_ttf + ]; + + configureFlags = lib.optional enableSdl2 "--enable-sdl2"; + installFlags = [ "bindir=$(out)/bin" ]; meta = with lib; { |