tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ghostOne: remove
broken and unmaintained
Robin Gloster
8 years ago
445e3d73
fe437d70
+2
-165
5 changed files
expand all
collapse all
unified
split
nixos
modules
misc
ids.nix
module-list.nix
services
games
ghost-one.nix
pkgs
servers
games
ghost-one
default.nix
top-level
all-packages.nix
+2
-2
nixos/modules/misc/ids.nix
···
65
65
foldingathome = 37;
66
66
sabnzbd = 38;
67
67
#kdm = 39; # dropped in 17.03
68
68
-
ghostone = 40;
68
68
+
#ghostone = 40; # dropped in 18.03
69
69
git = 41;
70
70
fourstore = 42;
71
71
fourstorehttp = 43;
···
348
348
#foldingathome = 37; # unused
349
349
#sabnzd = 38; # unused
350
350
#kdm = 39; # unused, even before 17.03
351
351
-
ghostone = 40;
351
351
+
#ghostone = 40; # dropped in 18.03
352
352
git = 41;
353
353
fourstore = 42;
354
354
fourstorehttp = 43;
-1
nixos/modules/module-list.nix
···
220
220
./services/editors/emacs.nix
221
221
./services/editors/infinoted.nix
222
222
./services/games/factorio.nix
223
223
-
./services/games/ghost-one.nix
224
223
./services/games/minecraft-server.nix
225
224
./services/games/minetest-server.nix
226
225
./services/games/terraria.nix
-105
nixos/modules/services/games/ghost-one.nix
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
with lib;
3
3
-
let
4
4
-
5
5
-
cfg = config.services.ghostOne;
6
6
-
ghostUser = "ghostone";
7
7
-
stateDir = "/var/lib/ghost-one";
8
8
-
9
9
-
in
10
10
-
{
11
11
-
12
12
-
###### interface
13
13
-
14
14
-
options = {
15
15
-
services.ghostOne = {
16
16
-
17
17
-
enable = mkOption {
18
18
-
default = false;
19
19
-
description = "Enable Ghost-One Warcraft3 game hosting server.";
20
20
-
};
21
21
-
22
22
-
language = mkOption {
23
23
-
default = "English";
24
24
-
type = types.enum [ "English" "Spanish" "Russian" "Serbian" "Turkish" ];
25
25
-
description = "The language of bot messages: English, Spanish, Russian, Serbian or Turkish.";
26
26
-
};
27
27
-
28
28
-
war3path = mkOption {
29
29
-
default = "";
30
30
-
description = ''
31
31
-
The path to your local Warcraft III directory, which must contain war3.exe, storm.dll, and game.dll.
32
32
-
'';
33
33
-
};
34
34
-
35
35
-
mappath = mkOption {
36
36
-
default = "";
37
37
-
description = ''
38
38
-
The path to the directory where you keep your map files. GHost One doesn't require
39
39
-
map files but if it has access to them it can send them to players and automatically
40
40
-
calculate most map config values. GHost One will search [bot_mappath + map_localpath]
41
41
-
for the map file (map_localpath is set in each map's config file).
42
42
-
'';
43
43
-
};
44
44
-
45
45
-
config = mkOption {
46
46
-
default = "";
47
47
-
description = "Extra configuration options.";
48
48
-
};
49
49
-
50
50
-
};
51
51
-
};
52
52
-
53
53
-
###### implementation
54
54
-
55
55
-
config = mkIf cfg.enable {
56
56
-
57
57
-
users.extraUsers = singleton
58
58
-
{ name = ghostUser;
59
59
-
uid = config.ids.uids.ghostone;
60
60
-
description = "Ghost One game server user";
61
61
-
home = stateDir;
62
62
-
};
63
63
-
64
64
-
users.extraGroups = singleton
65
65
-
{ name = ghostUser;
66
66
-
gid = config.ids.gids.ghostone;
67
67
-
};
68
68
-
69
69
-
services.ghostOne.config = ''
70
70
-
# bot_log = /dev/stderr
71
71
-
bot_language = ${pkgs.ghostOne}/share/ghost-one/languages/${cfg.language}.cfg
72
72
-
bot_war3path = ${cfg.war3path}
73
73
-
74
74
-
bot_mapcfgpath = mapcfgs
75
75
-
bot_savegamepath = savegames
76
76
-
bot_mappath = ${cfg.mappath}
77
77
-
bot_replaypath = replays
78
78
-
'';
79
79
-
80
80
-
systemd.services."ghost-one" = {
81
81
-
wantedBy = [ "multi-user.target" ];
82
82
-
script = ''
83
83
-
mkdir -p ${stateDir}
84
84
-
cd ${stateDir}
85
85
-
chown ${ghostUser}:${ghostUser} .
86
86
-
87
87
-
mkdir -p mapcfgs
88
88
-
chown ${ghostUser}:${ghostUser} mapcfgs
89
89
-
90
90
-
mkdir -p replays
91
91
-
chown ${ghostUser}:${ghostUser} replays
92
92
-
93
93
-
mkdir -p savegames
94
94
-
chown ${ghostUser}:${ghostUser} savegames
95
95
-
96
96
-
ln -sf ${pkgs.writeText "ghost.cfg" cfg.config} ghost.cfg
97
97
-
ln -sf ${pkgs.ghostOne}/share/ghost-one/ip-to-country.csv
98
98
-
${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${ghostUser} \
99
99
-
-c "LANG=C ${pkgs.ghostOne}/bin/ghost++"
100
100
-
'';
101
101
-
};
102
102
-
103
103
-
};
104
104
-
105
105
-
}
-55
pkgs/servers/games/ghost-one/default.nix
···
1
1
-
{ stdenv, fetchurl, unzip, gmp, zlib, bzip2, boost, mysql }:
2
2
-
stdenv.mkDerivation rec {
3
3
-
4
4
-
name = "ghost-one-${version}";
5
5
-
version = "1.7.265";
6
6
-
7
7
-
src = fetchurl {
8
8
-
url = "http://www.maxdevlon.com/ghost/ghostone${version}.zip";
9
9
-
sha256 = "1sm2ca3lcdr4vjg7v94d8zhqz8cdp44rg8yinzzwkgsr0hj74fv2";
10
10
-
};
11
11
-
12
12
-
buildInputs = [ unzip gmp zlib bzip2 boost mysql.connector-c ];
13
13
-
14
14
-
patchPhase = ''
15
15
-
substituteInPlace ghost/Makefile --replace "/usr/local/lib/mysql" \
16
16
-
"${mysql.connector-c}/lib/mariadb"
17
17
-
'';
18
18
-
19
19
-
buildPhase = ''
20
20
-
cd bncsutil/src/bncsutil
21
21
-
make
22
22
-
cd ../../../StormLib/stormlib/
23
23
-
make
24
24
-
mkdir -p $out/lib
25
25
-
cd ../..
26
26
-
# cp bncsutil/src/bncsutil/libbncutil.so $out/lib
27
27
-
# cp StormLib/stormlib/libStorm.so $out/lib
28
28
-
cd ghost
29
29
-
make
30
30
-
cd ..
31
31
-
'';
32
32
-
33
33
-
installPhase = ''
34
34
-
mkdir -p $out/lib
35
35
-
cp bncsutil/src/bncsutil/libbncsutil.so $out/lib
36
36
-
cp StormLib/stormlib/libStorm.so $out/lib
37
37
-
38
38
-
mkdir -p $out/bin
39
39
-
cp ghost/ghost++ $out/bin
40
40
-
41
41
-
mkdir -p $out/share/ghost-one/languages
42
42
-
cp -r mapcfgs $out/share/ghost-one
43
43
-
cp Languages/*.cfg $out/share/ghost-one/languages
44
44
-
cp language.cfg $out/share/ghost-one/languages/English.cfg
45
45
-
cp ip-to-country.csv $out/share/ghost-one/
46
46
-
'';
47
47
-
48
48
-
meta = with stdenv.lib; {
49
49
-
homepage = http://www.codelain.com/forum/;
50
50
-
description = "A Warcraft III: Reign of Chaos and Warcraft III: The Frozen Throne game hosting bot";
51
51
-
license = licenses.asl20;
52
52
-
maintainers = [ maintainers.phreedom ];
53
53
-
broken = true; # can't even get downloaded
54
54
-
};
55
55
-
}
-2
pkgs/top-level/all-packages.nix
···
18085
18085
18086
18086
gemrb = callPackage ../games/gemrb { };
18087
18087
18088
18088
-
ghostOne = callPackage ../servers/games/ghost-one { };
18089
18089
-
18090
18088
gl117 = callPackage ../games/gl-117 {};
18091
18089
18092
18090
globulation2 = callPackage ../games/globulation {