
Fixes instances of the awt.useSystemAAFontSettings property in _JAVA_OPTIONS being impossible to override due to incorrect separators and due to replacing the value from the shell. Changes the font anti-aliasing mode to gasp; led is not suitable for users with subpixel arrangements other than horizontal RGB, on doesn't respect the hints encoded in fonts. See https://github.com/NixOS/nixpkgs/issues/422043
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
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" \
|
|
--prefix _JAVA_OPTIONS " " "-Dawt.useSystemAAFontSettings=gasp" \
|
|
--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 ];
|
|
};
|
|
}
|