|
|
|
@ -1,7 +1,8 @@ |
|
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, lua5_3, pkg-config, python3 |
|
|
|
|
, zlib, bzip2, curl, xz, gettext, libiconv |
|
|
|
|
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth |
|
|
|
|
, gtkClient ? false, gtk3, wrapGAppsHook |
|
|
|
|
, zlib, bzip2, curl, xz, gettext, libiconv, icu |
|
|
|
|
, SDL2, SDL2_mixer, SDL2_image, SDL2_ttf, SDL2_gfx, freetype, fluidsynth |
|
|
|
|
, sdl2Client ? false |
|
|
|
|
, gtkClient ? true, gtk3, wrapGAppsHook |
|
|
|
|
, qtClient ? false, qt5 |
|
|
|
|
, server ? true, readline |
|
|
|
|
, enableSqlite ? true, sqlite |
|
|
|
@ -9,13 +10,13 @@ |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
|
pname = "freeciv"; |
|
|
|
|
version = "2.6.6"; |
|
|
|
|
version = "3.0.1"; |
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
|
owner = "freeciv"; |
|
|
|
|
repo = "freeciv"; |
|
|
|
|
rev = "R${lib.replaceStrings [ "." ] [ "_" ] version}"; |
|
|
|
|
sha256 = "sha256-D5t6sMpm09jbixs5MCghBeDbeuRbGmrrfWR91VNolRM="; |
|
|
|
|
sha256 = "sha256-Nzc6Tirj6TKLgTYN5XjZZut9HVYLKGOp1GZeaoqEtW8="; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
postPatch = '' |
|
|
|
@ -29,8 +30,8 @@ stdenv.mkDerivation rec { |
|
|
|
|
++ lib.optional qtClient [ qt5.wrapQtAppsHook ] |
|
|
|
|
++ lib.optional gtkClient [ wrapGAppsHook ]; |
|
|
|
|
|
|
|
|
|
buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv ] |
|
|
|
|
++ lib.optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ] |
|
|
|
|
buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv icu ] |
|
|
|
|
++ [ SDL2 SDL2_mixer SDL2_image SDL2_ttf SDL2_gfx freetype fluidsynth ] |
|
|
|
|
++ lib.optionals gtkClient [ gtk3 ] |
|
|
|
|
++ lib.optionals qtClient [ qt5.qtbase ] |
|
|
|
|
++ lib.optional server readline |
|
|
|
@ -39,8 +40,16 @@ stdenv.mkDerivation rec { |
|
|
|
|
dontWrapQtApps = true; |
|
|
|
|
dontWrapGApps = true; |
|
|
|
|
|
|
|
|
|
# configure is not smart enough to look for SDL2 headers under |
|
|
|
|
# .../SDL2, but thankfully $SDL2_PATH is almost exactly what we want |
|
|
|
|
preConfigure = '' |
|
|
|
|
export CPPFLAGS="$(echo $SDL2_PATH | sed 's#/nix/store/#-I/nix/store/#g')" |
|
|
|
|
''; |
|
|
|
|
configureFlags = [ "--enable-shared" ] |
|
|
|
|
++ lib.optional sdlClient "--enable-client=sdl" |
|
|
|
|
++ lib.optionals sdl2Client [ |
|
|
|
|
"--enable-client=sdl2" |
|
|
|
|
"--enable-sdl-mixer=sdl2" |
|
|
|
|
] |
|
|
|
|
++ lib.optionals qtClient [ |
|
|
|
|
"--enable-client=qt" |
|
|
|
|
"--with-qt5-includes=${qt5.qtbase.dev}/include" |
|
|
|
|