2013-10-20 20:08:15 +04:00
|
|
|
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext
|
2015-08-02 22:37:03 +03:00
|
|
|
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
|
2012-02-13 23:34:39 +04:00
|
|
|
, gtkClient ? false, gtk
|
|
|
|
, server ? true, readline }:
|
2011-08-20 18:30:16 +04:00
|
|
|
|
2012-02-13 23:34:39 +04:00
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optional optionals;
|
2013-10-20 20:26:32 +04:00
|
|
|
|
|
|
|
sdlName = if sdlClient then "-sdl" else "";
|
|
|
|
gtkName = if gtkClient then "-gtk" else "";
|
|
|
|
|
2015-08-08 17:54:28 +03:00
|
|
|
name = "freeciv";
|
|
|
|
version = "2.5.0";
|
2012-02-13 23:34:39 +04:00
|
|
|
in
|
2013-10-20 20:26:32 +04:00
|
|
|
stdenv.mkDerivation {
|
2015-08-08 17:54:28 +03:00
|
|
|
name = "${name}${sdlName}${gtkName}-${version}";
|
2011-08-20 18:30:16 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-08 17:54:28 +03:00
|
|
|
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
|
2015-08-02 22:37:03 +03:00
|
|
|
sha256 = "bd9f7523ea79b8d2806d0c1844a9f48506ccd18276330580319913c43051210b";
|
|
|
|
# sha1 = "477b60e02606e47b31a019b065353c1a6da6c305";
|
|
|
|
# md5 = "8a61ecd986853200326711446c573f1b";
|
2011-08-20 18:30:16 +04:00
|
|
|
};
|
|
|
|
|
2012-12-28 22:20:09 +04:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-02-13 23:34:39 +04:00
|
|
|
|
2013-10-20 20:08:15 +04:00
|
|
|
buildInputs = [ zlib bzip2 curl lzma gettext ]
|
2015-08-02 22:37:03 +03:00
|
|
|
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
|
|
|
|
++ optionals gtkClient [ gtk ]
|
2012-02-13 23:34:39 +04:00
|
|
|
++ optional server readline;
|
2011-08-20 18:30:16 +04:00
|
|
|
|
2015-08-02 22:37:03 +03:00
|
|
|
configureFlags = []
|
|
|
|
++ optional sdlClient "--enable-client=sdl"
|
|
|
|
++ optional (!gtkClient) "--enable-fcmp=cli"
|
|
|
|
++ optional (!server) "--disable-server";
|
|
|
|
|
2011-08-20 18:30:16 +04:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 13:49:53 +04:00
|
|
|
description = "Multiplayer (or single player), turn-based strategy game";
|
2011-08-20 18:30:16 +04:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Freeciv is a Free and Open Source empire-building strategy game
|
|
|
|
inspired by the history of human civilization. The game commences in
|
|
|
|
prehistory and your mission is to lead your tribe from the stone age
|
|
|
|
to the space age...
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://freeciv.wikia.com/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
|
|
|
|
maintainers = with maintainers; [ pierron ];
|
2011-08-21 19:36:25 +04:00
|
|
|
platforms = with platforms; linux;
|
2011-08-20 18:30:16 +04:00
|
|
|
};
|
|
|
|
}
|