tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ja2-stracciatella 0.16.1 -> 0.17.0
Stefan Lau
4 years ago
cf8ebdc9
ec050f16
+102
-327
4 changed files
expand all
collapse all
unified
split
pkgs
games
ja2-stracciatella
Cargo.lock
default.nix
remove-rust-buildstep.patch
top-level
all-packages.nix
-291
pkgs/games/ja2-stracciatella/Cargo.lock
···
1
1
-
[[package]]
2
2
-
name = "aho-corasick"
3
3
-
version = "0.5.3"
4
4
-
source = "registry+https://github.com/rust-lang/crates.io-index"
5
5
-
dependencies = [
6
6
-
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
7
7
-
]
8
8
-
9
9
-
[[package]]
10
10
-
name = "bitflags"
11
11
-
version = "1.0.3"
12
12
-
source = "registry+https://github.com/rust-lang/crates.io-index"
13
13
-
14
14
-
[[package]]
15
15
-
name = "dtoa"
16
16
-
version = "0.4.3"
17
17
-
source = "registry+https://github.com/rust-lang/crates.io-index"
18
18
-
19
19
-
[[package]]
20
20
-
name = "fuchsia-zircon"
21
21
-
version = "0.3.3"
22
22
-
source = "registry+https://github.com/rust-lang/crates.io-index"
23
23
-
dependencies = [
24
24
-
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
25
25
-
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
26
26
-
]
27
27
-
28
28
-
[[package]]
29
29
-
name = "fuchsia-zircon-sys"
30
30
-
version = "0.3.3"
31
31
-
source = "registry+https://github.com/rust-lang/crates.io-index"
32
32
-
33
33
-
[[package]]
34
34
-
name = "getopts"
35
35
-
version = "0.2.18"
36
36
-
source = "registry+https://github.com/rust-lang/crates.io-index"
37
37
-
dependencies = [
38
38
-
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
39
39
-
]
40
40
-
41
41
-
[[package]]
42
42
-
name = "itoa"
43
43
-
version = "0.4.2"
44
44
-
source = "registry+https://github.com/rust-lang/crates.io-index"
45
45
-
46
46
-
[[package]]
47
47
-
name = "kernel32-sys"
48
48
-
version = "0.2.2"
49
49
-
source = "registry+https://github.com/rust-lang/crates.io-index"
50
50
-
dependencies = [
51
51
-
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
52
52
-
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
53
53
-
]
54
54
-
55
55
-
[[package]]
56
56
-
name = "libc"
57
57
-
version = "0.2.42"
58
58
-
source = "registry+https://github.com/rust-lang/crates.io-index"
59
59
-
60
60
-
[[package]]
61
61
-
name = "memchr"
62
62
-
version = "0.1.11"
63
63
-
source = "registry+https://github.com/rust-lang/crates.io-index"
64
64
-
dependencies = [
65
65
-
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
66
66
-
]
67
67
-
68
68
-
[[package]]
69
69
-
name = "proc-macro2"
70
70
-
version = "0.4.6"
71
71
-
source = "registry+https://github.com/rust-lang/crates.io-index"
72
72
-
dependencies = [
73
73
-
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
74
74
-
]
75
75
-
76
76
-
[[package]]
77
77
-
name = "quote"
78
78
-
version = "0.6.3"
79
79
-
source = "registry+https://github.com/rust-lang/crates.io-index"
80
80
-
dependencies = [
81
81
-
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
82
82
-
]
83
83
-
84
84
-
[[package]]
85
85
-
name = "rand"
86
86
-
version = "0.4.2"
87
87
-
source = "registry+https://github.com/rust-lang/crates.io-index"
88
88
-
dependencies = [
89
89
-
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
90
90
-
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
91
91
-
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
92
92
-
]
93
93
-
94
94
-
[[package]]
95
95
-
name = "regex"
96
96
-
version = "0.1.80"
97
97
-
source = "registry+https://github.com/rust-lang/crates.io-index"
98
98
-
dependencies = [
99
99
-
"aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
100
100
-
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
101
101
-
"regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
102
102
-
"thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
103
103
-
"utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
104
104
-
]
105
105
-
106
106
-
[[package]]
107
107
-
name = "regex-syntax"
108
108
-
version = "0.3.9"
109
109
-
source = "registry+https://github.com/rust-lang/crates.io-index"
110
110
-
111
111
-
[[package]]
112
112
-
name = "remove_dir_all"
113
113
-
version = "0.5.1"
114
114
-
source = "registry+https://github.com/rust-lang/crates.io-index"
115
115
-
dependencies = [
116
116
-
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
117
117
-
]
118
118
-
119
119
-
[[package]]
120
120
-
name = "serde"
121
121
-
version = "1.0.70"
122
122
-
source = "registry+https://github.com/rust-lang/crates.io-index"
123
123
-
124
124
-
[[package]]
125
125
-
name = "serde_derive"
126
126
-
version = "1.0.70"
127
127
-
source = "registry+https://github.com/rust-lang/crates.io-index"
128
128
-
dependencies = [
129
129
-
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
130
130
-
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
131
131
-
"syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)",
132
132
-
]
133
133
-
134
134
-
[[package]]
135
135
-
name = "serde_json"
136
136
-
version = "1.0.22"
137
137
-
source = "registry+https://github.com/rust-lang/crates.io-index"
138
138
-
dependencies = [
139
139
-
"dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
140
140
-
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
141
141
-
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
142
142
-
]
143
143
-
144
144
-
[[package]]
145
145
-
name = "shell32-sys"
146
146
-
version = "0.1.2"
147
147
-
source = "registry+https://github.com/rust-lang/crates.io-index"
148
148
-
dependencies = [
149
149
-
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
150
150
-
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
151
151
-
]
152
152
-
153
153
-
[[package]]
154
154
-
name = "stracciatella"
155
155
-
version = "0.1.0"
156
156
-
dependencies = [
157
157
-
"getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
158
158
-
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
159
159
-
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
160
160
-
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
161
161
-
"serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
162
162
-
"serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
163
163
-
"shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
164
164
-
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
165
165
-
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
166
166
-
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
167
167
-
]
168
168
-
169
169
-
[[package]]
170
170
-
name = "syn"
171
171
-
version = "0.14.4"
172
172
-
source = "registry+https://github.com/rust-lang/crates.io-index"
173
173
-
dependencies = [
174
174
-
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
175
175
-
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
176
176
-
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
177
177
-
]
178
178
-
179
179
-
[[package]]
180
180
-
name = "tempdir"
181
181
-
version = "0.3.7"
182
182
-
source = "registry+https://github.com/rust-lang/crates.io-index"
183
183
-
dependencies = [
184
184
-
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
185
185
-
"remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
186
186
-
]
187
187
-
188
188
-
[[package]]
189
189
-
name = "thread-id"
190
190
-
version = "2.0.0"
191
191
-
source = "registry+https://github.com/rust-lang/crates.io-index"
192
192
-
dependencies = [
193
193
-
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
194
194
-
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
195
195
-
]
196
196
-
197
197
-
[[package]]
198
198
-
name = "thread_local"
199
199
-
version = "0.2.7"
200
200
-
source = "registry+https://github.com/rust-lang/crates.io-index"
201
201
-
dependencies = [
202
202
-
"thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
203
203
-
]
204
204
-
205
205
-
[[package]]
206
206
-
name = "unicode-width"
207
207
-
version = "0.1.5"
208
208
-
source = "registry+https://github.com/rust-lang/crates.io-index"
209
209
-
210
210
-
[[package]]
211
211
-
name = "unicode-xid"
212
212
-
version = "0.1.0"
213
213
-
source = "registry+https://github.com/rust-lang/crates.io-index"
214
214
-
215
215
-
[[package]]
216
216
-
name = "user32-sys"
217
217
-
version = "0.2.0"
218
218
-
source = "registry+https://github.com/rust-lang/crates.io-index"
219
219
-
dependencies = [
220
220
-
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
221
221
-
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
222
222
-
]
223
223
-
224
224
-
[[package]]
225
225
-
name = "utf8-ranges"
226
226
-
version = "0.1.3"
227
227
-
source = "registry+https://github.com/rust-lang/crates.io-index"
228
228
-
229
229
-
[[package]]
230
230
-
name = "winapi"
231
231
-
version = "0.2.8"
232
232
-
source = "registry+https://github.com/rust-lang/crates.io-index"
233
233
-
234
234
-
[[package]]
235
235
-
name = "winapi"
236
236
-
version = "0.3.5"
237
237
-
source = "registry+https://github.com/rust-lang/crates.io-index"
238
238
-
dependencies = [
239
239
-
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
240
240
-
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
241
241
-
]
242
242
-
243
243
-
[[package]]
244
244
-
name = "winapi-build"
245
245
-
version = "0.1.1"
246
246
-
source = "registry+https://github.com/rust-lang/crates.io-index"
247
247
-
248
248
-
[[package]]
249
249
-
name = "winapi-i686-pc-windows-gnu"
250
250
-
version = "0.4.0"
251
251
-
source = "registry+https://github.com/rust-lang/crates.io-index"
252
252
-
253
253
-
[[package]]
254
254
-
name = "winapi-x86_64-pc-windows-gnu"
255
255
-
version = "0.4.0"
256
256
-
source = "registry+https://github.com/rust-lang/crates.io-index"
257
257
-
258
258
-
[metadata]
259
259
-
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
260
260
-
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
261
261
-
"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd"
262
262
-
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
263
263
-
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
264
264
-
"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797"
265
265
-
"checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606"
266
266
-
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
267
267
-
"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
268
268
-
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
269
269
-
"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6"
270
270
-
"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035"
271
271
-
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
272
272
-
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
273
273
-
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
274
274
-
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
275
275
-
"checksum serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "0c3adf19c07af6d186d91dae8927b83b0553d07ca56cbf7f2f32560455c91920"
276
276
-
"checksum serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3525a779832b08693031b8ecfb0de81cd71cfd3812088fafe9a7496789572124"
277
277
-
"checksum serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "84b8035cabe9b35878adec8ac5fe03d5f6bc97ff6edd7ccb96b44c1276ba390e"
278
278
-
"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c"
279
279
-
"checksum syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2beff8ebc3658f07512a413866875adddd20f4fd47b2a4e6c9da65cd281baaea"
280
280
-
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
281
281
-
"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
282
282
-
"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5"
283
283
-
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
284
284
-
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
285
285
-
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
286
286
-
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
287
287
-
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
288
288
-
"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
289
289
-
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
290
290
-
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
291
291
-
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+34
-22
pkgs/games/ja2-stracciatella/default.nix
···
1
1
-
{ stdenv, fetchFromGitHub, cmake, SDL2, boost, fltk, rustPlatform }:
1
1
+
{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, python, rustPlatform, SDL2, fltk, rapidjson, gtest, Carbon, Cocoa }:
2
2
let
3
3
-
version = "0.16.1";
3
3
+
version = "0.17.0";
4
4
src = fetchFromGitHub {
5
5
owner = "ja2-stracciatella";
6
6
repo = "ja2-stracciatella";
7
7
rev = "v${version}";
8
8
-
sha256 = "1pyn23syg70kiyfbs3pdlq0ixd2bxhncbamnic43rym3dmd52m29";
9
9
-
};
10
10
-
lockfile = ./Cargo.lock;
11
11
-
libstracciatellaSrc = stdenv.mkDerivation {
12
12
-
name = "libstracciatella-${version}-src";
13
13
-
src = "${src}/rust";
14
14
-
installPhase = ''
15
15
-
mkdir -p $out
16
16
-
cp -R ./* $out/
17
17
-
cp ${lockfile} $out/Cargo.lock
18
18
-
'';
8
8
+
sha256 = "0m6rvgkba29jy3yq5hs1sn26mwrjl6mamqnv4plrid5fqaivhn6j";
19
9
};
20
10
libstracciatella = rustPlatform.buildRustPackage {
21
11
pname = "libstracciatella";
22
12
inherit version;
23
23
-
src = libstracciatellaSrc;
24
24
-
cargoSha256 = "15djs4xaz4y1hpfyfqxdgdasxr0b5idy9i5a7c8cmh0jkxjv8bqc";
25
25
-
doCheck = false;
13
13
+
src = "${src}/rust";
14
14
+
cargoSha256 = "0blb971cv9k6c460mwq3zq8vih687bdnb39b9gph1hr90pxjviba";
15
15
+
16
16
+
preBuild = ''
17
17
+
mkdir -p $out/include/stracciatella
18
18
+
export HEADER_LOCATION=$out/include/stracciatella/stracciatella.h
19
19
+
'';
20
20
+
};
21
21
+
stringTheoryUrl = "https://github.com/zrax/string_theory/archive/3.1.tar.gz";
22
22
+
stringTheory = fetchurl {
23
23
+
url = stringTheoryUrl;
24
24
+
sha256 = "1flq26kkvx2m1yd38ldcq2k046yqw07jahms8a6614m924bmbv41";
26
25
};
27
26
in
28
27
stdenv.mkDerivation {
29
28
pname = "ja2-stracciatella";
30
30
-
inherit src;
31
31
-
inherit version;
29
29
+
inherit src version;
32
30
33
33
-
nativeBuildInputs = [ cmake ];
34
34
-
buildInputs = [ SDL2 fltk boost ];
31
31
+
nativeBuildInputs = [ cmake python ];
32
32
+
buildInputs = [ SDL2 fltk rapidjson gtest ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
35
33
36
34
patches = [
37
35
./remove-rust-buildstep.patch
38
36
];
39
37
40
38
preConfigure = ''
41
41
-
sed -i -e 's|rust-stracciatella|${libstracciatella}/lib/libstracciatella.so|g' CMakeLists.txt
42
42
-
cmakeFlagsArray+=("-DEXTRA_DATA_DIR=$out/share/ja2")
39
39
+
# Use rust library built with nix
40
40
+
substituteInPlace CMakeLists.txt \
41
41
+
--replace lib/libstracciatella_c_api.a ${libstracciatella}/lib/libstracciatella_c_api.a \
42
42
+
--replace include/stracciatella ${libstracciatella}/include/stracciatella \
43
43
+
--replace bin/ja2-resource-pack ${libstracciatella}/bin/ja2-resource-pack
44
44
+
45
45
+
# Patch dependencies that are usually loaded by url
46
46
+
substituteInPlace dependencies/lib-string_theory/builder/CMakeLists.txt.in \
47
47
+
--replace ${stringTheoryUrl} file://${stringTheory}
48
48
+
49
49
+
cmakeFlagsArray+=("-DLOCAL_RAPIDJSON_LIB=OFF" "-DLOCAL_GTEST_LIB=OFF" "-DEXTRA_DATA_DIR=$out/share/ja2")
50
50
+
'';
51
51
+
52
52
+
doInstallCheck = true;
53
53
+
installCheckPhase = ''
54
54
+
HOME=/tmp $out/bin/ja2 -unittests
43
55
'';
44
56
45
57
meta = {
+65
-13
pkgs/games/ja2-stracciatella/remove-rust-buildstep.patch
···
1
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
-
index f354370e0..c9fa23c6d 100644
2
2
+
index e4e5547af..a3017d197 100644
3
3
--- a/CMakeLists.txt
4
4
+++ b/CMakeLists.txt
5
5
-
@@ -159,7 +159,6 @@ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/externalized")
5
5
+
@@ -175,13 +175,12 @@ if(BUILD_LAUNCHER)
6
6
+
endif()
7
7
+
message(STATUS "Fltk Libraries: ${FLTK_LIBRARIES}")
8
8
+
9
9
+
-set(JA2_INCLUDES "")
10
10
+
+set(JA2_INCLUDES "include/stracciatella")
11
11
+
set(JA2_SOURCES "")
12
12
+
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/externalized")
6
13
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/game")
7
14
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/sgp")
8
8
-
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/slog")
9
9
-
-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/rust")
10
15
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-smacker")
11
11
-
16
16
+
-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-stracciatella")
17
17
+
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-string_theory")
18
18
+
19
19
+
if(BUILD_LAUNCHER)
20
20
+
@@ -239,14 +238,12 @@ string(LENGTH "${CMAKE_SOURCE_DIR}/src/" SOURCE_PATH_SIZE)
21
21
+
add_definitions("-DSOURCE_PATH_SIZE=${SOURCE_PATH_SIZE}")
22
22
+
23
23
+
add_executable(${JA2_BINARY} ${JA2_SOURCES})
24
24
+
-target_link_libraries(${JA2_BINARY} ${SDL2_LIBRARY} ${GTEST_LIBRARIES} smacker ${STRACCIATELLA_LIBRARIES} string_theory-internal)
25
25
+
-add_dependencies(${JA2_BINARY} stracciatella)
26
26
+
+target_link_libraries(${JA2_BINARY} ${SDL2_LIBRARY} ${GTEST_LIBRARIES} smacker lib/libstracciatella_c_api.a dl pthread string_theory-internal)
27
27
+
set_property(SOURCE ${CMAKE_SOURCE_DIR}/src/game/GameVersion.cc APPEND PROPERTY COMPILE_DEFINITIONS "GAME_VERSION=v${ja2-stracciatella_VERSION}")
28
28
+
12
29
if(BUILD_LAUNCHER)
13
13
-
@@ -235,8 +234,6 @@ copy_assets_dir_to_ja2_binary_after_build("externalized")
14
14
-
copy_assets_dir_to_ja2_binary_after_build("unittests")
15
15
-
copy_assets_dir_to_ja2_binary_after_build("mods")
16
16
-
17
17
-
-get_property(STRACCIATELLA_SHARED_LIB TARGET rust-stracciatella PROPERTY IMPORTED_LOCATION)
30
30
+
add_executable(${LAUNCHER_BINARY} ${LAUNCHER_SOURCES})
31
31
+
- target_link_libraries(${LAUNCHER_BINARY} ${FLTK_LIBRARIES} ${STRACCIATELLA_LIBRARIES} string_theory-internal)
32
32
+
- add_dependencies(${LAUNCHER_BINARY} stracciatella)
33
33
+
+ target_link_libraries(${LAUNCHER_BINARY} ${FLTK_LIBRARIES} lib/libstracciatella_c_api.a dl pthread string_theory-internal)
34
34
+
endif()
35
35
+
36
36
+
macro(copy_assets_dir_to_ja2_binary_after_build DIR)
37
37
+
@@ -375,12 +372,12 @@ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${PACKAGE_
38
38
+
39
39
+
include(CPack)
40
40
+
41
41
+
-if (UNIX AND NOT MINGW AND NOT APPLE)
42
42
+
+if (UNIX)
43
43
+
install(TARGETS ${JA2_BINARY} RUNTIME DESTINATION bin)
44
44
+
if(BUILD_LAUNCHER)
45
45
+
install(TARGETS ${LAUNCHER_BINARY} RUNTIME DESTINATION bin)
46
46
+
endif()
47
47
+
- install(PROGRAMS "${CMAKE_BINARY_DIR}/lib-stracciatella/bin/ja2-resource-pack${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
48
48
+
+ install(PROGRAMS "bin/ja2-resource-pack" DESTINATION bin)
49
49
+
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/externalized assets/mods assets/unittests DESTINATION share/ja2)
50
50
+
if(WITH_EDITOR_SLF)
51
51
+
install(FILES "${EDITORSLF_FILE}" DESTINATION share/ja2)
52
52
+
@@ -400,7 +397,7 @@ else()
53
53
+
if(BUILD_LAUNCHER)
54
54
+
install(TARGETS ${LAUNCHER_BINARY} RUNTIME DESTINATION .)
55
55
+
endif()
56
56
+
- install(PROGRAMS "${CMAKE_BINARY_DIR}/lib-stracciatella/bin/ja2-resource-pack${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION .)
57
57
+
+ install(PROGRAMS "bin/ja2-resource-pack" DESTINATION .)
58
58
+
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/externalized assets/mods assets/unittests DESTINATION .)
59
59
+
if(WITH_EDITOR_SLF)
60
60
+
install(FILES "${EDITORSLF_FILE}" DESTINATION .)
61
61
+
@@ -428,12 +425,6 @@ if (MINGW)
62
62
+
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install-dlls-mingw.cmake")
63
63
+
endif()
64
64
+
65
65
+
-if(APPLE)
66
66
+
- file(GLOB APPLE_DIST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/assets/distr-files-mac/*.txt")
67
67
+
- install(FILES ${APPLE_DIST_FILES} DESTINATION .)
68
68
+
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.8-macos/SDL2.framework DESTINATION .)
69
69
+
-endif()
18
70
-
19
19
-
if (MSVC OR APPLE)
20
20
-
add_custom_command(TARGET ${JA2_BINARY} POST_BUILD
21
21
-
COMMAND ${CMAKE_COMMAND} -E copy
71
71
+
## Uninstall
72
72
+
73
73
+
add_custom_templated_target("uninstall")
+3
-1
pkgs/top-level/all-packages.nix
···
27684
27684
27685
27685
ivan = callPackage ../games/ivan { };
27686
27686
27687
27687
-
ja2-stracciatella = callPackage ../games/ja2-stracciatella { };
27687
27687
+
ja2-stracciatella = callPackage ../games/ja2-stracciatella {
27688
27688
+
inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
27689
27689
+
};
27688
27690
27689
27691
katago = callPackage ../games/katago { };
27690
27692