freeciv: 2.6.6 -> 3.0.1

* change the default client to gtk (because sdl2 is marked experimental)

* use sdl2 sound in all clients
main
Michael Livshin 2 years ago
parent 02cd48717d
commit 9ae248d5ba
  1. 25
      pkgs/games/freeciv/default.nix
  2. 17
      pkgs/top-level/all-packages.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"

@ -31803,20 +31803,25 @@ with pkgs;
freecell-solver = callPackage ../games/freecell-solver { };
freeciv = callPackage ../games/freeciv {
autoreconfHook = buildPackages.autoreconfHook269;
qt5 = qt514;
sdl2Client = false;
gtkClient = true;
qtClient = false;
};
freeciv_gtk = freeciv.override {
gtkClient = true;
sdlClient = false;
freeciv_sdl2 = freeciv.override {
sdl2Client = true;
gtkClient = false;
qtClient = false;
};
freeciv_qt = freeciv.override {
sdl2Client = false;
gtkClient = false;
qtClient = true;
sdlClient = false;
};
freeciv_gtk = freeciv;
freedink = callPackage ../games/freedink { };
freeorion = callPackage ../games/freeorion { };

Loading…
Cancel
Save