summary refs log tree commit diff
path: root/pkgs/games/widelands/default.nix
blob: b6008bd7e76aea8db731acf21295243ca6c5a5fe (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
39
40
41
42
43
44
45
46
{ stdenv, fetchurl, cmake, python, gettext
, boost, libpng, zlib, glew, lua
, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, SDL_gfx
}:

stdenv.mkDerivation {
  name = "widelands-18";

  meta = with stdenv.lib; {
    description = "RTS with multiple-goods economy";
    homepage    = "http://widelands.org/";
    longDescription = ''
      Widelands is a real time strategy game based on "The Settlers" and "The
      Settlers II". It has a single player campaign mode, as well as a networked
      multiplayer mode.
    '';
    license        = licenses.gpl2Plus;
    platforms      = platforms.linux;
    maintainers    = with maintainers; [ raskin jcumming ];
    hydraPlatforms = [];
  };


  src = fetchurl {
    url = "https://launchpad.net/widelands/build18/build-18/+download/"
        + "widelands-build18-src.tar.bz2";
    sha256 = "1qvx1cwkf61iwq0qkngvg460dsxqsfvk36qc7jf7mzwkiwbxkzvd";
  };

  preConfigure = ''
    cmakeFlags="
      -DWL_INSTALL_PREFIX=$out
      -DWL_INSTALL_BINDIR=bin
      -DWL_INSTALL_DATADIR=share/widelands
    "
  '';

  nativeBuildInputs = [ cmake python gettext ];

  buildInputs = [
    boost libpng zlib glew lua
    SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx
  ];

  enableParallelBuilding = true;
}