Commit | Line | Data |
---|---|---|
6cb89466 TČ |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz> | |
f586c877 | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
bc64d955 | 4 | ;;; Copyright © 2015, 2018, 2021 Ludovic Courtès <ludo@gnu.org> |
a6dec13b | 5 | ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com> |
68c6110c | 6 | ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org> |
920a3639 | 7 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> |
762c89fb | 8 | ;;; Copyright © 2016, 2017, 2020 Kei Kebreau <kkebreau@posteo.net> |
cd528946 | 9 | ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
cd6ae1ce | 10 | ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com> |
d6660ef6 | 11 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
42d0d13d | 12 | ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> |
194b4e7d | 13 | ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com> |
3c399e9b | 14 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
6bc30a57 | 15 | ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com> |
5b8d2ace | 16 | ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> |
4041fabb | 17 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
719bbcc1 | 18 | ;;; Copyright © 2019, 2020, 2021 Liliana Marie Prikler <liliana.prikler@gmail.com> |
328dd9b7 | 19 | ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com> |
dfb67d2c | 20 | ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
d8682615 | 21 | ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si> |
2e0787a5 | 22 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
a0609772 | 23 | ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro> |
2e0ddc74 | 24 | ;;; Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz> |
bd20d178 | 25 | ;;; Copyright © 2020-2021 James Smith <jsubuntuxp@disroot.org> |
60bb0360 | 26 | ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech> |
2b08cc96 | 27 | ;;; Copyright © 2021 Andy Tai <atai@atai.org> |
92faad0a | 28 | ;;; Copyright © 2022 Felix Gruber <felgru@posteo.net> |
6cb89466 TČ |
29 | ;;; |
30 | ;;; This file is part of GNU Guix. | |
31 | ;;; | |
32 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
33 | ;;; under the terms of the GNU General Public License as published by | |
34 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
35 | ;;; your option) any later version. | |
36 | ;;; | |
37 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
38 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
39 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
40 | ;;; GNU General Public License for more details. | |
41 | ;;; | |
42 | ;;; You should have received a copy of the GNU General Public License | |
43 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
44 | ||
45 | (define-module (gnu packages game-development) | |
bd20d178 | 46 | #:use-module ((srfi srfi-1) #:hide (zip)) |
0b5bf615 | 47 | #:use-module (ice-9 match) |
b0910aad | 48 | #:use-module ((guix licenses) #:prefix license:) |
6cb89466 TČ |
49 | #:use-module (guix packages) |
50 | #:use-module (guix download) | |
2a068aec | 51 | #:use-module (guix git-download) |
4041fabb | 52 | #:use-module (guix svn-download) |
be4d26f5 | 53 | #:use-module (guix utils) |
6cb89466 | 54 | #:use-module (guix build-system cmake) |
b0910aad | 55 | #:use-module (guix build-system gnu) |
4bc37bf0 | 56 | #:use-module (guix build-system python) |
92b51d12 | 57 | #:use-module (guix build-system scons) |
b0910aad | 58 | #:use-module (gnu packages) |
1297bc05 | 59 | #:use-module (gnu packages audio) |
c608fe8c | 60 | #:use-module (gnu packages autotools) |
e4ff9dff | 61 | #:use-module (gnu packages base) |
bd20d178 | 62 | #:use-module (gnu packages bash) |
94a66dd9 | 63 | #:use-module (gnu packages boost) |
1297bc05 | 64 | #:use-module (gnu packages compression) |
a0609772 | 65 | #:use-module (gnu packages check) |
2a068aec | 66 | #:use-module (gnu packages curl) |
99828fa7 | 67 | #:use-module (gnu packages documentation) |
531003be | 68 | #:use-module (gnu packages fltk) |
42d0d13d | 69 | #:use-module (gnu packages fonts) |
d2cc38b7 | 70 | #:use-module (gnu packages fontutils) |
324b0040 | 71 | #:use-module (gnu packages freedesktop) |
d2cc38b7 | 72 | #:use-module (gnu packages fribidi) |
255d1bbe | 73 | #:use-module (gnu packages dbm) |
cccab9bf | 74 | #:use-module (gnu packages gettext) |
1297bc05 | 75 | #:use-module (gnu packages gl) |
c24fff61 | 76 | #:use-module (gnu packages glib) |
1297bc05 | 77 | #:use-module (gnu packages gnome) |
c24fff61 | 78 | #:use-module (gnu packages gnunet) |
42d0d13d MR |
79 | #:use-module (gnu packages graphics) |
80 | #:use-module (gnu packages graphviz) | |
1297bc05 | 81 | #:use-module (gnu packages gtk) |
c24fff61 | 82 | #:use-module (gnu packages guile) |
1297bc05 EF |
83 | #:use-module (gnu packages image) |
84 | #:use-module (gnu packages linux) | |
85 | #:use-module (gnu packages lua) | |
c608fe8c | 86 | #:use-module (gnu packages m4) |
7158fe4d | 87 | #:use-module (gnu packages mono) |
1297bc05 | 88 | #:use-module (gnu packages mp3) |
c24fff61 | 89 | #:use-module (gnu packages multiprecision) |
4bc37bf0 | 90 | #:use-module (gnu packages music) |
c24fff61 | 91 | #:use-module (gnu packages ncurses) |
c1bc92c0 | 92 | #:use-module (gnu packages pcre) |
1297bc05 EF |
93 | #:use-module (gnu packages pkg-config) |
94 | #:use-module (gnu packages pulseaudio) | |
4bc37bf0 | 95 | #:use-module (gnu packages python) |
44d10b1f | 96 | #:use-module (gnu packages python-xyz) |
338dfc92 | 97 | #:use-module (gnu packages readline) |
b0910aad | 98 | #:use-module (gnu packages qt) |
1297bc05 | 99 | #:use-module (gnu packages sdl) |
45c552ec | 100 | #:use-module (gnu packages sphinx) |
67c127c9 | 101 | #:use-module (gnu packages stb) |
00fca594 | 102 | #:use-module (gnu packages texinfo) |
2e0787a5 | 103 | #:use-module (gnu packages textutils) |
1297bc05 | 104 | #:use-module (gnu packages tls) |
4bc37bf0 | 105 | #:use-module (gnu packages video) |
451e1075 | 106 | #:use-module (gnu packages web) |
bd20d178 | 107 | #:use-module (gnu packages wxwidgets) |
2a068aec | 108 | #:use-module (gnu packages xdisorg) |
83a4a70b | 109 | #:use-module (gnu packages xiph) |
194b4e7d | 110 | #:use-module (gnu packages xml) |
1297bc05 | 111 | #:use-module (gnu packages xorg)) |
6cb89466 TČ |
112 | |
113 | (define-public bullet | |
114 | (package | |
115 | (name "bullet") | |
2b08cc96 | 116 | (version "3.17") |
6cb89466 | 117 | (source (origin |
fbb456dd EF |
118 | (method git-fetch) |
119 | (uri (git-reference | |
120 | (url "https://github.com/bulletphysics/bullet3/") | |
121 | (commit version))) | |
122 | (file-name (git-file-name name version)) | |
6cb89466 TČ |
123 | (sha256 |
124 | (base32 | |
2b08cc96 | 125 | "0x1ghxbkvqr910sp01sjf4hlfy4sdgn2jx2qf0dsi697bzq1f3mr")) |
fbb456dd EF |
126 | (modules '((guix build utils))) |
127 | (snippet | |
128 | '(begin | |
129 | (for-each delete-file (find-files "build3" "premake*")) | |
130 | (with-directory-excursion "examples/ThirdPartyLibs" | |
131 | (for-each delete-file-recursively | |
132 | '("Gwen" "clsocket" "enet" "glad" "imgui" | |
133 | "lua-5.2.3" "midi" "minizip" "openvr" | |
134 | "optionalX11" "serial" "zlib"))) | |
2b08cc96 | 135 | |
623a0d83 | 136 | ;; Tests fail on linking, cannot find -lBussIK. |
fbb456dd EF |
137 | (substitute* "test/CMakeLists.txt" |
138 | ((" InverseDynamics") | |
139 | "../examples/ThirdPartyLibs/BussIK InverseDynamics")) | |
140 | ; (("SharedMemory") "")) | |
141 | #t)))) | |
6cb89466 | 142 | (build-system cmake-build-system) |
937bc2d1 | 143 | (arguments |
fbb456dd EF |
144 | '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" |
145 | "-DBUILD_CPU_DEMOS=OFF" | |
146 | "-DBUILD_OPENGL3_DEMOS=OFF" | |
147 | "-DBUILD_BULLET2_DEMOS=OFF" | |
dececca2 FG |
148 | ;; openmw 0.47.0 requires bullet to be built with |
149 | ;; double precision. | |
150 | ;; See <https://issues.guix.gnu.org/52953> for | |
151 | ;; more information. | |
152 | "-DUSE_DOUBLE_PRECISION=ON" | |
2b08cc96 AT |
153 | ;; Extras/BulletRoboticsGUI needs files from |
154 | ;; ThirdPartyLibs | |
155 | "-DBUILD_BULLET_ROBOTICS_GUI_EXTRA=OFF" | |
156 | ;; Extras/BulletRobotics needs files from | |
157 | ;; ThirdPartyLibs | |
158 | "-DBUILD_BULLET_ROBOTICS_EXTRA=OFF" | |
fbb456dd EF |
159 | (string-append "-DCMAKE_CXX_FLAGS=-fPIC " |
160 | (or (getenv "CXXFLAGS") ""))) | |
161 | #:phases | |
162 | (modify-phases %standard-phases | |
163 | (add-after 'unpack 'remove-failing-tests | |
623a0d83 | 164 | ;; These tests fail specifically after removing 3rd party code. |
fbb456dd EF |
165 | (lambda _ |
166 | (substitute* "test/SharedMemory/CMakeLists.txt" | |
167 | (("ADD_TEST") "# ADD_TEST")) | |
168 | (substitute* "test/InverseDynamics/CMakeLists.txt" | |
169 | (("ADD_TEST\\(Test_BulletInverseForward") | |
170 | "# ADD_TEST(Test_BulletInverseForward")) | |
171 | #t))))) | |
937bc2d1 | 172 | (inputs |
8394619b | 173 | (list glu libx11 mesa)) |
9b811f69 | 174 | (home-page "https://pybullet.org/wordpress/") |
6cb89466 TČ |
175 | (synopsis "3D physics engine library") |
176 | (description | |
177 | "Bullet is a physics engine library usable for collision detection. It | |
178 | is used in some video games and movies.") | |
b0910aad DT |
179 | (license license:zlib))) |
180 | ||
1a0c4437 KK |
181 | (define-public deutex |
182 | (package | |
183 | (name "deutex") | |
d6660ef6 TGR |
184 | (version "5.2.2") |
185 | (source | |
186 | (origin | |
187 | (method url-fetch) | |
188 | (uri (string-append "https://github.com/Doom-Utils/deutex" | |
189 | "/releases/download/v" version "/" | |
190 | "deutex-" version ".tar.zst")) | |
191 | (sha256 | |
192 | (base32 "0psb2za6ldrlak7s8pjvli98ij5yiwjx8j1ms2v7rj9yadx0xv8h")))) | |
1a0c4437 | 193 | (build-system gnu-build-system) |
5bd80333 | 194 | (inputs |
8394619b | 195 | (list libpng)) |
5bd80333 | 196 | (native-inputs |
8394619b | 197 | (list asciidoc pkg-config zstd)) |
1a0c4437 KK |
198 | (home-page "https://github.com/Doom-Utils/deutex") |
199 | (synopsis "WAD file composer for Doom and related games") | |
200 | (description | |
201 | "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be | |
202 | used to extract the lumps of a wad and save them as individual files. | |
203 | Conversely, it can also build a wad from separate files. When extracting a | |
204 | lump to a file, it does not just copy the raw data, it converts it to an | |
205 | appropriate format (such as PPM for graphics, Sun audio for samples, etc.). | |
206 | Conversely, when it reads files for inclusion in pwads, it does the necessary | |
207 | conversions (for example, from PPM to Doom picture format). In addition, | |
208 | DeuTex has functions such as merging wads, etc.") | |
209 | (license license:gpl2+))) | |
210 | ||
94a66dd9 KK |
211 | (define-public grfcodec |
212 | (package | |
213 | (name "grfcodec") | |
214 | (version "6.0.6") | |
127c7fba NG |
215 | (source |
216 | (origin | |
217 | (method url-fetch) | |
218 | (uri (string-append "https://binaries.openttd.org/extra/" | |
219 | name "/" version "/" name "-" version | |
220 | "-source.tar.xz")) | |
e0559c53 | 221 | (patches (search-patches "grfcodec-gcc-compat.patch")) |
127c7fba NG |
222 | (sha256 |
223 | (base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk")))) | |
94a66dd9 KK |
224 | (build-system gnu-build-system) |
225 | (arguments | |
127c7fba | 226 | '(#:tests? #f ;no check target |
94a66dd9 | 227 | #:phases |
127c7fba NG |
228 | (modify-phases %standard-phases |
229 | (delete 'configure) ;no configure script | |
230 | (replace 'install ;no install target | |
231 | (lambda* (#:key outputs #:allow-other-keys) | |
232 | (let* ((out (assoc-ref outputs "out")) | |
233 | (bin (string-append out "/bin")) | |
234 | (doc (string-append out "/share/doc")) | |
235 | (man (string-append out "/share/man/man1"))) | |
236 | (for-each (lambda (file) | |
237 | (install-file file bin)) | |
238 | '("grfcodec" "grfid" "grfstrip" "nforenum")) | |
239 | (install-file "COPYING" doc) | |
240 | (with-directory-excursion "docs" | |
241 | (for-each (lambda (file) | |
242 | (install-file (string-append file ".txt") doc)) | |
243 | '("auto_correct" "commands" "grf" "grfcodec" "grftut" | |
244 | "readme" "readme.rpn")) | |
245 | (for-each (lambda (file) | |
246 | (install-file file man)) | |
e0559c53 | 247 | (find-files "." "\\.1"))))))))) |
94a66dd9 | 248 | (inputs |
8394619b | 249 | (list boost libpng zlib)) |
94a66dd9 KK |
250 | (synopsis "GRF development tools") |
251 | (description | |
3d77785a | 252 | "The @dfn{Graphics Resource File} (GRF) development tools are a set of |
94a66dd9 KK |
253 | tools for developing (New)GRFs. It includes a number of smaller programs, each |
254 | with a specific task: | |
255 | @enumerate | |
256 | @item @code{grfcodec} decodes and encodes GRF files for OpenTTD. | |
257 | @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF. | |
258 | @item @code{grfstrip} strips all sprites from a GRF. | |
259 | @item @code{nforenum} checks NFO code for errors, making corrections when | |
260 | necessary. | |
261 | @end enumerate") | |
0661638f | 262 | (home-page "https://dev.openttdcoop.org/projects/grfcodec") |
94a66dd9 KK |
263 | ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2. |
264 | ;; NFORenum is under the GPL2+. | |
265 | ;; The MD5 implementation contained in GRFID is under the zlib license. | |
266 | (license (list license:gpl2 license:gpl2+ license:zlib)))) | |
267 | ||
3c399e9b AI |
268 | (define-public catcodec |
269 | (package | |
270 | (name "catcodec") | |
271 | (version "1.0.5") | |
272 | (source | |
273 | (origin | |
274 | (method url-fetch) | |
275 | (uri (string-append "https://binaries.openttd.org/extra/catcodec/" | |
276 | version "/catcodec-" version "-source.tar.xz")) | |
277 | (sha256 | |
2798d5b5 | 278 | (base32 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7")))) |
3c399e9b AI |
279 | (build-system gnu-build-system) |
280 | (arguments | |
281 | `(#:tests? #f ; no tests | |
282 | #:make-flags (list (string-append "prefix=" %output)) | |
283 | #:phases (modify-phases %standard-phases | |
284 | (delete 'configure)))) | |
2798d5b5 | 285 | (home-page "https://dev.openttdcoop.org/projects/catcodec") |
3c399e9b AI |
286 | (synopsis "Encode/decode OpenTTD sounds") |
287 | (description "catcodec encodes and decodes sounds for OpenTTD. These | |
288 | sounds are not much more than some metadata (description and filename) and raw | |
289 | PCM data.") | |
290 | (license license:gpl2))) | |
291 | ||
c24fff61 JG |
292 | (define-public gzochi |
293 | (package | |
294 | (name "gzochi") | |
95878903 | 295 | (version "0.13") |
c24fff61 JG |
296 | (source (origin |
297 | (method url-fetch) | |
298 | (uri (string-append "mirror://savannah/gzochi/gzochi-" | |
299 | version ".tar.gz")) | |
300 | (sha256 | |
301 | (base32 | |
95878903 | 302 | "1vcvf04qqzs3q8kaild2x7qvkwc6bwzfsisb78147b8z747j7hj0")))) |
c24fff61 | 303 | (build-system gnu-build-system) |
1798e9ee LC |
304 | (arguments |
305 | '(#:phases (modify-phases %standard-phases | |
306 | (add-before 'build 'no-Werror | |
307 | (lambda _ | |
308 | ;; Don't abort builds due to things like GLib | |
309 | ;; deprecation warnings. | |
310 | (substitute* (find-files "." "^Makefile\\.in$") | |
311 | (("-Werror") "")) | |
312 | #t))))) | |
c24fff61 | 313 | (native-inputs `(("pkgconfig" ,pkg-config))) |
8394619b LC |
314 | (inputs (list bdb |
315 | glib | |
316 | guile-3.0 | |
317 | libmicrohttpd | |
318 | ncurses | |
319 | sdl | |
320 | zlib)) | |
340978d7 | 321 | (home-page "https://www.nongnu.org/gzochi/") |
c24fff61 JG |
322 | (synopsis "Scalable middleware for multiplayer games") |
323 | (description | |
324 | "gzochi is a framework for developing massively multiplayer online games. | |
325 | A server container provides services to deployed games, which are written in | |
326 | Guile Scheme, that abstract and simplify some of the most challenging and | |
327 | error-prone aspects of online game development: Concurrency, data persistence, | |
328 | and network communications. A very thin client library can be embedded to | |
329 | provide connectivity for client applications written in any language.") | |
330 | (license license:gpl3+))) | |
331 | ||
7357fcf2 KK |
332 | (define-public nml |
333 | (package | |
334 | (name "nml") | |
1f334a5c | 335 | (version "0.5.3") |
7357fcf2 KK |
336 | (source |
337 | (origin | |
338 | (method url-fetch) | |
362ae431 | 339 | (uri (pypi-uri "nml" version)) |
7357fcf2 | 340 | (sha256 |
1f334a5c | 341 | (base32 "0l5pfs8q7jrl3xscqq7pnwh5h5d17fsyjy7xspkc73sa0ayjm9jx")))) |
7357fcf2 | 342 | (build-system python-build-system) |
362ae431 KK |
343 | ;; TODO: Fix test that fails with |
344 | ;; "AttributeError: partially initialized module 'nml.nmlop' has no | |
345 | ;; attribute 'ADD' (most likely due to a circular import)" | |
e877f4d0 | 346 | (arguments |
362ae431 | 347 | '(#:tests? #f)) |
7357fcf2 | 348 | (propagated-inputs |
8394619b | 349 | (list python-pillow python-ply)) |
362ae431 | 350 | (home-page "https://github.com/OpenTTD/nml") |
7357fcf2 KK |
351 | (synopsis "NML compiler") |
352 | (description | |
a7cbe727 | 353 | "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of |
7357fcf2 KK |
354 | compiling NML files (along with their associated language, sound and graphic |
355 | files) into @file{.grf} and/or @file{.nfo} files.") | |
356 | (license license:gpl2+))) | |
357 | ||
762c89fb | 358 | (define-public python-sge |
45f8e7f7 | 359 | (package |
762c89fb | 360 | (name "python-sge") |
ff9c881f | 361 | (version "2.0.post0") |
45f8e7f7 KK |
362 | (source |
363 | (origin | |
364 | (method url-fetch) | |
762c89fb | 365 | (uri (pypi-uri "sge" version)) |
45f8e7f7 KK |
366 | (sha256 |
367 | (base32 | |
ff9c881f | 368 | "0s5d5qzlzfmqb10iyrqi62n36ll94d99xjaznp5ca6dz1b91qkvr")))) |
45f8e7f7 KK |
369 | (build-system python-build-system) |
370 | (propagated-inputs | |
8394619b | 371 | (list python-pygame python-uniseg)) |
762c89fb | 372 | (home-page "https://python-sge.github.io/") |
45f8e7f7 KK |
373 | (synopsis "2D game engine for Python") |
374 | (description | |
375 | "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a | |
ffbe2dc1 | 376 | general-purpose 2D game engine. It takes care of several details for you so |
45f8e7f7 KK |
377 | you can focus on the game itself. This makes more rapid game development |
378 | possible, and it also makes the SGE easy to learn.") | |
379 | (license license:lgpl3+))) | |
380 | ||
1b775fd1 KK |
381 | (define-public python-tmx |
382 | (package | |
383 | (name "python-tmx") | |
95c1324a | 384 | (version "1.10") |
1b775fd1 KK |
385 | (source |
386 | (origin | |
387 | (method url-fetch) | |
be4d26f5 KK |
388 | (uri (string-append "mirror://savannah/python-tmx/" |
389 | (version-major+minor version) "/tmx-" | |
1b775fd1 KK |
390 | version ".tar.gz")) |
391 | (sha256 | |
392 | (base32 | |
95c1324a | 393 | "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0")))) |
1b775fd1 KK |
394 | (build-system python-build-system) |
395 | (propagated-inputs | |
8394619b | 396 | (list python-six)) |
1b775fd1 KK |
397 | (home-page "http://python-tmx.nongnu.org") |
398 | (synopsis "Python library for the @code{Tiled} TMX format") | |
399 | (description | |
400 | "Python TMX reads and writes the @code{Tiled} TMX format in a simple way. | |
401 | This is useful for map editors or generic level editors, and it's also useful | |
402 | for using a map editor or generic level editor like Tiled to edit your game's | |
403 | levels.") | |
404 | (license (list license:asl2.0 | |
405 | ;; Documentation (only available in the source tarball) is | |
406 | ;; under the CC0 license. | |
407 | license:cc0)))) | |
408 | ||
409 | (define-public python2-tmx | |
410 | (let ((python2-tmx (package-with-python2 python-tmx))) | |
411 | (package | |
412 | (inherit python2-tmx) | |
413 | (propagated-inputs | |
8394619b LC |
414 | (modify-inputs (package-propagated-inputs python2-tmx) |
415 | (prepend python2-pathlib)))))) | |
1b775fd1 | 416 | |
e99039b5 KK |
417 | (define-public python-xsge |
418 | (package | |
419 | (name "python-xsge") | |
2110cd13 | 420 | (version "2020.09.07") |
e99039b5 KK |
421 | (source (origin |
422 | (method url-fetch) | |
2110cd13 KK |
423 | (uri (string-append "https://github.com/python-sge/xsge" |
424 | "/releases/download/v" version | |
425 | "/xsge-" version ".zip")) | |
e99039b5 KK |
426 | (sha256 |
427 | (base32 | |
2110cd13 | 428 | "136xgy3f9vw636wxpqbha022avk0wyxw63mm3a2dvwhh90s716f9")))) |
e99039b5 KK |
429 | (build-system python-build-system) |
430 | (arguments | |
431 | '(#:phases | |
432 | (modify-phases %standard-phases | |
433 | ;; xSGE's setup.py script does not support one of the Python build | |
434 | ;; system's default flags, "--single-version-externally-managed". | |
435 | (replace 'install | |
436 | (lambda* (#:key outputs #:allow-other-keys) | |
6e92fba4 KK |
437 | (invoke "python" "setup.py" "install" |
438 | (string-append "--prefix=" (assoc-ref outputs "out")) | |
439 | "--root=/")))) | |
e99039b5 | 440 | #:tests? #f)) ; no check target |
2110cd13 | 441 | (native-inputs |
8394619b | 442 | (list unzip)) |
e99039b5 | 443 | (propagated-inputs |
8394619b | 444 | (list python-sge)) |
2110cd13 | 445 | (home-page "https://python-sge.github.io/") |
e99039b5 KK |
446 | (synopsis "Extensions for the SGE Game Engine") |
447 | (description | |
448 | "xSGE is a collection of modules that make doing certain tasks with the SGE | |
449 | Game Engine easier. In addition to SGE's conveniences, the user has access to a | |
450 | GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format | |
451 | support.") | |
452 | (license license:gpl3+))) | |
453 | ||
bd20d178 JS |
454 | (define-public slade |
455 | (package | |
456 | (name "slade") | |
457 | (version "3.1.13") | |
458 | (source | |
459 | (origin | |
460 | (method git-fetch) | |
461 | (uri (git-reference | |
462 | (url "https://github.com/sirjuddington/SLADE") | |
463 | (commit version))) | |
464 | (sha256 (base32 "009yc5m6y074wfalvwbrnv2zsmaf9yhbi8hzgs973di0zqnqv011")) | |
465 | (file-name (git-file-name name version)))) | |
466 | (build-system cmake-build-system) | |
467 | (arguments | |
468 | '(#:configure-flags | |
469 | (list "-DWX_GTK3=ON" "-DNO_WEBVIEW=ON" | |
470 | (string-append "-DWITH_WXPATH=" | |
471 | (assoc-ref %build-inputs "wxwidgets") "/bin") | |
472 | (string-append "-DwxWidgets_LIBRARIES=" | |
473 | (assoc-ref %build-inputs "wxwidgets") "/lib")) | |
474 | #:phases | |
475 | (modify-phases %standard-phases | |
476 | (add-before 'build 'reset-slade.pk3-timestamps | |
477 | ;; This is neccessary to make slade reproducible due to | |
478 | ;; <https://bugs.gnu.org/44741>. TODO: Remove on next core update | |
479 | ;; cycle. | |
480 | (lambda _ | |
481 | (invoke "find" "../source/dist/res" "-exec" "touch" | |
482 | "--no-dereference" "-t" "197001010000.00" "{}" | |
483 | "+"))) | |
484 | (add-after 'install 'wrap-with-x11-gdk-backend | |
485 | ;; Set GDK_BACKEND to x11 to prevent crash on Wayland. | |
486 | ;; See https://github.com/sirjuddington/SLADE/issues/1097 for details. | |
487 | (lambda* (#:key outputs #:allow-other-keys) | |
488 | (wrap-program | |
489 | (string-append (assoc-ref outputs "out") | |
490 | "/bin/slade") | |
491 | '("GDK_BACKEND" = ("x11")))))) | |
492 | #:tests? #f)) ;; No test suite. | |
493 | (inputs | |
494 | `(("bash" ,bash-minimal) | |
495 | ("curl" ,curl) | |
496 | ("fluidsynth" ,fluidsynth) | |
497 | ("freeimage" ,freeimage) | |
498 | ("ftgl" ,ftgl) | |
499 | ("glew" ,glew) | |
500 | ("gtk+" ,gtk+) | |
501 | ("sfml" ,sfml) | |
502 | ("wxwidgets" ,wxwidgets-3.1))) | |
503 | (native-inputs | |
8394619b | 504 | (list pkg-config which zip)) |
bd20d178 JS |
505 | (home-page "https://slade.mancubus.net") |
506 | (synopsis "Doom game data editor") | |
507 | (description "SLADE3 is a modern editor for Doom-engine based games and | |
508 | source ports. It has the ability to view, modify, and write many different game- | |
509 | specific formats, and even convert between some of them, or from/to other generic | |
510 | formats such as PNG.") | |
511 | (license license:gpl2+))) | |
512 | ||
b0910aad DT |
513 | (define-public tiled |
514 | (package | |
515 | (name "tiled") | |
8a3bcbec | 516 | (version "1.7.2") |
b0910aad | 517 | (source (origin |
902068b4 RW |
518 | (method git-fetch) |
519 | (uri (git-reference | |
b0e7b699 | 520 | (url "https://github.com/bjorn/tiled") |
902068b4 RW |
521 | (commit (string-append "v" version)))) |
522 | (file-name (git-file-name name version)) | |
b0910aad DT |
523 | (sha256 |
524 | (base32 | |
8a3bcbec | 525 | "1ifxh3sv6gz32gahgi7ba0ivcw5mfgwnrw6iycpav150w9xla43i")))) |
b0910aad | 526 | (build-system gnu-build-system) |
864cc7ef | 527 | (inputs |
8394619b | 528 | (list qtbase-5 qtdeclarative qtsvg zlib)) |
864cc7ef | 529 | (native-inputs |
8394619b | 530 | (list qttools)) |
b0910aad DT |
531 | (arguments |
532 | '(#:phases | |
d06fc008 EF |
533 | (modify-phases %standard-phases |
534 | (replace 'configure | |
864cc7ef RW |
535 | (lambda* (#:key inputs outputs #:allow-other-keys) |
536 | (substitute* "translations/translations.pro" | |
537 | (("LRELEASE =.*") | |
538 | (string-append "LRELEASE = " | |
539 | (assoc-ref inputs "qttools") | |
540 | "/bin/lrelease\n"))) | |
d06fc008 | 541 | (let ((out (assoc-ref outputs "out"))) |
9dafb647 KK |
542 | (invoke "qmake" |
543 | (string-append "PREFIX=" out)))))))) | |
88b028f3 | 544 | (home-page "https://www.mapeditor.org/") |
b0910aad DT |
545 | (synopsis "Tile map editor") |
546 | (description | |
547 | "Tiled is a general purpose tile map editor. It is meant to be used for | |
548 | editing maps of any tile-based game, be it an RPG, a platformer or a Breakout | |
549 | clone.") | |
550 | ||
551 | ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is | |
552 | ;; under BSD-2. | |
553 | (license license:gpl2+))) | |
5809ffcc | 554 | |
3e072a59 LP |
555 | (define-public tsukundere |
556 | (package | |
557 | (name "tsukundere") | |
5464af07 | 558 | (version "0.4.1") |
3e072a59 LP |
559 | (source (origin |
560 | (method git-fetch) | |
561 | (uri (git-reference | |
c4595fde | 562 | (url "https://gitlab.com/lilyp/tsukundere") |
3e072a59 LP |
563 | (commit version))) |
564 | (file-name (git-file-name name version)) | |
565 | (sha256 | |
566 | (base32 | |
5464af07 | 567 | "11glghnff27rqh2s34g51afg93g3f5ryfz9mkyb7qj35ngl8vw5f")))) |
3e072a59 | 568 | (build-system gnu-build-system) |
1e1e6ebf | 569 | (arguments |
13b13190 LP |
570 | `(#:modules ((ice-9 match) |
571 | (srfi srfi-1) | |
572 | ((guix build guile-build-system) | |
1e1e6ebf LP |
573 | #:select (target-guile-effective-version)) |
574 | ,@%gnu-build-system-modules) | |
575 | #:imported-modules ((guix build guile-build-system) | |
576 | ,@%gnu-build-system-modules) | |
577 | #:phases | |
578 | (modify-phases %standard-phases | |
579 | (add-after 'unpack 'patch-command | |
13b13190 LP |
580 | (lambda* (#:key inputs outputs #:allow-other-keys) |
581 | (let* ((scm (lambda (in) | |
582 | (string-append in "/share/guile/site/" | |
583 | (target-guile-effective-version)))) | |
584 | (ccache (lambda (in) | |
585 | (string-append in "/lib/guile/" | |
586 | (target-guile-effective-version) | |
587 | "/site-ccache"))) | |
588 | (pkgs | |
589 | (cons | |
590 | (assoc-ref outputs "out") | |
591 | (filter-map | |
592 | (match-lambda | |
593 | (("guile" . pkg) pkg) | |
594 | ((label . pkg) | |
595 | (and (string-prefix? "guile-" label) pkg))) | |
596 | inputs)))) | |
5464af07 | 597 | (substitute* "tsukundere.scm" |
13b13190 | 598 | (("exec guile (.*)" _ args) |
1e1e6ebf | 599 | (string-append |
dd9fa204 LMP |
600 | ;; XXX: Prevent Guile-SDL2 from blowing up by not knowing |
601 | ;; where the SDL2 libaries are. | |
602 | "unset LD_LIBRARY_PATH\n" | |
13b13190 LP |
603 | (format #f "export GUILE_LOAD_PATH=\"~@?\"~%" |
604 | "~{~a~^:~}" (map scm pkgs)) | |
605 | (format #f "export GUILE_LOAD_COMPILED_PATH=\"~@?\"~%" | |
606 | "~{~a~^:~}" (map ccache pkgs)) | |
607 | "exec " | |
608 | (assoc-ref inputs "guile") | |
609 | "/bin/guile " args))) | |
1e1e6ebf | 610 | #t)))))) |
3e072a59 | 611 | (native-inputs |
ce10e2b3 | 612 | `(("autoconf" ,autoconf) |
3e072a59 | 613 | ("automake" ,automake) |
cccab9bf | 614 | ("gettext" ,gettext-minimal) |
3e072a59 | 615 | ("guile" ,guile-3.0) |
5464af07 | 616 | ("libtool" ,libtool) |
1e1e6ebf LP |
617 | ("pkg-config" ,pkg-config) |
618 | ("texinfo" ,texinfo))) | |
13b13190 LP |
619 | (inputs |
620 | `(("guile-sdl2" ,guile3.0-sdl2) | |
5464af07 LMP |
621 | ("guile" ,guile-3.0) |
622 | ("pango" ,pango) | |
623 | ("sdl2" ,sdl2))) | |
c4595fde | 624 | (home-page "https://gitlab.com/lilyp/tsukundere") |
3e072a59 LP |
625 | (synopsis "Visual novel engine") |
626 | (description "Tsukundere is a game engine geared heavily towards the | |
627 | development of visual novels, written on top of Guile-SDL2. It is still | |
1e1e6ebf | 628 | experimental.") |
3e072a59 LP |
629 | (license license:lgpl3+))) |
630 | ||
5809ffcc DT |
631 | (define-public sfml |
632 | (package | |
633 | (name "sfml") | |
9ac59ad3 | 634 | (version "2.5.1") |
5809ffcc | 635 | (source (origin |
95f6adae | 636 | (method git-fetch) |
7d1b5022 RW |
637 | ;; Do not fetch the archives from |
638 | ;; http://mirror0.sfml-dev.org/files/ because files there seem | |
639 | ;; to be changed in place. | |
95f6adae | 640 | (uri (git-reference |
b0e7b699 | 641 | (url "https://github.com/SFML/SFML") |
95f6adae TGR |
642 | (commit version))) |
643 | (file-name (git-file-name name version)) | |
5809ffcc DT |
644 | (sha256 |
645 | (base32 | |
9ac59ad3 | 646 | "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay")) |
67c127c9 MB |
647 | (modules '((guix build utils))) |
648 | (snippet | |
649 | '(begin | |
650 | ;; Ensure system libraries are used. | |
651 | (delete-file-recursively "extlibs") | |
652 | #t)))) | |
5809ffcc DT |
653 | (build-system cmake-build-system) |
654 | (arguments | |
a6e25a50 | 655 | '(#:configure-flags |
0bc27248 MB |
656 | (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE" |
657 | "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig") | |
a6e25a50 | 658 | #:tests? #f)) ; no tests |
0bc27248 | 659 | (native-inputs |
8394619b | 660 | (list pkg-config)) |
5809ffcc DT |
661 | (inputs |
662 | `(("mesa" ,mesa) | |
663 | ("glew" ,glew) | |
664 | ("libx11" ,libx11) | |
240f2785 | 665 | ("xcb-util-image" ,xcb-util-image) |
5809ffcc DT |
666 | ("libxrandr" ,libxrandr) |
667 | ("eudev" ,eudev) | |
4bd428a7 | 668 | ("libjpeg" ,libjpeg-turbo) |
67c127c9 MB |
669 | ("libsndfile" ,libsndfile) |
670 | ("stb-image" ,stb-image) | |
671 | ("stb-image-write" ,stb-image-write))) | |
0bc27248 MB |
672 | (propagated-inputs |
673 | ;; In Requires.private of pkg-config files. | |
8394619b | 674 | (list flac freetype libvorbis openal)) |
167f0e82 | 675 | (home-page "https://www.sfml-dev.org") |
5809ffcc DT |
676 | (synopsis "Simple and Fast Multimedia Library") |
677 | (description | |
678 | "SFML provides a simple interface to the various computer components, | |
679 | to ease the development of games and multimedia applications. It is composed | |
680 | of five modules: system, window, graphics, audio and network.") | |
681 | (license license:zlib))) | |
d620ea88 DT |
682 | |
683 | (define-public sfxr | |
684 | (package | |
685 | (name "sfxr") | |
686 | (version "1.2.1") | |
687 | (source (origin | |
688 | (method url-fetch) | |
689 | (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) | |
690 | (sha256 | |
691 | (base32 | |
692 | "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) | |
693 | (build-system gnu-build-system) | |
694 | (arguments | |
695 | `(#:phases (modify-phases %standard-phases | |
696 | (delete 'configure) ; no configure script | |
697 | (add-before 'build 'patch-makefile | |
698 | (lambda* (#:key outputs #:allow-other-keys) | |
699 | (let ((out (assoc-ref outputs "out"))) | |
700 | (substitute* "Makefile" | |
701 | (("\\$\\(DESTDIR\\)/usr") out)) | |
702 | (substitute* "main.cpp" | |
703 | (("/usr/share") | |
704 | (string-append out "/share"))) | |
705 | #t)))) | |
706 | #:tests? #f)) ; no tests | |
707 | (native-inputs | |
8394619b | 708 | (list pkg-config desktop-file-utils)) |
d620ea88 | 709 | (inputs |
8394619b | 710 | (list sdl gtk+)) |
d620ea88 DT |
711 | (synopsis "Simple sound effect generator") |
712 | (description "Sfxr is a tool for quickly generating simple sound effects. | |
713 | Originally created for use in video game prototypes, it can generate random | |
714 | sounds from presets such as \"explosion\" or \"powerup\".") | |
715 | (home-page "http://www.drpetter.se/project_sfxr.html") | |
716 | (license license:expat))) | |
0f6139b1 | 717 | |
540d41d8 TL |
718 | (define-public surgescript |
719 | (package | |
720 | (name "surgescript") | |
94466f95 | 721 | (version "0.5.5") |
540d41d8 TL |
722 | (source |
723 | (origin | |
724 | (method git-fetch) | |
725 | (uri (git-reference | |
b0e7b699 | 726 | (url "https://github.com/alemart/surgescript") |
540d41d8 TL |
727 | (commit (string-append "v" version)))) |
728 | (file-name (git-file-name name version)) | |
729 | (sha256 | |
94466f95 | 730 | (base32 "0xwd4g7n0b0rxkpbyshkzyl472h1y606ghyvf8gv034n3jz2g4jk")))) |
540d41d8 TL |
731 | (build-system cmake-build-system) |
732 | (arguments | |
733 | '(#:configure-flags | |
734 | (let ((share (string-append (assoc-ref %outputs "out") "/share"))) | |
497a4646 TGR |
735 | (list "-DWANT_STATIC=NO" |
736 | (string-append "-DICON_PATH=" share "/pixmaps") | |
540d41d8 TL |
737 | (string-append "-DMETAINFO_PATH=" share "/metainfo"))) |
738 | #:tests? #f)) | |
739 | (home-page "https://docs.opensurge2d.org") | |
740 | (synopsis "Scripting language for games") | |
741 | (description "@code{SurgeScript} is a dynamically typed object-oriented | |
742 | scripting language designed for games. Each object is a state machine that | |
743 | can be customized by attaching other objects. The language supports automatic | |
744 | garbage collection and can be extended with plugins.") | |
745 | (license license:asl2.0))) | |
746 | ||
0f6139b1 AK |
747 | (define-public physfs |
748 | (package | |
749 | (name "physfs") | |
d00a8b84 | 750 | (version "3.0.2") |
0f6139b1 AK |
751 | (source (origin |
752 | (method url-fetch) | |
753 | (uri (string-append | |
167f0e82 | 754 | "https://icculus.org/physfs/downloads/physfs-" |
0f6139b1 AK |
755 | version ".tar.bz2")) |
756 | (file-name (string-append name "-" version ".tar.gz")) | |
757 | (sha256 | |
758 | (base32 | |
d00a8b84 | 759 | "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h")))) |
0f6139b1 AK |
760 | (build-system cmake-build-system) |
761 | (arguments | |
08e977d2 | 762 | '(#:tests? #f ; no check target |
a904223e | 763 | #:configure-flags '("-DPHYSFS_BUILD_STATIC=OFF") |
08e977d2 MB |
764 | #:phases (modify-phases %standard-phases |
765 | (add-after 'unpack 'patch-CMakeLists.txt | |
766 | (lambda _ | |
767 | (substitute* "CMakeLists.txt" | |
768 | ;; XXX: For some reason CMakeLists.txt disables | |
769 | ;; RUNPATH manipulation when the compiler is GCC. | |
770 | (("CMAKE_COMPILER_IS_GNUCC") "FALSE")) | |
771 | #t))))) | |
0f6139b1 | 772 | (inputs |
8394619b | 773 | (list zlib)) |
0f6139b1 | 774 | (native-inputs |
8394619b | 775 | (list doxygen)) |
167f0e82 | 776 | (home-page "https://icculus.org/physfs") |
0f6139b1 AK |
777 | (synopsis "File system abstraction library") |
778 | (description | |
779 | "PhysicsFS is a library to provide abstract access to various archives. | |
780 | It is intended for use in video games. For security, no file writing done | |
781 | through the PhysicsFS API can leave a defined @emph{write directory}. For | |
782 | file reading, a @emph{search path} with archives and directories is defined, | |
783 | and it becomes a single, transparent hierarchical file system. So archive | |
784 | files can be accessed in the same way as you access files directly on a disk, | |
785 | and it makes it easy to ship a new archive that will override a previous | |
786 | archive on a per-file basis.") | |
787 | (license license:zlib))) | |
83a4a70b DT |
788 | |
789 | (define-public love | |
790 | (package | |
791 | (name "love") | |
2b83619a TGR |
792 | (version "11.4") |
793 | (source | |
794 | (origin | |
795 | (method url-fetch) | |
796 | (uri (string-append "https://github.com/love2d/love/releases/download/" | |
797 | version "/love-" version "-linux-src.tar.gz")) | |
798 | (sha256 | |
799 | (base32 "0sak3zjpzfs3ys315m8qvszi946fz76jcpsb58j11wplyp5fwbz3")))) | |
83a4a70b DT |
800 | (build-system gnu-build-system) |
801 | (native-inputs | |
8394619b | 802 | (list pkg-config)) |
83a4a70b | 803 | (inputs |
8394619b LC |
804 | (list devil |
805 | freetype | |
806 | libmodplug | |
807 | libtheora | |
808 | libvorbis | |
809 | luajit | |
810 | mesa | |
811 | mpg123 | |
812 | openal | |
813 | sdl2 | |
814 | zlib)) | |
83a4a70b DT |
815 | (synopsis "2D game framework for Lua") |
816 | (description "LÖVE is a framework for making 2D games in the Lua | |
817 | programming language.") | |
818 | (home-page "https://love2d.org/") | |
819 | (license license:zlib))) | |
154f6156 | 820 | |
328dd9b7 | 821 | (define-public love-nuklear |
744fe9ee LMP |
822 | (package |
823 | (name "love-nuklear") | |
824 | (version "2.6.1") | |
825 | (source (origin | |
826 | (method git-fetch) | |
827 | (uri (git-reference | |
828 | (url "https://github.com/keharriso/love-nuklear/") | |
829 | (commit (string-append "v" version)) | |
830 | (recursive? #t))) | |
831 | ;; NOTE: the HEAD of the Nuklear git-submodule is at commit | |
832 | ;; "adc52d710fe3c87194b99f540c53e82eb75c2521" of Oct 1 2019 | |
833 | (file-name (git-file-name name version)) | |
834 | (sha256 | |
835 | (base32 | |
836 | "090xp5c975155hd1pa7bdssdlawvygs5s6icdkwbyc8il5kg5kgv")))) | |
837 | (build-system cmake-build-system) | |
838 | (arguments | |
839 | `(#:build-type "Release" | |
80aeefd5 LMP |
840 | #:tests? #f |
841 | #:phases | |
842 | (modify-phases %standard-phases | |
843 | (add-after 'unpack 'patch-cmake | |
844 | (lambda _ | |
845 | (substitute* "CMakeLists.txt" | |
846 | (("DESTINATION .") "DESTINATION lib/love"))))))) | |
744fe9ee | 847 | (inputs |
8394619b | 848 | (list luajit)) |
744fe9ee LMP |
849 | (synopsis "Lightweight immediate mode GUI for LÖVE games") |
850 | (description "LÖVE is a Lua framework for making 2D games. Nuklear | |
328dd9b7 JC |
851 | is a minimal state immediate mode graphical user interface toolkit. This |
852 | package is the Nuklear bindings for LÖVE created by Kevin Harrison.") | |
744fe9ee LMP |
853 | (home-page "https://github.com/keharriso/love-nuklear/") |
854 | (license license:expat))) | |
328dd9b7 | 855 | |
154f6156 DT |
856 | (define-public allegro-4 |
857 | (package | |
858 | (name "allegro") | |
4d82dbea | 859 | (version "4.4.3.1") |
154f6156 DT |
860 | (source (origin |
861 | (method url-fetch) | |
3a12e21c EF |
862 | (uri (string-append "https://github.com/liballeg/allegro5/" |
863 | "releases/download/" version "/allegro-" | |
864 | version ".tar.gz")) | |
154f6156 DT |
865 | (sha256 |
866 | (base32 | |
4d82dbea | 867 | "1m6lz35nk07dli26kkwz3wa50jsrxs1kb6w1nj14a911l34xn6gc")))) |
154f6156 DT |
868 | (build-system cmake-build-system) |
869 | (arguments | |
870 | '(#:phases | |
871 | (modify-phases %standard-phases | |
872 | (add-after 'unpack 'patch-build-system | |
873 | (lambda _ | |
874 | ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE | |
875 | ;; via a command line option doesn't work because it is | |
876 | ;; unconditionally clobbered in the build script. | |
877 | (substitute* '("CMakeLists.txt") | |
878 | (("ADDON_LINKAGE STATIC") | |
4d82dbea | 879 | "ADDON_LINKAGE SHARED"))))))) |
154f6156 | 880 | (inputs |
8394619b | 881 | (list glu libpng libvorbis mesa zlib)) |
154f6156 DT |
882 | (synopsis "Game programming library") |
883 | (description "Allegro is a library mainly aimed at video game and | |
884 | multimedia programming. It handles common, low-level tasks such as creating | |
885 | windows, accepting user input, loading data, drawing images, playing sounds, | |
886 | etc.") | |
4968ea2c | 887 | (home-page "https://liballeg.org") |
154f6156 | 888 | (license license:giftware))) |
2a068aec | 889 | |
19d311b4 RW |
890 | (define-public allegro |
891 | (package | |
892 | (name "allegro") | |
cd514587 | 893 | (version "5.2.7.0") |
19d311b4 RW |
894 | (source (origin |
895 | (method url-fetch) | |
3a12e21c EF |
896 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
897 | "/download/" version "/allegro-" | |
b15a020d | 898 | version ".tar.gz")) |
19d311b4 RW |
899 | (sha256 |
900 | (base32 | |
cd514587 | 901 | "034pmbmbq6jagpp4lhnyjqmf8gcz5fx74d9rknrm7d4wv4cv7qy1")))) |
19d311b4 | 902 | (build-system cmake-build-system) |
49405aaf | 903 | (arguments `(#:tests? #f)) ; there are no tests |
19d311b4 RW |
904 | (inputs |
905 | ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb | |
906 | `(("flac" ,flac) | |
907 | ("freetype" ,freetype) | |
908 | ("glu" ,glu) | |
cd514587 | 909 | ("gtk" ,gtk+) |
4bd428a7 | 910 | ("libjpeg" ,libjpeg-turbo) |
19d311b4 RW |
911 | ("libpng" ,libpng) |
912 | ("libtheora" ,libtheora) | |
913 | ("libvorbis" ,libvorbis) | |
914 | ("libxcursor" ,libxcursor) | |
915 | ("libxinerama" ,libxinerama) | |
916 | ("libxrandr" ,libxrandr) | |
917 | ("mesa" ,mesa) | |
918 | ("openal" ,openal) | |
919 | ("physfs" ,physfs) | |
920 | ("zlib" ,zlib))) | |
921 | (native-inputs | |
8394619b | 922 | (list pkg-config)) |
19d311b4 RW |
923 | (synopsis "Game programming library") |
924 | (description "Allegro is a library mainly aimed at video game and | |
925 | multimedia programming. It handles common, low-level tasks such as creating | |
926 | windows, accepting user input, loading data, drawing images, playing sounds, | |
927 | etc.") | |
4968ea2c | 928 | (home-page "https://liballeg.org") |
19d311b4 RW |
929 | (license license:bsd-3))) |
930 | ||
cdf8f391 RW |
931 | (define-public allegro-5.0 |
932 | (package (inherit allegro) | |
933 | (name "allegro") | |
934 | (version "5.0.11") | |
935 | (source (origin | |
936 | (method url-fetch) | |
3a12e21c EF |
937 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
938 | "/download/" version "/allegro-" | |
939 | (if (equal? "0" (string-take-right version 1)) | |
940 | (string-drop-right version 2) | |
941 | version) | |
942 | ".tar.gz")) | |
0109b89c EF |
943 | (patches (search-patches |
944 | "allegro-mesa-18.2.5-and-later.patch")) | |
cdf8f391 RW |
945 | (sha256 |
946 | (base32 | |
947 | "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) | |
948 | ||
2a068aec DT |
949 | (define-public aseprite |
950 | (package | |
951 | (name "aseprite") | |
82654d95 | 952 | (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL. |
ff4dc16e | 953 | ;; TODO: Unbundle third party software. |
2a068aec | 954 | (source (origin |
ff4dc16e MB |
955 | (method url-fetch/zipbomb) |
956 | (uri (string-append "https://github.com/aseprite/aseprite" | |
957 | "/releases/download/v" version | |
958 | "/Aseprite-v" version "-Source.zip")) | |
2a068aec DT |
959 | (sha256 |
960 | (base32 | |
82654d95 | 961 | "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv")))) |
2a068aec DT |
962 | (build-system cmake-build-system) |
963 | (arguments | |
964 | '(#:configure-flags | |
965 | ;; Use shared libraries instead of building bundled source. | |
966 | (list "-DWITH_WEBP_SUPPORT=1" | |
967 | "-DUSE_SHARED_CURL=1" | |
968 | "-DUSE_SHARED_GIFLIB=1" | |
969 | "-DUSE_SHARED_JPEGLIB=1" | |
970 | "-DUSE_SHARED_ZLIB=1" | |
971 | "-DUSE_SHARED_LIBPNG=1" | |
972 | "-DUSE_SHARED_LIBLOADPNG=1" | |
973 | "-DUSE_SHARED_LIBWEBP=1" | |
974 | "-DUSE_SHARED_TINYXML=1" | |
975 | "-DUSE_SHARED_PIXMAN=1" | |
976 | "-DUSE_SHARED_FREETYPE=1" | |
977 | "-DUSE_SHARED_ALLEGRO4=1" | |
978 | "-DENABLE_UPDATER=0" ; no auto-updates | |
979 | (string-append "-DFREETYPE_INCLUDE_DIR=" | |
980 | (assoc-ref %build-inputs "freetype") | |
de1d68a2 | 981 | "/include/freetype2")))) |
2a068aec | 982 | (native-inputs |
8394619b | 983 | (list pkg-config)) |
2a068aec DT |
984 | ;; TODO: Use a patched Allegro 4 that supports window resizing. This |
985 | ;; patched version is bundled with Aseprite, but the patches should be | |
986 | ;; extracted and applied on top of a standalone Allegro 4 package. | |
987 | (inputs | |
988 | `(("allegro" ,allegro-4) | |
989 | ("curl" ,curl) | |
990 | ("freetype" ,freetype) | |
991 | ("giflib" ,giflib) | |
4bd428a7 | 992 | ("libjpeg" ,libjpeg-turbo) |
2a068aec DT |
993 | ("libpng" ,libpng) |
994 | ("libwebp" ,libwebp) | |
995 | ("libx11" ,libx11) | |
996 | ("libxext" ,libxext) | |
997 | ("libxxf86vm" ,libxxf86vm) | |
998 | ("pixman" ,pixman) | |
999 | ("tinyxml" ,tinyxml) | |
1000 | ("zlib" ,zlib))) | |
1001 | (synopsis "Animated sprite editor and pixel art tool") | |
1002 | (description "Aseprite is a tool for creating 2D pixel art for video | |
1003 | games. In addition to basic pixel editing features, Aseprite can assist in | |
1004 | the creation of animations, tiled graphics, texture atlases, and more.") | |
167f0e82 | 1005 | (home-page "https://www.aseprite.org/") |
2a068aec | 1006 | (license license:gpl2+))) |
966dff3b | 1007 | |
60bb0360 EZ |
1008 | (define-public libresprite |
1009 | (package | |
1010 | (name "libresprite") | |
1011 | (version "1.0") | |
1012 | ;; TODO: Unbundle third party software. | |
1013 | ;; - duktape is bundled inside the project but it's hard to unbundle: | |
1014 | ;; there are many differences from a version to the next and it is not | |
1015 | ;; really designed to work as a shared lib. | |
1016 | (source (origin | |
1017 | (method git-fetch) | |
1018 | (uri (git-reference | |
1019 | (url "https://github.com/LibreSprite/LibreSprite") | |
1020 | (commit (string-append "v" version)) | |
1021 | (recursive? #t))) | |
1022 | (file-name (git-file-name name version)) | |
1023 | (sha256 | |
1024 | (base32 | |
1025 | "0djbjjh21ahlxzh0b0jp4mpfycam8h9157i4wbxkd618fraadhbp")))) | |
1026 | (build-system cmake-build-system) | |
1027 | (arguments | |
1028 | '(#:configure-flags | |
1029 | (list "-DWITH_WEBP_SUPPORT=1") | |
1030 | ;; Tests are unmaintained | |
1031 | #:tests? #f)) | |
1032 | (native-inputs | |
e661f4ef | 1033 | `(("pkg-config" ,pkg-config))) |
60bb0360 EZ |
1034 | (inputs |
1035 | `(("curl" ,curl) | |
1036 | ("freetype" ,freetype) | |
1037 | ("giflib" ,giflib) | |
1038 | ("googletest" ,googletest) | |
1039 | ("libjpeg" ,libjpeg-turbo) | |
1040 | ("libpng" ,libpng) | |
1041 | ("libwebp" ,libwebp) | |
1042 | ("libx11" ,libx11) | |
1043 | ("libxext" ,libxext) | |
1044 | ("libxxf86dga" ,libxxf86dga) | |
1045 | ("libxxf86vm" ,libxxf86vm) | |
1046 | ("lua" ,lua) ; Optional | |
1047 | ("pixman" ,pixman) | |
1048 | ("sdl2" ,sdl2) | |
1049 | ("sdl2-image" ,sdl2-image) | |
1050 | ("tinyxml" ,tinyxml) | |
1051 | ("zlib" ,zlib))) | |
1052 | (synopsis "Animated sprite editor and pixel art tool") | |
1053 | (description "LibreSprite is a tool for creating 2D pixel art for video | |
1054 | games. In addition to basic pixel editing features, it can assist in the | |
1055 | creation of animations, tiled graphics, texture atlases, and more. | |
1056 | LibreSprite is a fork of the latest GPLv2 commit of Aseprite.") | |
1057 | (home-page "https://libresprite.github.io/") | |
1058 | (license license:gpl2+))) | |
1059 | ||
966dff3b KY |
1060 | (define-public qqwing |
1061 | (package | |
1062 | (name "qqwing") | |
1063 | (version "1.3.4") | |
1064 | (source (origin | |
1065 | (method url-fetch) | |
1066 | (uri (string-append | |
1067 | "https://qqwing.com/" | |
1068 | name "-" version ".tar.gz")) | |
1069 | (sha256 | |
1070 | (base32 | |
1071 | "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp")))) | |
1072 | (build-system gnu-build-system) | |
1073 | (native-inputs | |
8394619b | 1074 | (list pkg-config)) |
966dff3b KY |
1075 | (home-page "https://qqwing.com/") |
1076 | (synopsis "Sudoku puzzle solver and generator") | |
1077 | (description | |
1078 | "QQWing is a Sudoku puzzle generator and solver. | |
1079 | It offers the following features: | |
1080 | @enumerate | |
1081 | @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds. | |
1082 | @item Uses logic. Uses as many solve techniques as possible when solving | |
1083 | puzzles rather than guessing. | |
1084 | @item Rates puzzles. Most generators don't give an indication of the difficulty | |
1085 | of a Sudoku puzzle. QQwing does. | |
1086 | @item Can print solve instructions for any puzzle. | |
1087 | @item Customizable output style, including a CSV style that is easy to | |
1088 | import into a database. | |
1089 | @end enumerate") | |
1090 | (license license:gpl2+))) | |
d2cc38b7 KK |
1091 | |
1092 | (define-public quesoglc | |
1093 | (package | |
1094 | (name "quesoglc") | |
1095 | (version "0.7.2") | |
1096 | (source (origin | |
1097 | (method url-fetch) | |
1098 | (uri (string-append "mirror://sourceforge/" name "/" version "/" | |
1099 | name "-" version "-free.tar.bz2")) | |
1100 | (sha256 | |
1101 | (base32 | |
1102 | "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks")))) | |
1103 | (build-system gnu-build-system) | |
8394619b | 1104 | (native-inputs (list pkg-config)) |
e3196755 | 1105 | (inputs (list fontconfig freeglut fribidi glew)) |
d2cc38b7 KK |
1106 | (home-page "http://quesoglc.sourceforge.net") |
1107 | (synopsis "Implementation of the OpenGL Character Renderer (GLC)") | |
1108 | (description | |
1109 | "The OpenGL Character Renderer (GLC) is a state machine that provides | |
1110 | OpenGL programs with character rendering services via an application programming | |
1111 | interface (API).") | |
1112 | (license (list license:expat license:lgpl2.1+)))) | |
4bc37bf0 KK |
1113 | |
1114 | (define-public python-pygame | |
1115 | (package | |
1116 | (name "python-pygame") | |
a9db93c1 | 1117 | (version "1.9.4") |
4bc37bf0 KK |
1118 | (source (origin |
1119 | (method url-fetch) | |
052f75da | 1120 | (uri (pypi-uri "pygame" version)) |
4bc37bf0 KK |
1121 | (sha256 |
1122 | (base32 | |
a9db93c1 | 1123 | "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh")))) |
4bc37bf0 KK |
1124 | (build-system python-build-system) |
1125 | (arguments | |
a9db93c1 | 1126 | `(#:tests? #f ; tests require pygame to be installed first |
4bc37bf0 KK |
1127 | #:phases |
1128 | (modify-phases %standard-phases | |
1129 | ;; Set the paths to the dependencies manually because | |
1130 | ;; the configure script does not allow passing them as | |
1131 | ;; parameters. This also means we can skip the configure | |
1132 | ;; phase. | |
1133 | (add-before 'build 'set-library-paths | |
1134 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1135 | (let ((sdl-ref (assoc-ref inputs "sdl")) | |
1136 | (font-ref (assoc-ref inputs "sdl-ttf")) | |
1137 | (image-ref (assoc-ref inputs "sdl-image")) | |
1138 | (mixer-ref (assoc-ref inputs "sdl-mixer")) | |
1139 | (smpeg-ref (assoc-ref inputs "libsmpeg")) | |
1140 | (png-ref (assoc-ref inputs "libpng")) | |
1141 | (jpeg-ref (assoc-ref inputs "libjpeg")) | |
052f75da | 1142 | (freetype-ref (assoc-ref inputs "freetype")) |
4bc37bf0 KK |
1143 | (v4l-ref (assoc-ref inputs "v4l-utils")) |
1144 | (out-ref (assoc-ref outputs "out"))) | |
1145 | (substitute* "Setup.in" | |
1146 | (("SDL = -I/usr/include/SDL") | |
1147 | (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) | |
1148 | (substitute* "Setup.in" | |
1149 | (("FONT = -lSDL_ttf") | |
1150 | (string-append "FONT = -I" font-ref "/include/SDL -L" | |
a9db93c1 | 1151 | font-ref "/lib -lSDL_ttf"))) |
4bc37bf0 KK |
1152 | (substitute* "Setup.in" |
1153 | (("IMAGE = -lSDL_image") | |
1154 | (string-append "IMAGE = -I" image-ref "/include/SDL -L" | |
a9db93c1 | 1155 | image-ref "/lib -lSDL_image"))) |
4bc37bf0 KK |
1156 | (substitute* "Setup.in" |
1157 | (("MIXER = -lSDL_mixer") | |
1158 | (string-append "MIXER = -I" mixer-ref "/include/SDL -L" | |
a9db93c1 | 1159 | mixer-ref "/lib -lSDL_mixer"))) |
4bc37bf0 KK |
1160 | (substitute* "Setup.in" |
1161 | (("SMPEG = -lsmpeg") | |
1162 | (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" | |
a9db93c1 | 1163 | smpeg-ref "/lib -lsmpeg"))) |
4bc37bf0 KK |
1164 | (substitute* "Setup.in" |
1165 | (("PNG = -lpng") | |
1166 | (string-append "PNG = -I" png-ref "/include -L" | |
a9db93c1 | 1167 | png-ref "/lib -lpng"))) |
4bc37bf0 KK |
1168 | (substitute* "Setup.in" |
1169 | (("JPEG = -ljpeg") | |
1170 | (string-append "JPEG = -I" jpeg-ref "/include -L" | |
1171 | jpeg-ref "/lib -ljpeg"))) | |
052f75da DM |
1172 | |
1173 | (substitute* "Setup.in" | |
1174 | (("FREETYPE = -lfreetype") | |
1175 | (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" | |
1176 | freetype-ref "/lib -lfreetype"))) | |
1177 | ||
4bc37bf0 KK |
1178 | (substitute* "Setup.in" |
1179 | (("^pypm") "#pypm")) | |
4bc37bf0 KK |
1180 | ;; Create a path to a header file provided by v4l-utils. |
1181 | (system* "mkdir" "linux") | |
1182 | (system* "ln" "--symbolic" | |
1183 | (string-append v4l-ref "/include/libv4l1-videodev.h") | |
1184 | "linux/videodev.h") | |
1185 | (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) | |
4bc37bf0 | 1186 | (inputs |
052f75da DM |
1187 | `(("freetype" ,freetype) |
1188 | ("sdl" ,sdl) | |
4bc37bf0 KK |
1189 | ("sdl-image" ,sdl-image) |
1190 | ("sdl-mixer" ,sdl-mixer) | |
1191 | ("sdl-ttf" ,sdl-ttf) | |
1192 | ("sdl-gfx" ,sdl-gfx) | |
4bd428a7 | 1193 | ("libjpeg" ,libjpeg-turbo) |
4bc37bf0 KK |
1194 | ("libpng" ,libpng) |
1195 | ("libX11" ,libx11) | |
1196 | ("libsmpeg" ,libsmpeg) | |
1197 | ("portmidi" ,portmidi) | |
1198 | ("v4l-utils" ,v4l-utils))) | |
167f0e82 | 1199 | (home-page "https://www.pygame.org") |
4bc37bf0 KK |
1200 | (synopsis "SDL wrapper for Python") |
1201 | (description "Pygame is a set of Python modules designed for writing games. | |
1202 | Pygame adds functionality on top of the excellent SDL library. This allows you | |
1203 | to create fully featured games and multimedia programs in the python language.") | |
1204 | (license (list license:bsd-2 | |
1205 | ;; python numeric license as listed by Debian looks like | |
1206 | ;; an Expat-style license with a warranty disclaimer for | |
1207 | ;; the U.S. government and the University of California. | |
1208 | license:expat | |
1209 | license:lgpl2.0+ | |
1210 | license:lgpl2.1+ | |
1211 | license:gpl3+ | |
1212 | license:psfl | |
1213 | license:public-domain | |
1214 | license:lgpl2.1+)))) | |
052f75da DM |
1215 | |
1216 | (define-public python2-pygame | |
1217 | (package-with-python2 python-pygame)) | |
68c6110c | 1218 | |
313d5e62 | 1219 | (define-public python-pygame-sdl2 |
8476e585 | 1220 | (let ((real-version "2.1.0") |
a69392bf | 1221 | (renpy-version "7.4.11")) |
8476e585 | 1222 | (package |
313d5e62 LP |
1223 | (inherit python-pygame) |
1224 | (name "python-pygame-sdl2") | |
8476e585 CY |
1225 | (version (string-append real-version "-for-renpy-" renpy-version)) |
1226 | (source | |
1227 | (origin | |
1228 | (method url-fetch) | |
1229 | (uri (string-append "https://www.renpy.org/dl/" renpy-version | |
1230 | "/pygame_sdl2-" version ".tar.gz")) | |
a69392bf | 1231 | (sha256 (base32 "0nxvca16299jx6sp0ys29rqixcs21ymhqwjfkbchhss0yar7qjgz")) |
2a951e87 LP |
1232 | (modules '((guix build utils))) |
1233 | (snippet | |
1234 | '(begin | |
1235 | ;; drop generated sources | |
1236 | (delete-file-recursively "gen") | |
313d5e62 | 1237 | (delete-file-recursively "gen3") |
b4d71a62 | 1238 | (delete-file-recursively "gen-static") |
2a951e87 | 1239 | #t)))) |
8476e585 CY |
1240 | (build-system python-build-system) |
1241 | (arguments | |
1242 | `(#:tests? #f ; tests require pygame to be installed first | |
8476e585 CY |
1243 | #:phases |
1244 | (modify-phases %standard-phases | |
1245 | (add-after 'set-paths 'set-sdl-vars | |
1246 | (lambda* (#:key inputs #:allow-other-keys) | |
1247 | (setenv "PYGAME_SDL2_CFLAGS" | |
1248 | (string-append "-I" | |
1249 | (assoc-ref inputs "sdl-union") | |
1250 | "/include/SDL2 -D_REENTRANT")) | |
1251 | (setenv "PYGAME_SDL2_LDFLAGS" | |
1252 | (string-append "-L" | |
1253 | (assoc-ref inputs "sdl-union") | |
1254 | "/lib -Wl,-rpath," | |
1255 | (assoc-ref inputs "sdl-union") | |
1256 | "/lib -Wl,--enable-new-dtags -lSDL2")) | |
8476e585 CY |
1257 | #t))))) |
1258 | (inputs | |
8394619b | 1259 | (list (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))) |
8476e585 | 1260 | (native-inputs |
8394619b | 1261 | (list python-cython)) |
dfb67d2c | 1262 | (home-page "https://www.renpy.org/") |
8476e585 CY |
1263 | (synopsis "Reimplementation of the Pygame API using SDL2") |
1264 | (description "Pygame_SDL2 reimplements the Pygame API using SDL2, | |
1265 | staying close to the original, but also adding some SDL2-specific features. | |
1266 | While it aims to be used as a drop-in replacement, it appears to be | |
1267 | developed mainly for Ren'py.") | |
1268 | (license (list license:lgpl2.1 license:zlib))))) | |
1269 | ||
313d5e62 LP |
1270 | (define-public python2-pygame-sdl2 |
1271 | (package-with-python2 python-pygame-sdl2)) | |
1272 | ||
8476e585 CY |
1273 | (define-public python2-renpy |
1274 | (package | |
1275 | (name "python2-renpy") | |
98af365b | 1276 | (version "7.4.11") |
8476e585 CY |
1277 | (source |
1278 | (origin | |
1279 | (method url-fetch) | |
1280 | (uri (string-append "https://www.renpy.org/dl/" version | |
1281 | "/renpy-" version "-source.tar.bz2")) | |
98af365b | 1282 | (sha256 (base32 "0zkhg2sd2hglm9dkansf4h8sq7lm7iqslzl763ambp4kyfdvd07q")) |
1592491c LP |
1283 | (modules '((guix build utils))) |
1284 | (patches | |
1285 | (search-patches | |
1286 | "renpy-use-system-fribidi.patch")) | |
1287 | (snippet | |
1288 | '(with-directory-excursion "module" | |
1592491c LP |
1289 | ;; drop fribidi sources |
1290 | (delete-file-recursively "fribidi-src") | |
1291 | #t)))) | |
8476e585 CY |
1292 | (build-system python-build-system) |
1293 | (arguments | |
1294 | `(#:tests? #f ; Ren'py doesn't seem to package tests | |
1295 | #:python ,python-2 | |
1296 | #:phases | |
1297 | (modify-phases %standard-phases | |
1298 | (add-after 'unpack 'fix-commands | |
3d7dea09 | 1299 | (lambda* (#:key inputs #:allow-other-keys) |
8476e585 CY |
1300 | (substitute* "renpy/editor.py" |
1301 | (("xdg-open") | |
3d7dea09 LP |
1302 | (string-append (assoc-ref inputs "xdg-utils") |
1303 | "/bin/xdg-open"))) | |
8476e585 | 1304 | #t)) |
1592491c LP |
1305 | (add-after 'unpack 'fix-include-paths |
1306 | (lambda* (#:key inputs #:allow-other-keys) | |
1307 | (substitute* "module/setup.py" | |
1308 | (("/usr/include/fribidi") | |
425ccde6 | 1309 | (search-input-directory inputs "include/fribidi"))))) |
8476e585 | 1310 | (add-after 'set-paths 'set-build-vars |
3d7dea09 | 1311 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
8476e585 | 1312 | (setenv "RENPY_CYTHON" |
bc64d955 LC |
1313 | (search-input-file (or native-inputs inputs) |
1314 | "/bin/cython")) | |
8476e585 CY |
1315 | (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":")) |
1316 | #t)) | |
1317 | (replace 'build | |
37c52b5b LP |
1318 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) |
1319 | ;; The "module" subdirectory contains a python (really cython) | |
1320 | ;; project, which is built using a script, that is thankfully | |
1321 | ;; named "setup.py". | |
1322 | (with-directory-excursion "module" | |
1323 | (apply (assoc-ref %standard-phases 'build) args)) | |
72d43df6 LMP |
1324 | ;; The above only builds the cython modules, but nothing else, |
1325 | ;; so we do that here. | |
37c52b5b | 1326 | (invoke "python" "-m" "compileall" "renpy") |
8476e585 CY |
1327 | #t)) |
1328 | (replace 'install | |
37c52b5b LP |
1329 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) |
1330 | ;; Again, we have to wrap the module installation. | |
1331 | ;; Additionally, we want to install the python code | |
1332 | ;; (both source and compiled) in the same directory. | |
1333 | (let* ((out (assoc-ref outputs "out")) | |
1334 | (site (string-append "/lib/python" | |
eaa99857 LP |
1335 | (python-version |
1336 | (assoc-ref inputs "python")) | |
37c52b5b LP |
1337 | "/site-packages"))) |
1338 | (with-directory-excursion "module" | |
1339 | (apply (assoc-ref %standard-phases 'install) args)) | |
1340 | (copy-recursively "renpy" | |
d4bef961 LP |
1341 | (string-append out site "/renpy")) |
1342 | (delete-file-recursively (string-append out site "/renpy/common"))) | |
8476e585 CY |
1343 | #t))))) |
1344 | (inputs | |
8394619b LC |
1345 | (list ffmpeg |
1346 | freetype | |
1347 | fribidi | |
1348 | glew | |
1349 | libpng | |
1350 | (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)) | |
1351 | xdg-utils)) | |
eaa99857 LP |
1352 | (propagated-inputs |
1353 | `(("python2-future" ,python2-future) | |
1354 | ("python2-pygame" ,python2-pygame-sdl2))) | |
8476e585 | 1355 | (native-inputs |
8394619b | 1356 | (list python2-cython)) |
22e5a77a | 1357 | (home-page "https://www.renpy.org/") |
8476e585 | 1358 | (synopsis "Ren'py python module") |
a613e626 LP |
1359 | (description "This package contains the shared libraries and Python modules |
1360 | of Ren'py. While functional, they are not meaningful on their own without | |
1361 | the launcher and common Ren'py code provided by the @code{renpy} package and | |
1362 | are only used to bootstrap it.") | |
8476e585 CY |
1363 | (license license:expat))) |
1364 | ||
1365 | (define-public renpy | |
1366 | (package | |
1367 | (inherit python2-renpy) | |
1368 | (name "renpy") | |
8476e585 CY |
1369 | (build-system python-build-system) |
1370 | (arguments | |
1371 | `(#:tests? #f ; see python2-renpy | |
1372 | #:python ,python-2 | |
769f7d2c LP |
1373 | #:modules ((srfi srfi-1) |
1374 | (guix build python-build-system) | |
1375 | (guix build utils)) | |
1376 | #:imported-modules ((srfi srfi-1) ,@%python-build-system-modules) | |
8476e585 CY |
1377 | #:phases |
1378 | (modify-phases %standard-phases | |
1379 | (add-after 'unpack 'fix-commands | |
769f7d2c | 1380 | (lambda* (#:key inputs outputs #:allow-other-keys) |
8476e585 | 1381 | (substitute* "launcher/game/choose_directory.rpy" |
769f7d2c LP |
1382 | (("/usr/bin/python") |
1383 | (string-append (assoc-ref inputs "python2") | |
1384 | "/bin/python2"))) | |
8476e585 CY |
1385 | (substitute* "launcher/game/front_page.rpy" |
1386 | (("xdg-open") | |
769f7d2c LP |
1387 | (string-append (assoc-ref inputs "xdg-utils") |
1388 | "/bin/xdg-open"))) | |
8476e585 CY |
1389 | (substitute* "launcher/game/project.rpy" |
1390 | (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]") | |
1391 | (string-append "cmd = [ \"" (assoc-ref outputs "out") | |
1392 | "/bin/renpy\" ]")) | |
1393 | ;; Projects are still created in the usual style, so we need | |
1394 | ;; to adjust the path. | |
1395 | (("cmd.append\\(self.path\\)") | |
1396 | "cmd.append(self.path + \"/game\")")) | |
1397 | #t)) | |
1398 | (add-after 'unpack 'drop-game-from-paths | |
1399 | (lambda _ | |
1400 | (substitute* (list "launcher/game/gui7.rpy" | |
1401 | "launcher/game/gui7/images.py") | |
1402 | ((", \"game\",") ",")) | |
1403 | #t)) | |
1404 | (add-before 'build 'start-xserver | |
769f7d2c LP |
1405 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
1406 | (let ((xorg-server (assoc-ref (or native-inputs inputs) | |
1407 | "xorg-server"))) | |
8476e585 CY |
1408 | (setenv "HOME" (getcwd)) |
1409 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
1410 | (setenv "DISPLAY" ":1") | |
1411 | #t))) | |
1412 | (replace 'build | |
1413 | (lambda _ | |
1414 | (invoke "python" "renpy.py" "launcher" "quit") | |
1415 | (invoke "python" "renpy.py" "the_question" "quit") | |
1416 | (invoke "python" "renpy.py" "tutorial" "quit") | |
1417 | #t)) | |
1418 | (replace 'install | |
1419 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1420 | ;; Here we install our custom renpy program. | |
1421 | ;; After finishing this step, "out" will have the following: | |
1422 | ;; |-- bin/renpy | |
1423 | ;; `-- share/renpy ; i.e. path_to_renpy_base() | |
d4bef961 LP |
1424 | ;; |-- common |
1425 | ;; `-- gui | |
8476e585 | 1426 | ;; |
d4bef961 LP |
1427 | ;; Note that common shares the source files that would be installed |
1428 | ;; by python2-renpy (which are instead deleted from that package), | |
1429 | ;; but also contains their byte-compiled versions. | |
1430 | ;; On other systems, renpy_base would point to site-packages or | |
1431 | ;; even somewhere in /opt. | |
8476e585 CY |
1432 | ;; The former approach is not as straightforward as it seems |
1433 | ;; -- it causes renpy to load files twice for some weird reason -- | |
1434 | ;; and the latter is impossible on Guix. Hence the detour through | |
1435 | ;; share/renpy and the custom renpy program. | |
1436 | ;; | |
1437 | ;; As a convention, other games should be installed as | |
1438 | ;; subdirectories of share/renpy in their respective outputs as | |
1439 | ;; well. This differs from the traditional layout, which is | |
1440 | ;; roughly the following: | |
1441 | ;; `-- Super Awesome Game | |
d4bef961 LP |
1442 | ;; |-- game ; <- the folder we actually want |
1443 | ;; |-- lib ; compiled renpy module and dependencies | |
1444 | ;; |-- renpy ; yet another copy of Ren'py's code | |
1445 | ;; | |-- common ; the common folder from above | |
1446 | ;; | `-- ... ; Python code (source + compiled) | |
8476e585 CY |
1447 | ;; |-- Super Awesome Game.py |
1448 | ;; `-- Super Awesome Game.sh | |
1449 | (let* ((out (assoc-ref outputs "out")) | |
1450 | (bin/renpy (string-append out "/bin/renpy"))) | |
8476e585 CY |
1451 | (copy-recursively "renpy/common" |
1452 | (string-append out "/share/renpy/common")) | |
1453 | (copy-recursively "gui" | |
1454 | (string-append out "/share/renpy/gui")) | |
1455 | ||
0f9e7384 LMP |
1456 | (mkdir-p (string-append out "/bin")) |
1457 | (copy-file (assoc-ref inputs "renpy.in") bin/renpy) | |
1458 | (substitute* bin/renpy | |
1459 | (("@PYTHON@") (search-input-file inputs "bin/python2")) | |
1460 | (("@RENPY_BASE@") (string-append out "/share/renpy"))) | |
1461 | (chmod bin/renpy #o755)))) | |
8476e585 CY |
1462 | |
1463 | (add-after 'install 'install-games | |
1464 | (lambda* (#:key outputs #:allow-other-keys) | |
1465 | (define renpy (assoc-ref outputs "out")) | |
1466 | ;; TODO: We should offer a renpy-build-system to make the | |
1467 | ;; installation of Ren'py games easier. | |
1468 | (define* (install-renpy-game #:key output game name (renpy renpy) | |
1469 | #:allow-other-keys) | |
1470 | (let* ((name (or name (basename game))) | |
1471 | (launcher (string-append output "/bin/renpy-" name)) | |
1472 | (share (string-append output "/share/renpy/" name))) | |
1473 | (copy-recursively (string-append game "/game") share) | |
1474 | (mkdir-p (string-append output "/bin")) | |
1475 | (with-output-to-file launcher | |
1476 | (lambda () | |
1477 | (format #t | |
1478 | "#!~a~%~a ~a \"$@\"" | |
1479 | (which "bash") | |
1480 | (string-append renpy "/bin/renpy") | |
1481 | share))) | |
1482 | (chmod launcher #o755))) | |
1483 | ||
1484 | (install-renpy-game #:output (assoc-ref outputs "out") | |
1485 | #:game "launcher") | |
1486 | ||
1487 | (install-renpy-game #:output (assoc-ref outputs "the-question") | |
1488 | #:game "the_question" | |
1489 | #:name "the-question") | |
1490 | ||
1491 | (install-renpy-game #:output (assoc-ref outputs "tutorial") | |
1492 | #:game "tutorial") | |
1493 | #t)) | |
1494 | (replace 'wrap | |
1495 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
769f7d2c LP |
1496 | (let ((out (assoc-ref outputs "out")) |
1497 | (site (string-append "/lib/python" | |
1498 | (python-version | |
1499 | (assoc-ref inputs "python")) | |
1500 | "/site-packages"))) | |
1501 | (wrap-program (string-append out "/bin/renpy") | |
0e47fcce | 1502 | `("GUIX_PYTHONPATH" = |
769f7d2c LP |
1503 | (,@(delete-duplicates |
1504 | (map | |
1505 | (lambda (store-path) | |
1506 | (string-append store-path site)) | |
1507 | (cons (assoc-ref outputs "out") | |
1508 | (map cdr | |
1509 | (filter | |
1510 | (lambda (input) | |
1511 | (string-prefix? "python2" (car input))) | |
1512 | inputs)))))))) | |
1513 | #t)))))) | |
8476e585 | 1514 | (inputs |
0f9e7384 LMP |
1515 | `(("renpy.in" ,(search-auxiliary-file "renpy/renpy.in")) |
1516 | ("python2-renpy" ,python2-renpy) | |
769f7d2c LP |
1517 | ("python2-tkinter" ,python-2 "tk") |
1518 | ("python2" ,python-2) ; for ‘fix-commands’ and ‘wrap’ | |
1519 | ("xdg-utils" ,xdg-utils))) | |
1520 | (propagated-inputs '()) | |
1521 | (native-inputs | |
8394619b | 1522 | (list xorg-server-for-tests)) |
8476e585 CY |
1523 | (outputs |
1524 | (list "out" "tutorial" "the-question")) | |
10052b70 | 1525 | (home-page "https://www.renpy.org/") |
8476e585 CY |
1526 | (synopsis "Visual Novel Engine") |
1527 | (description "Ren'Py is a visual novel engine that helps you use words, | |
1528 | images, and sounds to tell interactive stories that run on computers and | |
1529 | mobile devices. These can be both visual novels and life simulation games. | |
1530 | The easy to learn script language allows anyone to efficiently write large | |
1531 | visual novels, while its Python scripting is enough for complex simulation | |
1532 | games.") | |
1533 | (license license:expat))) | |
1534 | ||
bca5d7db LP |
1535 | (define-public python-pyxel |
1536 | (package | |
1537 | (name "python-pyxel") | |
1538 | (version "1.4.3") | |
1539 | (source | |
1540 | (origin | |
1541 | (method git-fetch) | |
1542 | (uri | |
1543 | (git-reference | |
1544 | (url "https://github.com/kitao/pyxel") | |
1545 | (commit (string-append "v" version)))) | |
1546 | (file-name (git-file-name name version)) | |
1547 | (sha256 | |
1548 | (base32 | |
1549 | "0bwsgb5yq5s479cnf046v379zsn5ybp5195kbfvzr9l11qbaicm9")) | |
1550 | (modules '((guix build utils))) | |
1551 | (snippet | |
1552 | '(begin | |
1553 | (delete-file-recursively "pyxel/core/bin"))))) | |
1554 | (build-system python-build-system) | |
1555 | (arguments | |
1556 | `(#:tests? #f ; "Tests" are actually example programs that never halt. | |
1557 | #:phases | |
1558 | (modify-phases %standard-phases | |
1559 | (add-after 'unpack 'patch-build-files | |
1560 | (lambda* (#:key inputs #:allow-other-keys) | |
1561 | (substitute* "setup.py" | |
1562 | (("\"pyxel\\.core\\.bin\\.(.*)\"," all arch) | |
1563 | (if (string=? arch "linux") | |
1564 | all | |
1565 | ""))) | |
1566 | (substitute* "pyxel/core/Makefile" | |
1567 | (("`sdl2-config") | |
1568 | (string-append "`sdl2-config --prefix=" | |
1569 | (assoc-ref inputs "sdl2")))))) | |
1570 | (add-before 'build 'prebuild | |
1571 | (lambda _ | |
1572 | (invoke "make" "-C" "pyxel/core")))))) | |
1573 | (inputs | |
1574 | `(("gifsicle" ,gifsicle) | |
1575 | ("sdl2" ,(sdl-union (list sdl2 sdl2-image))))) | |
bca5d7db LP |
1576 | (home-page "https://github.com/kitao/pyxel") |
1577 | (synopsis "Retro game engine for Python") | |
1578 | (description "Pyxel is a game engine inspired by retro gaming consoles. | |
1579 | It has a fixed 16-color palette, can hold up to 3 image banks and 8 tilemaps | |
1580 | (256x256 pixels each) and 4 sound channels with 64 definable sounds. It | |
1581 | also comes with a built-in image and sound editor.") | |
1582 | (license license:expat))) | |
1583 | ||
68c6110c DT |
1584 | (define-public grafx2 |
1585 | (package | |
1586 | (name "grafx2") | |
1587 | (version "2.4") | |
1588 | (source (origin | |
1589 | (method url-fetch) | |
1590 | ;; XXX: There is no URL that contains the version. :( | |
1591 | (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21") | |
c34bb6b3 | 1592 | (file-name (string-append "grafx2-" version ".tgz")) |
68c6110c DT |
1593 | (sha256 |
1594 | (base32 | |
1595 | "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q")))) | |
1596 | (build-system gnu-build-system) | |
1597 | (arguments | |
1598 | '(#:phases | |
1599 | (modify-phases %standard-phases | |
1600 | (delete 'configure) ; no configure script | |
1601 | (add-before 'build 'change-to-src-directory | |
1602 | (lambda _ | |
1603 | (chdir "src") | |
1604 | #t))) | |
1605 | #:make-flags | |
1606 | ;; SDL header files are referenced without the preceeding "SDL/". | |
1607 | (list (string-append "CFLAGS=-I" | |
1608 | (assoc-ref %build-inputs "sdl-union") | |
83010a08 LC |
1609 | "/include/SDL" |
1610 | " -fcommon") | |
68c6110c DT |
1611 | (string-append "prefix=" |
1612 | (assoc-ref %outputs "out"))) | |
1613 | #:tests? #f)) ; no check target | |
1614 | (native-inputs | |
8394619b | 1615 | (list pkg-config)) |
68c6110c | 1616 | (inputs |
8394619b LC |
1617 | (list libpng lua-5.1 |
1618 | (sdl-union (list sdl sdl-image sdl-ttf)))) | |
68c6110c DT |
1619 | (synopsis "Bitmap paint program") |
1620 | (description "GrafX2 is a bitmap paint program inspired by the Amiga | |
7432d3ae | 1621 | programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it |
68c6110c DT |
1622 | includes a very large number of tools and effects that make it particularly |
1623 | suitable for pixel art, game graphics, and generally any detailed graphics | |
1624 | painted with a mouse.") | |
1625 | (home-page "http://pulkomandy.tk/projects/GrafX2") | |
1626 | (license license:gpl2))) ; GPLv2 only | |
c608fe8c MR |
1627 | |
1628 | (define-public ois | |
1629 | (package | |
1630 | (name "ois") | |
1c4144a1 | 1631 | (version "1.5.1") |
c608fe8c MR |
1632 | (source |
1633 | (origin | |
c608fe8c MR |
1634 | (method git-fetch) |
1635 | (uri (git-reference | |
b0e7b699 | 1636 | (url "https://github.com/wgois/OIS") |
006345c1 TGR |
1637 | (commit (string-append "v" version)))) |
1638 | (file-name (git-file-name name version)) | |
c608fe8c | 1639 | (sha256 |
1c4144a1 | 1640 | (base32 "0nkh0zrsbyv47c0i0vhdna3jsnvs69pb1svg75avxw6z7kwskgla")))) |
006345c1 TGR |
1641 | (build-system cmake-build-system) |
1642 | (arguments | |
1643 | `(#:tests? #f)) ; no test suite | |
c608fe8c | 1644 | (inputs |
8394619b | 1645 | (list libx11)) |
c608fe8c MR |
1646 | (synopsis "Object Oriented Input System") |
1647 | (description | |
1648 | "Cross Platform Object Oriented Input Lib System is a cross platform, | |
1649 | simple solution for using all kinds of Input Devices (Keyboards, Mice, | |
1650 | Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very | |
1651 | robust and compatible with many systems and operating systems.") | |
1652 | (home-page "https://github.com/wgois/OIS") | |
1653 | (license license:zlib))) | |
42d0d13d MR |
1654 | |
1655 | (define-public mygui | |
1656 | (package | |
1657 | (name "mygui") | |
1658 | (version "3.2.2") | |
1659 | (source | |
1660 | (origin | |
47f4d5d3 PN |
1661 | (method git-fetch) |
1662 | (uri (git-reference | |
1663 | (url "https://github.com/MyGUI/mygui") | |
1664 | (commit (string-append "MyGUI" version)))) | |
1665 | (file-name (git-file-name name version)) | |
42d0d13d MR |
1666 | (sha256 |
1667 | (base32 | |
47f4d5d3 | 1668 | "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw")))) |
42d0d13d MR |
1669 | (build-system cmake-build-system) |
1670 | (arguments | |
1671 | '(#:tests? #f ; No test target | |
1672 | #:configure-flags | |
1673 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1674 | (string-append "-DOGRE_INCLUDE_DIR=" | |
1675 | (assoc-ref %build-inputs "ogre") | |
47f4d5d3 PN |
1676 | "/include/OGRE") |
1677 | ;; Demos and tools are Windows-specific: | |
1678 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1679 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1680 | "-DMYGUI_BUILD_TOOLS=FALSE"))) | |
42d0d13d | 1681 | (native-inputs |
8394619b | 1682 | (list boost doxygen pkg-config)) |
42d0d13d | 1683 | (inputs |
8394619b LC |
1684 | (list font-dejavu |
1685 | freetype | |
1686 | graphviz | |
1687 | libx11 | |
1688 | ogre | |
1689 | ois)) | |
42d0d13d MR |
1690 | (synopsis "Fast, flexible and simple GUI") |
1691 | (description | |
1692 | "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games | |
1693 | and 3D applications. The main goals of mygui are: speed, flexibility and ease | |
1694 | of use.") | |
1695 | (home-page "http://mygui.info/") | |
1696 | (license license:expat))) | |
e9a599cd | 1697 | |
9fd50db3 PN |
1698 | (define-public mygui-gl |
1699 | ;; Closure size is reduced by some 800 MiB. | |
1700 | (package | |
1701 | (inherit mygui) | |
1702 | (name "mygui-gl") | |
1703 | (version "3.2.2") | |
1704 | (arguments | |
1705 | (substitute-keyword-arguments (package-arguments mygui) | |
1706 | ((#:configure-flags _) | |
1707 | `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL. | |
1708 | ;; We can't reuse the flags because of the mention to Ogre. | |
1709 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1710 | ;; Demos and tools are Windows-specific: | |
1711 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1712 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1713 | "-DMYGUI_BUILD_TOOLS=FALSE"))))) | |
1714 | (inputs | |
8394619b LC |
1715 | (modify-inputs (package-inputs mygui) |
1716 | (delete "ogre") | |
1717 | (prepend mesa glu))) | |
9fd50db3 PN |
1718 | (synopsis "Fast, flexible and simple GUI (OpenGL backend)"))) |
1719 | ||
e9a599cd MR |
1720 | (define-public openmw |
1721 | (package | |
1722 | (name "openmw") | |
92faad0a | 1723 | (version "0.47.0") |
e9a599cd MR |
1724 | (source |
1725 | (origin | |
aa246eaa EF |
1726 | (method git-fetch) |
1727 | (uri (git-reference | |
1728 | (url "https://github.com/OpenMW/openmw") | |
1729 | (commit (string-append "openmw-" version)))) | |
1730 | (file-name (git-file-name name version)) | |
e9a599cd MR |
1731 | (sha256 |
1732 | (base32 | |
92faad0a | 1733 | "19mcbnjl4279qalb97msf965bjax48mx1r1qczyvwhn28h6n3bsy")))) |
e9a599cd MR |
1734 | (build-system cmake-build-system) |
1735 | (arguments | |
1736 | `(#:tests? #f ; No test target | |
1737 | #:configure-flags | |
92faad0a FG |
1738 | (list "-DDESIRED_QT_VERSION=5" |
1739 | "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON"))) | |
e9a599cd | 1740 | (native-inputs |
8394619b | 1741 | (list boost doxygen pkg-config)) |
e9a599cd | 1742 | (inputs |
92faad0a FG |
1743 | (list bullet |
1744 | ffmpeg | |
1745 | libxt | |
1746 | lz4 | |
1747 | mygui-gl ; OpenMW does not need Ogre. | |
1748 | openal | |
1749 | openmw-openscenegraph | |
1750 | qtbase-5 | |
1751 | recastnavigation | |
1752 | sdl2 | |
1753 | unshield)) | |
5a80c15c | 1754 | (synopsis "Re-implementation of the RPG Morrowind engine") |
e9a599cd | 1755 | (description |
5a80c15c RW |
1756 | "OpenMW is a game engine which reimplements and extends the one that runs |
1757 | the 2002 open-world RPG Morrowind. The engine comes with its own editor, | |
1758 | called OpenMW-CS which allows the user to edit or create their own original | |
1759 | games.") | |
e9a599cd | 1760 | (home-page "https://openmw.org") |
8b1f8f64 | 1761 | (license license:gpl3))) |
194b4e7d PM |
1762 | |
1763 | (define-public godot | |
1764 | (package | |
1765 | (name "godot") | |
8f90ff4c | 1766 | (version "3.4.2") |
194b4e7d | 1767 | (source (origin |
39f516cb TGR |
1768 | (method git-fetch) |
1769 | (uri (git-reference | |
1770 | (url "https://github.com/godotengine/godot") | |
1771 | (commit (string-append version "-stable")))) | |
1772 | (file-name (git-file-name name version)) | |
194b4e7d | 1773 | (sha256 |
9766c6e2 | 1774 | (base32 |
8f90ff4c | 1775 | "1bm9yl995chvx6jwkdia12yjrgwcpzb1r9bmj606q8z264aw2ma5")) |
18f8e935 TL |
1776 | (modules '((guix build utils) |
1777 | (ice-9 ftw) | |
1778 | (srfi srfi-1))) | |
5b8d2ace MB |
1779 | (snippet |
1780 | '(begin | |
18f8e935 TL |
1781 | ;; Keep only those bundled files we have not (yet) replaced |
1782 | ;; with Guix versions. Note that some of these may be | |
1783 | ;; modified; see "thirdparty/README.md". | |
5b8d2ace | 1784 | (with-directory-excursion "thirdparty" |
18f8e935 TL |
1785 | (let* ((preserved-files |
1786 | '("README.md" | |
451e1075 | 1787 | "assimp" |
18f8e935 TL |
1788 | "certs" |
1789 | "cvtt" | |
af067eaf | 1790 | "embree" |
18f8e935 TL |
1791 | "enet" |
1792 | "etc2comp" | |
1793 | "fonts" | |
1794 | "glad" | |
1795 | "jpeg-compressor" | |
1796 | "libsimplewebm" | |
af067eaf | 1797 | "minimp3" |
18f8e935 TL |
1798 | "miniupnpc" |
1799 | "minizip" | |
1800 | "misc" | |
1801 | "nanosvg" | |
af067eaf | 1802 | "oidn" |
18f8e935 TL |
1803 | "pvrtccompressor" |
1804 | "recastnavigation" | |
1805 | "squish" | |
af067eaf | 1806 | "stb_rect_pack" |
18f8e935 | 1807 | "tinyexr" |
451e1075 | 1808 | "vhacd" |
18f8e935 TL |
1809 | "xatlas"))) |
1810 | (for-each delete-file-recursively | |
1811 | (lset-difference string=? | |
1812 | (scandir ".") | |
8f90ff4c | 1813 | (cons* "." ".." preserved-files))))))))) |
92b51d12 | 1814 | (build-system scons-build-system) |
194b4e7d | 1815 | (arguments |
92b51d12 | 1816 | `(#:scons ,scons-python2 |
ab67f84b | 1817 | #:scons-flags (list "platform=x11" "target=release_debug" |
92b51d12 AI |
1818 | ;; Avoid using many of the bundled libs. |
1819 | ;; Note: These options can be found in the SConstruct file. | |
c1bc92c0 | 1820 | "builtin_bullet=no" |
92b51d12 AI |
1821 | "builtin_freetype=no" |
1822 | "builtin_glew=no" | |
1823 | "builtin_libmpdec=no" | |
1824 | "builtin_libogg=no" | |
1825 | "builtin_libpng=no" | |
1826 | "builtin_libtheora=no" | |
1827 | "builtin_libvorbis=no" | |
5b8d2ace | 1828 | "builtin_libvpx=no" |
92b51d12 | 1829 | "builtin_libwebp=no" |
c1bc92c0 | 1830 | "builtin_mbedtls=no" |
92b51d12 | 1831 | "builtin_opus=no" |
c1bc92c0 | 1832 | "builtin_pcre2=no" |
451e1075 | 1833 | "builtin_wslay=no" |
c1bc92c0 TL |
1834 | "builtin_zlib=no" |
1835 | "builtin_zstd=no") | |
545511df | 1836 | #:tests? #f ; There are no tests |
194b4e7d PM |
1837 | #:phases |
1838 | (modify-phases %standard-phases | |
194b4e7d PM |
1839 | (add-after 'unpack 'scons-use-env |
1840 | (lambda _ | |
1841 | ;; Scons does not use the environment variables by default, | |
1842 | ;; but this substitution makes it do so. | |
1843 | (substitute* "SConstruct" | |
1844 | (("env_base = Environment\\(tools=custom_tools\\)") | |
1845 | (string-append | |
1846 | "env_base = Environment(tools=custom_tools)\n" | |
8f90ff4c | 1847 | "env_base = Environment(ENV=os.environ)"))))) |
545511df TL |
1848 | ;; Build headless tools, used for packaging games without depending on X. |
1849 | (add-after 'build 'build-headless | |
1850 | (lambda* (#:key scons-flags #:allow-other-keys) | |
1851 | (apply invoke "scons" | |
1852 | `(,(string-append "-j" (number->string (parallel-job-count))) | |
1853 | "platform=server" ,@(delete "platform=x11" scons-flags))))) | |
194b4e7d | 1854 | (replace 'install |
545511df | 1855 | (lambda* (#:key inputs outputs #:allow-other-keys) |
194b4e7d | 1856 | (let* ((out (assoc-ref outputs "out")) |
545511df TL |
1857 | (headless (assoc-ref outputs "headless")) |
1858 | (zenity (assoc-ref inputs "zenity"))) | |
1859 | ;; Strip build info from filenames. | |
194b4e7d | 1860 | (with-directory-excursion "bin" |
545511df TL |
1861 | (for-each |
1862 | (lambda (file) | |
1863 | (let ((dest (car (string-split (basename file) #\.)))) | |
1864 | (rename-file file dest))) | |
1865 | (find-files "." "godot.*\\.x11\\.opt\\.tools.*")) | |
1866 | (install-file "godot" (string-append out "/bin")) | |
1867 | (install-file "godot_server" (string-append headless "/bin"))) | |
1868 | ;; Tell the editor where to find zenity for OS.alert(). | |
1869 | (wrap-program (string-append out "/bin/godot") | |
8f90ff4c | 1870 | `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) |
af067eaf AT |
1871 | (add-after 'install 'wrap |
1872 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1873 | ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a | |
1874 | ;; fix of the mesa package we wrap the pcb executable such that | |
1875 | ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH. | |
1876 | ;; also append ld path for pulseaudio and alsa-lib | |
1877 | (let* ((out (assoc-ref outputs "out")) | |
457416bb | 1878 | (udev_path (string-append (assoc-ref inputs "eudev") "/lib")) |
af067eaf AT |
1879 | (pulseaudio_path (string-append (assoc-ref inputs "pulseaudio") "/lib")) |
1880 | (alas_lib_path (string-append (assoc-ref inputs "alsa-lib") "/lib"))) | |
1881 | (wrap-program (string-append out "/bin/godot") | |
8f90ff4c | 1882 | `("LD_LIBRARY_PATH" ":" prefix (,udev_path ,pulseaudio_path ,alas_lib_path)))))) |
194b4e7d PM |
1883 | (add-after 'install 'install-godot-desktop |
1884 | (lambda* (#:key outputs #:allow-other-keys) | |
1885 | (let* ((out (assoc-ref outputs "out")) | |
bf076da9 TL |
1886 | (applications (string-append out "/share/applications")) |
1887 | (icons (string-append out "/share/icons/hicolor"))) | |
1888 | (mkdir-p applications) | |
1889 | (copy-file "misc/dist/linux/org.godotengine.Godot.desktop" | |
1890 | (string-append applications "/godot.desktop")) | |
1891 | (for-each (lambda (icon dest) | |
1892 | (mkdir-p (dirname dest)) | |
1893 | (copy-file icon dest)) | |
1894 | '("icon.png" "icon.svg") | |
1895 | `(,(string-append icons "/256x256/apps/godot.png") | |
8f90ff4c | 1896 | ,(string-append icons "/scalable/apps/godot.svg"))))))))) |
545511df | 1897 | (outputs '("out" "headless")) |
457416bb TGR |
1898 | (native-inputs |
1899 | (list pkg-config)) | |
1900 | (inputs | |
1901 | (list alsa-lib | |
1902 | bullet | |
1903 | freetype | |
1904 | glew | |
1905 | glu | |
1906 | libtheora | |
1907 | libvorbis | |
1908 | libvpx | |
1909 | libwebp | |
1910 | libx11 | |
1911 | libxcursor | |
1912 | libxi | |
1913 | libxinerama | |
1914 | libxrandr | |
1915 | mbedtls-apache | |
1916 | mesa | |
1917 | opusfile | |
1918 | pcre2 | |
1919 | pulseaudio | |
1920 | eudev ; FIXME: required by mesa | |
1921 | wslay | |
1922 | zenity | |
1923 | `(,zstd "lib"))) | |
194b4e7d PM |
1924 | (home-page "https://godotengine.org/") |
1925 | (synopsis "Advanced 2D and 3D game engine") | |
1926 | (description | |
1927 | "Godot is an advanced multi-platform game engine written in C++. If | |
1928 | features design tools such as a visual editor, can import 3D models and | |
1929 | provide high-quality 3D rendering, it contains an animation editor, and can be | |
1930 | scripted in a Python-like language.") | |
1931 | (license license:expat))) | |
531003be | 1932 | |
a0609772 ASM |
1933 | (define-public entt |
1934 | (package | |
1935 | (name "entt") | |
d3480fbf | 1936 | (version "3.7.1") |
a0609772 ASM |
1937 | (source (origin |
1938 | (method git-fetch) | |
1939 | (uri (git-reference | |
1940 | (url "https://github.com/skypjack/entt") | |
1941 | (commit (string-append "v" version)))) | |
1942 | (file-name (git-file-name name version)) | |
1943 | (sha256 | |
1944 | (base32 | |
d3480fbf | 1945 | "151jg3m262xwaywl2rqnc90yr6p48rhmgi5mxyv6bwqvmfli2m5p")))) |
a0609772 ASM |
1946 | (build-system cmake-build-system) |
1947 | (arguments | |
1948 | `(#:configure-flags (list "-DENTT_BUILD_TESTING=ON" | |
1949 | "-DENTT_FIND_GTEST_PACKAGE=ON" | |
1950 | "-DENTT_BUILD_DOCS=ON") | |
1951 | ;; Only tests are compiled, and they need assertions to work correctly. | |
1952 | #:build-type "Debug")) | |
1953 | (native-inputs | |
8394619b LC |
1954 | (list ;; for testing |
1955 | googletest | |
1956 | ;; for documentation | |
1957 | doxygen graphviz)) | |
a0609772 ASM |
1958 | (synopsis "Entity component system") |
1959 | (description "EnTT is a header-only library, containing (among other things) | |
1960 | @itemize | |
1961 | @item an entity component system based on sparse sets, | |
1962 | @item a configuration system using the monostate pattern, | |
1963 | @item a static reflection system, | |
1964 | @item and a cooperative scheduler. | |
1965 | @end itemize") | |
1966 | (home-page "https://github.com/skypjack/entt") | |
1967 | (license (list license:expat ; code | |
1968 | license:cc-by4.0)))) ; documentation | |
1969 | ||
531003be | 1970 | (define-public eureka |
1971 | (package | |
1972 | (name "eureka") | |
75f66e4a | 1973 | (version "1.24") |
531003be | 1974 | (source (origin |
1975 | (method url-fetch) | |
1976 | (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/" | |
1977 | version "/eureka-" | |
1978 | ;; version without dots e.g 1.21 => 121 | |
1979 | (string-join (string-split version #\.) "") | |
1980 | "-source.tar.gz")) | |
1981 | (sha256 | |
1982 | (base32 | |
75f66e4a | 1983 | "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v")))) |
531003be | 1984 | (build-system gnu-build-system) |
1985 | (arguments | |
1986 | '(#:tests? #f | |
1987 | #:make-flags | |
1988 | (let ((out (assoc-ref %outputs "out"))) | |
1989 | (list (string-append "PREFIX=" out))) | |
1990 | #:phases | |
1991 | (modify-phases %standard-phases | |
1992 | (delete 'configure) | |
1993 | (add-before 'build 'prepare-install-directories | |
1994 | (lambda* (#:key outputs #:allow-other-keys) | |
1995 | (let ((out (assoc-ref outputs "out"))) | |
1996 | (mkdir-p (string-append out "/bin")) | |
1997 | (mkdir-p (string-append out "/share")) | |
1998 | ||
1999 | (with-fluids ((%default-port-encoding #f)) | |
2000 | (substitute* "./src/main.cc" | |
2001 | (("/usr/local") out))) | |
2002 | ||
2003 | (substitute* "Makefile" | |
2004 | (("-o root") "")))))))) | |
2005 | (inputs `(("mesa" ,mesa) | |
2006 | ("libxft" ,libxft) | |
2007 | ("libxinerama" ,libxinerama) | |
2008 | ("libfontconfig" ,fontconfig) | |
4bd428a7 | 2009 | ("libjpeg" ,libjpeg-turbo) |
531003be | 2010 | ("libpng" ,libpng) |
2011 | ("fltk" ,fltk) | |
2012 | ("zlib" ,zlib))) | |
8394619b | 2013 | (native-inputs (list pkg-config xdg-utils)) |
531003be | 2014 | (synopsis "Doom map editor") |
2015 | (description "Eureka is a map editor for the classic DOOM games, and a few | |
2016 | related games such as Heretic and Hexen. It comes with a 3d preview mode and | |
2017 | a 2D editor view.") | |
2018 | (home-page "http://eureka-editor.sourceforge.net/") | |
2019 | (license license:gpl2+))) | |
00fca594 RW |
2020 | |
2021 | (define-public guile-chickadee | |
2022 | (package | |
2023 | (name "guile-chickadee") | |
338dfc92 | 2024 | (version "0.8.0") |
00fca594 RW |
2025 | (source (origin |
2026 | (method url-fetch) | |
2027 | (uri (string-append "https://files.dthompson.us/chickadee/" | |
2028 | "chickadee-" version ".tar.gz")) | |
2029 | (sha256 | |
2030 | (base32 | |
338dfc92 | 2031 | "1k2dml2z57lnc36wrmwhh7avnpczxgxnshlfhpbk174vg6v609n0")))) |
00fca594 | 2032 | (build-system gnu-build-system) |
daca7077 EF |
2033 | (arguments |
2034 | '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) | |
00fca594 | 2035 | (propagated-inputs |
be4d9527 | 2036 | `(("guile-opengl" ,guile3.0-opengl) |
338dfc92 | 2037 | ("guile-sdl2" ,guile-sdl2))) |
00fca594 | 2038 | (inputs |
8394619b LC |
2039 | (list freetype |
2040 | guile-3.0-latest | |
2041 | libvorbis | |
2042 | mpg123 | |
2043 | openal | |
2044 | readline)) | |
00fca594 | 2045 | (native-inputs |
8394619b | 2046 | (list guile-3.0-latest pkg-config texinfo)) |
00fca594 RW |
2047 | (home-page "https://dthompson.us/projects/chickadee.html") |
2048 | (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL") | |
2049 | (description "Chickadee is a game development toolkit for Guile Scheme | |
2050 | built on top of SDL2 and OpenGL. Chickadee aims to provide all the features | |
2051 | that parenthetically inclined game developers need to make 2D (and eventually | |
2052 | 3D) games in Scheme, such as: | |
2053 | ||
abb0ff45 RW |
2054 | @enumerate |
2055 | @item extensible, fixed-timestep game loop | |
2056 | @item OpenGL-based rendering engine | |
2057 | @item keyboard, mouse, controller input | |
2058 | @item REPL-driven development model | |
2059 | @end enumerate\n") | |
2060 | (license license:gpl3+))) | |
2061 | ||
4041fabb PN |
2062 | (define-public bennu-game-development |
2063 | (package | |
2064 | (name "bennu-game-development") | |
abb64b5e | 2065 | (version "353") |
4041fabb PN |
2066 | (source (origin |
2067 | (method svn-fetch) | |
2068 | (uri (svn-reference | |
2069 | (url "http://svn.code.sf.net/p/bennugd/code") | |
2070 | (revision (string->number version)))) | |
2071 | (file-name (string-append name "-" version)) | |
2072 | (sha256 | |
2073 | (base32 | |
abb64b5e | 2074 | "1iri58ryk9lbqn585cbccnvrfkj8qxlbcsk8rpih40jhvs1j101l")) |
edf1ce60 EF |
2075 | (modules '((guix build utils))) |
2076 | (snippet | |
2077 | '(begin | |
2078 | (delete-file-recursively "3rdparty") #t)))) | |
4041fabb PN |
2079 | (build-system gnu-build-system) |
2080 | (arguments | |
2081 | '(#:phases | |
2082 | (modify-phases %standard-phases | |
f0e4cfcb | 2083 | (add-after 'unpack 'patch-configure-to-use-openssl |
4041fabb PN |
2084 | (lambda* (#:key outputs #:allow-other-keys) |
2085 | (chdir "core") | |
2086 | (delete-file "configure") | |
2087 | (substitute* "configure.in" | |
2088 | (("i\\*86\\)") | |
f0e4cfcb | 2089 | "*) |
4041fabb PN |
2090 | COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\" |
2091 | COMMON_LDFLAGS=\"$COMMON_LDFLAGS\" | |
2092 | LIBSSL=\"crypto\" | |
2093 | USE_OPENSSL=yes | |
2094 | ;; | |
2095 | ||
f0e4cfcb EF |
2096 | i*86)")) |
2097 | #t))))) | |
8394619b LC |
2098 | (inputs (list openssl zlib)) |
2099 | (native-inputs (list pkg-config autoconf automake libtool)) | |
4041fabb PN |
2100 | (synopsis "Programming language to create games") |
2101 | (description "Bennu Game Development, also known as bennudg, is a | |
2102 | programming language tailored at game development. It is the successor of | |
2103 | Fenix.") | |
2104 | (home-page "https://sourceforge.net/projects/bennugd/") | |
2105 | (license license:zlib))) | |
24c4b012 PN |
2106 | |
2107 | (define-public bennu-game-development-modules | |
2108 | (package | |
2109 | (inherit bennu-game-development) | |
2110 | (name "bennu-game-development-modules") | |
2111 | (arguments | |
2112 | '(#:phases | |
2113 | (modify-phases %standard-phases | |
2114 | (add-after 'unpack 'patch-conflicting-definitions | |
2115 | (lambda _ | |
2116 | (with-fluids ((%default-port-encoding #f)) | |
2117 | (substitute* "core/include/fmath.h" | |
2118 | (("extern fixed fmul\\( int x, int y \\);") "") | |
2119 | (("extern fixed fdiv\\( int x, int y \\);") ""))) | |
2120 | (chdir "modules")))))) | |
8394619b | 2121 | (inputs (list zlib libpng openssl sdl-mixer bennu-game-development)) |
0525864b | 2122 | (synopsis "Modules for the Bennu Game Development programming language") |
24c4b012 | 2123 | (description "This package contains a collection of modules for the Bennu |
0525864b | 2124 | Game Development programming language, from CD handling through SDL to |
24c4b012 | 2125 | joystick support."))) |
cd528946 RW |
2126 | |
2127 | (define-public plib | |
2128 | (package | |
2129 | (name "plib") | |
2130 | (version "1.8.5") | |
2131 | (source (origin | |
2132 | (method url-fetch) | |
2133 | (uri (string-append "http://plib.sourceforge.net/dist/" | |
2134 | "plib-" version ".tar.gz")) | |
2135 | (sha256 | |
2136 | (base32 | |
05f386f1 EF |
2137 | "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8")) |
2138 | (patches (search-patches "plib-CVE-2011-4620.patch" | |
2139 | "plib-CVE-2012-4552.patch")))) | |
cd528946 RW |
2140 | (build-system gnu-build-system) |
2141 | (inputs | |
8394619b | 2142 | (list mesa libxi libxmu)) |
cd528946 | 2143 | (native-inputs |
8394619b | 2144 | (list pkg-config)) |
cd528946 RW |
2145 | (home-page "http://plib.sourceforge.net/") |
2146 | (synopsis "Suite of portable game libraries") | |
2147 | (description "PLIB is a set of libraries that will permit programmers to | |
2148 | write games and other realtime interactive applications that are 100% portable | |
2149 | across a wide range of hardware and operating systems. PLIB includes sound | |
2150 | effects, music, a complete 3D engine, font rendering, a simple Windowing | |
2151 | library, a game scripting language, a GUI, networking, 3D math library and a | |
2152 | collection of handy utility functions. All are 100% portable across nearly | |
2153 | all modern computing platforms. Each library component is fairly independent | |
2154 | of the others") | |
2155 | (license license:lgpl2.0+))) | |
e4ff9dff PN |
2156 | |
2157 | (define-public ioquake3 | |
2158 | ;; We follow master since it seems that there won't be releases after 1.3.6. | |
2159 | (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0")) | |
2160 | (package | |
2161 | (name "ioquake3") | |
2162 | (version (git-version "1.3.6" "1" commit)) | |
2163 | (source | |
2164 | (origin | |
2165 | (method git-fetch) | |
2166 | (uri (git-reference | |
b0e7b699 | 2167 | (url "https://github.com/ioquake/ioq3") |
e4ff9dff PN |
2168 | (commit commit))) |
2169 | (file-name (git-file-name name version)) | |
2170 | (sha256 | |
2171 | (base32 | |
2172 | "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z")))) | |
2173 | (build-system gnu-build-system) | |
2174 | (inputs | |
2175 | `(("sdl2" ,sdl2) | |
4bd428a7 | 2176 | ("libjpeg" ,libjpeg-turbo) |
e4ff9dff PN |
2177 | ("openal" ,openal) |
2178 | ("curl" ,curl) | |
2179 | ("opusfile" ,opusfile) | |
2180 | ("opus" ,opus) | |
2181 | ("libvorbis" ,libvorbis) | |
2182 | ("freetype" ,freetype) | |
2183 | ("libogg" ,libogg))) | |
2184 | (native-inputs | |
8394619b LC |
2185 | (list which ; Else SDL_version.h won't be found. |
2186 | pkg-config)) | |
e4ff9dff PN |
2187 | (arguments |
2188 | '(#:tests? #f ; No tests. | |
2189 | #:make-flags '("CC=gcc" | |
2190 | "USE_INTERNAL_LIBS=0" | |
2191 | "USE_FREETYPE=1" | |
2192 | "USE_RENDERER_DLOPEN=0" | |
2193 | "USE_OPENAL_DLOPEN=0" | |
2194 | "USE_CURL_DLOPEN=0") | |
2195 | #:phases | |
2196 | (modify-phases %standard-phases | |
2197 | (delete 'configure) | |
2198 | (replace 'install | |
2199 | (lambda* (#:key outputs #:allow-other-keys) | |
2200 | (invoke "make" "copyfiles" "CC=gcc" | |
2201 | "USE_INTERNAL_LIBS=0" | |
2202 | (string-append "COPYDIR=" | |
2203 | (assoc-ref outputs "out") | |
2204 | "/bin"))))))) | |
2205 | (home-page "https://ioquake3.org/") | |
2206 | (synopsis "FPS game engine based on Quake 3") | |
2207 | (description "ioquake3 is a free software first person shooter engine | |
2208 | based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to | |
2209 | the original, ioquake3 has been cleaned up, bugs have been fixed and features | |
2210 | added. The permanent goal is to create the open source Quake 3 distribution | |
2211 | upon which people base their games, ports to new platforms, and other | |
2212 | projects.") | |
e4ff9dff | 2213 | (license license:gpl2)))) |
545946f6 | 2214 | |
2e0ddc74 DP |
2215 | (define-public instead |
2216 | (package | |
2217 | (name "instead") | |
2218 | (version "3.3.5") | |
2219 | (build-system cmake-build-system) | |
2220 | (source | |
2221 | (origin | |
2222 | (method git-fetch) | |
2223 | (uri (git-reference | |
2224 | (url "https://github.com/instead-hub/instead") | |
2225 | (commit version))) | |
2226 | (file-name (git-file-name name version)) | |
2227 | (sha256 | |
2228 | (base32 "02j8cw623j51qmr4991i5hsbrzmnp0qfzds8m6nwwr15sjv3hv1g")) | |
2229 | (patches | |
2230 | (search-patches | |
2231 | "instead-use-games-path.patch")) | |
2232 | (modules '((guix build utils))) | |
2233 | (snippet | |
2234 | '(begin | |
2235 | (delete-file-recursively "src/zlib"))))) | |
2236 | (arguments | |
2237 | '(#:configure-flags | |
2238 | (list (string-append | |
2239 | "-DLUA_INCLUDE_DIR=" | |
2240 | (assoc-ref %build-inputs "luajit") "/include/luajit-2.1/") | |
2241 | "-DWITH_LUAJIT=1" | |
2242 | "-DWITH_GTK3=1") | |
2243 | #:tests? #f)) | |
2244 | (inputs | |
2245 | `(("gtk+",gtk+) | |
2246 | ("lua" ,lua) | |
2247 | ("luajit" ,luajit) | |
2248 | ("pkg-config" ,pkg-config) | |
2249 | ("sdl2-images" ,sdl2-image) | |
2250 | ("sdl2-ttf" ,sdl2-ttf) | |
2251 | ("sdl2-mixer" ,sdl2-mixer) | |
2252 | ("zlib" ,zlib))) | |
2253 | (home-page "https://instead3.syscall.ru/") | |
2254 | (synopsis "Text adventure interpreter") | |
2255 | (description "The STEAD (Simple TExt ADventures) interpreter provides | |
2256 | functionality to play games that mix elements of visual novels, interactive | |
2257 | fiction and classic point-and-click adventures.") | |
2258 | (native-search-paths | |
2259 | (list (search-path-specification | |
2260 | (variable "INSTEAD_GAMES_PATH") | |
2261 | (separator #f) ;single entry | |
2262 | (files '("share/instead/games"))))) | |
2263 | (license license:expat))) | |
2264 | ||
545946f6 PN |
2265 | (define-public openvr |
2266 | (package | |
2267 | (name "openvr") | |
1854a0ec | 2268 | (version "1.8.19") |
545946f6 PN |
2269 | (home-page "https://github.com/ValveSoftware/openvr/") |
2270 | (source | |
2271 | (origin | |
2272 | (method git-fetch) | |
2273 | (uri (git-reference | |
2274 | (url home-page) | |
2275 | (commit (string-append "v" version)))) | |
2276 | (file-name (git-file-name name version)) | |
2277 | (sha256 | |
1854a0ec | 2278 | (base32 "1b8cppvw6ib0kvx0vjq7jsk3plg1vh171w8xr230vjn05381wp52")))) |
545946f6 PN |
2279 | (build-system cmake-build-system) |
2280 | (arguments | |
2281 | ;; No tests. | |
2282 | '(#:tests? #f | |
2283 | #:configure-flags (list "-DBUILD_SHARED=1"))) | |
2284 | (synopsis "Virtual reality software development kit") | |
2285 | (description "OpenVR is an API and runtime that allows access to VR | |
2286 | hardware from multiple vendors without requiring that applications have | |
2287 | specific knowledge of the hardware they are targeting.") | |
2288 | (license license:bsd-3))) | |
7158fe4d | 2289 | |
93c47bff NG |
2290 | (define-public flatzebra |
2291 | (package | |
2292 | (name "flatzebra") | |
2293 | (version "0.1.7") | |
2294 | (source | |
2295 | (origin | |
2296 | (method url-fetch) | |
2297 | (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/" | |
2298 | "flatzebra-" version ".tar.gz")) | |
2299 | (sha256 | |
2300 | (base32 "1x2dy41c8vrq62bn03b82fpmk7x4rzd7qqiwvq0mgcl5rmasc2c8")))) | |
2301 | (build-system gnu-build-system) | |
2302 | (arguments | |
2303 | `(#:phases | |
2304 | (modify-phases %standard-phases | |
2305 | (add-after 'unpack 'fix-sdl-config | |
2306 | (lambda* (#:key inputs #:allow-other-keys) | |
2307 | ;; XXX: sdl-config in sdl-union is a link to sdl-config from | |
2308 | ;; plain sdl package. As a consequence, the prefix is wrong. | |
2309 | ;; Force correct one with "--prefix" argument. | |
2310 | (let ((sdl-union (assoc-ref inputs "sdl"))) | |
2311 | (setenv "SDL_CONFIG" | |
2312 | (string-append sdl-union | |
2313 | "/bin/sdl-config --prefix=" | |
2314 | sdl-union))) | |
2315 | #t))))) | |
2316 | (native-inputs | |
8394619b | 2317 | (list pkg-config)) |
93c47bff NG |
2318 | (inputs |
2319 | `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer))))) | |
2320 | (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html") | |
2321 | (synopsis "Generic game engine for 2D double-buffering animation") | |
2322 | (description | |
2323 | "Flatzebra is a simple, generic C++ game engine library supporting 2D | |
2324 | double-buffering.") | |
2325 | (license license:gpl2+))) | |
2326 | ||
7158fe4d PN |
2327 | (define-public fna |
2328 | (package | |
2329 | (name "fna") | |
2330 | (version "19.12.01") | |
2331 | (source | |
2332 | (origin | |
2333 | (method git-fetch) | |
2334 | (uri (git-reference | |
b0e7b699 | 2335 | (url "https://github.com/FNA-XNA/FNA") |
7158fe4d PN |
2336 | (commit version))) |
2337 | (file-name (git-file-name name version)) | |
2338 | (sha256 | |
2339 | (base32 "1vdyi9hac24fqcs8kpj6yk36bf5rrl4dvlvdd9fc701fawcf6lrr")))) | |
2340 | (build-system gnu-build-system) | |
2341 | (arguments | |
2342 | '(#:tests? #f ; No tests. | |
2343 | #:phases | |
2344 | (modify-phases %standard-phases | |
2345 | (add-after 'unpack 'link-dep-src | |
2346 | (lambda* (#:key inputs #:allow-other-keys) | |
2347 | (let ((sdl2 (assoc-ref inputs "sdl2-cs-src")) | |
2348 | (mojoshader (assoc-ref inputs "mojoshader-src")) | |
2349 | (faudio (assoc-ref inputs "faudio-src")) | |
2350 | (theorafile (assoc-ref inputs "theorafile-src"))) | |
2351 | (symlink (string-append sdl2 "/src") "lib/SDL2-CS/src") | |
2352 | (symlink (string-append mojoshader "/csharp") "lib/MojoShader/csharp") | |
2353 | (symlink (string-append faudio "/csharp") "lib/FAudio/csharp") | |
2354 | (symlink (string-append theorafile "/csharp") "lib/Theorafile/csharp")))) | |
2355 | (delete 'configure) | |
2356 | (replace 'build | |
2357 | (lambda _ | |
2358 | (invoke "make" "release"))) | |
2359 | (replace 'install | |
2360 | (lambda* (#:key outputs #:allow-other-keys) | |
2361 | (let ((out (assoc-ref outputs "out"))) | |
2362 | (install-file "bin/Release/FNA.dll" (string-append out "/lib")) | |
2363 | #t)))))) | |
2364 | (native-inputs | |
8394619b | 2365 | (list mono)) |
7158fe4d PN |
2366 | (inputs `(("sdl2-cs-src" ,(package-source sdl2-cs)) |
2367 | ("mojoshader-src" ,(package-source mojoshader-cs)) | |
2368 | ("faudio-src" ,(package-source faudio)) | |
2369 | ("theorafile-src" ,(package-source theorafile)))) | |
2370 | (home-page "https://fna-xna.github.io/") | |
2371 | (synopsis "Accuracy-focused XNA4 reimplementation") | |
2372 | (description "FNA is a Microsoft XNA Game Studio 4.0 reimplementation that | |
2373 | focuses solely on developing a fully accurate XNA4 runtime for the desktop.") | |
2374 | (license (list license:ms-pl ; FNA | |
2375 | license:lgpl2.1 ; LzxDecoder.cs | |
2376 | ;; Mono.Xna: | |
2377 | license:expat)))) | |
45c552ec NG |
2378 | |
2379 | (define-public libccd | |
2380 | (package | |
2381 | (name "libccd") | |
2382 | (version "2.1") | |
2383 | (source | |
2384 | (origin | |
2385 | (method git-fetch) | |
2386 | (uri (git-reference | |
b0e7b699 | 2387 | (url "https://github.com/danfis/libccd") |
45c552ec NG |
2388 | (commit (string-append "v" version)))) |
2389 | (file-name (git-file-name name version)) | |
2390 | (sha256 | |
2391 | (base32 "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc")))) | |
2392 | (build-system cmake-build-system) | |
2393 | (arguments | |
2394 | `(#:configure-flags '("-DBUILD_DOCUMENTATION=ON" | |
2395 | "-DBUILD_TESTING=ON" | |
2396 | "-DENABLE_DOUBLE_PRECISION=ON"))) | |
2397 | (native-inputs | |
8394619b | 2398 | (list python-sphinx)) |
45c552ec NG |
2399 | (home-page "https://github.com/danfis/libccd") |
2400 | (synopsis "Library for collision detection between two convex shapes") | |
2401 | (description "@code{libccd} is library for a collision detection | |
2402 | between two convex shapes. @code{libccd} implements variation on | |
2403 | Gilbert–Johnson–Keerthi algorithm plus Expand Polytope Algorithm (EPA) | |
2404 | and also implements algorithm Minkowski Portal Refinement (MPR, | |
2405 | a.k.a. XenoCollide) as described in Game Programming Gems 7.") | |
2406 | (license license:expat))) | |
42399ad7 NG |
2407 | |
2408 | (define-public ode | |
2409 | (package | |
2410 | (name "ode") | |
416fe466 | 2411 | (version "0.16.2") |
42399ad7 NG |
2412 | (source |
2413 | (origin | |
2414 | (method url-fetch) | |
2415 | (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/" | |
2416 | "ode-" version ".tar.gz")) | |
2417 | (sha256 | |
416fe466 | 2418 | (base32 "08hgh4gqdk77jcw8b7gq2mwsfg4a5v5y0j7g42bxiqhmn3ffnsmj")) |
42399ad7 NG |
2419 | (modules '((guix build utils))) |
2420 | (snippet | |
2421 | '(begin | |
2422 | (delete-file-recursively "libccd") | |
2423 | #t)))) | |
2424 | (build-system cmake-build-system) | |
2425 | (arguments | |
416fe466 | 2426 | `(#:configure-flags '("-DODE_WITH_LIBCCD_SYSTEM=ON") |
42399ad7 NG |
2427 | #:phases |
2428 | (modify-phases %standard-phases | |
2429 | (add-after 'unpack 'unbundle-libccd | |
2430 | (lambda _ | |
2431 | (substitute* "CMakeLists.txt" | |
2432 | (("configure_file\\(libccd/.*") "")) | |
2433 | #t))))) | |
2434 | (inputs | |
8394619b | 2435 | (list glu libccd mesa)) |
76fcbb78 | 2436 | (home-page "https://www.ode.org/") |
42399ad7 NG |
2437 | (synopsis "High performance library for simulating rigid body dynamics") |
2438 | (description "ODE is a high performance library for simulating | |
2439 | rigid body dynamics. It is fully featured, stable, mature and | |
2440 | platform independent with an easy to use C/C++ API. It has advanced | |
2441 | joint types and integrated collision detection with friction. ODE is | |
2442 | useful for simulating vehicles, objects in virtual reality | |
2443 | environments and virtual creatures. It is currently used in many | |
2444 | computer games, 3D authoring tools and simulation tools.") | |
2445 | ;; Software is dual-licensed. | |
2446 | (license (list license:lgpl2.1+ license:expat)))) | |
d6ab5f4f NG |
2447 | |
2448 | (define-public chipmunk | |
2449 | (package | |
2450 | (name "chipmunk") | |
2451 | (version "7.0.3") | |
2452 | (source | |
2453 | (origin | |
2454 | (method git-fetch) | |
2455 | (uri (git-reference | |
b0e7b699 | 2456 | (url "https://github.com/slembcke/Chipmunk2D") |
d6ab5f4f NG |
2457 | (commit (string-append "Chipmunk-" version)))) |
2458 | (file-name (git-file-name name version)) | |
2459 | (sha256 | |
2460 | (base32 "1qmkn01g06p3rnhmbyffmjns6wj5vhgf9cscigk3wzxcpwv1hyxb")))) | |
2461 | (build-system cmake-build-system) | |
2462 | (arguments | |
2463 | `(#:tests? #f ;no test | |
2464 | #:configure-flags '("-DBUILD_STATIC=OFF" | |
2465 | "-DBUILD_DEMOS=OFF"))) | |
2466 | (inputs | |
8394619b | 2467 | (list freeglut libxmu libxrandr)) |
d0bb1c2f | 2468 | (home-page "https://chipmunk-physics.net/") |
d6ab5f4f NG |
2469 | (synopsis "Fast and lightweight 2D game physics library") |
2470 | (description "Chipmunk is a simple, lightweight, fast and portable 2D | |
2471 | rigid body physics library written in C.") | |
2472 | (license license:expat))) | |
2e0787a5 | 2473 | |
920a3639 EF |
2474 | (define-public box2d |
2475 | (package | |
2476 | (name "box2d") | |
2477 | (version "2.4.1") | |
2478 | (source | |
2479 | (origin | |
2480 | (method git-fetch) | |
2481 | (uri (git-reference | |
2482 | (url "https://github.com/erincatto/box2d") | |
2483 | (commit (string-append "v" version)))) | |
2484 | (file-name (git-file-name name version)) | |
2485 | (sha256 | |
2486 | (base32 "1ja9cahf3z9zzrdaqcw44lpjmqf2ir2g4chwz0iwqwlkckwhpgvh")) | |
2487 | (modules '((guix build utils))) | |
2488 | (snippet | |
2489 | '(begin | |
2490 | ;; Bundled code only used for the testbed. | |
2491 | (delete-file-recursively "extern"))))) | |
2492 | (build-system cmake-build-system) | |
2493 | (arguments | |
2494 | `(#:test-target "unit_test" | |
2495 | #:configure-flags '("-DBUILD_SHARED_LIBS=ON" | |
2496 | "-DBOX2D_BUILD_TESTBED=OFF"))) | |
2497 | (inputs | |
8394619b | 2498 | (list libx11)) |
920a3639 EF |
2499 | (home-page "https://box2d.org/") |
2500 | (synopsis "2D physics engine for games") | |
2501 | (description "Box2D is a 2D rigid body simulation library for games. | |
2502 | Programmers can use it in their games to make objects move in realistic ways and | |
2503 | make the game world more interactive. From the game engine's point of view, a | |
2504 | physics engine is just a system for procedural animation.") | |
2505 | (license license:expat))) | |
2506 | ||
2e0787a5 GL |
2507 | (define-public libtcod |
2508 | (package | |
2509 | (name "libtcod") | |
2510 | (version "1.15.1") | |
2511 | (source (origin | |
2512 | (method git-fetch) | |
2513 | (uri (git-reference | |
b0e7b699 | 2514 | (url "https://github.com/libtcod/libtcod") |
2e0787a5 GL |
2515 | (commit version))) |
2516 | (file-name (git-file-name name version)) | |
2517 | (sha256 | |
2518 | (base32 | |
2519 | "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5")) | |
2520 | (modules '((guix build utils))) | |
2521 | (snippet '(begin | |
2522 | (delete-file-recursively "src/vendor/utf8proc") | |
2523 | (delete-file-recursively "src/vendor/zlib") | |
2524 | (delete-file "src/vendor/stb_truetype.h") | |
2525 | (delete-file "src/vendor/stb_sprintf.h") | |
2526 | (delete-file "src/vendor/lodepng.cpp") | |
2527 | (delete-file "src/vendor/lodepng.h") | |
2528 | ||
2529 | (substitute* "buildsys/autotools/sources.am" | |
2530 | (("\\.\\./\\.\\./src/vendor/lodepng\\.cpp \\\\\n") "") | |
2531 | (("\\.\\./\\.\\./src/vendor/stb\\.c \\\\") | |
2532 | "../../src/vendor/stb.c") | |
2533 | (("\\.\\./\\.\\./src/vendor/utf8proc/utf8proc\\.c") "")) | |
2534 | ||
2535 | (substitute* "src/libtcod/sys_sdl_img_png.cpp" | |
2536 | (("\\.\\./vendor/") "")) | |
2537 | ||
2538 | (substitute* '("src/libtcod/color/canvas.cpp" | |
2539 | "src/libtcod/sys_sdl_img_png.cpp" | |
2540 | "src/libtcod/tileset/truetype.cpp" | |
2541 | "src/libtcod/tileset/tilesheet.cpp") | |
2542 | (("\\.\\./\\.\\./vendor/") "")) | |
2543 | ||
2544 | (substitute* "src/libtcod/console/printing.cpp" | |
2545 | (("\\.\\./\\.\\./vendor/utf8proc/") "")) | |
2546 | #t)))) | |
2547 | (build-system gnu-build-system) | |
2548 | (arguments | |
2549 | `(#:configure-flags '("--with-gnu-ld" | |
2550 | "LIBS=-lutf8proc -llodepng") | |
2551 | #:phases | |
2552 | (modify-phases %standard-phases | |
2553 | (add-after 'unpack 'change-to-build-dir | |
2554 | (lambda _ | |
2555 | (chdir "buildsys/autotools") | |
2556 | (patch-shebang "get_version.py") | |
2557 | #t))))) | |
2558 | (native-inputs | |
8394619b LC |
2559 | (list autoconf |
2560 | automake | |
2561 | libtool | |
2562 | python | |
2563 | pkg-config | |
2564 | stb-sprintf | |
2565 | stb-truetype)) | |
2e0787a5 | 2566 | (inputs |
8394619b | 2567 | (list lodepng sdl2 utf8proc zlib)) |
2e0787a5 GL |
2568 | (home-page "https://github.com/libtcod/libtcod") |
2569 | (synopsis "Library specifically designed for writing roguelikes") | |
2570 | (description | |
2571 | "libtcod is a fast, portable and uncomplicated API for roguelike | |
2572 | developers providing an advanced true color console, input, and lots of other | |
2573 | utilities frequently used in roguelikes.") | |
2574 | (license license:bsd-3))) | |
0b5bf615 PN |
2575 | |
2576 | (define-public warsow-qfusion | |
2577 | ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated. | |
2578 | ;; The 2.5 beta as published on the homepage is commit | |
2579 | ;; c4de15df559410aff0ca6643724e24cddb0ecbbd | |
2580 | (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd")) | |
2581 | (package | |
2582 | (name "warsow-qfusion") | |
2583 | (version (git-version "2.5" "1" commit)) ; 2.5-beta | |
2584 | (source (origin | |
2585 | (method git-fetch) | |
2586 | (uri (git-reference | |
2587 | (url "https://github.com/Warsow/qfusion/") | |
2588 | (commit commit) | |
2589 | (recursive? #t))) | |
2590 | (file-name (git-file-name name version)) | |
2591 | (sha256 | |
2592 | (base32 | |
2593 | "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g")) | |
2594 | ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46 | |
e5f1f5ce PN |
2595 | (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch")) |
2596 | (modules '((guix build utils))) | |
2597 | (snippet '(begin | |
2598 | (delete-file-recursively "platforms") | |
2599 | (delete-file-recursively "debian") | |
2600 | (delete-file-recursively "libsrcs") | |
2601 | #t)))) | |
0b5bf615 PN |
2602 | (build-system cmake-build-system) |
2603 | (arguments | |
2604 | `(#:tests? #f ; No tests. | |
2605 | #:configure-flags '("-DQFUSION_GAME=Warsow") | |
2606 | #:modules | |
2607 | ((guix build utils) | |
2608 | (guix build cmake-build-system) | |
2609 | (ice-9 match)) | |
2610 | #:phases | |
2611 | (modify-phases %standard-phases | |
2612 | (add-after 'unpack 'change-to-build-dir | |
2613 | (lambda _ | |
2614 | (chdir "source") | |
2615 | #t)) | |
2616 | (add-after 'install 'really-install | |
2617 | (lambda* (#:key outputs system #:allow-other-keys) | |
2618 | (let ((arch (match system | |
2619 | ("x86_64-linux" "x86_64") | |
2620 | ("i686-linux" "i386"))) | |
2621 | (out (assoc-ref outputs "out"))) | |
2622 | (install-file (string-append "../source/build/basewsw/libgame_" | |
2623 | arch ".so") | |
2624 | (string-append out "/lib/")) | |
2625 | (install-file (string-append "../source/build/libui_" arch ".so") | |
2626 | (string-append out "/lib/")) | |
2627 | (for-each | |
2628 | (lambda (file) | |
2629 | (install-file file (string-append out "/bin/"))) | |
2630 | (append (find-files "../source/build" "warsow") | |
2631 | (find-files "../source/build" "wsw_server.")))) | |
2632 | #t))))) | |
2633 | (inputs | |
2634 | `(("alsa-lib" ,alsa-lib) | |
2635 | ("curl" ,curl) | |
2636 | ("freetype" ,freetype) | |
2637 | ("ffmpeg" ,ffmpeg) | |
c263cfdc | 2638 | ("libjpeg" ,libjpeg-turbo) |
0b5bf615 PN |
2639 | ("libogg" ,libogg) |
2640 | ("libpng" ,libpng) | |
2641 | ("libtheora" ,libtheora) | |
2642 | ("libvorbis" ,libvorbis) | |
2643 | ("mesa" ,mesa) | |
2644 | ("openal" ,openal) | |
2645 | ("pulseaudio" ,pulseaudio) | |
ea0a5107 | 2646 | ("qtbase" ,qtbase-5) |
0b5bf615 PN |
2647 | ("qtdeclarative" ,qtdeclarative) |
2648 | ("sdl2" ,sdl2) | |
c263cfdc | 2649 | ("uuid.h" ,util-linux "lib") |
0b5bf615 PN |
2650 | ("zlib" ,zlib))) |
2651 | (native-inputs | |
8394619b | 2652 | (list pkg-config)) |
0b5bf615 PN |
2653 | (home-page "https://github.com/Warsow/qfusion") |
2654 | (supported-systems '("i686-linux" "x86_64-linux")) | |
2655 | (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine") | |
2656 | (description | |
2657 | "This package contains the game engine of Warsow, a first-person | |
2658 | shooter video game. The engine is based on qfusion, the id Tech 2 derived | |
2659 | game engine. id Tech 2 is the engine originally behind Quake 2.") | |
2660 | (license license:gpl2+)))) | |
5f7474a2 PN |
2661 | |
2662 | (define-public dhewm3 | |
2663 | (package | |
2664 | (name "dhewm3") | |
b6df89ef | 2665 | (version "1.5.1") |
5f7474a2 PN |
2666 | (source (origin |
2667 | (method url-fetch) | |
2668 | (uri (string-append | |
2669 | "https://github.com/dhewm/dhewm3/releases/download/" | |
2670 | version "/dhewm3-" version "-src.tar.xz")) | |
2671 | (sha256 | |
2672 | (base32 | |
b6df89ef | 2673 | "0s2brx6wyljhjbpli97iy4lc4fqqsvdc09raz8njg0vgzcsiyrri")))) |
5f7474a2 PN |
2674 | (build-system cmake-build-system) |
2675 | (arguments | |
2676 | `(#:tests? #f ; No tests. | |
2677 | #:phases | |
2678 | (modify-phases %standard-phases | |
2679 | (add-after 'unpack 'change-to-build-dir | |
2680 | (lambda _ | |
2681 | (chdir "neo") | |
2682 | #t))))) | |
2683 | (inputs | |
2684 | `(("curl" ,curl) | |
2685 | ("libjpeg" ,libjpeg-turbo) | |
2686 | ("libogg" ,libogg) | |
2687 | ("libvorbis" ,libvorbis) | |
2688 | ("libx11" ,libx11) | |
2689 | ("openal" ,openal) | |
2690 | ("sdl2" ,sdl2) | |
2691 | ("zlib" ,zlib))) | |
2692 | (home-page "https://dhewm3.org/") | |
2693 | (synopsis "Port of the original Doom 3 engine") | |
2694 | (description | |
2695 | "@command{dhewm3} is a source port of the original Doom 3 engine (not | |
2696 | Doom 3: BFG Edition), also known as id Tech 4. Compared to the original | |
2697 | version of the Doom 3 engine, dhewm3 has many bugfixes, supports EAX-like | |
2698 | sound effects on all operating systems and hardware (via OpenAL Softs EFX | |
2699 | support), has much better support for widescreen resolutions and has 64bit | |
2700 | support.") | |
2701 | (license license:gpl3))) | |
f67ae666 PN |
2702 | |
2703 | (define-public tesseract-engine | |
2704 | (let ((svn-revision 2411)) | |
2705 | (package | |
2706 | (name "tesseract-engine") | |
2707 | (version (string-append "20200615-" (number->string svn-revision))) | |
2708 | (source | |
2709 | (origin | |
2710 | (method svn-fetch) | |
2711 | (uri (svn-reference | |
2712 | (url "svn://svn.tuxfamily.org/svnroot/tesseract/main") | |
2713 | (revision svn-revision))) | |
2714 | (file-name (git-file-name name version)) | |
2715 | (sha256 | |
2716 | (base32 "1av9jhl2ivbl7wfszyhyna84llvh1z2d8khkmadm8d105addj10q")) | |
2717 | (modules '((guix build utils))) | |
2718 | (snippet | |
2719 | '(begin | |
2720 | (for-each delete-file-recursively | |
2721 | '("bin" "bin64" | |
2722 | ;; Remove "media" since some files such as | |
2723 | ;; media/sound/game/soundsnap/info.txt refer to a | |
2724 | ;; non-commercial license. | |
2725 | "media" | |
2726 | "server.bat" | |
2727 | "tesseract.bat" | |
2728 | "src/lib" | |
2729 | "src/lib64")) | |
2730 | #t)))) | |
2731 | (build-system gnu-build-system) | |
2732 | (arguments | |
2733 | `(#:make-flags (list "CC=gcc") | |
2734 | #:tests? #f ; No tests. | |
2735 | #:phases | |
2736 | (modify-phases %standard-phases | |
2737 | (delete 'configure) | |
2738 | (add-after 'unpack 'cd-src | |
2739 | (lambda _ (chdir "src") #t)) | |
2740 | (add-before 'build 'fix-env | |
2741 | (lambda* (#:key inputs #:allow-other-keys) | |
2742 | (setenv "CPATH" | |
bf182596 LC |
2743 | (string-append |
2744 | (search-input-directory inputs "include/SDL2") | |
2745 | ":" (or (getenv "CPATH") ""))))) | |
f67ae666 PN |
2746 | (add-after 'install 'really-install |
2747 | (lambda* (#:key outputs #:allow-other-keys) | |
2748 | (let* ((out (assoc-ref outputs "out")) | |
2749 | (share (string-append out "/share/tesseract")) | |
2750 | (bin (string-append out "/bin/tesseract")) | |
2751 | (client (string-append out "/bin/tesseract-client"))) | |
2752 | (chdir "..") ; Back to root. | |
2753 | (for-each | |
2754 | (lambda (dir) | |
2755 | (mkdir-p (string-append share "/" dir)) | |
2756 | (copy-recursively dir (string-append share "/" dir))) | |
2757 | '("config")) | |
2758 | (mkdir-p (string-append out "/bin/")) | |
2759 | (copy-file "bin_unix/native_client" client) | |
2760 | (copy-file "bin_unix/native_server" | |
2761 | (string-append out "/bin/tesseract-server")) | |
2762 | (call-with-output-file bin | |
2763 | (lambda (p) | |
2764 | (format p "#!~a | |
2765 | TESS_DATA=~a | |
2766 | TESS_BIN=~a | |
2767 | TESS_OPTIONS=\"-u$HOME/.tesseract\" | |
2768 | cd \"$TESS_DATA\" | |
2769 | exec \"$TESS_BIN\" \"$TESS_OPTIONS\" \"$@\"" | |
2770 | (which "bash") | |
2771 | share | |
2772 | client))) | |
2773 | (chmod bin #o755) | |
2774 | (install-file "src/readme_tesseract.txt" | |
2775 | (string-append out "/share/licenses/tesseract/LICENSE"))) | |
2776 | #t))))) | |
2777 | (inputs | |
2778 | `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-image))) | |
2779 | ("zlib" ,zlib) | |
2780 | ("libpng" ,libpng) | |
2781 | ("libgl" ,mesa))) | |
2782 | (home-page "http://tesseract.gg/") | |
2783 | (synopsis "First-person shooter engine with map editing, instagib, DM and CTF") | |
2784 | (description "This package contains the game engine of Tesseract, a | |
2785 | first-person shooter focused on cooperative in-game map editing. | |
2786 | ||
2787 | The engine is derived from @emph{Cube 2: Sauerbraten} technology but with | |
2788 | upgraded modern rendering techniques. The new rendering features include | |
2789 | fully dynamic omnidirectional shadows, global illumination, HDR lighting, | |
2790 | deferred shading, morphological / temporal / multisample anti-aliasing, and | |
2791 | much more.") | |
2792 | (license license:zlib)))) | |
0aac289d FG |
2793 | |
2794 | (define-public recastnavigation | |
2795 | ;; We follow master since there hasn't been a release since 1.5.1 in 2016. | |
2796 | (let ((commit "c5cbd53024c8a9d8d097a4371215e3342d2fdc87") | |
2797 | (revision "1")) | |
2798 | (package | |
2799 | (name "recastnavigation") | |
2800 | (version (git-version "1.5.1" revision commit)) | |
2801 | (source (origin | |
2802 | (method git-fetch) | |
2803 | (uri (git-reference | |
2804 | (url "https://github.com/recastnavigation/recastnavigation") | |
2805 | (commit commit))) | |
2806 | (file-name (git-file-name name version)) | |
2807 | (sha256 | |
2808 | (base32 | |
2809 | "034bm47gc3r285w1pnvkhmm74zz99d204b1r865gisaiq4qfbza0")))) | |
2810 | (build-system cmake-build-system) | |
2811 | (arguments | |
2812 | `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" | |
2813 | "-DRECASTNAVIGATION_DEMO=OFF" | |
2814 | "-DRECASTNAVIGATION_TESTS=ON" | |
2815 | "-DRECASTNAVIGATION_EXAMPLES=OFF"))) | |
2816 | (synopsis "Navigation system for games") | |
2817 | (description "Recast is state of the art navigation mesh | |
2818 | construction toolset for games. | |
2819 | ||
2820 | @itemize | |
2821 | @item It is automatic, which means that you can throw any level geometry | |
2822 | at it and you will get robust mesh out. | |
2823 | @item It is fast which means swift turnaround times for level designers. | |
2824 | @item It is open source so it comes with full source and you can | |
2825 | customize it to your heart's content. | |
2826 | @end itemize | |
2827 | ||
2828 | The Recast process starts with constructing a voxel mold from a level | |
2829 | geometry and then casting a navigation mesh over it. The process | |
2830 | consists of three steps, building the voxel mold, partitioning the mold | |
2831 | into simple regions, peeling off the regions as simple polygons. | |
2832 | ||
2833 | Recast is accompanied with Detour, path-finding and spatial reasoning | |
2834 | toolkit. You can use any navigation mesh with Detour, but of course the | |
2835 | data generated with Recast fits perfectly. | |
2836 | ||
2837 | Detour offers simple static navigation mesh which is suitable for many | |
2838 | simple cases, as well as tiled navigation mesh which allows you to plug | |
2839 | in and out pieces of the mesh. The tiled mesh allows you to create | |
2840 | systems where you stream new navigation data in and out as the player | |
2841 | progresses the level, or you may regenerate tiles as the world changes.") | |
2842 | (home-page "https://github.com/recastnavigation/recastnavigation") | |
2843 | (license license:zlib)))) |