Crossfire: fix python breakage, update server and client, add jxclient and editor (#400098)

This commit is contained in:
Martin Weinelt
2025-05-01 19:55:38 +02:00
committed by GitHub
9 changed files with 168 additions and 98 deletions
@@ -1,25 +1,26 @@
{
stdenv,
lib,
fetchsvn,
version,
rev,
sha256,
fetchgit,
}:
stdenv.mkDerivation {
pname = "crossfire-arch";
version = rev;
version = "2025-04";
src = fetchsvn {
url = "http://svn.code.sf.net/p/crossfire/code/arch/trunk/";
inherit sha256;
rev = "r${rev}";
src = fetchgit {
url = "https://git.code.sf.net/p/crossfire/crossfire-arch";
rev = "876eb50b9199e9aa06175b7a7d85832662be3f78";
hash = "sha256-jDiAKcjWYvjGiD68LuKlZS4sOR9jW3THp99kAEdE+y0=";
};
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -a . "$out/"
runHook postInstall
'';
meta = with lib; {
@@ -1,7 +1,7 @@
{
stdenv,
lib,
fetchsvn,
fetchgit,
cmake,
pkg-config,
perl,
@@ -17,24 +17,21 @@
xorg,
util-linux,
curl,
SDL,
SDL_image,
SDL_mixer,
SDL2,
SDL2_image,
SDL2_mixer,
libselinux,
libsepol,
version,
rev,
sha256,
}:
stdenv.mkDerivation {
pname = "crossfire-client";
version = rev;
version = "2025-01";
src = fetchsvn {
url = "http://svn.code.sf.net/p/crossfire/code/client/trunk/";
inherit sha256;
rev = "r${rev}";
src = fetchgit {
url = "https://git.code.sf.net/p/crossfire/crossfire-client";
hash = "sha256-iFm9yVEIBwngr8/0f9TRS4Uw0hnjrW6ngMRfsWY6TX0=";
rev = "c69f578add358c1db567f6b46f532dd038d2ade0";
};
nativeBuildInputs = [
@@ -55,9 +52,9 @@ stdenv.mkDerivation {
xorg.libpthreadstubs
xorg.libXdmcp
curl
SDL
SDL_image
SDL_mixer
SDL2
SDL2_image
SDL2_mixer
util-linux
libselinux
libsepol
@@ -0,0 +1,53 @@
{
stdenv,
lib,
fetchgit,
makeWrapper,
jre,
gradle,
}:
stdenv.mkDerivation rec {
name = "crossfire-gridarta";
version = "2025-04";
src = fetchgit {
url = "https://git.code.sf.net/p/gridarta/gridarta";
rev = "9ff39a63071fc76141117eac97a27c07d312cfb5";
hash = "sha256-UotvRJey0SXhKjyKo0L7MiDtqvsBOUcT0315fkAKwb0=";
};
nativeBuildInputs = [
jre
gradle
makeWrapper
];
buildPhase = ''
runHook preBuild
gradle :src:crossfire:createEditorJar
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -pv $out/share/java $out/bin
cp src/crossfire/build/libs/CrossfireEditor.jar $out/share/java/
makeWrapper ${jre}/bin/java $out/bin/crossfire-gridarta \
--add-flags "-jar $out/share/java/CrossfireEditor.jar" \
--set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \
--set _JAVA_AWT_WM_NONREPARENTING 1
runHook postInstall
'';
meta = with lib; {
description = "Map and archetype editor for the Crossfire free MMORPG";
homepage = "http://crossfire.real-time.com/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ToxicFrog ];
};
}
@@ -0,0 +1,73 @@
{
stdenv,
lib,
fetchgit,
makeWrapper,
gradle,
jre,
ffmpeg,
}:
stdenv.mkDerivation rec {
name = "crossfire-jxclient";
version = "2025-01";
src = fetchgit {
url = "https://git.code.sf.net/p/crossfire/jxclient";
rev = "01471f0fdf7a5fd8b4ea6d5b49bde7edead5c505";
hash = "sha256-NGBj3NUBZIfS9J3FHqER8lblPuFEEH9dsTKFBqioiik=";
# For some reason, submodule fetching fails in nix even though it works in
# the shell. So we fetch the sounds repo separately below.
fetchSubmodules = false;
};
sounds = fetchgit {
url = "https://git.code.sf.net/p/crossfire/crossfire-sounds";
rev = "b53f436e1d1cca098c641f34c46f15c828ea9c8f";
hash = "sha256-zA+SaQAaNxNroHESCSonDiUsCuCzjZp+WZNzvsJHNXY=";
};
nativeBuildInputs = [
jre
gradle
makeWrapper
ffmpeg
];
patchPhase = ''
runHook prePatch
rm -rf sounds
ln -s ${sounds} sounds
runHook postPatch
'';
buildPhase = ''
runHook preBuild
gradle :createJar
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -pv $out/share/java $out/bin
cp jxclient.jar $out/share/java/jxclient.jar
makeWrapper ${jre}/bin/java $out/bin/crossfire-jxclient \
--add-flags "-jar $out/share/java/jxclient.jar" \
--set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \
--set _JAVA_AWT_WM_NONREPARENTING 1
runHook postInstall
'';
meta = with lib; {
description = "Java-based fullscreen client for the Crossfire free MMORPG";
homepage = "http://crossfire.real-time.com/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ToxicFrog ];
};
}
@@ -1,25 +1,26 @@
{
stdenv,
lib,
fetchsvn,
version,
rev,
sha256,
fetchgit,
}:
stdenv.mkDerivation {
pname = "crossfire-maps";
version = rev;
version = "2025-04";
src = fetchsvn {
url = "http://svn.code.sf.net/p/crossfire/code/maps/trunk/";
inherit sha256;
rev = "r${rev}";
src = fetchgit {
url = "https://git.code.sf.net/p/crossfire/crossfire-maps";
rev = "ec57d473064ed1732adb1897415b56f96fbd9382";
hash = "sha256-hJOMa8c80T4/NC37NKM270LDHNqWK6NZfKvKnFno9TE=";
};
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -a . "$out/"
runHook postInstall
'';
meta = with lib; {
@@ -1,7 +1,8 @@
{
stdenv,
lib,
fetchsvn,
pkgs,
fetchgit,
autoconf,
automake,
libtool,
@@ -10,27 +11,21 @@
check,
pkg-config,
python3,
version,
rev,
sha256,
maps,
arch,
# Included here so that hosts using custom maps/archetypes can easily override.
maps ? pkgs.crossfire-maps,
arch ? pkgs.crossfire-arch,
}:
stdenv.mkDerivation {
pname = "crossfire-server";
version = rev;
version = "2025-04";
src = fetchsvn {
url = "http://svn.code.sf.net/p/crossfire/code/server/trunk/";
inherit sha256;
rev = "r${rev}";
src = fetchgit {
url = "https://git.code.sf.net/p/crossfire/crossfire-server";
rev = "5f742b9f9f785e4a59a3a463bee1f31c9bc67098";
hash = "sha256-e7e3xN7B1cv9+WkZGzOJgrFer50Cs0L/2dYB9RmGCiE=";
};
patches = [
./add-cstdint-include-to-crossfire-server.patch
];
nativeBuildInputs = [
autoconf
automake
@@ -56,7 +51,6 @@ stdenv.mkDerivation {
'';
meta = with lib; {
broken = true; # cfpython.c:63:10: fatal error: node.h: No such file or directory
description = "Server for the Crossfire free MMORPG";
homepage = "http://crossfire.real-time.com/";
license = licenses.gpl2Plus;
@@ -1,13 +0,0 @@
diff --git a/include/Treasures.h b/include/Treasures.h
index 614078f..a00b4f6 100644
--- a/include/Treasures.h
+++ b/include/Treasures.h
@@ -13,6 +13,8 @@
#ifndef TREASURES_H
#define TREASURES_H
+#include <cstdint>
+
#include "AssetsCollection.h"
extern "C" {
-29
View File
@@ -1,29 +0,0 @@
{ callPackage, ... }:
rec {
crossfire-client = callPackage ./crossfire-client.nix {
version = "1.75.0";
rev = "21760";
sha256 = "0b42sak8hj60nywfswkps777asy9p8r9wsn7pmj2nqbd29ng1p9d";
};
crossfire-server = callPackage ./crossfire-server.nix {
version = "latest";
rev = "22111";
sha256 = "04fjif6zv642n2zlw27cgzkak2kknwrxqzg42bvzl7q901bsr9l7";
maps = crossfire-maps;
arch = crossfire-arch;
};
crossfire-arch = callPackage ./crossfire-arch.nix {
version = "latest";
rev = "22111";
sha256 = "0l4rp3idvbhknpxxs0w4i4nqfg01wblzm4v4j375xwxxbf00j0ms";
};
crossfire-maps = callPackage ./crossfire-maps.nix {
version = "latest";
rev = "22111";
sha256 = "1dwfc84acjvbjgjakkb8z8pdlksbsn90j0z8z8rq37lqx0kx1sap";
};
}
-7
View File
@@ -16937,13 +16937,6 @@ with pkgs;
crawl = callPackage ../games/crawl { };
inherit (import ../games/crossfire pkgs)
crossfire-server
crossfire-arch
crossfire-maps
crossfire-client
;
curseofwar = callPackage ../games/curseofwar { SDL = null; };
curseofwar-sdl = callPackage ../games/curseofwar { ncurses = null; };