lol

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

authored by

Martin Weinelt and committed by
GitHub
2f3e8c8c 1e0aefb4

+216 -146
+34
pkgs/by-name/cr/crossfire-arch/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchgit, 5 + }: 6 + 7 + stdenv.mkDerivation { 8 + pname = "crossfire-arch"; 9 + version = "2025-04"; 10 + 11 + src = fetchgit { 12 + url = "https://git.code.sf.net/p/crossfire/crossfire-arch"; 13 + rev = "876eb50b9199e9aa06175b7a7d85832662be3f78"; 14 + hash = "sha256-jDiAKcjWYvjGiD68LuKlZS4sOR9jW3THp99kAEdE+y0="; 15 + }; 16 + 17 + installPhase = '' 18 + runHook preInstall 19 + 20 + mkdir -p "$out" 21 + cp -a . "$out/" 22 + 23 + runHook postInstall 24 + ''; 25 + 26 + meta = with lib; { 27 + description = "Archetype data for the Crossfire free MMORPG"; 28 + homepage = "http://crossfire.real-time.com/"; 29 + license = licenses.gpl2Plus; 30 + platforms = platforms.linux; 31 + hydraPlatforms = [ ]; 32 + maintainers = with maintainers; [ ToxicFrog ]; 33 + }; 34 + }
+53
pkgs/by-name/cr/crossfire-gridarta/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchgit, 5 + makeWrapper, 6 + jre, 7 + gradle, 8 + }: 9 + 10 + stdenv.mkDerivation rec { 11 + name = "crossfire-gridarta"; 12 + version = "2025-04"; 13 + 14 + src = fetchgit { 15 + url = "https://git.code.sf.net/p/gridarta/gridarta"; 16 + rev = "9ff39a63071fc76141117eac97a27c07d312cfb5"; 17 + hash = "sha256-UotvRJey0SXhKjyKo0L7MiDtqvsBOUcT0315fkAKwb0="; 18 + }; 19 + 20 + nativeBuildInputs = [ 21 + jre 22 + gradle 23 + makeWrapper 24 + ]; 25 + 26 + buildPhase = '' 27 + runHook preBuild 28 + gradle :src:crossfire:createEditorJar 29 + runHook postBuild 30 + ''; 31 + 32 + installPhase = '' 33 + runHook preInstall 34 + 35 + mkdir -pv $out/share/java $out/bin 36 + cp src/crossfire/build/libs/CrossfireEditor.jar $out/share/java/ 37 + 38 + makeWrapper ${jre}/bin/java $out/bin/crossfire-gridarta \ 39 + --add-flags "-jar $out/share/java/CrossfireEditor.jar" \ 40 + --set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \ 41 + --set _JAVA_AWT_WM_NONREPARENTING 1 42 + 43 + runHook postInstall 44 + ''; 45 + 46 + meta = with lib; { 47 + description = "Map and archetype editor for the Crossfire free MMORPG"; 48 + homepage = "http://crossfire.real-time.com/"; 49 + license = licenses.gpl2Plus; 50 + platforms = platforms.linux; 51 + maintainers = with maintainers; [ ToxicFrog ]; 52 + }; 53 + }
+73
pkgs/by-name/cr/crossfire-jxclient/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchgit, 5 + makeWrapper, 6 + gradle, 7 + jre, 8 + ffmpeg, 9 + }: 10 + 11 + stdenv.mkDerivation rec { 12 + name = "crossfire-jxclient"; 13 + version = "2025-01"; 14 + 15 + src = fetchgit { 16 + url = "https://git.code.sf.net/p/crossfire/jxclient"; 17 + rev = "01471f0fdf7a5fd8b4ea6d5b49bde7edead5c505"; 18 + hash = "sha256-NGBj3NUBZIfS9J3FHqER8lblPuFEEH9dsTKFBqioiik="; 19 + # For some reason, submodule fetching fails in nix even though it works in 20 + # the shell. So we fetch the sounds repo separately below. 21 + fetchSubmodules = false; 22 + }; 23 + 24 + sounds = fetchgit { 25 + url = "https://git.code.sf.net/p/crossfire/crossfire-sounds"; 26 + rev = "b53f436e1d1cca098c641f34c46f15c828ea9c8f"; 27 + hash = "sha256-zA+SaQAaNxNroHESCSonDiUsCuCzjZp+WZNzvsJHNXY="; 28 + }; 29 + 30 + nativeBuildInputs = [ 31 + jre 32 + gradle 33 + makeWrapper 34 + ffmpeg 35 + ]; 36 + 37 + patchPhase = '' 38 + runHook prePatch 39 + 40 + rm -rf sounds 41 + ln -s ${sounds} sounds 42 + 43 + runHook postPatch 44 + ''; 45 + 46 + buildPhase = '' 47 + runHook preBuild 48 + gradle :createJar 49 + runHook postBuild 50 + ''; 51 + 52 + installPhase = '' 53 + runHook preInstall 54 + 55 + mkdir -pv $out/share/java $out/bin 56 + cp jxclient.jar $out/share/java/jxclient.jar 57 + 58 + makeWrapper ${jre}/bin/java $out/bin/crossfire-jxclient \ 59 + --add-flags "-jar $out/share/java/jxclient.jar" \ 60 + --set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \ 61 + --set _JAVA_AWT_WM_NONREPARENTING 1 62 + 63 + runHook postInstall 64 + ''; 65 + 66 + meta = with lib; { 67 + description = "Java-based fullscreen client for the Crossfire free MMORPG"; 68 + homepage = "http://crossfire.real-time.com/"; 69 + license = licenses.gpl2Plus; 70 + platforms = platforms.linux; 71 + maintainers = with maintainers; [ ToxicFrog ]; 72 + }; 73 + }
+34
pkgs/by-name/cr/crossfire-maps/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchgit, 5 + }: 6 + 7 + stdenv.mkDerivation { 8 + pname = "crossfire-maps"; 9 + version = "2025-04"; 10 + 11 + src = fetchgit { 12 + url = "https://git.code.sf.net/p/crossfire/crossfire-maps"; 13 + rev = "ec57d473064ed1732adb1897415b56f96fbd9382"; 14 + hash = "sha256-hJOMa8c80T4/NC37NKM270LDHNqWK6NZfKvKnFno9TE="; 15 + }; 16 + 17 + installPhase = '' 18 + runHook preInstall 19 + 20 + mkdir -p "$out" 21 + cp -a . "$out/" 22 + 23 + runHook postInstall 24 + ''; 25 + 26 + meta = with lib; { 27 + description = "Map data for the Crossfire free MMORPG"; 28 + homepage = "http://crossfire.real-time.com/"; 29 + license = licenses.gpl2Plus; 30 + platforms = platforms.linux; 31 + hydraPlatforms = [ ]; 32 + maintainers = with maintainers; [ ToxicFrog ]; 33 + }; 34 + }
-13
pkgs/games/crossfire/add-cstdint-include-to-crossfire-server.patch
··· 1 - diff --git a/include/Treasures.h b/include/Treasures.h 2 - index 614078f..a00b4f6 100644 3 - --- a/include/Treasures.h 4 - +++ b/include/Treasures.h 5 - @@ -13,6 +13,8 @@ 6 - #ifndef TREASURES_H 7 - #define TREASURES_H 8 - 9 - +#include <cstdint> 10 - + 11 - #include "AssetsCollection.h" 12 - 13 - extern "C" {
-33
pkgs/games/crossfire/crossfire-arch.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchsvn, 5 - version, 6 - rev, 7 - sha256, 8 - }: 9 - 10 - stdenv.mkDerivation { 11 - pname = "crossfire-arch"; 12 - version = rev; 13 - 14 - src = fetchsvn { 15 - url = "http://svn.code.sf.net/p/crossfire/code/arch/trunk/"; 16 - inherit sha256; 17 - rev = "r${rev}"; 18 - }; 19 - 20 - installPhase = '' 21 - mkdir -p "$out" 22 - cp -a . "$out/" 23 - ''; 24 - 25 - meta = with lib; { 26 - description = "Archetype data for the Crossfire free MMORPG"; 27 - homepage = "http://crossfire.real-time.com/"; 28 - license = licenses.gpl2Plus; 29 - platforms = platforms.linux; 30 - hydraPlatforms = [ ]; 31 - maintainers = with maintainers; [ ToxicFrog ]; 32 - }; 33 - }
+12 -15
pkgs/games/crossfire/crossfire-client.nix pkgs/by-name/cr/crossfire-client/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - fetchsvn, 4 + fetchgit, 5 5 cmake, 6 6 pkg-config, 7 7 perl, ··· 17 17 xorg, 18 18 util-linux, 19 19 curl, 20 - SDL, 21 - SDL_image, 22 - SDL_mixer, 20 + SDL2, 21 + SDL2_image, 22 + SDL2_mixer, 23 23 libselinux, 24 24 libsepol, 25 - version, 26 - rev, 27 - sha256, 28 25 }: 29 26 30 27 stdenv.mkDerivation { 31 28 pname = "crossfire-client"; 32 - version = rev; 29 + version = "2025-01"; 33 30 34 - src = fetchsvn { 35 - url = "http://svn.code.sf.net/p/crossfire/code/client/trunk/"; 36 - inherit sha256; 37 - rev = "r${rev}"; 31 + src = fetchgit { 32 + url = "https://git.code.sf.net/p/crossfire/crossfire-client"; 33 + hash = "sha256-iFm9yVEIBwngr8/0f9TRS4Uw0hnjrW6ngMRfsWY6TX0="; 34 + rev = "c69f578add358c1db567f6b46f532dd038d2ade0"; 38 35 }; 39 36 40 37 nativeBuildInputs = [ ··· 55 52 xorg.libpthreadstubs 56 53 xorg.libXdmcp 57 54 curl 58 - SDL 59 - SDL_image 60 - SDL_mixer 55 + SDL2 56 + SDL2_image 57 + SDL2_mixer 61 58 util-linux 62 59 libselinux 63 60 libsepol
-33
pkgs/games/crossfire/crossfire-maps.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchsvn, 5 - version, 6 - rev, 7 - sha256, 8 - }: 9 - 10 - stdenv.mkDerivation { 11 - pname = "crossfire-maps"; 12 - version = rev; 13 - 14 - src = fetchsvn { 15 - url = "http://svn.code.sf.net/p/crossfire/code/maps/trunk/"; 16 - inherit sha256; 17 - rev = "r${rev}"; 18 - }; 19 - 20 - installPhase = '' 21 - mkdir -p "$out" 22 - cp -a . "$out/" 23 - ''; 24 - 25 - meta = with lib; { 26 - description = "Map data for the Crossfire free MMORPG"; 27 - homepage = "http://crossfire.real-time.com/"; 28 - license = licenses.gpl2Plus; 29 - platforms = platforms.linux; 30 - hydraPlatforms = [ ]; 31 - maintainers = with maintainers; [ ToxicFrog ]; 32 - }; 33 - }
+10 -16
pkgs/games/crossfire/crossfire-server.nix pkgs/by-name/cr/crossfire-server/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - fetchsvn, 4 + pkgs, 5 + fetchgit, 5 6 autoconf, 6 7 automake, 7 8 libtool, ··· 10 11 check, 11 12 pkg-config, 12 13 python3, 13 - version, 14 - rev, 15 - sha256, 16 - maps, 17 - arch, 14 + # Included here so that hosts using custom maps/archetypes can easily override. 15 + maps ? pkgs.crossfire-maps, 16 + arch ? pkgs.crossfire-arch, 18 17 }: 19 18 20 19 stdenv.mkDerivation { 21 20 pname = "crossfire-server"; 22 - version = rev; 21 + version = "2025-04"; 23 22 24 - src = fetchsvn { 25 - url = "http://svn.code.sf.net/p/crossfire/code/server/trunk/"; 26 - inherit sha256; 27 - rev = "r${rev}"; 23 + src = fetchgit { 24 + url = "https://git.code.sf.net/p/crossfire/crossfire-server"; 25 + rev = "5f742b9f9f785e4a59a3a463bee1f31c9bc67098"; 26 + hash = "sha256-e7e3xN7B1cv9+WkZGzOJgrFer50Cs0L/2dYB9RmGCiE="; 28 27 }; 29 - 30 - patches = [ 31 - ./add-cstdint-include-to-crossfire-server.patch 32 - ]; 33 28 34 29 nativeBuildInputs = [ 35 30 autoconf ··· 56 51 ''; 57 52 58 53 meta = with lib; { 59 - broken = true; # cfpython.c:63:10: fatal error: node.h: No such file or directory 60 54 description = "Server for the Crossfire free MMORPG"; 61 55 homepage = "http://crossfire.real-time.com/"; 62 56 license = licenses.gpl2Plus;
-29
pkgs/games/crossfire/default.nix
··· 1 - { callPackage, ... }: 2 - 3 - rec { 4 - crossfire-client = callPackage ./crossfire-client.nix { 5 - version = "1.75.0"; 6 - rev = "21760"; 7 - sha256 = "0b42sak8hj60nywfswkps777asy9p8r9wsn7pmj2nqbd29ng1p9d"; 8 - }; 9 - 10 - crossfire-server = callPackage ./crossfire-server.nix { 11 - version = "latest"; 12 - rev = "22111"; 13 - sha256 = "04fjif6zv642n2zlw27cgzkak2kknwrxqzg42bvzl7q901bsr9l7"; 14 - maps = crossfire-maps; 15 - arch = crossfire-arch; 16 - }; 17 - 18 - crossfire-arch = callPackage ./crossfire-arch.nix { 19 - version = "latest"; 20 - rev = "22111"; 21 - sha256 = "0l4rp3idvbhknpxxs0w4i4nqfg01wblzm4v4j375xwxxbf00j0ms"; 22 - }; 23 - 24 - crossfire-maps = callPackage ./crossfire-maps.nix { 25 - version = "latest"; 26 - rev = "22111"; 27 - sha256 = "1dwfc84acjvbjgjakkb8z8pdlksbsn90j0z8z8rq37lqx0kx1sap"; 28 - }; 29 - }
-7
pkgs/top-level/all-packages.nix
··· 16937 16937 16938 16938 crawl = callPackage ../games/crawl { }; 16939 16939 16940 - inherit (import ../games/crossfire pkgs) 16941 - crossfire-server 16942 - crossfire-arch 16943 - crossfire-maps 16944 - crossfire-client 16945 - ; 16946 - 16947 16940 curseofwar = callPackage ../games/curseofwar { SDL = null; }; 16948 16941 curseofwar-sdl = callPackage ../games/curseofwar { ncurses = null; }; 16949 16942