2023-05-19 01:33:35 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchsvn
|
|
|
|
, autoreconfHook
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
|
|
|
, flex
|
|
|
|
, perl
|
|
|
|
, check
|
|
|
|
, pkg-config
|
|
|
|
, python39 # crossfire-server relies on a parser wich was removed in python >3.9
|
|
|
|
, version
|
|
|
|
, rev
|
|
|
|
, sha256
|
|
|
|
, maps
|
|
|
|
, arch
|
|
|
|
}:
|
2019-08-03 00:16:16 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "crossfire-server";
|
2022-04-30 01:29:15 +01:00
|
|
|
version = rev;
|
2019-08-03 00:16:16 +01:00
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
url = "http://svn.code.sf.net/p/crossfire/code/server/trunk/";
|
2022-04-30 01:29:15 +01:00
|
|
|
inherit sha256;
|
|
|
|
rev = "r${rev}";
|
2019-08-03 00:16:16 +01:00
|
|
|
};
|
|
|
|
|
2024-01-26 22:57:20 +00:00
|
|
|
patches = [
|
|
|
|
./add-cstdint-include-to-crossfire-server.patch
|
|
|
|
];
|
|
|
|
|
2023-05-19 01:33:35 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool flex perl check pkg-config python39 ];
|
2019-08-03 00:16:16 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
ln -s ${arch} lib/arch
|
|
|
|
ln -s ${maps} lib/maps
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
|
|
|
|
2023-05-19 01:33:35 +01:00
|
|
|
configureFlags = [ "--with-python=${python39}" ];
|
2019-08-03 00:16:16 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
ln -s ${maps} "$out/share/crossfire/maps"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Server for the Crossfire free MMORPG";
|
|
|
|
homepage = "http://crossfire.real-time.com/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ToxicFrog ];
|
|
|
|
};
|
|
|
|
}
|