Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
74 lines
1.7 KiB
Nix
74 lines
1.7 KiB
Nix
{
|
|
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" \
|
|
--prefix _JAVA_OPTIONS " " "-Dawt.useSystemAAFontSettings=gasp" \
|
|
--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 ];
|
|
};
|
|
}
|