diff --git a/pkgs/games/angband/default.nix b/pkgs/games/angband/default.nix index 3f706b42c32c..c6dbb631767f 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; {