summary refs log tree commit diff
path: root/pkgs/games/wargus/stratagus.nix
blob: aa050442bfdb3ace4188e43f2edbe9cf0b458e09 (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
{ lib, stdenv, fetchFromGitHub
, cmake, pkg-config, makeWrapper
, zlib, bzip2, libpng, lua5_1, toluapp
, SDL, SDL_mixer, SDL_image, libGL
}:

stdenv.mkDerivation rec {
  pname = "stratagus";
  version = "2.4.3";

  src = fetchFromGitHub {
    owner = "wargus";
    repo = "stratagus";
    rev = "v${version}";
    sha256 = "128m5n9axq007xi8a002ig7d4dyw8j060542x220ld66ibfprhcn";
  };

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [
    zlib bzip2 libpng
    lua5_1 toluapp
    (lib.getDev SDL) SDL_image SDL_mixer libGL
  ];
  cmakeFlags = [
    "-DCMAKE_CXX_FLAGS=-Wno-error=format-overflow"
  ];

  meta = with lib; {
    description = "strategy game engine";
    homepage = "https://wargus.github.io/stratagus.html";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.astro ];
    platforms = platforms.linux;
  };
}