2013-10-20 16:08:15 +00:00
|
|
|
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext
|
2015-08-02 19:37:03 +00:00
|
|
|
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
|
2016-09-11 21:24:51 +00:00
|
|
|
, gtkClient ? false, gtk2
|
2016-12-28 21:12:57 +00:00
|
|
|
, server ? true, readline
|
|
|
|
, enableSqlite ? true, sqlite
|
|
|
|
}:
|
2011-08-20 14:30:16 +00:00
|
|
|
|
2012-02-13 19:34:39 +00:00
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optional optionals;
|
2013-10-20 16:26:32 +00:00
|
|
|
|
|
|
|
sdlName = if sdlClient then "-sdl" else "";
|
|
|
|
gtkName = if gtkClient then "-gtk" else "";
|
|
|
|
|
2015-08-08 14:54:28 +00:00
|
|
|
name = "freeciv";
|
2017-11-10 07:51:47 +00:00
|
|
|
version = "2.5.9";
|
2012-02-13 19:34:39 +00:00
|
|
|
in
|
2013-10-20 16:26:32 +00:00
|
|
|
stdenv.mkDerivation {
|
2015-08-08 14:54:28 +00:00
|
|
|
name = "${name}${sdlName}${gtkName}-${version}";
|
2016-12-28 21:33:13 +00:00
|
|
|
inherit version;
|
2011-08-20 14:30:16 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-08 14:54:28 +00:00
|
|
|
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
|
2017-11-10 07:51:47 +00:00
|
|
|
sha256 = "0a2rjw6065psh14bkk6ar4i19dcicn9lz63rffr9h278b9c76g5q";
|
2011-08-20 14:30:16 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-02-13 19:34:39 +00:00
|
|
|
|
2013-10-20 16:08:15 +00:00
|
|
|
buildInputs = [ zlib bzip2 curl lzma gettext ]
|
2015-08-02 19:37:03 +00:00
|
|
|
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
|
2016-09-11 21:24:51 +00:00
|
|
|
++ optionals gtkClient [ gtk2 ]
|
2016-12-28 20:32:34 +00:00
|
|
|
++ optional server readline
|
2016-12-28 21:12:57 +00:00
|
|
|
++ optional enableSqlite sqlite;
|
2011-08-20 14:30:16 +00:00
|
|
|
|
2016-12-28 21:33:13 +00:00
|
|
|
configureFlags = [ "--enable-shared" ]
|
2015-08-02 19:37:03 +00:00
|
|
|
++ optional sdlClient "--enable-client=sdl"
|
2016-12-28 21:12:57 +00:00
|
|
|
++ optional enableSqlite "--enable-fcdb=sqlite3"
|
2015-08-02 19:37:03 +00:00
|
|
|
++ optional (!gtkClient) "--enable-fcmp=cli"
|
|
|
|
++ optional (!server) "--disable-server";
|
|
|
|
|
2017-11-26 07:42:18 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2011-08-20 14:30:16 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Multiplayer (or single player), turn-based strategy game";
|
2011-08-20 14:30:16 +00: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 ];
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.linux;
|
2011-08-20 14:30:16 +00:00
|
|
|
};
|
|
|
|
}
|