Merge commit 'refs/pull/21479/head' of git://github.com/NixOS/nixpkgs

This commit is contained in:
Nikolay Amiantov 2016-12-29 00:12:57 +03:00
commit 5d5e0c19f6

View File

@ -1,7 +1,9 @@
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
, gtkClient ? false, gtk2
, server ? true, readline }:
, server ? true, readline
, enableSqlite ? true, sqlite
}:
let
inherit (stdenv.lib) optional optionals;
@ -10,14 +12,14 @@ let
gtkName = if gtkClient then "-gtk" else "";
name = "freeciv";
version = "2.5.3";
version = "2.5.6";
in
stdenv.mkDerivation {
name = "${name}${sdlName}${gtkName}-${version}";
src = fetchurl {
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
sha256 = "0p40bpkhbldsnlqdvfn3qd2vzadxfrfsf1r57x1akwabqs0h62s8";
sha256 = "16wrnsx5rmbz6rjs03bhy0vn20i6n6g73lx7fjpai98ixhzc5bfg";
};
nativeBuildInputs = [ pkgconfig ];
@ -25,10 +27,12 @@ stdenv.mkDerivation {
buildInputs = [ zlib bzip2 curl lzma gettext ]
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
++ optionals gtkClient [ gtk2 ]
++ optional server readline;
++ optional server readline
++ optional enableSqlite sqlite;
configureFlags = []
++ optional sdlClient "--enable-client=sdl"
++ optional enableSqlite "--enable-fcdb=sqlite3"
++ optional (!gtkClient) "--enable-fcmp=cli"
++ optional (!server) "--disable-server";