Unverified Commit 2f3e8c8c authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

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

parents 1e0aefb4 2386aba1
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
{
  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; {
+12 −15
Original line number Diff line number Diff line
{
  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
+53 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+73 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+10 −9
Original line number Diff line number Diff line
{
  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; {
Loading