about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/angband/default.nix
blob: 1d3ac929d337b2d34c25287edb85ec2728bb79d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5
, enableSdl2 ? false, SDL2, SDL2_image, SDL2_sound, SDL2_mixer, SDL2_ttf
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "angband";
  version = "4.2.5";

  src = fetchFromGitHub {
    owner = "angband";
    repo = "angband";
    rev = finalAttrs.version;
    hash = "sha256-XH2FUTJJaH5TqV2UD1CKKAXE4CRAb6zfg1UQ79a15k0=";
  };

  nativeBuildInputs = [ autoreconfHook ];
  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; {
    homepage = "https://angband.github.io/angband";
    description = "A single-player roguelike dungeon exploration game";
    mainProgram = "angband";
    maintainers = [ maintainers.kenran ];
    license = licenses.gpl2;
    platforms = platforms.unix;
  };
})