From 1c4a8d7e6d0fc72f79dc9a57dc48c475f5f37ed3 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 13 Feb 2012 19:34:39 +0000 Subject: [PATCH] freeciv: add flags for clients and server svn path=/nixpkgs/trunk/; revision=32263 --- pkgs/games/freeciv/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index 933d009dd2cc..7aaf32383081 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -1,6 +1,12 @@ -{ stdenv, fetchurl, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype -, pkgconfig, fontconfig, libzip, zip, zlib }: +{ stdenv, fetchurl, zlib, bzip2, pkgconfig +, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype +, gtkClient ? false, gtk +, server ? true, readline }: +let + inherit (stdenv.lib) optional optionals; + client = sdlClient || gtkClient; +in stdenv.mkDerivation rec { name = "freeciv-2.3.1"; @@ -9,7 +15,12 @@ stdenv.mkDerivation rec { sha256 = "1n3ak0y9hj9kha0r3cdbi8zb47vrgal1jsbblamqgwwwgzy8cri3"; }; - buildInputs = [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype pkgconfig fontconfig libzip zip zlib] ; + buildNativeInputs = [ pkgconfig ]; + + buildInputs = [ zlib bzip2 ] + ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype ] + ++ optional gtkClient gtk + ++ optional server readline; meta = with stdenv.lib; { description = "multiplayer (or single player), turn-based strategy game.";