summaryrefslogtreecommitdiffstats
path: root/packages/freeciv
diff options
context:
space:
mode:
Diffstat (limited to 'packages/freeciv')
-rw-r--r--packages/freeciv/default.nix115
1 files changed, 59 insertions, 56 deletions
diff --git a/packages/freeciv/default.nix b/packages/freeciv/default.nix
index a49069f..5cd37c6 100644
--- a/packages/freeciv/default.nix
+++ b/packages/freeciv/default.nix
@@ -21,10 +21,10 @@
freetype,
fluidsynth,
sdl2Client ? false,
- gtkClient ? false,
- gtk3,
+ gtkClient ? true,
+ gtk4,
wrapGAppsHook3,
- qtClient ? true,
+ qtClient ? false,
qt5,
server ? true,
readline,
@@ -32,57 +32,57 @@
sqlite,
}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
pname = "freeciv";
- version = "3.1.5";
+ version = "3.2.1";
src = fetchFromGitHub {
owner = "freeciv";
repo = "freeciv";
- rev = "R${lib.replaceStrings [ "." ] [ "_" ] version}";
- hash = "sha256-+kAV9Jz0aQpzeVUFp3so+rYbWOn52NuxRwE8kP5hzM8=";
+ tag = "R${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
+ hash = "sha256-Rl/B71pp5PA6mtRaKs8TbOya18cYxlNmMzVJ4ySVmhY=";
};
postPatch = ''
for f in {common,utility}/*.py; do
substituteInPlace $f \
- --replace '/usr/bin/env python3' ${python3.interpreter}
+ --replace-fail '/usr/bin/env python3' ${python3.interpreter}
done
for f in bootstrap/*.sh; do
patchShebangs $f
done
'';
- nativeBuildInputs =
- [
- autoreconfHook
- pkg-config
- ]
- ++ lib.optionals qtClient [ qt5.wrapQtAppsHook ]
- ++ lib.optionals gtkClient [ wrapGAppsHook3 ];
+ nativeBuildInputs = [
+ autoreconfHook
+ pkg-config
+ ]
+ ++ lib.optionals qtClient [ qt5.wrapQtAppsHook ]
+ ++ lib.optionals gtkClient [ wrapGAppsHook3 ];
- 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
- ++ lib.optional enableSqlite sqlite;
+ buildInputs = [
+ lua5_3
+ zlib
+ bzip2
+ curl
+ xz
+ gettext
+ libiconv
+ icu
+ SDL2
+ SDL2_mixer
+ fluidsynth
+ ]
+ ++ lib.optionals sdl2Client [
+ SDL2_image
+ SDL2_ttf
+ SDL2_gfx
+ freetype
+ ]
+ ++ lib.optionals gtkClient [ gtk4 ]
+ ++ lib.optionals qtClient [ qt5.qtbase ]
+ ++ lib.optional server readline
+ ++ lib.optional enableSqlite sqlite;
dontWrapQtApps = true;
dontWrapGApps = true;
@@ -92,29 +92,32 @@ stdenv.mkDerivation rec {
preConfigure = ''
export CPPFLAGS="$(echo $SDL2_PATH | sed 's#/nix/store/#-I/nix/store/#g')"
'';
- configureFlags =
- [ "--enable-shared" ]
- ++ lib.optionals sdl2Client [
- "--enable-client=sdl2"
- "--enable-sdl-mixer=sdl2"
- ]
- ++ lib.optionals qtClient [
- "--enable-client=qt"
- "--enable-sdl-mixer=sdl2"
- "--with-qtver=qt5"
- "--with-qt5-includes=${qt5.qtbase.dev}/include"
- ]
- ++ lib.optionals gtkClient [ "--enable-client=gtk3.22" ]
- ++ lib.optional enableSqlite "--enable-fcdb=sqlite3"
- ++ lib.optional (!gtkClient) "--enable-fcmp=cli"
- ++ lib.optional (!server) "--disable-server";
+ configureFlags = [
+ "--enable-shared"
+ ]
+ ++ lib.optionals sdl2Client [
+ "--enable-client=sdl2"
+ "--enable-sdl-mixer=sdl2"
+ ]
+ ++ lib.optionals qtClient [
+ "--enable-client=qt"
+ "--with-qtver=qt5"
+ "--with-qt5-includes=${qt5.qtbase.dev}/include"
+ ]
+ ++ lib.optionals gtkClient [
+ "--enable-client=gtk4"
+ "--enable-sdl-mixer=sdl2"
+ ]
+ ++ lib.optional enableSqlite "--enable-fcdb=sqlite3"
+ ++ 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
+ wrapGApp $out/bin/freeciv-gtk4
'';
enableParallelBuilding = true;
@@ -127,12 +130,12 @@ stdenv.mkDerivation rec {
prehistory and your mission is to lead your tribe from the stone age
to the space age...
'';
- homepage = "http://www.freeciv.org"; # http only
+ homepage = "https://freeciv.org/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ pierron ];
platforms = lib.platforms.unix;
hydraPlatforms = lib.platforms.linux; # sdl-config times out on darwin
broken = qtClient && stdenv.hostPlatform.isDarwin; # Missing Qt5 development files
};
-}
+})