Merge pull request #136905 from Artturin/freecivqt

This commit is contained in:
Artturi 2021-09-07 00:22:51 +03:00 committed by GitHub
commit e3549ba06d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
{ 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 ? stdenv.isLinux, gtk3
, gtkClient ? false, gtk3, wrapGAppsHook
, qtClient ? false, qt5
, server ? true, readline
, enableSqlite ? true, sqlite
@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ autoreconfHook pkg-config ]
++ lib.optional qtClient [ qt5.wrapQtAppsHook ];
++ 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 ]
@ -36,6 +37,7 @@ stdenv.mkDerivation rec {
++ lib.optional enableSqlite sqlite;
dontWrapQtApps = true;
dontWrapGApps = true;
configureFlags = [ "--enable-shared" ]
++ lib.optional sdlClient "--enable-client=sdl"
@ -47,6 +49,12 @@ stdenv.mkDerivation rec {
++ lib.optional (!gtkClient) "--enable-fcmp=cli"
++ lib.optional (!server) "--disable-server";
postFixup = lib.optionalString qtClient ''
wrapQtApp $out/bin/freeciv-qt
'' + lib.optionalString gtkClient ''
wrapGApp $out/bin/freeciv-gtk3.22
'';
enableParallelBuilding = true;
meta = with lib; {