2013-10-20 18:08:15 +02:00
|
|
|
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext
|
2012-02-13 20:34:39 +01:00
|
|
|
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype
|
|
|
|
, gtkClient ? false, gtk
|
|
|
|
, server ? true, readline }:
|
2011-08-20 16:30:16 +02:00
|
|
|
|
2012-02-13 20:34:39 +01:00
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optional optionals;
|
|
|
|
client = sdlClient || gtkClient;
|
2013-10-20 18:26:32 +02:00
|
|
|
|
|
|
|
sdlName = if sdlClient then "-sdl" else "";
|
|
|
|
gtkName = if gtkClient then "-gtk" else "";
|
|
|
|
|
|
|
|
baseName = "freeciv-2.4.0";
|
2012-02-13 20:34:39 +01:00
|
|
|
in
|
2013-10-20 18:26:32 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = baseName + sdlName + gtkName;
|
2011-08-20 16:30:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-10-20 18:26:32 +02:00
|
|
|
url = "mirror://sourceforge/freeciv/${baseName}.tar.bz2";
|
2013-10-20 18:08:15 +02:00
|
|
|
sha256 = "1bc01pyihsrby6w95n49gi90ggp40dyxsy4kmlmwcakxfxprwakv";
|
2011-08-20 16:30:16 +02:00
|
|
|
};
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-02-13 20:34:39 +01:00
|
|
|
|
2013-10-20 18:08:15 +02:00
|
|
|
buildInputs = [ zlib bzip2 curl lzma gettext ]
|
2012-02-13 20:34:39 +01:00
|
|
|
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype ]
|
|
|
|
++ optional gtkClient gtk
|
|
|
|
++ optional server readline;
|
2011-08-20 16:30:16 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Multiplayer (or single player), turn-based strategy game";
|
2011-08-20 16:30:16 +02: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 17:36:25 +02:00
|
|
|
platforms = with platforms; linux;
|
2011-08-20 16:30:16 +02:00
|
|
|
};
|
|
|
|
}
|