diff options
author | Michael Livshin <repo@cmm.kakpryg.net> | 2022-06-11 01:21:12 +0300 |
---|---|---|
committer | Michael Livshin <repo@cmm.kakpryg.net> | 2022-06-14 09:16:06 +0300 |
commit | 9ae248d5ba3dba5923c9cdda95ac777bce56f92b (patch) | |
tree | 4b335e93c1c65588b01bb008cfacec99cfd646d9 /pkgs/games | |
parent | 02cd48717d5249876b181cf9555a48041dd33ae7 (diff) |
freeciv: 2.6.6 -> 3.0.1
* change the default client to gtk (because sdl2 is marked experimental) * use sdl2 sound in all clients
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/freeciv/default.nix | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index f5c1ff0ea3f49..b1d215912a0a8 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -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" |