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