mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
deliantra-server: remove
I'm not really using or maintaining it anymore and it's getting increasingly bit-rotted.
This commit is contained in:
parent
0382c944cc
commit
b8a2f7fff9
10 changed files with 0 additions and 423 deletions
|
@ -603,7 +603,6 @@
|
|||
./services/games/archisteamfarm.nix
|
||||
./services/games/armagetronad.nix
|
||||
./services/games/crossfire-server.nix
|
||||
./services/games/deliantra-server.nix
|
||||
./services/games/factorio.nix
|
||||
./services/games/freeciv.nix
|
||||
./services/games/mchprs.nix
|
||||
|
|
|
@ -1,182 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.deliantra-server;
|
||||
serverPort = 13327;
|
||||
in
|
||||
{
|
||||
options.services.deliantra-server = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
If enabled, the Deliantra game server will be started at boot.
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkPackageOption pkgs "deliantra-server" {
|
||||
extraDescription = ''
|
||||
::: {.note}
|
||||
This will also be used for map/arch data, if you don't change {option}`dataDir`
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${pkgs.deliantra-data}";
|
||||
defaultText = lib.literalExpression ''"''${pkgs.deliantra-data}"'';
|
||||
description = ''
|
||||
Where to store readonly data (maps, archetypes, sprites, etc).
|
||||
Note that if you plan to use the live map editor (rather than editing
|
||||
the maps offline and then nixos-rebuilding), THIS MUST BE WRITEABLE --
|
||||
copy the deliantra-data someplace writeable (say,
|
||||
/var/lib/deliantra/data) and update this option accordingly.
|
||||
'';
|
||||
};
|
||||
|
||||
stateDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/var/lib/deliantra";
|
||||
description = ''
|
||||
Where to store runtime data (save files, persistent items, etc).
|
||||
|
||||
If left at the default, this will be automatically created on server
|
||||
startup if it does not already exist. If changed, it is the admin's
|
||||
responsibility to make sure that the directory exists and is writeable
|
||||
by the `crossfire` user.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to open ports in the firewall for the server.
|
||||
'';
|
||||
};
|
||||
|
||||
configFiles = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = ''
|
||||
Contents of the server configuration files. These will be appended to
|
||||
the example configurations the server comes with and overwrite any
|
||||
default settings defined therein.
|
||||
|
||||
The example here is not comprehensive. See the files in
|
||||
/etc/deliantra-server after enabling this module for full documentation.
|
||||
'';
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
dm_file = '''
|
||||
admin:secret_password:localhost
|
||||
alice:xyzzy:*
|
||||
''';
|
||||
motd = "Welcome to Deliantra!";
|
||||
settings = '''
|
||||
# Settings for game mechanics.
|
||||
stat_loss_on_death true
|
||||
armor_max_enchant 7
|
||||
''';
|
||||
config = '''
|
||||
# Settings for the server daemon.
|
||||
hiscore_url https://deliantra.example.net/scores/
|
||||
max_map_reset 86400
|
||||
''';
|
||||
}
|
||||
'';
|
||||
default = {
|
||||
motd = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.deliantra = {
|
||||
description = "Deliantra server daemon user";
|
||||
home = cfg.stateDir;
|
||||
createHome = false;
|
||||
isSystemUser = true;
|
||||
group = "deliantra";
|
||||
};
|
||||
users.groups.deliantra = { };
|
||||
|
||||
# Merge the cfg.configFiles setting with the default files shipped with
|
||||
# Deliantra.
|
||||
# For most files this consists of reading
|
||||
# ${deliantra}/etc/deliantra-server/${name} and appending the user setting
|
||||
# to it.
|
||||
environment.etc =
|
||||
lib.attrsets.mapAttrs'
|
||||
(
|
||||
name: value:
|
||||
lib.attrsets.nameValuePair "deliantra-server/${name}" {
|
||||
mode = "0644";
|
||||
text =
|
||||
# Deliantra doesn't come with a motd file, but respects it if present
|
||||
# in /etc.
|
||||
(lib.optionalString (name != "motd") (
|
||||
lib.fileContents "${cfg.package}/etc/deliantra-server/${name}"
|
||||
))
|
||||
+ "\n${value}";
|
||||
}
|
||||
)
|
||||
(
|
||||
{
|
||||
motd = "";
|
||||
settings = "";
|
||||
config = "";
|
||||
dm_file = "";
|
||||
}
|
||||
// cfg.configFiles
|
||||
);
|
||||
|
||||
systemd.services.deliantra-server = {
|
||||
description = "Deliantra Server Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
environment = {
|
||||
DELIANTRA_DATADIR = "${cfg.dataDir}";
|
||||
DELIANTRA_LOCALDIR = "${cfg.stateDir}";
|
||||
DELIANTRA_CONFDIR = "/etc/deliantra-server";
|
||||
};
|
||||
|
||||
serviceConfig = lib.mkMerge [
|
||||
{
|
||||
ExecStart = "${cfg.package}/bin/deliantra-server";
|
||||
Restart = "always";
|
||||
User = "deliantra";
|
||||
Group = "deliantra";
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
}
|
||||
(lib.mkIf (cfg.stateDir == "/var/lib/deliantra") {
|
||||
StateDirectory = "deliantra";
|
||||
})
|
||||
];
|
||||
|
||||
# The deliantra server needs access to a bunch of files at runtime that
|
||||
# are not created automatically at server startup; they're meant to be
|
||||
# installed in $PREFIX/var/deliantra-server by `make install`. And those
|
||||
# files need to be writeable, so we can't just point at the ones in the
|
||||
# nix store. Instead we take the approach of copying them out of the store
|
||||
# on first run. If `bookarch` already exists, we assume the rest of the
|
||||
# files do as well, and copy nothing -- otherwise we risk ovewriting
|
||||
# server state information every time the server is upgraded.
|
||||
preStart = ''
|
||||
if [ ! -e "${cfg.stateDir}"/bookarch ]; then
|
||||
${pkgs.rsync}/bin/rsync -a --chmod=u=rwX,go=rX \
|
||||
"${cfg.package}/var/deliantra-server/" "${cfg.stateDir}/"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ serverPort ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
--- a/utils/cfhq2xa.C
|
||||
+++ b/utils/cfhq2xa.C
|
||||
@@ -182,10 +182,10 @@ static inline bool Diff (pixel w1, pixel w2)
|
||||
pixel YUV1 = RGBAtoYUVA (w1);
|
||||
pixel YUV2 = RGBAtoYUVA (w2);
|
||||
|
||||
- return ((abs (((YUV1 >> Rshift) & Cmask) - ((YUV2 >> Rshift) & Cmask)) > trY) ||
|
||||
- (abs (((YUV1 >> Gshift) & Cmask) - ((YUV2 >> Gshift) & Cmask)) > trU) ||
|
||||
- (abs (((YUV1 >> Bshift) & Cmask) - ((YUV2 >> Bshift) & Cmask)) > trV) ||
|
||||
- (abs (((YUV1 >> Ashift) & Cmask) - ((YUV2 >> Ashift) & Cmask)) > trA) );
|
||||
+ return ((abs ((signed int)((YUV1 >> Rshift) & Cmask) - (signed int)((YUV2 >> Rshift) & Cmask)) > trY) ||
|
||||
+ (abs ((signed int)((YUV1 >> Gshift) & Cmask) - (signed int)((YUV2 >> Gshift) & Cmask)) > trU) ||
|
||||
+ (abs ((signed int)((YUV1 >> Bshift) & Cmask) - (signed int)((YUV2 >> Bshift) & Cmask)) > trV) ||
|
||||
+ (abs ((signed int)((YUV1 >> Ashift) & Cmask) - (signed int)((YUV2 >> Ashift) & Cmask)) > trA) );
|
||||
}
|
||||
|
||||
static void
|
|
@ -1,11 +0,0 @@
|
|||
--- a/utils/cfutil.in
|
||||
+++ b/utils/cfutil.in
|
||||
@@ -27,7 +27,7 @@ use common::sense;
|
||||
my $prefix = "@prefix@";
|
||||
my $exec_prefix = "@exec_prefix@";
|
||||
my $datarootdir = "@datarootdir@";
|
||||
-my $DATADIR = "@datadir@/@PACKAGE@";
|
||||
+my $DATADIR = $ENV{'DELIANTRA_DATADIR'} || "@datadir@/@PACKAGE@";
|
||||
|
||||
my $CONVERT = "@CONVERT@";
|
||||
my $IDENTIFY = "@IDENTIFY@";
|
|
@ -1,14 +0,0 @@
|
|||
--- a/include/util.h
|
||||
+++ b/include/util.h
|
||||
@@ -449,6 +449,11 @@ struct slice_allocator
|
||||
{
|
||||
p->~Tp ();
|
||||
}
|
||||
+
|
||||
+ bool operator ==(const slice_allocator &) const
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
};
|
||||
|
||||
// basically a memory area, but refcounted
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
deliantra-server,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deliantra-arch";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz";
|
||||
sha256 = "1xzhv48g90hwkzgx9nfjm81ivg6hchkik9ldimi8ijb4j393kvsz";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
export DELIANTRA_DATADIR="$out"
|
||||
${deliantra-server}/bin/cfutil --install-arch .
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Archetype data for the Deliantra free MMORPG";
|
||||
homepage = "http://www.deliantra.net/";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
agpl3Plus
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
deliantra-maps,
|
||||
deliantra-arch,
|
||||
deliantra-server,
|
||||
symlinkJoin,
|
||||
}:
|
||||
|
||||
symlinkJoin rec {
|
||||
name = "deliantra-data-${version}";
|
||||
version = "M${deliantra-maps.version}+A${deliantra-arch.version}";
|
||||
|
||||
paths = [
|
||||
deliantra-maps
|
||||
deliantra-arch
|
||||
"${deliantra-server}/share/deliantra-server"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Combined game data (maps + archetypes) for the Deliantra free MMORPG";
|
||||
homepage = "http://www.deliantra.net/";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
agpl3Plus
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
hydraPlatforms = [ ];
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
deliantra-server,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deliantra-maps";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz";
|
||||
sha256 = "0zbwzya28s1xpnbrmqkqvfrzns03zdjd8a9w9nk665aif6rw2zbz";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/maps"
|
||||
export DELIANTRA_DATADIR="$out"
|
||||
${deliantra-server}/bin/cfutil --install-maps .
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Map data for the Deliantra free MMORPG";
|
||||
homepage = "http://www.deliantra.net/";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
agpl3Plus
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
};
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
perlPackages,
|
||||
autoconf,
|
||||
perl,
|
||||
gperf,
|
||||
optipng,
|
||||
pngnq,
|
||||
rsync,
|
||||
imagemagick,
|
||||
blitz,
|
||||
pkg-config,
|
||||
glib,
|
||||
boost,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
let
|
||||
perl-deps = with perlPackages; [
|
||||
AnyEvent
|
||||
AnyEventAIO
|
||||
AnyEventBDB
|
||||
AnyEventIRC
|
||||
CompressLZF
|
||||
commonsense
|
||||
Coro
|
||||
CoroEV
|
||||
Deliantra
|
||||
DigestSHA1
|
||||
EV
|
||||
PodPOM
|
||||
SafeHole
|
||||
URI
|
||||
YAMLLibYAML
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deliantra-server";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz";
|
||||
sha256 = "0v0m2m9fxq143aknh7jb3qj8bnpjrs3bpbbx07c18516y3izr71d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
perl
|
||||
gperf
|
||||
optipng
|
||||
pngnq
|
||||
rsync
|
||||
imagemagick
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
propagatedBuildInputs = perl-deps;
|
||||
|
||||
buildInputs = [
|
||||
blitz
|
||||
boost
|
||||
glib
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
patches = [
|
||||
./0001-abs.patch
|
||||
./0002-datadir.patch
|
||||
./0003-swap.patch
|
||||
];
|
||||
|
||||
env.CXXFLAGS = "-std=c++11";
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/cfutil --prefix PERL5LIB : $PERL5LIB
|
||||
wrapProgram $out/bin/deliantra-server --prefix PERL5LIB : $PERL5LIB
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Server for the Deliantra free MMORPG";
|
||||
homepage = "http://www.deliantra.net/";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
agpl3Plus
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
};
|
||||
}
|
|
@ -14931,15 +14931,6 @@ with pkgs;
|
|||
|
||||
cutemaze = qt6Packages.callPackage ../games/cutemaze { };
|
||||
|
||||
deliantra-server = callPackage ../games/deliantra/server.nix {
|
||||
# perl538 defines 'struct object' in sv.h. many conflicts result
|
||||
perl = perl540;
|
||||
perlPackages = perl540Packages;
|
||||
};
|
||||
deliantra-arch = callPackage ../games/deliantra/arch.nix { };
|
||||
deliantra-maps = callPackage ../games/deliantra/maps.nix { };
|
||||
deliantra-data = callPackage ../games/deliantra/data.nix { };
|
||||
|
||||
ddnet-server = ddnet.override { buildClient = false; };
|
||||
|
||||
duckmarines = callPackage ../games/duckmarines { love = love_0_10; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue