summaryrefslogtreecommitdiffstats
path: root/pkgs/games/freeciv
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-08-05 16:57:52 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-08-05 16:57:52 +0200
commitda88c1e9b6be4013310f3d1fb2ea03455426df4e (patch)
treebf5a5e33e44e6f41f2dad0c2da4970965786b495 /pkgs/games/freeciv
parent00ee57021df1101d5a921d88409c8a358f211137 (diff)
freeciv: format, cleanup
Diffstat (limited to 'pkgs/games/freeciv')
-rw-r--r--pkgs/games/freeciv/default.nix35
1 files changed, 14 insertions, 21 deletions
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix
index 27731a3a008b..051266fa8007 100644
--- a/pkgs/games/freeciv/default.nix
+++ b/pkgs/games/freeciv/default.nix
@@ -7,17 +7,14 @@
, enableSqlite ? true, sqlite
}:
-let
- inherit (lib) optional optionals;
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
pname = "freeciv";
version = "2.6.5";
src = fetchFromGitHub {
owner = "freeciv";
repo = "freeciv";
- rev = "R${builtins.replaceStrings [ "." ] [ "_" ] version}";
+ rev = "R${lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "sha256-7KVtBGihABpcbUm5ac2fuBVaDvbucEJSREPulGUdnUE=";
};
@@ -29,43 +26,39 @@ in stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ autoreconfHook pkg-config ]
- ++ optional qtClient [ qt5.wrapQtAppsHook ];
+ ++ lib.optional qtClient [ qt5.wrapQtAppsHook ];
buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv ]
- ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
- ++ optionals gtkClient [ gtk3 ]
- ++ optionals qtClient [ qt5.qtbase ]
- ++ optional server readline
- ++ optional enableSqlite sqlite;
+ ++ lib.optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
+ ++ lib.optionals gtkClient [ gtk3 ]
+ ++ lib.optionals qtClient [ qt5.qtbase ]
+ ++ lib.optional server readline
+ ++ lib.optional enableSqlite sqlite;
dontWrapQtApps = true;
configureFlags = [ "--enable-shared" ]
- ++ optional sdlClient "--enable-client=sdl"
- ++ optionals qtClient [
+ ++ lib.optional sdlClient "--enable-client=sdl"
+ ++ lib.optionals qtClient [
"--enable-client=qt"
"--with-qt5-includes=${qt5.qtbase.dev}/include"
- ]
- ++ optionals gtkClient [ "--enable-client=gtk3.22" ]
- ++ optional enableSqlite "--enable-fcdb=sqlite3"
- ++ optional (!gtkClient) "--enable-fcmp=cli"
- ++ optional (!server) "--disable-server";
+ ] ++ lib.optionals gtkClient [ "--enable-client=gtk3.22" ]
+ ++ lib.optional enableSqlite "--enable-fcdb=sqlite3"
+ ++ lib.optional (!gtkClient) "--enable-fcmp=cli"
+ ++ lib.optional (!server) "--disable-server";
enableParallelBuilding = true;
meta = with 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://www.freeciv.org"; # http only
license = licenses.gpl2;
-
maintainers = with maintainers; [ pierron ];
platforms = platforms.unix;
hydraPlatforms = platforms.linux; # sdl-config times out on darwin