2018-05-22 00:08:43 +02:00
|
|
|
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext, libiconv
|
2015-08-02 21:37:03 +02:00
|
|
|
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
|
2016-09-11 23:24:51 +02:00
|
|
|
, gtkClient ? false, gtk2
|
2016-12-28 22:12:57 +01:00
|
|
|
, server ? true, readline
|
|
|
|
, enableSqlite ? true, sqlite
|
|
|
|
}:
|
2011-08-20 16:30:16 +02:00
|
|
|
|
2012-02-13 20:34:39 +01:00
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optional optionals;
|
2013-10-20 18:26:32 +02:00
|
|
|
|
2015-08-08 16:54:28 +02:00
|
|
|
name = "freeciv";
|
2018-03-25 22:28:38 +02:00
|
|
|
version = "2.5.11";
|
2012-02-13 20:34:39 +01:00
|
|
|
in
|
2013-10-20 18:26:32 +02:00
|
|
|
stdenv.mkDerivation {
|
2018-05-21 06:49:04 +02:00
|
|
|
name = "${name}-${version}";
|
2016-12-28 22:33:13 +01:00
|
|
|
inherit version;
|
2011-08-20 16:30:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-08 16:54:28 +02:00
|
|
|
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
|
2018-03-25 22:28:38 +02:00
|
|
|
sha256 = "1bcs4mj4kzkpyrr0yryydmn0dzcqazvwrf02nfs7r5zya9lm572c";
|
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
|
|
|
|
2018-05-22 00:08:43 +02:00
|
|
|
buildInputs = [ zlib bzip2 curl lzma gettext libiconv ]
|
2015-08-02 21:37:03 +02:00
|
|
|
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
|
2016-09-11 23:24:51 +02:00
|
|
|
++ optionals gtkClient [ gtk2 ]
|
2016-12-28 21:32:34 +01:00
|
|
|
++ optional server readline
|
2016-12-28 22:12:57 +01:00
|
|
|
++ optional enableSqlite sqlite;
|
2011-08-20 16:30:16 +02:00
|
|
|
|
2016-12-28 22:33:13 +01:00
|
|
|
configureFlags = [ "--enable-shared" ]
|
2015-08-02 21:37:03 +02:00
|
|
|
++ optional sdlClient "--enable-client=sdl"
|
2016-12-28 22:12:57 +01:00
|
|
|
++ optional enableSqlite "--enable-fcdb=sqlite3"
|
2015-08-02 21:37:03 +02:00
|
|
|
++ optional (!gtkClient) "--enable-fcmp=cli"
|
|
|
|
++ optional (!server) "--disable-server";
|
|
|
|
|
2017-11-26 08:42:18 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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 ];
|
2018-05-22 00:08:43 +02:00
|
|
|
platforms = platforms.unix;
|
2018-06-23 23:46:07 +02:00
|
|
|
hydraPlatforms = stdenv.lib.platforms.linux; # sdl-config times out on darwin
|
2011-08-20 16:30:16 +02:00
|
|
|
};
|
|
|
|
}
|