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