From 48082af9b89c4f662be46862e8199fe6b8b885bf Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 6 Sep 2021 17:39:49 +0300 Subject: [PATCH 1/2] freeciv: do not enable gtkClient always on linux makes it possible to use the qtClient --- pkgs/games/freeciv/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index 051266fa8007..afb42cc4d306 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 , qtClient ? false, qt5 , server ? true, readline , enableSqlite ? true, sqlite @@ -47,6 +47,10 @@ stdenv.mkDerivation rec { ++ lib.optional (!gtkClient) "--enable-fcmp=cli" ++ lib.optional (!server) "--disable-server"; + postFixup = lib.optionalString qtClient '' + wrapQtApp $out/bin/freeciv-qt + ''; + enableParallelBuilding = true; meta = with lib; { From a9dacd437f2a87978a429a05f92009eb99d943de Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 6 Sep 2021 23:18:32 +0300 Subject: [PATCH 2/2] freeciv: wrap gtkClient --- pkgs/games/freeciv/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index afb42cc4d306..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 ? false, 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" @@ -49,6 +51,8 @@ stdenv.mkDerivation rec { postFixup = lib.optionalString qtClient '' wrapQtApp $out/bin/freeciv-qt + '' + lib.optionalString gtkClient '' + wrapGApp $out/bin/freeciv-gtk3.22 ''; enableParallelBuilding = true;