nixpkgs/pkgs/games/freeciv/default.nix

52 lines
1.6 KiB
Nix
Raw Normal View History

2013-10-20 17:08:15 +01:00
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext
2015-08-02 20:37:03 +01:00
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
, gtkClient ? false, gtk
, server ? true, readline }:
let
inherit (stdenv.lib) optional optionals;
sdlName = if sdlClient then "-sdl" else "";
gtkName = if gtkClient then "-gtk" else "";
name = "freeciv";
2016-04-20 05:59:41 +01:00
version = "2.5.3";
in
stdenv.mkDerivation {
name = "${name}${sdlName}${gtkName}-${version}";
src = fetchurl {
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
2016-04-20 05:59:41 +01:00
sha256 = "0p40bpkhbldsnlqdvfn3qd2vzadxfrfsf1r57x1akwabqs0h62s8";
};
nativeBuildInputs = [ pkgconfig ];
2013-10-20 17:08:15 +01:00
buildInputs = [ zlib bzip2 curl lzma gettext ]
2015-08-02 20:37:03 +01:00
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
++ optionals gtkClient [ gtk ]
++ optional server readline;
2015-08-02 20:37:03 +01:00
configureFlags = []
++ optional sdlClient "--enable-client=sdl"
++ optional (!gtkClient) "--enable-fcmp=cli"
++ optional (!server) "--disable-server";
meta = with stdenv.lib; {
description = "Multiplayer (or single player), turn-based strategy game";
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 ];
platforms = platforms.linux;
};
}