nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 ncurses5,
7 enableSdl2 ? false,
8 SDL2,
9 SDL2_image,
10 SDL2_mixer,
11 SDL2_ttf,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "angband";
16 version = "4.2.6";
17
18 src = fetchFromGitHub {
19 owner = "angband";
20 repo = "angband";
21 rev = finalAttrs.version;
22 hash = "sha256-lx2EfE3ylcH1vLAHwNT1me1l4e4Jspkw4YJIAOlu/0E=";
23 };
24
25 nativeBuildInputs = [ autoreconfHook ];
26 buildInputs = [
27 ncurses5
28 ]
29 ++ lib.optionals enableSdl2 [
30 SDL2
31 SDL2_image
32 SDL2_mixer
33 SDL2_ttf
34 ];
35
36 configureFlags = lib.optional enableSdl2 "--enable-sdl2";
37
38 installFlags = [ "bindir=$(out)/bin" ];
39
40 meta = {
41 homepage = "https://angband.github.io/angband";
42 description = "Single-player roguelike dungeon exploration game";
43 mainProgram = "angband";
44 maintainers = [ lib.maintainers.kenran ];
45 license = lib.licenses.gpl2Only;
46 platforms = lib.platforms.unix;
47 };
48})