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