gnu: Add bennu-game-development.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
CommitLineData
6cb89466
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>
189be331 4;;; Copyright © 2015, 2018 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>
d5c60e0a 7;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 8;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
00fca594 9;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
cd6ae1ce 10;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
b2cf5597 11;;; Copyright © 2017, 2018, 2019 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>
0ea2364f 15;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
5b8d2ace 16;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
4041fabb 17;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
6cb89466
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages game-development)
b0910aad 35 #:use-module ((guix licenses) #:prefix license:)
6cb89466
36 #:use-module (guix packages)
37 #:use-module (guix download)
2a068aec 38 #:use-module (guix git-download)
4041fabb 39 #:use-module (guix svn-download)
be4d26f5 40 #:use-module (guix utils)
6cb89466 41 #:use-module (guix build-system cmake)
b0910aad 42 #:use-module (guix build-system gnu)
4bc37bf0 43 #:use-module (guix build-system python)
92b51d12 44 #:use-module (guix build-system scons)
b0910aad 45 #:use-module (gnu packages)
1297bc05 46 #:use-module (gnu packages audio)
c608fe8c 47 #:use-module (gnu packages autotools)
94a66dd9 48 #:use-module (gnu packages boost)
1297bc05 49 #:use-module (gnu packages compression)
2a068aec 50 #:use-module (gnu packages curl)
99828fa7 51 #:use-module (gnu packages documentation)
531003be 52 #:use-module (gnu packages fltk)
42d0d13d 53 #:use-module (gnu packages fonts)
d2cc38b7 54 #:use-module (gnu packages fontutils)
324b0040 55 #:use-module (gnu packages freedesktop)
d2cc38b7 56 #:use-module (gnu packages fribidi)
255d1bbe 57 #:use-module (gnu packages dbm)
1297bc05 58 #:use-module (gnu packages gl)
c24fff61 59 #:use-module (gnu packages glib)
1297bc05 60 #:use-module (gnu packages gnome)
c24fff61 61 #:use-module (gnu packages gnunet)
42d0d13d
MR
62 #:use-module (gnu packages graphics)
63 #:use-module (gnu packages graphviz)
1297bc05 64 #:use-module (gnu packages gtk)
c24fff61 65 #:use-module (gnu packages guile)
1297bc05
EF
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages lua)
c608fe8c 69 #:use-module (gnu packages m4)
1297bc05 70 #:use-module (gnu packages mp3)
c24fff61 71 #:use-module (gnu packages multiprecision)
4bc37bf0 72 #:use-module (gnu packages music)
c24fff61 73 #:use-module (gnu packages ncurses)
1297bc05
EF
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages pulseaudio)
4bc37bf0 76 #:use-module (gnu packages python)
44d10b1f 77 #:use-module (gnu packages python-xyz)
b0910aad 78 #:use-module (gnu packages qt)
1297bc05 79 #:use-module (gnu packages sdl)
67c127c9 80 #:use-module (gnu packages stb)
00fca594 81 #:use-module (gnu packages texinfo)
1297bc05 82 #:use-module (gnu packages tls)
4bc37bf0 83 #:use-module (gnu packages video)
2a068aec 84 #:use-module (gnu packages xdisorg)
83a4a70b 85 #:use-module (gnu packages xiph)
194b4e7d 86 #:use-module (gnu packages xml)
1297bc05 87 #:use-module (gnu packages xorg))
6cb89466
88
89(define-public bullet
90 (package
91 (name "bullet")
fbb456dd 92 (version "2.88")
6cb89466 93 (source (origin
fbb456dd
EF
94 (method git-fetch)
95 (uri (git-reference
96 (url "https://github.com/bulletphysics/bullet3/")
97 (commit version)))
98 (file-name (git-file-name name version))
6cb89466
99 (sha256
100 (base32
fbb456dd
EF
101 "00qkif245yj7n2f262bgjaxv1bz3wmmcsfnjgy3qpzvlpzpns5z8"))
102 (modules '((guix build utils)))
103 (snippet
104 '(begin
105 (for-each delete-file (find-files "build3" "premake*"))
106 (with-directory-excursion "examples/ThirdPartyLibs"
107 (for-each delete-file-recursively
108 '("Gwen" "clsocket" "enet" "glad" "imgui"
109 "lua-5.2.3" "midi" "minizip" "openvr"
110 "optionalX11" "serial" "zlib")))
111 ;; These need files from ThirdPartyLibs
112 (substitute* "Extras/CMakeLists.txt"
113 (("BulletRobotics") "")
114 (("obj2sdf") ""))
115 ;; Tests fail on linking, cannot find -lBussIK
116 (substitute* "test/CMakeLists.txt"
117 ((" InverseDynamics")
118 "../examples/ThirdPartyLibs/BussIK InverseDynamics"))
119 ; (("SharedMemory") ""))
120 #t))))
6cb89466 121 (build-system cmake-build-system)
937bc2d1 122 (arguments
fbb456dd
EF
123 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
124 "-DBUILD_CPU_DEMOS=OFF"
125 "-DBUILD_OPENGL3_DEMOS=OFF"
126 "-DBUILD_BULLET2_DEMOS=OFF"
127 (string-append "-DCMAKE_CXX_FLAGS=-fPIC "
128 (or (getenv "CXXFLAGS") "")))
129 #:phases
130 (modify-phases %standard-phases
131 (add-after 'unpack 'remove-failing-tests
132 ;; These tests fail specifically after removing 3rd party code
133 (lambda _
134 (substitute* "test/SharedMemory/CMakeLists.txt"
135 (("ADD_TEST") "# ADD_TEST"))
136 (substitute* "test/InverseDynamics/CMakeLists.txt"
137 (("ADD_TEST\\(Test_BulletInverseForward")
138 "# ADD_TEST(Test_BulletInverseForward"))
139 #t)))))
937bc2d1
EF
140 (inputs
141 `(("glu" ,glu)
142 ("libx11" ,libx11)
143 ("mesa" ,mesa)))
9b811f69 144 (home-page "https://pybullet.org/wordpress/")
6cb89466
145 (synopsis "3D physics engine library")
146 (description
147 "Bullet is a physics engine library usable for collision detection. It
148is used in some video games and movies.")
b0910aad
DT
149 (license license:zlib)))
150
1a0c4437
KK
151(define-public deutex
152 (package
153 (name "deutex")
23ae96d5 154 (version "5.1.2")
1a0c4437
KK
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "https://github.com/Doom-Utils/" name
f7b60fdc
KK
158 "/releases/download/v" version "/"
159 name "-" version ".tar.xz"))
1a0c4437
KK
160 (sha256
161 (base32
23ae96d5 162 "1rj3w4xa0n4jixy4j7p6gbclylbgxvhdnji7xnkydrqii9rxnbp4"))))
1a0c4437 163 (build-system gnu-build-system)
f7b60fdc 164 (native-inputs `(("asciidoc" ,asciidoc)))
1a0c4437
KK
165 (home-page "https://github.com/Doom-Utils/deutex")
166 (synopsis "WAD file composer for Doom and related games")
167 (description
168 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
169used to extract the lumps of a wad and save them as individual files.
170Conversely, it can also build a wad from separate files. When extracting a
171lump to a file, it does not just copy the raw data, it converts it to an
172appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
173Conversely, when it reads files for inclusion in pwads, it does the necessary
174conversions (for example, from PPM to Doom picture format). In addition,
175DeuTex has functions such as merging wads, etc.")
176 (license license:gpl2+)))
177
94a66dd9
KK
178(define-public grfcodec
179 (package
180 (name "grfcodec")
181 (version "6.0.6")
182 (source (origin
183 (method url-fetch)
184 (uri (string-append "http://binaries.openttd.org/extra/"
185 name "/" version "/" name "-" version
186 "-source.tar.xz"))
187 (sha256
188 (base32
189 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
190 (build-system gnu-build-system)
191 (arguments
192 '(#:tests? #f ; no check target
193 #:phases
194 (modify-phases %standard-phases
195 (delete 'configure) ; no configure script
196 (replace 'install ; no install target
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let* ((out (assoc-ref outputs "out"))
199 (bin (string-append out "/bin"))
200 (doc (string-append out "/share/doc"))
201 (man (string-append out "/share/man/man1")))
202 (for-each (lambda (file)
203 (install-file file bin))
204 '("grfcodec" "grfid" "grfstrip" "nforenum"))
205 (install-file "COPYING" doc)
206 (with-directory-excursion "docs"
207 (for-each (lambda (file)
208 (install-file (string-append file ".txt") doc))
209 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
210 "readme" "readme.rpn"))
211 (for-each (lambda (file)
212 (install-file file man))
213 (find-files "." "\\.1"))))
214 #t)))))
215 (inputs
216 `(("boost" ,boost)
217 ("libpng" ,libpng)
218 ("zlib" ,zlib)))
219 (synopsis "GRF development tools")
220 (description
3d77785a 221 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
94a66dd9
KK
222tools for developing (New)GRFs. It includes a number of smaller programs, each
223with a specific task:
224@enumerate
225@item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
226@item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
227@item @code{grfstrip} strips all sprites from a GRF.
228@item @code{nforenum} checks NFO code for errors, making corrections when
229necessary.
230@end enumerate")
231 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
232 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
233 ;; NFORenum is under the GPL2+.
234 ;; The MD5 implementation contained in GRFID is under the zlib license.
235 (license (list license:gpl2 license:gpl2+ license:zlib))))
236
3c399e9b
AI
237(define-public catcodec
238 (package
239 (name "catcodec")
240 (version "1.0.5")
241 (source
242 (origin
243 (method url-fetch)
244 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
245 version "/catcodec-" version "-source.tar.xz"))
246 (sha256
247 (base32
248 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
249 (build-system gnu-build-system)
250 (arguments
251 `(#:tests? #f ; no tests
252 #:make-flags (list (string-append "prefix=" %output))
253 #:phases (modify-phases %standard-phases
254 (delete 'configure))))
255 (home-page "http://dev.openttdcoop.org/projects/catcodec")
256 (synopsis "Encode/decode OpenTTD sounds")
257 (description "catcodec encodes and decodes sounds for OpenTTD. These
258sounds are not much more than some metadata (description and filename) and raw
259PCM data.")
260 (license license:gpl2)))
261
c24fff61
JG
262(define-public gzochi
263 (package
264 (name "gzochi")
cd6ae1ce 265 (version "0.12")
c24fff61
JG
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "mirror://savannah/gzochi/gzochi-"
269 version ".tar.gz"))
270 (sha256
271 (base32
cd6ae1ce 272 "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
c24fff61 273 (build-system gnu-build-system)
1798e9ee
LC
274 (arguments
275 '(#:phases (modify-phases %standard-phases
276 (add-before 'build 'no-Werror
277 (lambda _
278 ;; Don't abort builds due to things like GLib
279 ;; deprecation warnings.
280 (substitute* (find-files "." "^Makefile\\.in$")
281 (("-Werror") ""))
282 #t)))))
c24fff61
JG
283 (native-inputs `(("pkgconfig" ,pkg-config)))
284 (inputs `(("bdb" ,bdb)
285 ("glib" ,glib)
0e4885af 286 ("guile" ,guile-2.2)
c24fff61
JG
287 ("libmicrohttpd" ,libmicrohttpd)
288 ("ncurses" ,ncurses)
289 ("sdl" ,sdl)
290 ("zlib" ,zlib)))
340978d7 291 (home-page "https://www.nongnu.org/gzochi/")
c24fff61
JG
292 (synopsis "Scalable middleware for multiplayer games")
293 (description
294 "gzochi is a framework for developing massively multiplayer online games.
295A server container provides services to deployed games, which are written in
296Guile Scheme, that abstract and simplify some of the most challenging and
297error-prone aspects of online game development: Concurrency, data persistence,
298and network communications. A very thin client library can be embedded to
299provide connectivity for client applications written in any language.")
300 (license license:gpl3+)))
301
7357fcf2
KK
302(define-public nml
303 (package
304 (name "nml")
41770337 305 (version "0.4.5")
7357fcf2
KK
306 (source
307 (origin
308 (method url-fetch)
309 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
310 version "/nml-" version ".tar.gz"))
311 (sha256
312 (base32
41770337 313 "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
7357fcf2
KK
314 (build-system python-build-system)
315 (propagated-inputs
316 `(("python-pillow" ,python-pillow)
317 ("python-ply" ,python-ply)))
df0fd7bf 318 (home-page "https://dev.openttdcoop.org/projects/nml")
7357fcf2
KK
319 (synopsis "NML compiler")
320 (description
a7cbe727 321 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
7357fcf2
KK
322compiling NML files (along with their associated language, sound and graphic
323files) into @file{.grf} and/or @file{.nfo} files.")
324 (license license:gpl2+)))
325
45f8e7f7
KK
326(define-public python-sge-pygame
327 (package
328 (name "python-sge-pygame")
b1d1a10c 329 (version "1.5.1")
45f8e7f7
KK
330 (source
331 (origin
332 (method url-fetch)
7f652029
KK
333 (uri (string-append "mirror://savannah/stellarengine/"
334 (version-major+minor version) "/sge-pygame-"
335 version ".tar.gz"))
336 (file-name (string-append name "-" version ".tar.gz"))
45f8e7f7
KK
337 (sha256
338 (base32
b1d1a10c 339 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
45f8e7f7
KK
340 (build-system python-build-system)
341 (propagated-inputs
342 `(("python-pygame" ,python-pygame)
81353514
KK
343 ("python-six" ,python-six)
344 ("python-uniseg" ,python-uniseg)))
45f8e7f7
KK
345 (home-page "http://stellarengine.nongnu.org")
346 (synopsis "2D game engine for Python")
347 (description
348 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
ffbe2dc1 349general-purpose 2D game engine. It takes care of several details for you so
45f8e7f7
KK
350you can focus on the game itself. This makes more rapid game development
351possible, and it also makes the SGE easy to learn.")
352 (license license:lgpl3+)))
353
354(define-public python2-sge-pygame
355 (package-with-python2 python-sge-pygame))
356
1b775fd1
KK
357(define-public python-tmx
358 (package
359 (name "python-tmx")
95c1324a 360 (version "1.10")
1b775fd1
KK
361 (source
362 (origin
363 (method url-fetch)
be4d26f5
KK
364 (uri (string-append "mirror://savannah/python-tmx/"
365 (version-major+minor version) "/tmx-"
1b775fd1
KK
366 version ".tar.gz"))
367 (sha256
368 (base32
95c1324a 369 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
1b775fd1
KK
370 (build-system python-build-system)
371 (propagated-inputs
372 `(("python-six" ,python-six)))
373 (home-page "http://python-tmx.nongnu.org")
374 (synopsis "Python library for the @code{Tiled} TMX format")
375 (description
376 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
377This is useful for map editors or generic level editors, and it's also useful
378for using a map editor or generic level editor like Tiled to edit your game's
379levels.")
380 (license (list license:asl2.0
381 ;; Documentation (only available in the source tarball) is
382 ;; under the CC0 license.
383 license:cc0))))
384
385(define-public python2-tmx
386 (let ((python2-tmx (package-with-python2 python-tmx)))
387 (package
388 (inherit python2-tmx)
389 (propagated-inputs
390 `(("python2-pathlib" ,python2-pathlib)
391 ,@(package-propagated-inputs python2-tmx))))))
392
e99039b5
KK
393(define-public python-xsge
394 (package
395 (name "python-xsge")
6e92fba4 396 (version "2018.02.26")
e99039b5
KK
397 (source (origin
398 (method url-fetch)
795f3a00 399 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
e99039b5
KK
400 version ".tar.gz"))
401 (sha256
402 (base32
6e92fba4 403 "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
e99039b5
KK
404 (build-system python-build-system)
405 (arguments
406 '(#:phases
407 (modify-phases %standard-phases
408 ;; xSGE's setup.py script does not support one of the Python build
409 ;; system's default flags, "--single-version-externally-managed".
410 (replace 'install
411 (lambda* (#:key outputs #:allow-other-keys)
6e92fba4
KK
412 (invoke "python" "setup.py" "install"
413 (string-append "--prefix=" (assoc-ref outputs "out"))
414 "--root=/"))))
e99039b5
KK
415 #:tests? #f)) ; no check target
416 (propagated-inputs
417 `(("python-sge-pygame" ,python-sge-pygame)
418 ("python-pygame" ,python-pygame)
419 ("python-six" ,python-six)
420 ("python-tmx" ,python-tmx)))
421 (home-page "http://xsge.nongnu.org")
422 (synopsis "Extensions for the SGE Game Engine")
423 (description
424 "xSGE is a collection of modules that make doing certain tasks with the SGE
425Game Engine easier. In addition to SGE's conveniences, the user has access to a
426GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
427support.")
428 (license license:gpl3+)))
429
430(define-public python2-xsge
431 (package-with-python2 python-xsge))
432
b0910aad
DT
433(define-public tiled
434 (package
435 (name "tiled")
a37bdf42 436 (version "1.2.2")
b0910aad 437 (source (origin
902068b4
RW
438 (method git-fetch)
439 (uri (git-reference
440 (url "https://github.com/bjorn/tiled.git")
441 (commit (string-append "v" version))))
442 (file-name (git-file-name name version))
b0910aad
DT
443 (sha256
444 (base32
a37bdf42 445 "0ay4x1b6h5xfax1cqry2fklcmqi6a16klgmci4gkhga7as66lnnn"))))
b0910aad 446 (build-system gnu-build-system)
864cc7ef
RW
447 (inputs
448 `(("qtbase" ,qtbase)
449 ("qtsvg" ,qtsvg)
450 ("zlib" ,zlib)))
451 (native-inputs
452 `(("qttools" ,qttools)))
b0910aad
DT
453 (arguments
454 '(#:phases
d06fc008
EF
455 (modify-phases %standard-phases
456 (replace 'configure
864cc7ef
RW
457 (lambda* (#:key inputs outputs #:allow-other-keys)
458 (substitute* "translations/translations.pro"
459 (("LRELEASE =.*")
460 (string-append "LRELEASE = "
461 (assoc-ref inputs "qttools")
462 "/bin/lrelease\n")))
d06fc008 463 (let ((out (assoc-ref outputs "out")))
9dafb647
KK
464 (invoke "qmake"
465 (string-append "PREFIX=" out))))))))
b0910aad
DT
466 (home-page "http://www.mapeditor.org/")
467 (synopsis "Tile map editor")
468 (description
469 "Tiled is a general purpose tile map editor. It is meant to be used for
470editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
471clone.")
472
473 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
474 ;; under BSD-2.
475 (license license:gpl2+)))
5809ffcc
DT
476
477(define-public sfml
478 (package
479 (name "sfml")
9ac59ad3 480 (version "2.5.1")
5809ffcc 481 (source (origin
95f6adae 482 (method git-fetch)
7d1b5022
RW
483 ;; Do not fetch the archives from
484 ;; http://mirror0.sfml-dev.org/files/ because files there seem
485 ;; to be changed in place.
95f6adae
TGR
486 (uri (git-reference
487 (url "https://github.com/SFML/SFML.git")
488 (commit version)))
489 (file-name (git-file-name name version))
5809ffcc
DT
490 (sha256
491 (base32
9ac59ad3 492 "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
67c127c9
MB
493 (modules '((guix build utils)))
494 (snippet
495 '(begin
496 ;; Ensure system libraries are used.
497 (delete-file-recursively "extlibs")
498 #t))))
5809ffcc
DT
499 (build-system cmake-build-system)
500 (arguments
a6e25a50 501 '(#:configure-flags
0bc27248
MB
502 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
503 "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
a6e25a50 504 #:tests? #f)) ; no tests
0bc27248
MB
505 (native-inputs
506 `(("pkg-config" ,pkg-config)))
5809ffcc
DT
507 (inputs
508 `(("mesa" ,mesa)
509 ("glew" ,glew)
510 ("libx11" ,libx11)
240f2785 511 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
512 ("libxrandr" ,libxrandr)
513 ("eudev" ,eudev)
5809ffcc 514 ("libjpeg" ,libjpeg)
67c127c9
MB
515 ("libsndfile" ,libsndfile)
516 ("stb-image" ,stb-image)
517 ("stb-image-write" ,stb-image-write)))
0bc27248
MB
518 (propagated-inputs
519 ;; In Requires.private of pkg-config files.
520 `(("flac" ,flac)
521 ("freetype" ,freetype)
522 ("libvorbis" ,libvorbis)
5809ffcc 523 ("openal" ,openal)))
167f0e82 524 (home-page "https://www.sfml-dev.org")
5809ffcc
DT
525 (synopsis "Simple and Fast Multimedia Library")
526 (description
527 "SFML provides a simple interface to the various computer components,
528to ease the development of games and multimedia applications. It is composed
529of five modules: system, window, graphics, audio and network.")
530 (license license:zlib)))
d620ea88
DT
531
532(define-public sfxr
533 (package
534 (name "sfxr")
535 (version "1.2.1")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
539 (sha256
540 (base32
541 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
542 (build-system gnu-build-system)
543 (arguments
544 `(#:phases (modify-phases %standard-phases
545 (delete 'configure) ; no configure script
546 (add-before 'build 'patch-makefile
547 (lambda* (#:key outputs #:allow-other-keys)
548 (let ((out (assoc-ref outputs "out")))
549 (substitute* "Makefile"
550 (("\\$\\(DESTDIR\\)/usr") out))
551 (substitute* "main.cpp"
552 (("/usr/share")
553 (string-append out "/share")))
554 #t))))
555 #:tests? #f)) ; no tests
556 (native-inputs
557 `(("pkg-config" ,pkg-config)
558 ("desktop-file-utils" ,desktop-file-utils)))
559 (inputs
560 `(("sdl" ,sdl)
561 ("gtk+" ,gtk+)))
562 (synopsis "Simple sound effect generator")
563 (description "Sfxr is a tool for quickly generating simple sound effects.
564Originally created for use in video game prototypes, it can generate random
565sounds from presets such as \"explosion\" or \"powerup\".")
566 (home-page "http://www.drpetter.se/project_sfxr.html")
567 (license license:expat)))
0f6139b1
AK
568
569(define-public physfs
570 (package
571 (name "physfs")
08e977d2 572 (version "3.0.1")
0f6139b1
AK
573 (source (origin
574 (method url-fetch)
575 (uri (string-append
167f0e82 576 "https://icculus.org/physfs/downloads/physfs-"
0f6139b1
AK
577 version ".tar.bz2"))
578 (file-name (string-append name "-" version ".tar.gz"))
579 (sha256
580 (base32
08e977d2 581 "1wgj2zqpnfbnyyi1i7bq5pshcc9n5cvwlpzp8im67nb8662ryyxp"))))
0f6139b1
AK
582 (build-system cmake-build-system)
583 (arguments
08e977d2
MB
584 '(#:tests? #f ; no check target
585 #:phases (modify-phases %standard-phases
586 (add-after 'unpack 'patch-CMakeLists.txt
587 (lambda _
588 (substitute* "CMakeLists.txt"
589 ;; XXX: For some reason CMakeLists.txt disables
590 ;; RUNPATH manipulation when the compiler is GCC.
591 (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
592 #t)))))
0f6139b1
AK
593 (inputs
594 `(("zlib" ,zlib)))
595 (native-inputs
596 `(("doxygen" ,doxygen)))
167f0e82 597 (home-page "https://icculus.org/physfs")
0f6139b1
AK
598 (synopsis "File system abstraction library")
599 (description
600 "PhysicsFS is a library to provide abstract access to various archives.
601It is intended for use in video games. For security, no file writing done
602through the PhysicsFS API can leave a defined @emph{write directory}. For
603file reading, a @emph{search path} with archives and directories is defined,
604and it becomes a single, transparent hierarchical file system. So archive
605files can be accessed in the same way as you access files directly on a disk,
606and it makes it easy to ship a new archive that will override a previous
607archive on a per-file basis.")
608 (license license:zlib)))
83a4a70b
DT
609
610(define-public love
611 (package
612 (name "love")
bd7a147e 613 (version "11.1")
83a4a70b
DT
614 (source (origin
615 (method url-fetch)
616 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
617 "love-" version "-linux-src.tar.gz"))
618 (sha256
619 (base32
a288ab1f 620 "1pkwiszmjs0xrwk0wqbc5cp9108b1y8gwsid0gqk1s0x09q9lpmw"))))
83a4a70b
DT
621 (build-system gnu-build-system)
622 (native-inputs
623 `(("pkg-config" ,pkg-config)))
624 (inputs
625 `(("devil" ,devil)
626 ("freetype" ,freetype)
627 ("libmodplug" ,libmodplug)
05d48c52 628 ("libtheora" ,libtheora)
83a4a70b
DT
629 ("libvorbis" ,libvorbis)
630 ("luajit" ,luajit)
631 ("mesa" ,mesa)
632 ("mpg123" ,mpg123)
633 ("openal" ,openal)
634 ("physfs" ,physfs)
635 ("sdl2" ,sdl2)
636 ("zlib" ,zlib)))
637 (synopsis "2D game framework for Lua")
638 (description "LÖVE is a framework for making 2D games in the Lua
639programming language.")
640 (home-page "https://love2d.org/")
641 (license license:zlib)))
154f6156
DT
642
643(define-public allegro-4
644 (package
645 (name "allegro")
b2cf5597 646 (version "4.4.3")
154f6156
DT
647 (source (origin
648 (method url-fetch)
3a12e21c
EF
649 (uri (string-append "https://github.com/liballeg/allegro5/"
650 "releases/download/" version "/allegro-"
651 version ".tar.gz"))
154f6156
DT
652 (sha256
653 (base32
b2cf5597 654 "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y"))))
154f6156
DT
655 (build-system cmake-build-system)
656 (arguments
657 '(#:phases
658 (modify-phases %standard-phases
659 (add-after 'unpack 'patch-build-system
660 (lambda _
661 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
662 ;; via a command line option doesn't work because it is
663 ;; unconditionally clobbered in the build script.
664 (substitute* '("CMakeLists.txt")
665 (("ADDON_LINKAGE STATIC")
666 "ADDON_LINKAGE SHARED"))
667 #t)))))
668 (inputs
669 `(("glu" ,glu)
670 ("libpng" ,libpng)
671 ("libvorbis" ,libvorbis)
672 ("mesa" ,mesa)
673 ("zlib" ,zlib)))
674 (synopsis "Game programming library")
675 (description "Allegro is a library mainly aimed at video game and
676multimedia programming. It handles common, low-level tasks such as creating
677windows, accepting user input, loading data, drawing images, playing sounds,
678etc.")
679 (home-page "http://liballeg.org")
680 (license license:giftware)))
2a068aec 681
19d311b4
RW
682(define-public allegro
683 (package
684 (name "allegro")
b15a020d 685 (version "5.2.4.0")
19d311b4
RW
686 (source (origin
687 (method url-fetch)
3a12e21c
EF
688 (uri (string-append "https://github.com/liballeg/allegro5/releases"
689 "/download/" version "/allegro-"
b15a020d 690 version ".tar.gz"))
ab533c61 691 (patches (search-patches
0109b89c 692 "allegro-mesa-18.2.5-and-later.patch"))
19d311b4
RW
693 (sha256
694 (base32
b15a020d 695 "1w9a5yqi5q03b2qvmx5ff90paz0xbr9cy7i7f0xiqa65ava66q9l"))))
19d311b4
RW
696 (build-system cmake-build-system)
697 (arguments `(#:tests? #f)) ; there are no tests
698 (inputs
699 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
700 `(("flac" ,flac)
701 ("freetype" ,freetype)
702 ("glu" ,glu)
703 ("gtk" ,gtk+-2)
704 ("libjpeg" ,libjpeg)
705 ("libpng" ,libpng)
706 ("libtheora" ,libtheora)
707 ("libvorbis" ,libvorbis)
708 ("libxcursor" ,libxcursor)
709 ("libxinerama" ,libxinerama)
710 ("libxrandr" ,libxrandr)
711 ("mesa" ,mesa)
712 ("openal" ,openal)
713 ("physfs" ,physfs)
714 ("zlib" ,zlib)))
715 (native-inputs
716 `(("pkg-config" ,pkg-config)))
717 (synopsis "Game programming library")
718 (description "Allegro is a library mainly aimed at video game and
719multimedia programming. It handles common, low-level tasks such as creating
720windows, accepting user input, loading data, drawing images, playing sounds,
721etc.")
722 (home-page "http://liballeg.org")
723 (license license:bsd-3)))
724
cdf8f391
RW
725(define-public allegro-5.0
726 (package (inherit allegro)
727 (name "allegro")
728 (version "5.0.11")
729 (source (origin
730 (method url-fetch)
3a12e21c
EF
731 (uri (string-append "https://github.com/liballeg/allegro5/releases"
732 "/download/" version "/allegro-"
733 (if (equal? "0" (string-take-right version 1))
734 (string-drop-right version 2)
735 version)
736 ".tar.gz"))
0109b89c
EF
737 (patches (search-patches
738 "allegro-mesa-18.2.5-and-later.patch"))
cdf8f391
RW
739 (sha256
740 (base32
741 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
742
2a068aec
DT
743(define-public aseprite
744 (package
745 (name "aseprite")
82654d95 746 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
ff4dc16e 747 ;; TODO: Unbundle third party software.
2a068aec 748 (source (origin
ff4dc16e
MB
749 (method url-fetch/zipbomb)
750 (uri (string-append "https://github.com/aseprite/aseprite"
751 "/releases/download/v" version
752 "/Aseprite-v" version "-Source.zip"))
2a068aec
DT
753 (sha256
754 (base32
82654d95 755 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
2a068aec
DT
756 (build-system cmake-build-system)
757 (arguments
758 '(#:configure-flags
759 ;; Use shared libraries instead of building bundled source.
760 (list "-DWITH_WEBP_SUPPORT=1"
761 "-DUSE_SHARED_CURL=1"
762 "-DUSE_SHARED_GIFLIB=1"
763 "-DUSE_SHARED_JPEGLIB=1"
764 "-DUSE_SHARED_ZLIB=1"
765 "-DUSE_SHARED_LIBPNG=1"
766 "-DUSE_SHARED_LIBLOADPNG=1"
767 "-DUSE_SHARED_LIBWEBP=1"
768 "-DUSE_SHARED_TINYXML=1"
769 "-DUSE_SHARED_PIXMAN=1"
770 "-DUSE_SHARED_FREETYPE=1"
771 "-DUSE_SHARED_ALLEGRO4=1"
772 "-DENABLE_UPDATER=0" ; no auto-updates
773 (string-append "-DFREETYPE_INCLUDE_DIR="
774 (assoc-ref %build-inputs "freetype")
de1d68a2 775 "/include/freetype2"))))
2a068aec
DT
776 (native-inputs
777 `(("pkg-config" ,pkg-config)))
778 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
779 ;; patched version is bundled with Aseprite, but the patches should be
780 ;; extracted and applied on top of a standalone Allegro 4 package.
781 (inputs
782 `(("allegro" ,allegro-4)
783 ("curl" ,curl)
784 ("freetype" ,freetype)
785 ("giflib" ,giflib)
786 ("libjpeg" ,libjpeg)
787 ("libpng" ,libpng)
788 ("libwebp" ,libwebp)
789 ("libx11" ,libx11)
790 ("libxext" ,libxext)
791 ("libxxf86vm" ,libxxf86vm)
792 ("pixman" ,pixman)
793 ("tinyxml" ,tinyxml)
794 ("zlib" ,zlib)))
795 (synopsis "Animated sprite editor and pixel art tool")
796 (description "Aseprite is a tool for creating 2D pixel art for video
797games. In addition to basic pixel editing features, Aseprite can assist in
798the creation of animations, tiled graphics, texture atlases, and more.")
167f0e82 799 (home-page "https://www.aseprite.org/")
2a068aec 800 (license license:gpl2+)))
966dff3b
KY
801
802(define-public qqwing
803 (package
804 (name "qqwing")
805 (version "1.3.4")
806 (source (origin
807 (method url-fetch)
808 (uri (string-append
809 "https://qqwing.com/"
810 name "-" version ".tar.gz"))
811 (sha256
812 (base32
813 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
814 (build-system gnu-build-system)
815 (native-inputs
816 `(("pkg-config" ,pkg-config)))
817 (home-page "https://qqwing.com/")
818 (synopsis "Sudoku puzzle solver and generator")
819 (description
820 "QQWing is a Sudoku puzzle generator and solver.
821It offers the following features:
822@enumerate
823@item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
824@item Uses logic. Uses as many solve techniques as possible when solving
825 puzzles rather than guessing.
826@item Rates puzzles. Most generators don't give an indication of the difficulty
827 of a Sudoku puzzle. QQwing does.
828@item Can print solve instructions for any puzzle.
829@item Customizable output style, including a CSV style that is easy to
830 import into a database.
831@end enumerate")
832 (license license:gpl2+)))
d2cc38b7
KK
833
834(define-public quesoglc
835 (package
836 (name "quesoglc")
837 (version "0.7.2")
838 (source (origin
839 (method url-fetch)
840 (uri (string-append "mirror://sourceforge/" name "/" version "/"
841 name "-" version "-free.tar.bz2"))
842 (sha256
843 (base32
844 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
845 (build-system gnu-build-system)
846 (native-inputs `(("pkg-config" ,pkg-config)))
847 (inputs `(("fontconfig" ,fontconfig)
848 ("freeglute" ,freeglut)
849 ("fribidi" ,fribidi)
850 ("glew" ,glew)))
851 (home-page "http://quesoglc.sourceforge.net")
852 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
853 (description
854 "The OpenGL Character Renderer (GLC) is a state machine that provides
855OpenGL programs with character rendering services via an application programming
856interface (API).")
857 (license (list license:expat license:lgpl2.1+))))
4bc37bf0
KK
858
859(define-public python-pygame
860 (package
861 (name "python-pygame")
a9db93c1 862 (version "1.9.4")
4bc37bf0
KK
863 (source (origin
864 (method url-fetch)
052f75da 865 (uri (pypi-uri "pygame" version))
4bc37bf0
KK
866 (sha256
867 (base32
a9db93c1 868 "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh"))))
4bc37bf0
KK
869 (build-system python-build-system)
870 (arguments
a9db93c1 871 `(#:tests? #f ; tests require pygame to be installed first
4bc37bf0
KK
872 #:phases
873 (modify-phases %standard-phases
874 ;; Set the paths to the dependencies manually because
875 ;; the configure script does not allow passing them as
876 ;; parameters. This also means we can skip the configure
877 ;; phase.
878 (add-before 'build 'set-library-paths
879 (lambda* (#:key inputs outputs #:allow-other-keys)
880 (let ((sdl-ref (assoc-ref inputs "sdl"))
881 (font-ref (assoc-ref inputs "sdl-ttf"))
882 (image-ref (assoc-ref inputs "sdl-image"))
883 (mixer-ref (assoc-ref inputs "sdl-mixer"))
884 (smpeg-ref (assoc-ref inputs "libsmpeg"))
885 (png-ref (assoc-ref inputs "libpng"))
886 (jpeg-ref (assoc-ref inputs "libjpeg"))
052f75da 887 (freetype-ref (assoc-ref inputs "freetype"))
4bc37bf0
KK
888 (v4l-ref (assoc-ref inputs "v4l-utils"))
889 (out-ref (assoc-ref outputs "out")))
890 (substitute* "Setup.in"
891 (("SDL = -I/usr/include/SDL")
892 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
893 (substitute* "Setup.in"
894 (("FONT = -lSDL_ttf")
895 (string-append "FONT = -I" font-ref "/include/SDL -L"
a9db93c1 896 font-ref "/lib -lSDL_ttf")))
4bc37bf0
KK
897 (substitute* "Setup.in"
898 (("IMAGE = -lSDL_image")
899 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
a9db93c1 900 image-ref "/lib -lSDL_image")))
4bc37bf0
KK
901 (substitute* "Setup.in"
902 (("MIXER = -lSDL_mixer")
903 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
a9db93c1 904 mixer-ref "/lib -lSDL_mixer")))
4bc37bf0
KK
905 (substitute* "Setup.in"
906 (("SMPEG = -lsmpeg")
907 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
a9db93c1 908 smpeg-ref "/lib -lsmpeg")))
4bc37bf0
KK
909 (substitute* "Setup.in"
910 (("PNG = -lpng")
911 (string-append "PNG = -I" png-ref "/include -L"
a9db93c1 912 png-ref "/lib -lpng")))
4bc37bf0
KK
913 (substitute* "Setup.in"
914 (("JPEG = -ljpeg")
915 (string-append "JPEG = -I" jpeg-ref "/include -L"
916 jpeg-ref "/lib -ljpeg")))
052f75da
DM
917
918 (substitute* "Setup.in"
919 (("FREETYPE = -lfreetype")
920 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
921 freetype-ref "/lib -lfreetype")))
922
4bc37bf0
KK
923 (substitute* "Setup.in"
924 (("^pypm") "#pypm"))
4bc37bf0
KK
925 ;; Create a path to a header file provided by v4l-utils.
926 (system* "mkdir" "linux")
927 (system* "ln" "--symbolic"
928 (string-append v4l-ref "/include/libv4l1-videodev.h")
929 "linux/videodev.h")
930 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
4bc37bf0 931 (inputs
052f75da
DM
932 `(("freetype" ,freetype)
933 ("sdl" ,sdl)
4bc37bf0
KK
934 ("sdl-image" ,sdl-image)
935 ("sdl-mixer" ,sdl-mixer)
936 ("sdl-ttf" ,sdl-ttf)
937 ("sdl-gfx" ,sdl-gfx)
938 ("libjpeg" ,libjpeg)
939 ("libpng" ,libpng)
940 ("libX11" ,libx11)
941 ("libsmpeg" ,libsmpeg)
942 ("portmidi" ,portmidi)
943 ("v4l-utils" ,v4l-utils)))
167f0e82 944 (home-page "https://www.pygame.org")
4bc37bf0
KK
945 (synopsis "SDL wrapper for Python")
946 (description "Pygame is a set of Python modules designed for writing games.
947Pygame adds functionality on top of the excellent SDL library. This allows you
948to create fully featured games and multimedia programs in the python language.")
949 (license (list license:bsd-2
950 ;; python numeric license as listed by Debian looks like
951 ;; an Expat-style license with a warranty disclaimer for
952 ;; the U.S. government and the University of California.
953 license:expat
954 license:lgpl2.0+
955 license:lgpl2.1+
956 license:gpl3+
957 license:psfl
958 license:public-domain
959 license:lgpl2.1+))))
052f75da
DM
960
961(define-public python2-pygame
962 (package-with-python2 python-pygame))
68c6110c
DT
963
964(define-public grafx2
965 (package
966 (name "grafx2")
967 (version "2.4")
968 (source (origin
969 (method url-fetch)
970 ;; XXX: There is no URL that contains the version. :(
971 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
972 (sha256
973 (base32
974 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
975 (build-system gnu-build-system)
976 (arguments
977 '(#:phases
978 (modify-phases %standard-phases
979 (delete 'configure) ; no configure script
980 (add-before 'build 'change-to-src-directory
981 (lambda _
982 (chdir "src")
983 #t)))
984 #:make-flags
985 ;; SDL header files are referenced without the preceeding "SDL/".
986 (list (string-append "CFLAGS=-I"
987 (assoc-ref %build-inputs "sdl-union")
988 "/include/SDL")
989 (string-append "prefix="
990 (assoc-ref %outputs "out")))
991 #:tests? #f)) ; no check target
992 (native-inputs
993 `(("pkg-config" ,pkg-config)))
994 (inputs
995 `(("libpng" ,libpng)
996 ("lua" ,lua-5.1)
997 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
998 (synopsis "Bitmap paint program")
999 (description "GrafX2 is a bitmap paint program inspired by the Amiga
7432d3ae 1000programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
68c6110c
DT
1001includes a very large number of tools and effects that make it particularly
1002suitable for pixel art, game graphics, and generally any detailed graphics
1003painted with a mouse.")
1004 (home-page "http://pulkomandy.tk/projects/GrafX2")
1005 (license license:gpl2))) ; GPLv2 only
c608fe8c
MR
1006
1007(define-public ois
1008 (package
1009 (name "ois")
006345c1 1010 (version "1.5")
c608fe8c
MR
1011 (source
1012 (origin
c608fe8c
MR
1013 (method git-fetch)
1014 (uri (git-reference
1015 (url "https://github.com/wgois/OIS.git")
006345c1
TGR
1016 (commit (string-append "v" version))))
1017 (file-name (git-file-name name version))
c608fe8c 1018 (sha256
006345c1
TGR
1019 (base32 "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa"))))
1020 (build-system cmake-build-system)
1021 (arguments
1022 `(#:tests? #f)) ; no test suite
c608fe8c 1023 (inputs
006345c1 1024 `(("libx11" ,libx11)))
c608fe8c
MR
1025 (synopsis "Object Oriented Input System")
1026 (description
1027 "Cross Platform Object Oriented Input Lib System is a cross platform,
1028simple solution for using all kinds of Input Devices (Keyboards, Mice,
1029Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
1030robust and compatible with many systems and operating systems.")
1031 (home-page "https://github.com/wgois/OIS")
1032 (license license:zlib)))
42d0d13d
MR
1033
1034(define-public mygui
1035 (package
1036 (name "mygui")
1037 (version "3.2.2")
1038 (source
1039 (origin
1040 (method url-fetch)
1041 (uri
1042 (string-append "https://github.com/MyGUI/" name
1043 "/archive/MyGUI" version ".tar.gz"))
1044 (sha256
1045 (base32
1046 "13x7cydmj7gjmsg702sqjbfi53z265iv6j7binv3r6a7ibndfa0a"))))
1047 (build-system cmake-build-system)
1048 (arguments
1049 '(#:tests? #f ; No test target
1050 #:configure-flags
1051 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1052 (string-append "-DOGRE_INCLUDE_DIR="
1053 (assoc-ref %build-inputs "ogre")
1054 "/include/OGRE"))))
1055 (native-inputs
1056 `(("boost" ,boost)
1057 ("doxygen" ,doxygen)
1058 ("pkg-config" ,pkg-config)))
1059 (inputs
1060 `(("font-dejavu" ,font-dejavu)
1061 ("freetype" ,freetype)
1062 ("graphviz" ,graphviz)
1063 ("libx11" ,libx11)
1064 ("ogre" ,ogre)
1065 ("ois" ,ois)))
1066 (synopsis "Fast, flexible and simple GUI")
1067 (description
1068 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1069and 3D applications. The main goals of mygui are: speed, flexibility and ease
1070of use.")
1071 (home-page "http://mygui.info/")
1072 (license license:expat)))
e9a599cd
MR
1073
1074(define-public openmw
1075 (package
1076 (name "openmw")
8b1f8f64 1077 (version "0.44.0")
e9a599cd
MR
1078 (source
1079 (origin
8b1f8f64
AK
1080 (method url-fetch)
1081 (uri
1082 (string-append "https://github.com/OpenMW/openmw/archive/"
1083 name "-" version ".tar.gz"))
e9a599cd
MR
1084 (sha256
1085 (base32
8b1f8f64 1086 "03fgm2f2r7y0aqlgp038pdlnllgvm3jimrp968p4nhz1sffvjzcy"))))
e9a599cd
MR
1087 (build-system cmake-build-system)
1088 (arguments
1089 `(#:tests? #f ; No test target
1090 #:configure-flags
1091 (list "-DDESIRED_QT_VERSION=5")))
1092 (native-inputs
1093 `(("boost" ,boost)
1094 ("doxygen" ,doxygen)
1095 ("pkg-config" ,pkg-config)))
1096 (inputs
1097 `(("bullet" ,bullet)
1098 ("ffmpeg" ,ffmpeg)
1099 ("libxt" ,libxt)
1100 ("mygui" ,mygui)
1101 ("openal" ,openal)
1102 ("openscenegraph" ,openscenegraph)
1103 ("qtbase" ,qtbase)
1104 ("sdl" ,sdl2)
1105 ("unshield" ,unshield)))
5a80c15c 1106 (synopsis "Re-implementation of the RPG Morrowind engine")
e9a599cd 1107 (description
5a80c15c
RW
1108 "OpenMW is a game engine which reimplements and extends the one that runs
1109the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1110called OpenMW-CS which allows the user to edit or create their own original
1111games.")
e9a599cd 1112 (home-page "https://openmw.org")
8b1f8f64 1113 (license license:gpl3)))
194b4e7d
PM
1114
1115(define-public godot
1116 (package
1117 (name "godot")
fc346e30 1118 (version "3.0.6")
194b4e7d 1119 (source (origin
39f516cb
TGR
1120 (method git-fetch)
1121 (uri (git-reference
1122 (url "https://github.com/godotengine/godot")
1123 (commit (string-append version "-stable"))))
1124 (file-name (git-file-name name version))
194b4e7d 1125 (sha256
9766c6e2 1126 (base32
fc346e30 1127 "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
5b8d2ace
MB
1128 (modules '((guix build utils)))
1129 (snippet
1130 '(begin
1131 ;; Drop libraries that we take from Guix. Note that some
1132 ;; of these may be modified; see "thirdparty/README.md".
1133 (with-directory-excursion "thirdparty"
1134 (for-each delete-file-recursively
1135 '("freetype"
1136 "libogg"
1137 "libpng"
1138 "libtheora"
1139 "libvorbis"
1140 "libvpx"
1141 "libwebp"
1142 "openssl"
1143 "opus"
1144 "zlib"))
1145 #t)))))
92b51d12 1146 (build-system scons-build-system)
194b4e7d 1147 (arguments
92b51d12
AI
1148 `(#:scons ,scons-python2
1149 #:scons-flags (list "platform=x11"
d6e8a84e
EF
1150 ,@(if (string-prefix? "aarch64" (or (%current-target-system)
1151 (%current-system)))
1152 `("CCFLAGS=-DNO_THREADS")
1153 '())
92b51d12
AI
1154 ;; Avoid using many of the bundled libs.
1155 ;; Note: These options can be found in the SConstruct file.
1156 "builtin_freetype=no"
1157 "builtin_glew=no"
1158 "builtin_libmpdec=no"
1159 "builtin_libogg=no"
1160 "builtin_libpng=no"
1161 "builtin_libtheora=no"
1162 "builtin_libvorbis=no"
5b8d2ace 1163 "builtin_libvpx=no"
92b51d12
AI
1164 "builtin_libwebp=no"
1165 "builtin_openssl=no"
1166 "builtin_opus=no"
1167 "builtin_zlib=no")
1168 #:tests? #f ; There are no tests
194b4e7d
PM
1169 #:phases
1170 (modify-phases %standard-phases
194b4e7d
PM
1171 (add-after 'unpack 'scons-use-env
1172 (lambda _
1173 ;; Scons does not use the environment variables by default,
1174 ;; but this substitution makes it do so.
1175 (substitute* "SConstruct"
1176 (("env_base = Environment\\(tools=custom_tools\\)")
1177 (string-append
1178 "env_base = Environment(tools=custom_tools)\n"
1179 "env_base = Environment(ENV=os.environ)")))
1180 #t))
194b4e7d
PM
1181 (replace 'install
1182 (lambda* (#:key outputs #:allow-other-keys)
1183 (let* ((out (assoc-ref outputs "out"))
1184 (bin (string-append out "/bin")))
1185 (with-directory-excursion "bin"
1186 (if (file-exists? "godot.x11.tools.64")
1187 (rename-file "godot.x11.tools.64" "godot")
1188 (rename-file "godot.x11.tools.32" "godot"))
7da5db8e
TGR
1189 (install-file "godot" bin))
1190 #t)))
194b4e7d
PM
1191 (add-after 'install 'install-godot-desktop
1192 (lambda* (#:key outputs #:allow-other-keys)
1193 (let* ((out (assoc-ref outputs "out"))
1194 (desktop (string-append out "/share/applications"))
1195 (icon-dir (string-append out "/share/pixmaps")))
194b4e7d
PM
1196 (rename-file "icon.png" "godot.png")
1197 (install-file "godot.png" icon-dir)
7da5db8e 1198 (mkdir-p desktop)
194b4e7d
PM
1199 (with-output-to-file
1200 (string-append desktop "/godot.desktop")
1201 (lambda _
1202 (format #t
1203 "[Desktop Entry]~@
1204 Name=godot~@
1205 Comment=The godot game engine~@
1206 Exec=~a/bin/godot~@
1207 TryExec=~@*~a/bin/godot~@
1208 Icon=godot~@
1209 Type=Application~%"
1210 out)))
1211 #t))))))
92b51d12 1212 (native-inputs `(("pkg-config" ,pkg-config)))
194b4e7d
PM
1213 (inputs `(("alsa-lib" ,alsa-lib)
1214 ("freetype" ,freetype)
1215 ("glew" ,glew)
1216 ("glu" ,glu)
1217 ("libtheora" ,libtheora)
1218 ("libvorbis" ,libvorbis)
5b8d2ace 1219 ("libvpx" ,libvpx)
194b4e7d
PM
1220 ("libwebp" ,libwebp)
1221 ("libx11" ,libx11)
1222 ("libxcursor" ,libxcursor)
9766c6e2 1223 ("libxi" ,libxi)
194b4e7d
PM
1224 ("libxinerama" ,libxinerama)
1225 ("libxrandr" ,libxrandr)
1226 ("mesa" ,mesa)
1227 ("openssl" ,openssl)
1228 ("opusfile" ,opusfile)
92b51d12 1229 ("pulseaudio" ,pulseaudio)))
194b4e7d
PM
1230 (home-page "https://godotengine.org/")
1231 (synopsis "Advanced 2D and 3D game engine")
1232 (description
1233 "Godot is an advanced multi-platform game engine written in C++. If
1234features design tools such as a visual editor, can import 3D models and
1235provide high-quality 3D rendering, it contains an animation editor, and can be
1236scripted in a Python-like language.")
1237 (license license:expat)))
531003be 1238
1239(define-public eureka
1240 (package
1241 (name "eureka")
75f66e4a 1242 (version "1.24")
531003be 1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1246 version "/eureka-"
1247 ;; version without dots e.g 1.21 => 121
1248 (string-join (string-split version #\.) "")
1249 "-source.tar.gz"))
1250 (sha256
1251 (base32
75f66e4a 1252 "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v"))))
531003be 1253 (build-system gnu-build-system)
1254 (arguments
1255 '(#:tests? #f
1256 #:make-flags
1257 (let ((out (assoc-ref %outputs "out")))
1258 (list (string-append "PREFIX=" out)))
1259 #:phases
1260 (modify-phases %standard-phases
1261 (delete 'configure)
1262 (add-before 'build 'prepare-install-directories
1263 (lambda* (#:key outputs #:allow-other-keys)
1264 (let ((out (assoc-ref outputs "out")))
1265 (mkdir-p (string-append out "/bin"))
1266 (mkdir-p (string-append out "/share"))
1267
1268 (with-fluids ((%default-port-encoding #f))
1269 (substitute* "./src/main.cc"
1270 (("/usr/local") out)))
1271
1272 (substitute* "Makefile"
1273 (("-o root") ""))))))))
1274 (inputs `(("mesa" ,mesa)
1275 ("libxft" ,libxft)
1276 ("libxinerama" ,libxinerama)
1277 ("libfontconfig" ,fontconfig)
1278 ("libjpeg" ,libjpeg)
1279 ("libpng" ,libpng)
1280 ("fltk" ,fltk)
1281 ("zlib" ,zlib)))
1282 (native-inputs `(("pkg-config" ,pkg-config)
1283 ("xdg-utils" ,xdg-utils)))
1284 (synopsis "Doom map editor")
1285 (description "Eureka is a map editor for the classic DOOM games, and a few
1286related games such as Heretic and Hexen. It comes with a 3d preview mode and
1287a 2D editor view.")
1288 (home-page "http://eureka-editor.sourceforge.net/")
1289 (license license:gpl2+)))
00fca594
RW
1290
1291(define-public guile-chickadee
1292 (package
1293 (name "guile-chickadee")
d1022d68 1294 (version "0.3.0")
00fca594
RW
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append "https://files.dthompson.us/chickadee/"
1298 "chickadee-" version ".tar.gz"))
1299 (sha256
1300 (base32
d1022d68 1301 "0jl223dybsj5gvs7z4q60gnafj1b7kgi5mx0kj58m5knrp8qwg5h"))))
00fca594
RW
1302 (build-system gnu-build-system)
1303 (arguments
d1022d68
SB
1304 '(#:make-flags '("GUILE_AUTO_COMPILE=0")
1305 #:phases
1306 (modify-phases %standard-phases
1307 (add-before 'configure 'patch-godir
1308 (lambda _
1309 ;; Install compiled '.go' files into the site directory.
1310 (substitute* "Makefile.in"
1311 (("/ccache") "/site-ccache")))))))
00fca594
RW
1312 (propagated-inputs
1313 `(("guile-opengl" ,guile-opengl)
1314 ("guile-sdl2" ,guile-sdl2)))
1315 (inputs
1316 `(("guile" ,guile-2.2)))
1317 (native-inputs
1318 `(("pkg-config" ,pkg-config)
1319 ("texinfo" ,texinfo)))
1320 (home-page "https://dthompson.us/projects/chickadee.html")
1321 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1322 (description "Chickadee is a game development toolkit for Guile Scheme
1323built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1324that parenthetically inclined game developers need to make 2D (and eventually
13253D) games in Scheme, such as:
1326
1327@enumerate
1328@item extensible, fixed-timestep game loop
1329@item OpenGL-based rendering engine
1330@item keyboard, mouse, controller input
1331@item REPL-driven development model
1332@end enumerate\n")
1333 (license license:gpl3+)))
4041fabb
PN
1334
1335(define-public bennu-game-development
1336 (package
1337 (name "bennu-game-development")
1338 (version "348")
1339 (source (origin
1340 (method svn-fetch)
1341 (uri (svn-reference
1342 (url "http://svn.code.sf.net/p/bennugd/code")
1343 (revision (string->number version))))
1344 (file-name (string-append name "-" version))
1345 (sha256
1346 (base32
1347 "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))))
1348 (build-system gnu-build-system)
1349 (arguments
1350 '(#:phases
1351 (modify-phases %standard-phases
1352 (add-after 'unpack 'patch-configure-for-x86-64
1353 (lambda* (#:key outputs #:allow-other-keys)
1354 (chdir "core")
1355 (delete-file "configure")
1356 (substitute* "configure.in"
1357 (("i\\*86\\)")
1358 "x86_64)
1359 COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
1360 COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
1361 LIBSSL=\"crypto\"
1362 USE_OPENSSL=yes
1363 ;;
1364
1365 i*86)")))))))
1366 (inputs `(("openssl" ,openssl)
1367 ("zlib" ,zlib)))
1368 (native-inputs `(("pkg-config" ,pkg-config)
1369 ("autoconf" ,autoconf)
1370 ("automake" ,automake)
1371 ("libtool" ,libtool)))
1372 (synopsis "Programming language to create games")
1373 (description "Bennu Game Development, also known as bennudg, is a
1374programming language tailored at game development. It is the successor of
1375Fenix.")
1376 (home-page "https://sourceforge.net/projects/bennugd/")
1377 (license license:zlib)))