Merge pull request #177214 from kenranunderscore/angband-with-sdl2

angband: optionally enable SDL2 frontend

authored by Sandro and committed by GitHub aee69b63 1c838684

+15 -2
+15 -2
pkgs/games/angband/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 }: 1 + { lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 2 + , enableSdl2 ? false, SDL2, SDL2_image, SDL2_sound, SDL2_mixer, SDL2_ttf 3 + }: 2 4 3 5 stdenv.mkDerivation rec { 4 6 pname = "angband"; ··· 11 13 sha256 = "sha256-Fp3BGCZYYdQCKXOLYsT4zzlibNRlbELZi26ofrbGGPQ="; 12 14 }; 13 15 16 + 14 17 nativeBuildInputs = [ autoreconfHook ]; 15 - buildInputs = [ ncurses5 ]; 18 + buildInputs = [ ncurses5 ] 19 + ++ lib.optionals enableSdl2 [ 20 + SDL2 21 + SDL2_image 22 + SDL2_sound 23 + SDL2_mixer 24 + SDL2_ttf 25 + ]; 26 + 27 + configureFlags = lib.optional enableSdl2 "--enable-sdl2"; 28 + 16 29 installFlags = [ "bindir=$(out)/bin" ]; 17 30 18 31 meta = with lib; {