summaryrefslogtreecommitdiffstats
path: root/pkgs/games
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2021-09-07 00:22:51 +0300
committerGitHub <noreply@github.com>2021-09-07 00:22:51 +0300
commite3549ba06d70f3f68ee1f6a3514377b10b4ab639 (patch)
tree604cfd8b3d3b217245569244bd9273151382c663 /pkgs/games
parentdcbd03e582a846e16480be5c4febe02300695706 (diff)
parenta9dacd437f2a87978a429a05f92009eb99d943de (diff)
Merge pull request #136905 from Artturin/freecivqt
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/freeciv/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix
index 051266fa8007..4b022615e6c0 100644
--- a/pkgs/games/freeciv/default.nix
+++ b/pkgs/games/freeciv/default.nix
@@ -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; {