Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / games.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;; Copyright © 2014, 2015, 2016 David Thompson <dthompson2@worcester.edu>
5 ;;; Copyright © 2014, 2015, 2016, 2017 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
7 ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
8 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
9 ;;; Copyright © 2014, 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
10 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
11 ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
12 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
13 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
14 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
15 ;;; Copyright © 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
16 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
17 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
18 ;;; Copyright © 2016, 2017 Rodger Fox <thylakoid@openmailbox.org>
19 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
20 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
21 ;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
22 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
23 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
24 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
25 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
26 ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
27 ;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
28 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
29 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
30 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
31 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
32 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
33 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
34 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
35 ;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
36 ;;;
37 ;;; This file is part of GNU Guix.
38 ;;;
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
43 ;;;
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
48 ;;;
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52 (define-module (gnu packages games)
53 #:use-module (ice-9 match)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix utils)
56 #:use-module (guix packages)
57 #:use-module (guix download)
58 #:use-module (guix git-download)
59 #:use-module (guix svn-download)
60 #:use-module (guix gexp)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages backup)
65 #:use-module (gnu packages base)
66 #:use-module (gnu packages build-tools)
67 #:use-module (gnu packages admin)
68 #:use-module (gnu packages audio)
69 #:use-module (gnu packages avahi)
70 #:use-module (gnu packages boost)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages docbook)
73 #:use-module (gnu packages fltk)
74 #:use-module (gnu packages freedesktop)
75 #:use-module (gnu packages fribidi)
76 #:use-module (gnu packages game-development)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages ghostscript)
79 #:use-module (gnu packages gimp)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages gnome)
83 #:use-module (gnu packages gperf)
84 #:use-module (gnu packages graphics)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages guile)
87 #:use-module (gnu packages imagemagick)
88 #:use-module (gnu packages libcanberra)
89 #:use-module (gnu packages libedit)
90 #:use-module (gnu packages libunwind)
91 #:use-module (gnu packages haskell)
92 #:use-module (gnu packages mp3)
93 #:use-module (gnu packages music)
94 #:use-module (gnu packages icu4c)
95 #:use-module (gnu packages image)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages netpbm)
98 #:use-module (gnu packages networking)
99 #:use-module (gnu packages ocaml)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages textutils)
103 #:use-module (gnu packages xorg)
104 #:use-module (gnu packages pkg-config)
105 #:use-module (gnu packages databases)
106 #:use-module (gnu packages shells)
107 #:use-module (gnu packages sdl)
108 #:use-module (gnu packages swig)
109 #:use-module (gnu packages texinfo)
110 #:use-module (gnu packages check)
111 #:use-module (gnu packages fonts)
112 #:use-module (gnu packages fontutils)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages bash)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages qt)
117 #:use-module (gnu packages compression)
118 #:use-module (gnu packages pulseaudio)
119 #:use-module (gnu packages linux)
120 #:use-module (gnu packages xiph)
121 #:use-module (gnu packages curl)
122 #:use-module (gnu packages lua)
123 #:use-module (gnu packages video)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages tcl)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages tls)
128 #:use-module (gnu packages pcre)
129 #:use-module (gnu packages cyrus-sasl)
130 #:use-module (gnu packages messaging)
131 #:use-module (gnu packages upnp)
132 #:use-module (gnu packages wxwidgets)
133 #:use-module (gnu packages bison)
134 #:use-module (gnu packages flex)
135 #:use-module (gnu packages cmake)
136 #:use-module (gnu packages gnuzilla)
137 #:use-module (gnu packages icu4c)
138 #:use-module (gnu packages networking)
139 #:use-module (gnu packages vulkan)
140 #:use-module (gnu packages web)
141 #:use-module (guix build-system gnu)
142 #:use-module (guix build-system haskell)
143 #:use-module (guix build-system python)
144 #:use-module (guix build-system cmake)
145 #:use-module (guix build-system trivial))
146
147 (define-public armagetronad
148 (package
149 (name "armagetronad")
150 (version "0.2.8.3.4")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "mirror://sourceforge/" name "/stable/"
154 version "/" name "-" version ".src.tar.gz"))
155 (sha256
156 (base32
157 "1pgy0r80z702qdv94aw3ywdn4ynnr4cdi86ml558pljfc5ygasj4"))))
158 (build-system gnu-build-system)
159 (inputs
160 `(("libxml2" ,libxml2)
161 ("sdl" ,sdl)
162 ("sdl-image" ,sdl-image)
163 ("freeglut" ,freeglut)
164 ("libpng" ,libpng)
165 ("libjpeg-turbo" ,libjpeg-turbo)))
166 (home-page "http://www.armagetronad.org")
167 (synopsis "Tron clone in 3D")
168 (description "Armagetron is a multiplayer game in 3d that attempts to
169 emulate and expand on the lightcycle sequence from the movie Tron. It's
170 an old school arcade game slung into the 21st century. Highlights include
171 a customizable playing arena, HUD, unique graphics, and AI bots. For the
172 more advanced player there are new game modes and a wide variety of physics
173 settings to tweak as well.")
174 (license license:gpl2+)))
175
176 (define-public cataclysm-dda
177 (package
178 (name "cataclysm-dda")
179 (version "0.C")
180 (source (origin
181 (method url-fetch)
182 (uri (string-append "https://github.com/CleverRaven/Cataclysm-DDA/"
183 "archive/" version ".tar.gz"))
184 (file-name (string-append name "-" version ".tar.gz"))
185 (sha256
186 (base32
187 "1xlajmgl9cviqyjpp5g5q4rbljy9gqc49v54bi8gpzr68s14gsb9"))
188 (modules '((guix build utils)))
189 (snippet
190 ;; Import cmath header for the std::pow function.
191 '(for-each (lambda (file)
192 (substitute* file
193 (("#include <math.h>")
194 "#include <cmath>")))
195 (find-files "src")))))
196 (build-system gnu-build-system)
197 (arguments
198 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
199 "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1")
200 #:phases
201 (modify-phases %standard-phases
202 (replace 'configure
203 (lambda _
204 (substitute* "Makefile"
205 (("ncursesw5-config") "ncursesw6-config")
206 (("RELEASE_FLAGS = -Werror") "RELEASE_FLAGS ="))
207 #t))
208 (add-after 'build 'build-tiles
209 (lambda* (#:key make-flags outputs #:allow-other-keys)
210 ;; Change prefix directory and enable tile graphics and sound.
211 (zero?
212 (apply system* "make" "TILES=1" "SOUND=1"
213 (string-append "PREFIX="
214 (assoc-ref outputs "tiles"))
215 (cdr make-flags)))))
216 (add-after 'install 'install-tiles
217 (lambda* (#:key make-flags outputs #:allow-other-keys)
218 (zero?
219 (apply system* "make" "install" "TILES=1" "SOUND=1"
220 (string-append "PREFIX="
221 (assoc-ref outputs "tiles"))
222 (cdr make-flags))))))
223 ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
224 ;; input in order to support tests.
225 #:tests? #f))
226 (outputs '("out"
227 "tiles")) ; For tile graphics and sound support.
228 (native-inputs
229 `(("gettext" ,gettext-minimal)
230 ("pkg-config" ,pkg-config)))
231 (inputs
232 `(("freetype" ,freetype)
233 ("libogg" ,libogg)
234 ("libvorbis" ,libvorbis)
235 ("ncurses" ,ncurses)
236 ("sdl2" ,sdl2)
237 ("sdl2-image", sdl2-image)
238 ("sdl2-ttf" ,sdl2-ttf)
239 ("sdl2-mixer" ,sdl2-mixer)))
240 (home-page "http://en.cataclysmdda.com/")
241 (synopsis "Survival horror roguelike video game")
242 (description
243 "Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
244 Struggle to survive in a harsh, persistent, procedurally generated world.
245 Scavenge the remnants of a dead civilization for food, equipment, or, if you are
246 lucky, a vehicle with a full tank of gas to get you out of Dodge. Fight to
247 defeat or escape from a wide variety of powerful monstrosities, from zombies to
248 giant insects to killer robots and things far stranger and deadlier, and against
249 the others like yourself, that want what you have.")
250 (license license:cc-by-sa3.0)))
251
252 (define-public cowsay
253 (package
254 (name "cowsay")
255 (version "3.04")
256 (source (origin
257 (method url-fetch)
258 (uri (string-append "https://github.com/tnalpgge/"
259 "rank-amateur-cowsay/archive/"
260 name "-" version ".tar.gz"))
261 (sha256
262 (base32
263 "12w7apbf6a9qffk92r32b16w22na2fjcqbl32rn0n7zw5hrp3f6q"))))
264 (build-system gnu-build-system)
265 (arguments
266 `(#:phases
267 (modify-phases %standard-phases
268 (delete 'configure) ; no configure script
269 (delete 'build) ; nothing to be built
270 (replace 'install
271 (lambda* (#:key outputs #:allow-other-keys)
272 (zero? (system* "sh" "install.sh"
273 (assoc-ref outputs "out")))))
274 (delete 'check)
275 (add-after 'install 'check
276 (lambda* (#:key outputs #:allow-other-keys)
277 (zero? (system* (string-append (assoc-ref outputs "out")
278 "/bin/cowsay")
279 "We're done!")))))))
280 (inputs
281 `(("perl" ,perl)))
282 (home-page (string-append "https://web.archive.org/web/20071026043648/"
283 "http://www.nog.net:80/~tony/warez/cowsay.shtml"))
284 (synopsis "Speaking cow text filter")
285 (description "Cowsay is basically a text filter. Send some text into it,
286 and you get a cow saying your text. If you think a talking cow isn't enough,
287 cows can think too: all you have to do is run @command{cowthink}. If you're
288 tired of cows, a variety of other ASCII-art messengers are available.")
289 (license license:gpl3+)))
290
291 (define-public freedoom
292 (package
293 (name "freedoom")
294 (version "0.11.3")
295 (source (origin
296 (method url-fetch)
297 (uri (string-append "https://github.com/" name "/" name
298 "/archive/v" version ".tar.gz"))
299 (file-name (string-append name "-" version ".tar.gz"))
300 (sha256
301 (base32
302 "1bjijdfqhpazyifx1qda7scj7dry1azhjrnl8h8zn2vqfgdmlh0q"))))
303 (build-system gnu-build-system)
304 (arguments
305 '(#:make-flags `(,(string-append "prefix=" (assoc-ref %outputs "out")))
306 #:parallel-build? #f
307 #:tests? #f ; no check target
308 #:phases
309 (modify-phases %standard-phases
310 (replace 'configure
311 (lambda* (#:key inputs outputs #:allow-other-keys)
312 (let* ((dejavu (assoc-ref inputs "font-dejavu"))
313 (freedoom (assoc-ref outputs "out"))
314 (wad-dir (string-append freedoom "/share/games/doom")))
315 ;; Replace the font-searching function in a shell
316 ;; script with a direct path to the required font.
317 ;; This is necessary because ImageMagick can only find the
318 ;; most basic fonts while in the build environment.
319 (substitute* "graphics/titlepic/create_caption"
320 (("font=\\$\\(find_font.*$")
321 (string-append
322 "font=" dejavu
323 "/share/fonts/truetype/DejaVuSansCondensed-Bold.ttf\n")))
324 ;; Make icon creation reproducible.
325 (substitute* "dist/Makefile"
326 (("freedm.png")
327 "-define png:exclude-chunks=date freedm.png")
328 (("freedoom1.png")
329 "-define png:exclude-chunks=date freedoom1.png")
330 (("freedoom2.png")
331 "-define png:exclude-chunks=date freedoom2.png"))
332 ;; Make sure that the install scripts know where to find
333 ;; the appropriate WAD files.
334 (substitute* "dist/freedoom"
335 (("IWAD=freedm.wad")
336 (string-append "IWAD=" wad-dir "/freedm.wad"))
337 (("IWAD=freedoom1.wad")
338 (string-append "IWAD=" wad-dir "/freedoom1.wad"))
339 (("IWAD=freedoom2.wad")
340 (string-append "IWAD=" wad-dir "/freedoom2.wad")))
341 #t))))))
342 (native-inputs
343 `(("asciidoc" ,asciidoc)
344 ("deutex" ,deutex)
345 ("font-dejavu" ,font-dejavu)
346 ("imagemagick" ,imagemagick)
347 ("python" ,python-2)))
348 (inputs
349 `(("prboom-plus" ,prboom-plus)))
350 (home-page "https://freedoom.github.io/")
351 (synopsis "Free content game based on the Doom engine")
352 (description
353 "The Freedoom project aims to create a complete free content first person
354 shooter game. Freedoom by itself is just the raw material for a game: it must
355 be paired with a compatible game engine (such as @code{prboom-plus}) to be
356 played. Freedoom complements the Doom engine with free levels, artwork, sound
357 effects and music to make a completely free game.")
358 (license license:bsd-3)))
359
360 (define-public meandmyshadow
361 (package
362 (name "meandmyshadow")
363 (version "0.4")
364 (source (origin
365 (method url-fetch)
366 (uri (string-append "mirror://sourceforge/meandmyshadow/"
367 version "/meandmyshadow-" version
368 "-src.tar.gz"))
369 (sha256
370 (base32
371 "1dpb7s32b2psj5w3nr5kqibib8nndi86mw8gxp4hmxwrfiisf86d"))))
372 (build-system cmake-build-system)
373 (arguments
374 '(#:tests? #f ; there are no tests
375 #:phases
376 (modify-phases %standard-phases
377 (add-after 'unpack 'set-sdl'paths
378 (lambda* (#:key inputs #:allow-other-keys)
379 (substitute* "cmake/Modules/FindSDL_gfx.cmake"
380 (("/usr/local/include/SDL")
381 (string-append (assoc-ref inputs "sdl")
382 "/include/SDL")))
383 ;; Because SDL provides lib/libX11.so.6 we need to explicitly
384 ;; link with libX11, even though we're using the GL backend.
385 (substitute* "CMakeLists.txt"
386 (("\\$\\{X11_LIBRARIES\\}") "-lX11"))
387 )))))
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("sdl" ,(sdl-union (list sdl
392 sdl-image
393 sdl-gfx
394 sdl-mixer
395 sdl-ttf)))
396 ("libx11" ,libx11) ; needed by sdl's libX11
397 ("libarchive" ,libarchive)
398 ("openssl" ,openssl)
399 ("mesa" ,mesa)
400 ("glu" ,glu)
401 ("curl" ,curl)))
402 (home-page "http://meandmyshadow.sourceforge.net/")
403 (synopsis "Puzzle/platform game")
404 (description "Me and My Shadow is a puzzle/platform game in which you try
405 to reach the exit by solving puzzles. Spikes, moving blocks, fragile blocks
406 and much more stand between you and the exit. Record your moves and let your
407 shadow mimic them to reach blocks you couldn't reach alone.")
408 (license license:gpl3+)))
409
410 (define-public knights
411 (package
412 (name "knights")
413 (version "025")
414 (source (origin
415 (method url-fetch)
416 (uri (string-append "http://www.knightsgame.org.uk/files/knights_"
417 version "_src.tar.gz"))
418 (sha256
419 (base32
420 "18vp2ygvn0s0jz8rm585jqf6hjqkam1ximq81k0r9hpmfj7wb88f"))))
421 (build-system gnu-build-system)
422 (arguments
423 '(#:make-flags
424 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
425 #:phases
426 (modify-phases %standard-phases
427 ;; No configure script.
428 (delete 'configure))
429 #:tests? #f)) ;; No check target.
430 (inputs
431 `(("boost" ,boost)
432 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
433 ("freetype" ,freetype)
434 ("fontconfig" ,fontconfig)
435 ("curl" ,curl)))
436 (home-page "http://www.knightsgame.org.uk/")
437 (synopsis "Multiplayer dungeon game involving knights and quests")
438 (description "Knights is a multiplayer game involving several knights who
439 must run around a dungeon and complete various quests. Each game revolves
440 around a quest – for example, you might have to find some items and carry them
441 back to your starting point. This may sound easy, but as there are only
442 enough items in the dungeon for one player to win, you may end up having to
443 kill your opponents to get their stuff! Other quests involve escaping from
444 the dungeon, fighting a duel to the death against the enemy knights, or
445 destroying an ancient book using a special wand.")
446 ;; This package includes modified sources of lua (X11), enet (Expat), and
447 ;; guichan (BSD-3). The "Coercri" library is released under the Boost
448 ;; license. The whole package is released under GPLv3+.
449 (license license:gpl3+)))
450
451 (define-public gnubg
452 (package
453 (name "gnubg")
454 (version "1.02")
455 (source
456 (origin
457 (method url-fetch)
458 (uri (string-append "http://files.gnubg.org/media/sources/gnubg-release-"
459 version ".000-sources." "tar.gz"))
460 (sha256
461 (base32
462 "015mvjk2iw1cg1kxwxfnvp2rxb9cylf6yc39i30fdy414k07zkky"))))
463 (build-system gnu-build-system)
464 (inputs `(("glib" ,glib)
465 ("readline" ,readline)
466 ("gtk+" ,gtk+-2)
467 ("mesa" ,mesa)
468 ("glu" ,glu)
469 ("gtkglext" ,gtkglext)
470 ("sqlite" ,sqlite)
471 ("libcanberra" ,libcanberra)))
472 (native-inputs `(("python-2" ,python-2)
473 ("pkg-config" ,pkg-config)))
474 (home-page "http://gnubg.org")
475 (synopsis "Backgammon game")
476 (description "The GNU backgammon application can be used for playing, analyzing and
477 teaching the game. It has an advanced evaluation engine based on artificial
478 neural networks suitable for both beginners and advanced players. In
479 addition to a command-line interface, it also features an attractive, 3D
480 representation of the playing board.")
481 (license license:gpl3+)))
482
483 (define-public gnubik
484 (package
485 (name "gnubik")
486 (version "2.4.3")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (string-append "mirror://gnu/gnubik/gnubik-"
491 version ".tar.gz"))
492 (sha256
493 (base32
494 "1vlf924mq8hg93bsjj0rzvs0crc6psmlxyc6zn0fr7msnmpx6gib"))))
495 (build-system gnu-build-system)
496 (inputs `(("gtk+" ,gtk+-2)
497 ("mesa" ,mesa)
498 ("glu" ,glu)
499 ("libx11" ,libx11)
500 ("guile" ,guile-2.0)
501 ("gtkglext" ,gtkglext)))
502 (native-inputs `(("gettext" ,gettext-minimal)
503 ("pkg-config" ,pkg-config)))
504 (home-page "https://www.gnu.org/software/gnubik/")
505 (synopsis "3d Rubik's cube game")
506 (description
507 "GNUbik is a puzzle game in which you must manipulate a cube to make
508 each of its faces have a uniform color. The game is customizable, allowing
509 you to set the size of the cube (the default is 3x3) or to change the colors.
510 You may even apply photos to the faces instead of colors. The game is
511 scriptable with Guile.")
512 (license license:gpl3+)))
513
514 (define-public gnushogi
515 (package
516 (name "gnushogi")
517 (version "1.4.2")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
522 version ".tar.gz"))
523 (sha256
524 (base32
525 "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
526 (arguments `(#:tests? #f)) ;; No check target.
527 (build-system gnu-build-system)
528 (home-page "https://www.gnu.org/software/gnushogi/")
529 (synopsis "The game of Shogi (Japanese chess)")
530 (description "GNU Shogi is a program that plays the game Shogi (Japanese
531 Chess). It is similar to standard chess but this variant is far more complicated.")
532 (license license:gpl3+)))
533
534 (define-public ltris
535 (package
536 (name "ltris")
537 (version "1.0.19")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (string-append "http://prdownloads.sourceforge.net/lgames/"
542 name "-" version ".tar.gz"))
543 (sha256
544 (base32
545 "1895wv1fqklrj4apkz47rnkcfhfav7zjknskw6p0886j35vrwslg"))))
546 (build-system gnu-build-system)
547 (arguments
548 '(;; The code in LTris uses traditional GNU semantics for inline functions
549 #:configure-flags '("CFLAGS=-fgnu89-inline")
550 #:phases
551 (modify-phases %standard-phases
552 (add-after 'set-paths 'set-sdl-paths
553 (lambda* (#:key inputs #:allow-other-keys)
554 (setenv "CPATH"
555 (string-append (assoc-ref inputs "sdl-union")
556 "/include/SDL"))
557 #t)))))
558 (inputs
559 `(("sdl-union" ,(sdl-union (list sdl sdl-mixer)))))
560 (home-page "http://lgames.sourceforge.net/LTris/")
561 (synopsis "Tetris clone based on the SDL library")
562 (description
563 "LTris is a tetris clone: differently shaped blocks are falling down the
564 rectangular playing field and can be moved sideways or rotated by 90 degree
565 units with the aim of building lines without gaps which then disappear (causing
566 any block above the deleted line to fall down). LTris has three game modes: In
567 Classic you play until the stack of blocks reaches the top of the playing field
568 and no new blocks can enter. In Figures the playing field is reset to a new
569 figure each level and later on tiles and lines suddenly appear. In Multiplayer
570 up to three players (either human or CPU) compete with each other sending
571 removed lines to all opponents. There is also a Demo mode in which you can
572 watch your CPU playing while enjoying a cup of tea!")
573 (license license:gpl2+)))
574
575 (define-public prboom-plus
576 (package
577 (name "prboom-plus")
578 (version "2.5.1.4")
579 (source (origin
580 (method url-fetch)
581 (uri (string-append "mirror://sourceforge/" name "/" name "/"
582 version "/" name "-" version ".tar.gz"))
583 (sha256
584 (base32
585 "151v6nign86m1a2vqz27krsccpc9m4d1jax4y43v2fa82wfj9qp0"))
586 (modules '((guix build utils)))
587 (snippet
588 '(substitute* "src/version.c"
589 (("__DATE__") "")
590 (("__TIME__") "")))))
591 (build-system gnu-build-system)
592 (arguments
593 '(#:configure-flags '("--disable-cpu-opt")
594 #:make-flags `(,(string-append "gamesdir="
595 (assoc-ref %outputs "out") "/bin"))
596 #:phases
597 (modify-phases %standard-phases
598 (add-after 'set-paths 'set-sdl'paths
599 (lambda* (#:key inputs #:allow-other-keys)
600 (setenv "CPATH"
601 (string-append (assoc-ref inputs "sdl-union")
602 "/include/SDL"))
603 #t)))))
604 (inputs
605 `(("fluidsynth" ,fluidsynth)
606 ("glu" ,glu)
607 ("libmad" ,libmad)
608 ("libpng" ,libpng)
609 ("libvorbis" ,libvorbis)
610 ("pcre" ,pcre)
611 ("portmidi" ,portmidi)
612 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net)))))
613 (home-page "http://prboom-plus.sourceforge.net/")
614 (synopsis "Version of the classic 3D shoot'em'up game Doom")
615 (description
616 "PrBoom+ is a Doom source port developed from the original PrBoom project.")
617 (license license:gpl2+)))
618
619 (define-public retux
620 (package
621 (name "retux")
622 (version "1.3.5")
623 (source (origin
624 (method url-fetch)
625 (uri (string-append "mirror://savannah/retux/"
626 (version-major+minor version) "/retux-"
627 version "-src.tar.gz"))
628 (sha256
629 (base32
630 "1pcrh3z16fl412r3k7xccrgika19ahb1xh90jihgl8yy7zza2i6p"))))
631 (build-system python-build-system)
632 (arguments
633 `(#:tests? #f ; no check target
634 #:phases
635 (modify-phases %standard-phases
636 ;; no setup.py script
637 (delete 'build)
638 (replace 'install
639 (lambda* (#:key outputs #:allow-other-keys)
640 (let* ((out (assoc-ref outputs "out"))
641 (bin (string-append out "/bin"))
642 (data (string-append out "/share/retux"))
643 (doc (string-append out "/share/doc/retux")))
644 (mkdir-p bin)
645
646 (substitute* "retux.py"
647 ;; Use the correct data directory.
648 (("os\\.path\\.join\\(os\\.path\\.dirname\\(__file__\\), \"data\"\\),")
649 (string-append "\"" data "\","))
650 ;; Use Python 3 so the patch-shebangs phase works properly.
651 ((".*python2.*") "#!/usr/bin/python3"))
652
653 (copy-file "retux.py" (string-append bin "/retux"))
654
655 (copy-recursively "data" data)
656
657 (install-file "COPYING" doc)))))))
658 (inputs
659 `(("python-sge-pygame" ,python-sge-pygame)
660 ("python-six" ,python-six)
661 ("python-xsge" ,python-xsge)))
662 (home-page "http://retux.nongnu.org")
663 (synopsis "Action platformer game")
664 (description
665 "ReTux is an action platformer loosely inspired by the Mario games,
666 utilizing the art assets from the @code{SuperTux} project.")
667 ;; GPL version 3 or later is the license for the code and some art.
668 ;; The rest of the licenses are for the art exclusively, as listed in
669 ;; data/LICENSES.
670 (license (list license:cc0
671 license:cc-by3.0
672 license:cc-by-sa3.0
673 license:cc-by-sa4.0
674 license:gpl2+
675 license:gpl3+))))
676
677 (define-public roguebox-adventures
678 (let ((commit "19a2c340b34d5b4e7cc89118c7aedc058babbd93")
679 (revision "1"))
680 (package
681 (name "roguebox-adventures")
682 (version (git-version "2.1.2" revision commit))
683 (source
684 (origin
685 (method git-fetch)
686 (uri
687 (git-reference
688 (url "https://git.postactiv.com/themightyglider/RogueBoxAdventures.git")
689 (commit commit)))
690 (file-name (git-file-name name version))
691 (sha256
692 (base32
693 "0afmg8fjdcs3sqdp5rc7irgr7riil8jwysfjn1imfxslf1wcx5ah"))))
694 (build-system python-build-system)
695 (arguments
696 '(#:tests? #f ; no check target
697 #:phases
698 (modify-phases %standard-phases
699 ;; no setup.py script
700 (replace 'build
701 (lambda* (#:key outputs #:allow-other-keys)
702 (let* ((out (assoc-ref outputs "out"))
703 (data (string-append
704 out "/share/games/roguebox-adventures")))
705 ;; Use the correct data directory.
706 (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py")
707 (("basic_path + os\\.sep + 'DATA'")
708 (string-append "'" data "'"))
709 (("^basic_path.*$")
710 (string-append "basic_path ='" data "'\n")))
711 (substitute* "LIB/gra_files.py"
712 (("basic_path = b_path\\.replace\\('/LIB',''\\)")
713 (string-append "basic_path ='" data "'\n")))
714
715 ;; The game must save in the user's home directory because
716 ;; the store is read-only.
717 (substitute* "main.py"
718 (("home_save = False") "home_save = True")
719 (("'icon_small.png'")
720 (string-append "'" data "/icon_small.png'"))))
721 #t))
722 (replace 'install
723 (lambda* (#:key outputs #:allow-other-keys)
724 (let* ((out (assoc-ref outputs "out"))
725 (bin (string-append out "/bin"))
726 (data (string-append
727 out "/share/games/roguebox-adventures"))
728 (doc (string-append
729 out "/share/doc/roguebox-adventures")))
730 (mkdir-p bin)
731 (mkdir-p doc)
732 (copy-file "main.py"
733 (string-append bin "/roguebox-adventures"))
734 (chmod (string-append bin "/roguebox-adventures") #o555)
735
736 (for-each (lambda (file)
737 (copy-recursively file
738 (string-append data "/" file)))
739 '("AUDIO" "FONT" "GRAPHIC" "LIB" "LICENSE"
740 "icon_big.png" "icon_small.png"))
741
742 (copy-recursively "DOC" doc)
743
744 (wrap-program (string-append bin "/roguebox-adventures")
745 `("PYTHONPATH" ":" prefix (,(string-append data "/LIB")))))
746 #t)))))
747 (inputs
748 `(("python-pygame" ,python-pygame)
749 ("python-tmx" ,python-tmx)))
750 (home-page "https://rogueboxadventures.tuxfamily.org")
751 (synopsis "A classical roguelike/sandbox game")
752 (description
753 "RogueBox Adventures is a graphical roguelike with strong influences
754 from sandbox games like Minecraft or Terraria. The main idea of RogueBox
755 Adventures is to offer the player a kind of roguelike toy-world. This world
756 can be explored and changed freely.")
757 ;; The GPL3+ is for code, the rest are for art.
758 (license (list license:cc0
759 license:cc-by3.0
760 license:gpl3+
761 license:silofl1.1)))))
762
763 (define-public xshogi
764 (package
765 (name "xshogi")
766 (version "1.4.2")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (string-append "mirror://gnu/gnushogi/xshogi-"
771 version ".tar.gz"))
772 (sha256
773 (base32
774 "1dns0nhymak44by18sv48m4xb2skiwbi2i3nb9hl6w9iwd2i2brf"))))
775 (build-system gnu-build-system)
776 (inputs
777 `(("libxaw" ,libxaw)
778 ("libxt" ,libxt)))
779 (home-page "https://www.gnu.org/software/gnushogi/")
780 (synopsis "User interface for gnushogi")
781 (description "A graphical user interface for the package @code{gnushogi}.")
782 ;; Contains a copy of GPLv3 but the licence notices simply
783 ;; state "GNU General Public Licence" without specifying a version.
784 (license license:gpl1+)))
785
786 (define-public abbaye
787 (package
788 (name "abbaye")
789 (version "2.0.1")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (string-append "https://github.com/nevat/abbayedesmorts-gpl/"
794 "archive/v" version ".tar.gz"))
795 (file-name (string-append name "-" version ".tar.gz"))
796 (sha256
797 (base32
798 "1a67b0hq6271dd7pvwndjq29cwn2n8gawwz17xafa3k1hrhf8vw3"))
799 (modules '((guix build utils)))
800 (snippet
801 ;; Unbundle fonts.
802 '(delete-file-recursively "fonts"))))
803 (build-system gnu-build-system)
804 (arguments
805 '(#:make-flags '("CC=gcc")
806 #:phases (modify-phases %standard-phases
807 (add-after 'set-paths 'set-sdl-paths
808 (lambda* (#:key inputs #:allow-other-keys)
809 (setenv "CPATH"
810 (string-append (assoc-ref inputs "sdl-union")
811 "/include/SDL"))))
812 (add-after 'patch-source-shebangs 'patch-makefile
813 (lambda* (#:key outputs #:allow-other-keys)
814 ;; Replace /usr with package output directory.
815 (substitute* "Makefile"
816 (("/usr") (assoc-ref outputs "out")))))
817 (add-before 'install 'make-install-dirs
818 (lambda* (#:key outputs #:allow-other-keys)
819 (let ((prefix (assoc-ref outputs "out")))
820 ;; Create directories that the makefile assumes exist.
821 (mkdir-p (string-append prefix "/bin"))
822 (mkdir-p (string-append prefix "/share/applications"))
823 (mkdir-p (string-append prefix "/share/pixmaps")))))
824 ;; No configure script.
825 (delete 'configure))
826 #:tests? #f)) ;; No check target.
827 (native-inputs `(("pkg-config" ,pkg-config)))
828 (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer)))))
829 (home-page "https://github.com/nevat/abbayedesmorts-gpl")
830 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
831 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
832 France. The Cathars, who preach about good Christian beliefs, were being
833 expelled by the Catholic Church out of the Languedoc region in France. One of
834 them, called Jean Raymond, found an old church in which to hide, not knowing
835 that beneath its ruins lay buried an ancient evil.")
836 (license license:gpl3)))
837
838 (define-public angband
839 (package
840 (name "angband")
841 (version "4.0.5")
842 (source
843 (origin
844 (method url-fetch)
845 (uri (string-append "http://rephial.org/downloads/4.0/"
846 "angband-" version ".tar.gz"))
847 (sha256
848 (base32
849 "0lpq2kms7hp421vrasx2bkkn9w08kr581ldwik3v0hlq6h7rlxhd"))
850 (modules '((guix build utils)))
851 (snippet
852 ;; So, some of the sounds/graphics/tilesets are under different
853 ;; licenses... some of them even nonfree! This is a console-only
854 ;; version of this package so we just remove them.
855 ;; In the future, if someone tries to make a graphical variant of
856 ;; this package, they can deal with that mess themselves. :)
857 '(begin
858 (for-each
859 (lambda (subdir)
860 (let ((lib-subdir (string-append "lib/" subdir)))
861 (delete-file-recursively lib-subdir)))
862 '("fonts" "icons" "sounds" "tiles"))
863 (substitute* "lib/Makefile"
864 ;; And don't try to invoke makefiles in the directories we removed
865 (("gamedata customize help screens fonts tiles sounds icons user")
866 "gamedata customize help screens user"))))))
867 (build-system gnu-build-system)
868 (arguments
869 `(#:tests? #f ;no check target
870 #:configure-flags (list (string-append "--bindir=" %output "/bin"))
871 #:phases
872 (modify-phases %standard-phases
873 (add-after 'unpack 'autogen.sh
874 (lambda _
875 (substitute* "acinclude.m4"
876 (("ncursesw5-config") "ncursesw6-config"))
877 (zero? (system* "sh" "autogen.sh")))))))
878 (native-inputs
879 `(("autoconf" ,autoconf)
880 ("automake" ,automake)))
881 (inputs `(("ncurses" ,ncurses)))
882 (home-page "http://rephial.org/")
883 (synopsis "Dungeon exploration roguelike")
884 (description "Angband is a Classic dungeon exploration roguelike. Explore
885 the depths below Angband, seeking riches, fighting monsters, and preparing to
886 fight Morgoth, the Lord of Darkness.")
887 (license license:gpl2)))
888
889 (define-public pingus
890 (package
891 (name "pingus")
892 (version "0.7.6")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (string-append "https://github.com/Pingus/pingus/archive/v"
897 version ".tar.gz"))
898 (file-name (string-append name "-" version ".tar.gz"))
899 (sha256
900 (base32
901 "0r9v6as5vi7skvvy7b0fcaimhdlzmik64pyy68plgljhsghqkkf4"))
902 (patches (search-patches "pingus-sdl-libs-config.patch"))))
903 (build-system gnu-build-system)
904 (native-inputs `(("pkg-config" ,pkg-config)
905 ("scons-python2" ,scons-python2)))
906 (inputs `(("sdl" ,sdl)
907 ("sdl-image" ,sdl-image)
908 ("sdl-mixer" ,sdl-mixer)
909 ("mesa" ,mesa)
910 ("glu" ,glu)
911 ("libpng" ,libpng)
912 ("boost" ,boost)))
913 (arguments
914 '(#:make-flags (list (string-append "PREFIX=" %output))
915 #:tests? #f ; no check target
916 #:phases
917 (modify-phases %standard-phases
918 (delete 'configure)))) ; no configure script
919 (home-page "http://pingus.seul.org/welcome.html")
920 (synopsis "Lemmings clone")
921 (description
922 "Pingus is a free Lemmings-like puzzle game in which the player takes
923 command of a bunch of small animals and has to guide them through levels.
924 Since the animals walk on their own, the player can only influence them by
925 giving them commands, like build a bridge, dig a hole, or redirect all animals
926 in the other direction. Multiple such commands are necessary to reach the
927 level's exit. The game is presented in a 2D side view.")
928 ;; Some source files are under bsd-3 and gpl2+ licenses.
929 (license license:gpl3+)))
930
931 (define-public talkfilters
932 (package
933 (name "talkfilters")
934 (version "2.3.8")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (string-append "http://www.hyperrealm.com/" name "/"
939 name "-" version ".tar.gz"))
940 (sha256
941 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
942 (build-system gnu-build-system)
943 (home-page "https://www.gnu.org/software/talkfilters/")
944 (synopsis "Convert English text to humorous dialects")
945 (description "The GNU Talk Filters are programs that convert English text
946 into stereotyped or otherwise humorous dialects. The filters are provided as
947 a C library, so they can easily be integrated into other programs.")
948 (license license:gpl2+)))
949
950 (define-public cmatrix
951 (package
952 (name "cmatrix")
953 (version "1.2a")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (string-append "http://www.asty.org/cmatrix/dist/cmatrix-" version
958 ".tar.gz"))
959 (sha256
960 (base32
961 "0k06fw2n8nzp1pcdynhajp5prba03gfgsbj91bknyjr5xb5fd9hz"))))
962 (build-system gnu-build-system)
963 (arguments
964 '(#:phases
965 (modify-phases %standard-phases
966 (replace 'configure
967 (lambda* (#:key outputs #:allow-other-keys)
968 ;; This old ‘configure’ script doesn't support
969 ;; variables passed as arguments.
970 (let ((out (assoc-ref outputs "out")))
971 (setenv "CONFIG_SHELL" (which "bash"))
972 (zero?
973 (system* "./configure"
974 (string-append "--prefix=" out)))))))))
975 (inputs `(("ncurses" ,ncurses)))
976 (home-page "http://www.asty.org/cmatrix")
977 (synopsis "Simulate the display from \"The Matrix\"")
978 (description "CMatrix simulates the display from \"The Matrix\" and is
979 based on the screensaver from the movie's website. It works with terminal
980 settings up to 132x300 and can scroll lines all at the same rate or
981 asynchronously and at a user-defined speed.")
982 (license license:gpl2+)))
983
984 (define-public chess
985 (package
986 (name "chess")
987 (version "6.2.5")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (string-append "mirror://gnu/chess/gnuchess-" version
992 ".tar.gz"))
993 (sha256
994 (base32
995 "00j8s0npgfdi41a0mr5w9qbdxagdk2v41lcr42rwl1jp6miyk6cs"))))
996 (build-system gnu-build-system)
997 (home-page "https://www.gnu.org/software/chess/")
998 (synopsis "Full chess implementation")
999 (description "GNU Chess is a chess engine. It allows you to compete
1000 against the computer in a game of chess, either through the default terminal
1001 interface or via an external visual interface such as GNU XBoard.")
1002 (license license:gpl3+)))
1003
1004 (define freedink-engine
1005 (package
1006 (name "freedink-engine")
1007 (version "108.4")
1008 (source (origin
1009 (method url-fetch)
1010 (uri (string-append "mirror://gnu/freedink/freedink-" version
1011 ".tar.gz"))
1012 (sha256
1013 (base32
1014 "08c51imfjfcydm7h0va09z8qfw5nc837bi2x754ni2z737hb5kw2"))))
1015 (build-system gnu-build-system)
1016 (arguments `(#:configure-flags '("--disable-embedded-resources")))
1017 (native-inputs `(("gettext" ,gettext-minimal)
1018 ("pkg-config" ,pkg-config)))
1019 (inputs `(("sdl" ,sdl)
1020 ("sdl-image" ,sdl-image)
1021 ("sdl-mixer" ,sdl-mixer)
1022 ("sdl-ttf" ,sdl-ttf)
1023 ("sdl-gfx" ,sdl-gfx)
1024 ("fontconfig" ,fontconfig)
1025 ("check" ,check)))
1026 (home-page "https://www.gnu.org/software/freedink/")
1027 (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
1028 (description
1029 "GNU FreeDink is a free and portable re-implementation of the engine
1030 for the role-playing game Dink Smallwood. It supports not only the original
1031 game data files but it also supports user-produced game mods or \"D-Mods\".
1032 To that extent, it also includes a front-end for managing all of your D-Mods.")
1033 (license license:gpl3+)))
1034
1035 (define freedink-data
1036 (package
1037 (name "freedink-data")
1038 (version "1.08.20170401")
1039 (source (origin
1040 (method url-fetch)
1041 (uri (string-append "mirror://gnu/freedink/freedink-data-"
1042 version ".tar.xz"))
1043 (sha256
1044 (base32
1045 "1zx7qywibhznj7bnz217404scr8dfh0xj24xjihnda5iapzz7lz8"))))
1046 (build-system gnu-build-system)
1047 (arguments
1048 `(#:phases
1049 (modify-phases %standard-phases
1050 (delete 'configure) ; no configure script
1051 (delete 'check)) ; no tests
1052 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1053 (home-page "https://www.gnu.org/software/freedink/")
1054 (synopsis "Game data for GNU Freedink")
1055 (description
1056 "This package contains the game data of GNU Freedink.")
1057 (license license:gpl3+)))
1058
1059 ;; TODO: Add freedink-dfarc when there's a wxWidgets package.
1060
1061 (define-public freedink
1062 ;; This is a wrapper that tells the engine where to find the data.
1063 (package (inherit freedink-engine)
1064 (name "freedink")
1065 (build-system trivial-build-system)
1066 (arguments
1067 '(#:builder (begin
1068 (use-modules (guix build utils))
1069
1070 (let* ((output (assoc-ref %outputs "out"))
1071 (bin (string-append output "/bin"))
1072 (executable (string-append bin "/freedink")))
1073 (mkdir-p bin)
1074 (call-with-output-file executable
1075 (lambda (port)
1076 (format port "#!~a/bin/sh
1077 exec ~a/bin/freedink -refdir ~a/share/dink\n"
1078 (assoc-ref %build-inputs "bash")
1079 (assoc-ref %build-inputs "engine")
1080 (assoc-ref %build-inputs "data"))
1081 (chmod port #o777)))))
1082 #:modules ((guix build utils))))
1083 (inputs `(("engine" ,freedink-engine)
1084 ("data" ,freedink-data)
1085 ("bash" ,bash)))
1086 (native-inputs '())))
1087
1088 (define-public xboard
1089 (package
1090 (name "xboard")
1091 (version "4.9.1")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (string-append "mirror://gnu/xboard/xboard-" version
1096 ".tar.gz"))
1097 (sha256
1098 (base32
1099 "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
1100 (build-system gnu-build-system)
1101 (inputs
1102 `(("gtk+" ,gtk+-2)
1103 ("librsvg" ,librsvg)))
1104 (native-inputs
1105 `(("texinfo" ,texinfo)
1106 ("pkg-config" ,pkg-config)))
1107 (home-page "https://www.gnu.org/software/xboard/")
1108 (synopsis "Graphical user interface for chess programs")
1109 (description "GNU XBoard is a graphical board for all varieties of chess,
1110 including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
1111 and Makruk. Several lesser-known variants are also supported. It presents a
1112 fully interactive graphical interface and it can load and save games in the
1113 Portable Game Notation.")
1114 (license license:gpl3+)))
1115
1116
1117 (define-public xboing
1118 (package
1119 (name "xboing")
1120 (version "2.4")
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (string-append "http://www.techrescue.org/xboing/xboing"
1125 version ".tar.gz"))
1126 (sha256
1127 (base32 "16m2si8wmshxpifk861vhpqviqxgcg8bxj6wfw8hpnm4r2w9q0b7"))
1128 (patches (search-patches "xboing-CVE-2004-0149.patch"))))
1129 (arguments
1130 `(#:tests? #f
1131 #:phases
1132 (modify-phases %standard-phases
1133 (replace 'configure
1134 (lambda* (#:key outputs #:allow-other-keys)
1135
1136 (substitute* "Imakefile"
1137 (("XPMINCLUDE[\t ]*= -I/usr/X11/include/X11")
1138 (string-append "XPMINCLUDE = -I"
1139 (assoc-ref %build-inputs "libxpm")
1140 "/include/X11")))
1141
1142 (substitute* "Imakefile"
1143 (("XBOING_DIR = \\.") "XBOING_DIR=$(PROJECTROOT)"))
1144
1145 ;; FIXME: HIGH_SCORE_FILE should be set to somewhere writeable
1146
1147 (zero? (system* "xmkmf" "-a"
1148 (string-append "-DProjectRoot="
1149 (assoc-ref outputs "out"))))))
1150 (replace 'install
1151 (lambda* (#:key outputs #:allow-other-keys)
1152 (and
1153 (zero? (system* "make" "install.man"))
1154 (zero? (system* "make" "install"))))))))
1155 (inputs `(("libx11" ,libx11)
1156 ("libxext" ,libxext)
1157 ("libxpm" ,libxpm)))
1158 (native-inputs `(("imake" ,imake)
1159 ("inetutils" ,inetutils)
1160 ("makedepend" ,makedepend)))
1161 (build-system gnu-build-system)
1162 (home-page "http://www.techrescue.org/xboing")
1163 (synopsis "Ball and paddle game")
1164 (description "XBoing is a blockout type game where you have a paddle which
1165 you control to bounce a ball around the game zone destroying blocks with a
1166 proton ball. Each block carries a different point value. The more blocks you
1167 destroy, the better your score. The person with the highest score wins.")
1168 (license (license:x11-style "file://COPYING"
1169 "Very similar to the X11 licence."))))
1170
1171 (define-public gtypist
1172 (package
1173 (name "gtypist")
1174 (version "2.9.5")
1175 (source (origin
1176 (method url-fetch)
1177 (uri (string-append "mirror://gnu/gtypist/gtypist-"
1178 version ".tar.xz"))
1179 (sha256
1180 (base32
1181 "0xzrkkmj0b1dw3yr0m9hml2y634cc4h61im6zwcq57s7285z8fn1"))
1182 (modules '((guix build utils)))
1183 (snippet
1184 ;; We do not provide `ncurses.h' within an `ncursesw'
1185 ;; sub-directory, so patch the source accordingly. See
1186 ;; <http://bugs.gnu.org/19018>.
1187 '(for-each (lambda (file)
1188 (substitute* file
1189 (("ncursesw/ncurses.h")
1190 "ncurses.h")))
1191 (find-files "." "configure$|\\.c$")))))
1192 (build-system gnu-build-system)
1193 (inputs `(("ncurses" ,ncurses)
1194 ("perl" ,perl)))
1195 (home-page "https://www.gnu.org/software/gtypist/")
1196 (synopsis "Typing tutor")
1197 (description
1198 "GNU Typist is a universal typing tutor. It can be used to learn and
1199 practice touch-typing. Several tutorials are included; in addition to
1200 tutorials for the standard QWERTY layout, there are also tutorials for the
1201 alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
1202 are primarily in English, however some in other languages are provided.")
1203 (license license:gpl3+)))
1204
1205 (define-public irrlicht
1206 (package
1207 (name "irrlicht")
1208 (version "1.8.4")
1209 (source (origin
1210 (method url-fetch)
1211 (uri (string-append
1212 "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
1213 (version-major+minor version)
1214 "/" version "/irrlicht-" version ".zip"))
1215 (sha256
1216 (base32
1217 "0cz4z4dwrv5ypl19ll67wl6jjpy5k6ly4vr042w4br88qq5jhazl"))))
1218 (build-system gnu-build-system)
1219 (arguments
1220 `(#:phases
1221 (modify-phases %standard-phases
1222 (add-after 'unpack 'fix-build-env
1223 (lambda* (#:key outputs #:allow-other-keys)
1224 (let ((out (assoc-ref outputs "out")))
1225 (substitute* "Makefile"
1226 (("INSTALL_DIR = /usr/local/lib")
1227 (string-append "INSTALL_DIR = " out "/lib")))
1228 ;; The Makefile assumes these directories exist.
1229 (mkdir-p (string-append out "/lib"))
1230 (mkdir-p (string-append out "/include")))))
1231 (replace 'unpack
1232 (lambda* (#:key source #:allow-other-keys)
1233 (and (zero? (system* "unzip" source))
1234 ;; The actual source is buried a few directories deep.
1235 (chdir (string-append "irrlicht-" ,version
1236 "/source/Irrlicht/")))))
1237 (delete 'configure)) ; no configure script
1238 #:tests? #f ; no check target
1239 #:make-flags '("CC=gcc" "sharedlib")))
1240 (native-inputs
1241 `(("unzip" ,unzip)))
1242 (inputs
1243 `(("mesa" ,mesa)
1244 ("glu" ,glu)))
1245 (synopsis "3D game engine written in C++")
1246 (description
1247 "The Irrlicht Engine is a high performance realtime 3D engine written in
1248 C++. Features include an OpenGL renderer, extensible materials, scene graph
1249 management, character animation, particle and other special effects, support
1250 for common mesh file formats, and collision detection.")
1251 (home-page "http://irrlicht.sourceforge.net/")
1252 (license license:zlib)))
1253
1254 (define-public mars
1255 ;; The latest release on SourceForge relies on an unreleased version of SFML
1256 ;; with a different API, so we take the latest version from the official
1257 ;; repository on Github.
1258 (let ((commit "c855d044094a1d92317e38935d81ba938946132e")
1259 (revision "1"))
1260 (package
1261 (name "mars")
1262 (version (string-append "0.7.5." revision "." (string-take commit 7) ))
1263 (source (origin
1264 (method git-fetch)
1265 (uri (git-reference
1266 (url "https://github.com/thelaui/M.A.R.S..git")
1267 (commit commit)))
1268 (file-name (string-append name "-" version))
1269 (sha256
1270 (base32
1271 "1r4c5gap1z2zsv4yjd34qriqkxaq4lb4rykapyzkkdf4g36lc3nh"))
1272 (patches (search-patches "mars-sfml-2.3.patch"
1273 "mars-install.patch"))))
1274 (build-system cmake-build-system)
1275 (arguments
1276 `(#:tests? #f ; There are no tests
1277 #:phases
1278 (modify-phases %standard-phases
1279 (add-after 'unpack 'fix-install-path
1280 (lambda _
1281 (substitute* "src/CMakeLists.txt"
1282 (("\\$\\{CMAKE_INSTALL_PREFIX\\}/games")
1283 "${CMAKE_INSTALL_PREFIX}/bin"))
1284 #t))
1285 (add-after 'unpack 'fix-data-path
1286 (lambda* (#:key outputs #:allow-other-keys)
1287 (substitute* "src/System/settings.cpp"
1288 (("C_dataPath = \"./data/\";")
1289 (string-append "C_dataPath = \""
1290 (assoc-ref outputs "out")
1291 "/share/games/marsshooter/\";")))
1292 #t)))))
1293 (inputs
1294 `(("mesa" ,mesa)
1295 ("fribidi" ,fribidi)
1296 ("taglib" ,taglib)
1297 ("sfml" ,sfml)))
1298 (home-page "http://marsshooter.org")
1299 (synopsis "2D space shooter")
1300 (description
1301 "M.A.R.S. is a 2D space shooter with pretty visual effects and
1302 attractive physics. Players can battle each other or computer controlled
1303 enemies in different game modes such as space ball, death match, team death
1304 match, cannon keep, and grave-itation pit.")
1305 (license license:gpl3+))))
1306
1307 (define minetest-data
1308 (package
1309 (name "minetest-data")
1310 (version "0.4.16")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (string-append
1314 "https://github.com/minetest/minetest_game/archive/"
1315 version ".tar.gz"))
1316 (file-name (string-append name "-" version ".tar.gz"))
1317 (sha256
1318 (base32
1319 "0nibpm600rbv9dg1zgcsl5grlbqx0b5l6cg1lp6sqkwvjialb4ga"))))
1320 (build-system trivial-build-system)
1321 (native-inputs
1322 `(("source" ,source)
1323 ("tar" ,tar)
1324 ("gzip" ,(@ (gnu packages compression) gzip))))
1325 (arguments
1326 `(#:modules ((guix build utils))
1327 #:builder (begin
1328 (use-modules (guix build utils))
1329 (let ((tar (string-append (assoc-ref %build-inputs "tar")
1330 "/bin/tar"))
1331 (install-dir (string-append
1332 %output
1333 "/share/minetest/games/minetest_game"))
1334 (path (string-append (assoc-ref %build-inputs
1335 "gzip")
1336 "/bin")))
1337 (setenv "PATH" path)
1338 (system* tar "xvf" (assoc-ref %build-inputs "source"))
1339 (chdir (string-append "minetest_game-" ,version))
1340 (mkdir-p install-dir)
1341 (copy-recursively "." install-dir)))))
1342 (synopsis "Main game data for the Minetest game engine")
1343 (description
1344 "Game data for the Minetest infinite-world block sandox game.")
1345 (home-page "http://minetest.net")
1346 (license license:lgpl2.1+)))
1347
1348 (define-public minetest
1349 (package
1350 (name "minetest")
1351 (version "0.4.16")
1352 (source (origin
1353 (method url-fetch)
1354 (uri (string-append
1355 "https://github.com/minetest/minetest/archive/"
1356 version ".tar.gz"))
1357 (file-name (string-append name "-" version ".tar.gz"))
1358 (sha256
1359 (base32
1360 "0mbnf1ma4gsw9ah68ply04059xkfx5psdxwalxp78sgmx4ypkwqf"))))
1361 (build-system cmake-build-system)
1362 (arguments
1363 '(#:configure-flags
1364 (list "-DRUN_IN_PLACE=0"
1365 "-DENABLE_FREETYPE=1"
1366 "-DENABLE_GETTEXT=1"
1367 (string-append "-DIRRLICHT_INCLUDE_DIR="
1368 (assoc-ref %build-inputs "irrlicht")
1369 "/include/irrlicht")
1370 (string-append "-DCURL_INCLUDE_DIR="
1371 (assoc-ref %build-inputs "curl")
1372 "/include/curl"))
1373 #:tests? #f)) ; no check target
1374 (native-search-paths
1375 (list (search-path-specification
1376 (variable "MINETEST_SUBGAME_PATH")
1377 (files '("share/minetest/games")))))
1378 (native-inputs
1379 `(("pkg-config" ,pkg-config)))
1380 (inputs
1381 `(("irrlicht" ,irrlicht)
1382 ("libpng" ,libpng)
1383 ("libjpeg" ,libjpeg)
1384 ("libxxf86vm" ,libxxf86vm)
1385 ("mesa" ,mesa)
1386 ("libogg" ,libogg)
1387 ("libvorbis" ,libvorbis)
1388 ("openal" ,openal)
1389 ("freetype" ,(@ (gnu packages fontutils) freetype))
1390 ("curl" ,curl)
1391 ("luajit" ,luajit)
1392 ("gettext" ,gettext-minimal)
1393 ("sqlite" ,sqlite)))
1394 (propagated-inputs
1395 `(("minetest-data" ,minetest-data)))
1396 (synopsis "Infinite-world block sandbox game")
1397 (description
1398 "Minetest is a sandbox construction game. Players can create and destroy
1399 various types of blocks in a three-dimensional open world. This allows
1400 forming structures in every possible creation, on multiplayer servers or as a
1401 single player. Mods and texture packs allow players to personalize the game
1402 in different ways.")
1403 (home-page "http://minetest.net")
1404 (license license:lgpl2.1+)))
1405
1406 (define glkterm
1407 (package
1408 (name "glkterm")
1409 (version "1.0.4")
1410 (source
1411 (origin
1412 (method url-fetch)
1413 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
1414 "glk/implementations/glkterm-104.tar.gz"))
1415 (sha256
1416 (base32
1417 "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
1418 (build-system gnu-build-system)
1419 (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
1420 (arguments
1421 '(#:tests? #f ; no check target
1422 #:phases
1423 (modify-phases %standard-phases
1424 (replace 'install
1425 (lambda* (#:key outputs #:allow-other-keys)
1426 (let* ((out (assoc-ref outputs "out"))
1427 (inc (string-append out "/include"))
1428 (lib (string-append out "/lib")))
1429 (for-each
1430 (lambda (file)
1431 (install-file file inc))
1432 '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
1433 (install-file "libglkterm.a" lib))
1434 #t))
1435 (delete 'configure)))) ; no configure script
1436 (home-page "http://www.eblong.com/zarf/glk/")
1437 (synopsis "Curses Implementation of the Glk API")
1438 (description
1439 "Glk defines a portable API for applications with text UIs. It was
1440 primarily designed for interactive fiction, but it should be suitable for many
1441 interactive text utilities, particularly those based on a command line.
1442 This is an implementation of the Glk library which runs in a terminal window,
1443 using the @code{curses.h} library for screen control.")
1444 (license (license:fsf-free "file://README"))))
1445
1446 (define-public glulxe
1447 (package
1448 (name "glulxe")
1449 (version "0.5.4")
1450 (source
1451 (origin
1452 (method url-fetch)
1453 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
1454 "glulx/interpreters/glulxe/glulxe-054.tar.gz"))
1455 (sha256
1456 (base32
1457 "0vipydg6ra90yf9b3ipgppwxyb2xdhcxwvirgjy0v20wlf56zhhz"))))
1458 (build-system gnu-build-system)
1459 (inputs `(("glk" ,glkterm)))
1460 (arguments
1461 '(#:tests? #f ; no check target
1462 #:make-flags
1463 (let* ((glk (assoc-ref %build-inputs "glk")))
1464 (list (string-append "GLKINCLUDEDIR=" glk "/include")
1465 (string-append "GLKLIBDIR=" glk "/lib")
1466 (string-append "GLKMAKEFILE=" "Make.glkterm")))
1467 #:phases
1468 (modify-phases %standard-phases
1469 (replace 'install
1470 (lambda* (#:key outputs #:allow-other-keys)
1471 (let* ((out (assoc-ref outputs "out"))
1472 (bin (string-append out "/bin")))
1473 (install-file "glulxe" bin))
1474 #t))
1475 (delete 'configure)))) ; no configure script
1476 (home-page "http://www.eblong.com/zarf/glulx/")
1477 (synopsis "Interpreter for Glulx VM")
1478 (description
1479 "Glulx is a 32-bit portable virtual machine intended for writing and
1480 playing interactive fiction. It was designed by Andrew Plotkin to relieve
1481 some of the restrictions in the venerable Z-machine format. This is the
1482 reference interpreter, using the Glk API.")
1483 (license license:expat)))
1484
1485 (define-public fizmo
1486 (package
1487 (name "fizmo")
1488 (version "0.8.4")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append "https://christoph-ender.de/fizmo/source/"
1492 name "-" version ".tar.gz"))
1493 (sha256
1494 (base32
1495 "1sd988db2302r7cbfcfghbmg8ck43c6hvnlnlpb0rqxb7pm9cwyy"))))
1496 (build-system gnu-build-system)
1497 (arguments
1498 '(#:configure-flags
1499 (let ((libjpeg (assoc-ref %build-inputs "libjpeg"))
1500 (ncurses (assoc-ref %build-inputs "ncurses")))
1501 (list (string-append "jpeg_CFLAGS=-I" libjpeg "/include")
1502 (string-append "jpeg_LIBS=-ljpeg")
1503 (string-append "ncursesw_CFLAGS=-I" ncurses "/include")
1504 (string-append "ncursesw_LIBS=-lncursesw")))))
1505 (native-inputs
1506 `(("pkg-config" ,pkg-config)))
1507 (inputs
1508 `(("freetype" ,freetype)
1509 ("libjpeg" ,libjpeg)
1510 ("libpng" ,libpng)
1511 ("libsndfile" ,libsndfile)
1512 ("libxml2" ,libxml2)
1513 ("ncurses" ,ncurses)
1514 ("sdl2" ,sdl2)))
1515 (home-page "https://christoph-ender.de/fizmo/")
1516 (synopsis "Z-machine interpreter")
1517 (description
1518 "Fizmo is a console-based Z-machine interpreter. It is used to play
1519 interactive fiction, also known as text adventures, which were implemented
1520 either by Infocom or created using the Inform compiler.")
1521 (license license:bsd-3)))
1522
1523 (define-public retroarch
1524 (package
1525 (name "retroarch")
1526 (version "1.7.0")
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (string-append "https://github.com/libretro/RetroArch/archive/v"
1531 version ".tar.gz"))
1532 (file-name (string-append name "-" version ".tar.gz"))
1533 (sha256
1534 (base32 "1waskzf99947yqs40n38s86m41jf5v7prvzf8pzfjxzpgyis8bxk"))))
1535 (build-system gnu-build-system)
1536 (arguments
1537 '(#:tests? #f ; no tests
1538 #:phases
1539 (modify-phases %standard-phases
1540 (replace 'configure
1541 (lambda* (#:key inputs outputs #:allow-other-keys)
1542 (let* ((out (assoc-ref outputs "out"))
1543 (etc (string-append out "/etc"))
1544 (vulkan (assoc-ref inputs "vulkan-icd-loader")))
1545 ;; Hard-code the path to libvulkan.so.
1546 (substitute* "gfx/common/vulkan_common.c"
1547 (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so")))
1548 (substitute* "qb/qb.libs.sh"
1549 (("/bin/true") (which "true")))
1550 ;; The configure script does not yet accept the extra arguments
1551 ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase.
1552 (zero? (system*
1553 "./configure"
1554 (string-append "--prefix=" out)
1555 (string-append "--global-config-dir=" etc)))))))))
1556 (inputs
1557 `(("alsa-lib" ,alsa-lib)
1558 ("ffmpeg" ,ffmpeg)
1559 ("freetype" ,freetype)
1560 ("libxinerama" ,libxinerama)
1561 ("libxkbcommon" ,libxkbcommon)
1562 ("libxml2" ,libxml2)
1563 ("libxv" ,libxv)
1564 ("mesa" ,mesa)
1565 ("openal" ,openal)
1566 ("pulseaudio" ,pulseaudio)
1567 ("python" ,python)
1568 ("sdl" ,sdl2)
1569 ("udev" ,eudev)
1570 ("vulkan-icd-loader" ,vulkan-icd-loader)
1571 ("wayland", wayland)
1572 ("zlib" ,zlib)))
1573 (native-inputs
1574 `(("pkg-config" ,pkg-config)
1575 ("which" ,which)))
1576 (home-page "https://www.libretro.com/")
1577 (synopsis "Reference frontend for the libretro API")
1578 (description
1579 "Libretro is a simple but powerful development interface that allows for
1580 the easy creation of emulators, games and multimedia applications that can plug
1581 straight into any libretro-compatible frontend. RetroArch is the official
1582 reference frontend for the libretro API, currently used by most as a modular
1583 multi-system game/emulator system.")
1584 (license license:gpl3+)))
1585
1586 (define-public gnugo
1587 (package
1588 (name "gnugo")
1589 (version "3.8")
1590 (source (origin
1591 (method url-fetch)
1592 (uri (string-append "mirror://gnu/gnugo/gnugo-" version
1593 ".tar.gz"))
1594 (sha256
1595 (base32
1596 "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
1597 (build-system gnu-build-system)
1598 (inputs `(("readline" ,readline)))
1599 (synopsis "Play the game of Go")
1600 (description
1601 "GNU Go is a program that plays the game of Go, in which players
1602 place stones on a grid to form territory or capture other stones. While
1603 it can be played directly from the terminal, rendered in ASCII characters,
1604 it is also possible to play GNU Go with 3rd party graphical interfaces or
1605 even in Emacs. It supports the standard game storage format (SGF, Smart
1606 Game Format) and inter-process communication format (GMP, Go Modem
1607 Protocol).")
1608 (home-page "https://www.gnu.org/software/gnugo/")
1609 (license license:gpl3+)))
1610
1611 (define-public extremetuxracer
1612 (package
1613 (name "extremetuxracer")
1614 (version "0.7.4")
1615 (source (origin
1616 (method url-fetch)
1617 (uri (string-append
1618 "mirror://sourceforge/extremetuxracer/releases/"
1619 version "/etr-" version ".tar.xz"))
1620 (sha256
1621 (base32
1622 "0d2j4ybdjmimg67v2fndgahgq4fvgz3fpfb3a4l1ar75n6hy776s"))))
1623 (build-system gnu-build-system)
1624 (native-inputs
1625 `(("pkg-config" ,pkg-config)))
1626 (inputs
1627 `(("glu" ,glu)
1628 ("sfml" ,sfml)))
1629 (synopsis "High speed arctic racing game based on Tux Racer")
1630 ;; Snarfed straight from Debian
1631 (description "Extreme Tux Racer, or etracer as it is called for short, is
1632 a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the
1633 game is to slide down a snow- and ice-covered mountain as quickly as possible,
1634 avoiding the trees and rocks that will slow you down.
1635
1636 Collect herrings and other goodies while sliding down the hill, but avoid fish
1637 bones.
1638
1639 This game is based on the GPL version of the famous game TuxRacer.")
1640 (home-page "https://sourceforge.net/projects/extremetuxracer/")
1641 (license license:gpl2+)))
1642
1643 (define-public supertuxkart
1644 (package
1645 (name "supertuxkart")
1646 (version "0.9.3")
1647 (source
1648 (origin
1649 (method url-fetch)
1650 (uri (string-append "mirror://sourceforge/supertuxkart/SuperTuxKart/"
1651 version "/supertuxkart-" version "-src.tar.xz"))
1652 (sha256
1653 (base32
1654 "1c4w47ibj87lgwiqygq8qi7jiz6gklj4dwf5bs5zk15s0rqlw0fq"))
1655 (modules '((guix build utils)))
1656 (snippet
1657 ;; Delete bundled library sources
1658 '(begin
1659 ;; FIXME: try to unbundle enet, and angelscript
1660 (for-each delete-file-recursively
1661 '("lib/zlib"
1662 "lib/libpng"
1663 "lib/jpeglib"
1664 "lib/glew"
1665 "lib/wiiuse"))
1666 (substitute* "CMakeLists.txt"
1667 ;; Supertuxkart uses modified versions of the Irrlicht engine
1668 ;; and the bullet library. The developers gave an explanation here:
1669 ;; http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
1670 (("add_subdirectory\\(.*/(glew|zlib)\"\\)") ""))
1671 #t))))
1672 (build-system cmake-build-system)
1673 (arguments
1674 `(#:tests? #f ; no check target
1675 #:configure-flags
1676 (list "-DUSE_WIIUSE=0"
1677 ;; Do not use the bundled zlib
1678 "-DNO_IRR_COMPILE_WITH_ZLIB_=TRUE"
1679 ;; FIXME: needs libopenglrecorder
1680 "-DBUILD_RECORDER=0"
1681 ;; Irrlicht returns an integer instead of a boolean
1682 "-DCMAKE_C_FLAGS=-fpermissive")
1683 #:phases
1684 (modify-phases %standard-phases
1685 (add-after 'unpack 'unbundle
1686 (lambda* (#:key inputs #:allow-other-keys)
1687 (substitute* "CMakeLists.txt"
1688 (("glew")
1689 (string-append (assoc-ref inputs "glew")
1690 "/lib/libGLEW.a"))
1691 (("include_directories\\(\"\\$\\{PROJECT_SOURCE_DIR\\}/lib/glew/include\"\\)")
1692 (string-append "include_directories(\""
1693 (assoc-ref inputs "glew")
1694 "/include\")")))
1695 #t)))))
1696 (inputs
1697 `(("glew" ,glew)
1698 ("zlib" ,zlib)
1699 ("openal" ,openal)
1700 ("libvorbis" ,libvorbis)
1701 ("freetype" ,freetype)
1702 ("fribidi" ,fribidi)
1703 ("mesa" ,mesa)
1704 ("libx11" ,libx11)
1705 ("libxrandr" ,libxrandr)
1706 ("curl" ,curl)
1707 ;; The following input is needed to build the bundled and modified
1708 ;; version of irrlicht.
1709 ("libjpeg" ,libjpeg)))
1710 (native-inputs
1711 `(("pkg-config" ,pkg-config)))
1712 (home-page "http://supertuxkart.net")
1713 (synopsis "3D kart racing game")
1714 (description "SuperTuxKart is a 3D kart racing game, with a focus on
1715 having fun over realism. You can play with up to 4 friends on one PC, racing
1716 against each other or just trying to beat the computer; single-player mode is
1717 also available.")
1718 (license license:gpl3+)))
1719
1720 (define-public gnujump
1721 (package
1722 (name "gnujump")
1723 (version "1.0.8")
1724 (source (origin
1725 (method url-fetch)
1726 (uri (string-append "mirror://gnu/gnujump/gnujump-"
1727 version ".tar.gz"))
1728 (sha256
1729 (base32
1730 "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"))))
1731 (build-system gnu-build-system)
1732 (arguments
1733 '(#:phases
1734 (modify-phases %standard-phases
1735 (add-before
1736 'configure 'link-libm
1737 (lambda _ (setenv "LIBS" "-lm"))))))
1738 (inputs
1739 `(("glu" ,glu)
1740 ("mesa" ,mesa)
1741 ("sdl" ,sdl)
1742 ("sdl-image" ,sdl-image)
1743 ("sdl-mixer" ,sdl-mixer)))
1744 (home-page "http://gnujump.es.gnu.org/")
1745 (synopsis
1746 "Game of jumping to the next floor, trying not to fall")
1747 (description
1748 "GNUjump is a simple, yet addictive game in which you must jump from
1749 platform to platform to avoid falling, while the platforms drop at faster rates
1750 the higher you go. The game features multiplayer, unlimited FPS, smooth floor
1751 falling, themeable graphics and sounds, and replays.")
1752 (license license:gpl3+)))
1753
1754 (define-public wesnoth
1755 (package
1756 (name "wesnoth")
1757 (version "1.12.6")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "mirror://sourceforge/wesnoth/wesnoth-"
1761 (version-major+minor version) "/wesnoth-"
1762 version "/"
1763 name "-" version ".tar.bz2"))
1764 (sha256
1765 (base32
1766 "0kifp6g1dsr16m6ngjq2hx19h851fqg326ps3krnhpyix963h3x5"))))
1767 (build-system cmake-build-system)
1768 (arguments
1769 '(#:tests? #f ; no check target
1770 #:configure-flags
1771 ;; XXX: Failed to compile with '-Werror=old-style-cast'.
1772 ;; boost/mpl/assert.hpp:313:58: error:
1773 ;; use of old-style cast [-Werror=old-style-cast]
1774 ;; [...]
1775 ;; cc1plus: all warnings being treated as errors
1776 '("-DENABLE_STRICT_COMPILATION=OFF")))
1777 (native-inputs
1778 `(("gettext" ,gettext-minimal)
1779 ("pkg-config" ,pkg-config)))
1780 (inputs
1781 `(("boost" ,boost)
1782 ("dbus" ,dbus)
1783 ("fribidi" ,fribidi)
1784 ("libvorbis" ,libvorbis)
1785 ("pango" ,pango)
1786 ("sdl-image" ,sdl-image)
1787 ("sdl-mixer" ,sdl-mixer)
1788 ("sdl-net" ,sdl-net)
1789 ("sdl-ttf" ,sdl-ttf)))
1790 (home-page "http://www.wesnoth.org/")
1791 (synopsis "Turn-based strategy game")
1792 (description
1793 "The Battle for Wesnoth is a fantasy, turn based tactical strategy game,
1794 with several single player campaigns, and multiplayer games (both networked and
1795 local).
1796
1797 Battle for control on a range of maps, using variety of units which have
1798 advantages and disadvantages against different types of attacks. Units gain
1799 experience and advance levels, and are carried over from one scenario to the
1800 next campaign.")
1801 (license license:gpl2+)))
1802
1803 (define-public dosbox
1804 (package
1805 (name "dosbox")
1806 (version "0.74.svn3947")
1807 (source (origin
1808 (method svn-fetch)
1809 (uri (svn-reference
1810 (url "http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk/")
1811 (revision 3947)))
1812 (file-name (string-append name "-" version "-checkout"))
1813 ;; Use SVN head, since the last release (2010) is incompatible
1814 ;; with GCC 4.8+ (see
1815 ;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624976>).
1816 (sha256
1817 (base32
1818 "1p918j6090d1nkvgq7ifvmn506zrdmyi32y7p3ms40d5ssqjg8fj"))))
1819 (build-system gnu-build-system)
1820 (arguments
1821 `(#:phases (modify-phases %standard-phases
1822 (add-after
1823 'unpack 'autogen.sh
1824 (lambda _
1825 (zero? (system* "sh" "autogen.sh")))))))
1826 (native-inputs
1827 `(("autoconf" ,autoconf)
1828 ("automake" ,automake)))
1829 (inputs
1830 `(("sdl" ,sdl)
1831 ("libpng" ,libpng)
1832 ("zlib" ,zlib)
1833 ("alsa-lib" ,alsa-lib)
1834 ("glu" ,glu)
1835 ("mesa" ,mesa)))
1836 (home-page "http://www.dosbox.com")
1837 (synopsis "X86 emulator with CGA/EGA/VGA/etc. graphics and sound")
1838 (description "DOSBox is a DOS-emulator that uses the SDL library. DOSBox
1839 also emulates CPU:286/386 realmode/protected mode, Directory
1840 FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, a
1841 SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
1842 older games.")
1843 (license license:gpl2+)))
1844
1845 (define-public gamine
1846 (package
1847 (name "gamine")
1848 (version "1.5")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (string-append "mirror://sourceforge/gamine-game/"
1852 "gamine-" version ".tar.gz"))
1853 (sha256
1854 (base32
1855 "08wnk7w84c2413hwny89j2cn89cvfdf67bfc6wl0bf475if0mf4h"))))
1856 (build-system gnu-build-system)
1857 (native-inputs
1858 `(("pkg-config" ,pkg-config)
1859 ("intltool" ,intltool)))
1860 (inputs
1861 `(("gstreamer" ,gstreamer)
1862 ("gst-plugins-base" ,gst-plugins-base) ;playbin plugin
1863 ("gst-plugins-good" ,gst-plugins-good) ;for wav playback
1864 ("gtk+" ,gtk+)))
1865 (arguments
1866 `(#:tests? #f
1867 #:make-flags
1868 (let ((out (assoc-ref %outputs "out")))
1869 (list (string-append "PREFIX=" out)
1870 (string-append "SYSCONFDIR=" out "/etc")))
1871 #:phases
1872 (modify-phases %standard-phases
1873 (delete 'configure)
1874 (add-after
1875 'install 'wrap-gamine
1876 (lambda* (#:key outputs #:allow-other-keys)
1877 (let ((out (assoc-ref outputs "out"))
1878 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
1879 (wrap-program (string-append out "/bin/gamine")
1880 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
1881 #t)))))
1882 (home-page "http://gamine-game.sourceforge.net/")
1883 (synopsis "Mouse and keyboard discovery for children")
1884 (description
1885 "Gamine is a game designed for young children who are learning to use the
1886 mouse and keyboard. The child uses the mouse to draw colored dots and lines
1887 on the screen and keyboard to display letters.")
1888 ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
1889 (license license:gpl3)))
1890
1891 (define-public raincat
1892 (package
1893 (name "raincat")
1894 (version "1.1.1.3")
1895 (source
1896 (origin
1897 (method url-fetch)
1898 (uri (string-append
1899 "http://hackage.haskell.org/package/Raincat/Raincat-"
1900 version
1901 ".tar.gz"))
1902 (sha256
1903 (base32
1904 "1aalh68h6799mv4vyg30zpskl5jkn6x2j1jza7p4lrflyifxzar8"))))
1905 (build-system haskell-build-system)
1906 (inputs
1907 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
1908 ("ghc-mtl" ,ghc-mtl)
1909 ("ghc-random" ,ghc-random)
1910 ("ghc-glut" ,ghc-glut)
1911 ("freeglut" ,freeglut)
1912 ("ghc-opengl" ,ghc-opengl)
1913 ("ghc-sdl" ,ghc-sdl)
1914 ("ghc-sdl-image" ,ghc-sdl-image)
1915 ("ghc-sdl-mixer" ,ghc-sdl-mixer)))
1916 (home-page "http://www.bysusanlin.com/raincat/")
1917 (synopsis "Puzzle game with a cat in lead role")
1918 (description "Project Raincat is a game developed by Carnegie Mellon
1919 students through GCS during the Fall 2008 semester. Raincat features game
1920 play inspired from classics Lemmings and The Incredible Machine. The project
1921 proved to be an excellent learning experience for the programmers. Everything
1922 is programmed in Haskell.")
1923 (license license:bsd-3)))
1924
1925 (define-public manaplus
1926 (package
1927 (name "manaplus")
1928 (version "1.7.6.10")
1929 (source (origin
1930 (method url-fetch)
1931 (uri (string-append
1932 "http://repo.manaplus.org/manaplus/download/"
1933 version "/manaplus-" version ".tar.xz"))
1934 (sha256
1935 (base32
1936 "0l7swvpzq20am4w2rsjpp6fsvbjv07il6wbfy45a7h9zsdihmqhl"))))
1937 (build-system gnu-build-system)
1938 (arguments
1939 '(#:configure-flags
1940 (list (string-append "CPPFLAGS=-I"
1941 (assoc-ref %build-inputs "sdl-union")
1942 "/include/SDL"))))
1943 (native-inputs
1944 `(("pkg-config" ,pkg-config)))
1945 (inputs
1946 `(("glu" ,glu)
1947 ("curl" ,curl)
1948 ("libxml2" ,libxml2)
1949 ("mesa" ,mesa)
1950 ("sdl-union" ,(sdl-union))))
1951 (home-page "http://manaplus.org")
1952 (synopsis "Client for 'The Mana World' and similar games")
1953 (description
1954 "ManaPlus is a 2D MMORPG client for game servers. It is the only
1955 fully supported client for @uref{http://www.themanaworld.org, The mana
1956 world}, @uref{http://evolonline.org, Evol Online} and
1957 @uref{http://landoffire.org, Land of fire}.")
1958 ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
1959 ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
1960 ;; The rest is under GPL2+.
1961 (license (list license:gpl2+ license:zlib license:cc-by-sa4.0))))
1962
1963 (define-public mupen64plus-core
1964 (package
1965 (name "mupen64plus-core")
1966 (version "2.5")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (string-append
1971 "https://github.com/mupen64plus/mupen64plus-core/archive/"
1972 version ".tar.gz"))
1973 (file-name (string-append name "-" version ".tar.gz"))
1974 (sha256
1975 (base32 "0dg2hksm5qni2hcha93k7n4fqr92888p946f7phb0ndschzfh9kk"))))
1976 (build-system gnu-build-system)
1977 (native-inputs
1978 `(("pkg-config" ,pkg-config)
1979 ("which" ,which)))
1980 (inputs
1981 `(("freetype" ,freetype)
1982 ("glu" ,glu)
1983 ("libpng" ,libpng)
1984 ("mesa" ,mesa)
1985 ("sdl2" ,sdl2)
1986 ("zlib" ,zlib)))
1987 (arguments
1988 '(#:phases
1989 (modify-phases %standard-phases
1990 ;; The mupen64plus build system has no configure phase.
1991 (delete 'configure)
1992 ;; Makefile is in a subdirectory.
1993 (add-before
1994 'build 'cd-to-project-dir
1995 (lambda _
1996 (chdir "projects/unix"))))
1997 #:make-flags (let ((out (assoc-ref %outputs "out")))
1998 (list "all" (string-append "PREFIX=" out)))
1999 ;; There are no tests.
2000 #:tests? #f))
2001 ;; As per the Makefile (in projects/unix/Makefile):
2002 (supported-systems '("i686-linux" "x86_64-linux"))
2003 (home-page "http://www.mupen64plus.org/")
2004 (synopsis "Nintendo 64 emulator core library")
2005 (description
2006 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2007 which is capable of accurately playing many games. This package contains the
2008 core library.")
2009 (license license:gpl2+)))
2010
2011 (define-public mupen64plus-audio-sdl
2012 (package
2013 (name "mupen64plus-audio-sdl")
2014 (version "2.5")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (string-append
2019 "https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/"
2020 version ".tar.gz"))
2021 (file-name (string-append name "-" version ".tar.gz"))
2022 (sha256
2023 (base32 "0ss6w92n2rpfnazhg9lbq0nvs3fqx93nliz3k3wjxdlx4dpi7h3a"))))
2024 (build-system gnu-build-system)
2025 (native-inputs
2026 `(("pkg-config" ,pkg-config)
2027 ("which" ,which)))
2028 (inputs
2029 `(("mupen64plus-core" ,mupen64plus-core)
2030 ("sdl2" ,sdl2)))
2031 (arguments
2032 '(#:phases
2033 (modify-phases %standard-phases
2034 ;; The mupen64plus build system has no configure phase.
2035 (delete 'configure)
2036 ;; Makefile is in a subdirectory.
2037 (add-before
2038 'build 'cd-to-project-dir
2039 (lambda _
2040 (chdir "projects/unix"))))
2041 #:make-flags
2042 (let ((out (assoc-ref %outputs "out"))
2043 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2044 (list "all"
2045 (string-append "PREFIX=" out)
2046 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2047 ;; There are no tests.
2048 #:tests? #f))
2049 (home-page "http://www.mupen64plus.org/")
2050 (synopsis "Mupen64Plus SDL input plugin")
2051 (description
2052 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2053 which is capable of accurately playing many games. This package contains the
2054 SDL audio plugin.")
2055 (license license:gpl2+)))
2056
2057 (define-public mupen64plus-input-sdl
2058 (package
2059 (name "mupen64plus-input-sdl")
2060 (version "2.5")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "https://github.com/mupen64plus/mupen64plus-input-sdl/archive/"
2066 version ".tar.gz"))
2067 (file-name (string-append name "-" version ".tar.gz"))
2068 (sha256
2069 (base32 "11sj5dbalp2nrlmki34vy7wy28vc175pnnkdk65p8599hnyq37ri"))))
2070 (build-system gnu-build-system)
2071 (native-inputs
2072 `(("which" ,which)))
2073 (inputs
2074 `(("mupen64plus-core" ,mupen64plus-core)
2075 ("sdl2" ,sdl2)))
2076 (arguments
2077 '(#:phases
2078 (modify-phases %standard-phases
2079 ;; The mupen64plus build system has no configure phase.
2080 (delete 'configure)
2081 ;; Makefile is in a subdirectory.
2082 (add-before
2083 'build 'cd-to-project-dir
2084 (lambda _
2085 (chdir "projects/unix"))))
2086 #:make-flags
2087 (let ((out (assoc-ref %outputs "out"))
2088 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2089 (list "all"
2090 (string-append "PREFIX=" out)
2091 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2092 ;; There are no tests.
2093 #:tests? #f))
2094 (home-page "http://www.mupen64plus.org/")
2095 (synopsis "Mupen64Plus SDL input plugin")
2096 (description
2097 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2098 which is capable of accurately playing many games. This package contains the
2099 SDL input plugin.")
2100 (license license:gpl2+)))
2101
2102 (define-public mupen64plus-rsp-hle
2103 (package
2104 (name "mupen64plus-rsp-hle")
2105 (version "2.5")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (string-append
2110 "https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/"
2111 version ".tar.gz"))
2112 (file-name (string-append name "-" version ".tar.gz"))
2113 (sha256
2114 (base32 "15h7mgz6xd2zjzm6l3f96sbs8kwr3xvbwzgikhnka79m6c69hsxv"))))
2115 (build-system gnu-build-system)
2116 (inputs
2117 `(("mupen64plus-core" ,mupen64plus-core)))
2118 (arguments
2119 '(#:phases
2120 (modify-phases %standard-phases
2121 ;; The mupen64plus build system has no configure phase.
2122 (delete 'configure)
2123 ;; Makefile is in a subdirectory.
2124 (add-before
2125 'build 'cd-to-project-dir
2126 (lambda _
2127 (chdir "projects/unix"))))
2128 #:make-flags
2129 (let ((out (assoc-ref %outputs "out"))
2130 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2131 (list "all"
2132 (string-append "PREFIX=" out)
2133 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2134 ;; There are no tests.
2135 #:tests? #f))
2136 (home-page "http://www.mupen64plus.org/")
2137 (synopsis "Mupen64Plus SDL input plugin")
2138 (description
2139 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2140 which is capable of accurately playing many games. This package contains the
2141 high-level emulation (HLE) RSP processor plugin.")
2142 (license license:gpl2+)))
2143
2144 (define-public mupen64plus-rsp-z64
2145 (package
2146 (name "mupen64plus-rsp-z64")
2147 (version "2.0.0")
2148 (source
2149 (origin
2150 (method url-fetch)
2151 (uri (string-append
2152 "https://github.com/mupen64plus/mupen64plus-rsp-z64/archive/"
2153 version ".tar.gz"))
2154 (file-name (string-append name "-" version ".tar.gz"))
2155 (sha256
2156 (base32 "10jz1w2dhx5slhyk4m8mdqlpsd6cshchslr1fckb2ayzb1ls3ghi"))))
2157 (build-system gnu-build-system)
2158 (inputs
2159 `(("mupen64plus-core" ,mupen64plus-core)))
2160 (arguments
2161 '(#:phases
2162 (modify-phases %standard-phases
2163 ;; The mupen64plus build system has no configure phase.
2164 (delete 'configure)
2165 ;; Makefile is in a subdirectory.
2166 (add-before
2167 'build 'cd-to-project-dir
2168 (lambda _
2169 (chdir "projects/unix"))))
2170 #:make-flags
2171 (let ((out (assoc-ref %outputs "out"))
2172 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2173 (list "all"
2174 (string-append "PREFIX=" out)
2175 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2176 ;; There are no tests.
2177 #:tests? #f))
2178 (home-page "http://www.mupen64plus.org/")
2179 (synopsis "Mupen64Plus SDL input plugin")
2180 (description
2181 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2182 which is capable of accurately playing many games. This package contains the
2183 Z64 RSP processor plugin.")
2184 (license license:gpl2+)))
2185
2186 (define-public mupen64plus-video-arachnoid
2187 (package
2188 (name "mupen64plus-video-arachnoid")
2189 (version "2.0.0")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://github.com/mupen64plus/mupen64plus-video-arachnoid/archive/"
2195 version ".tar.gz"))
2196 (file-name (string-append name "-" version ".tar.gz"))
2197 (sha256
2198 (base32 "0jjwf144rihznm4lnqbhgigxw664v3v32wy94adaa6imk8z6gslh"))))
2199 (build-system gnu-build-system)
2200 (native-inputs
2201 `(("pkg-config" ,pkg-config)
2202 ("which" ,which)))
2203 (inputs
2204 `(("mesa" ,mesa)
2205 ("mupen64plus-core" ,mupen64plus-core)))
2206 (arguments
2207 '(#:phases
2208 (modify-phases %standard-phases
2209 ;; The mupen64plus build system has no configure phase.
2210 (delete 'configure)
2211 ;; Makefile is in a subdirectory.
2212 (add-before
2213 'build 'cd-to-project-dir
2214 (lambda _
2215 (chdir "projects/unix"))))
2216 #:make-flags
2217 (let ((out (assoc-ref %outputs "out"))
2218 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2219 (list "all"
2220 (string-append "PREFIX=" out)
2221 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2222 ;; There are no tests.
2223 #:tests? #f))
2224 (home-page "http://www.mupen64plus.org/")
2225 (synopsis "Mupen64Plus Rice Video plugin")
2226 (description
2227 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2228 which is capable of accurately playing many games. This package contains the
2229 Arachnoid video plugin.")
2230 (license license:gpl2+)))
2231
2232 (define-public mupen64plus-video-glide64
2233 (package
2234 (name "mupen64plus-video-glide64")
2235 (version "2.0.0")
2236 (source
2237 (origin
2238 (method url-fetch)
2239 (uri (string-append
2240 "https://github.com/mupen64plus/mupen64plus-video-glide64/archive/"
2241 version ".tar.gz"))
2242 (file-name (string-append name "-" version ".tar.gz"))
2243 (sha256
2244 (base32 "1rm55dbf6xgsq1blbzs6swa2ajv0qkn38acbljj346abnk6s3dla"))))
2245 (build-system gnu-build-system)
2246 (native-inputs
2247 `(("pkg-config" ,pkg-config)
2248 ("which" ,which)))
2249 (inputs
2250 `(("mesa" ,mesa)
2251 ("mupen64plus-core" ,mupen64plus-core)
2252 ("sdl2" ,sdl2)))
2253 (arguments
2254 '(#:phases
2255 (modify-phases %standard-phases
2256 ;; The mupen64plus build system has no configure phase.
2257 (delete 'configure)
2258 ;; Makefile is in a subdirectory.
2259 (add-before
2260 'build 'cd-to-project-dir
2261 (lambda _
2262 (chdir "projects/unix")))
2263 ;; XXX Should be unnecessary with the next release.
2264 (add-before
2265 'build 'use-sdl2
2266 (lambda _
2267 (substitute* "Makefile"
2268 (("SDL_CONFIG = (.*)sdl-config" all prefix)
2269 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
2270 #:make-flags
2271 (let ((out (assoc-ref %outputs "out"))
2272 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2273 (list "all"
2274 (string-append "PREFIX=" out)
2275 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2276 ;; There are no tests.
2277 #:tests? #f))
2278 (home-page "http://www.mupen64plus.org/")
2279 (synopsis "Mupen64Plus Rice Video plugin")
2280 (description
2281 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2282 which is capable of accurately playing many games. This package contains the
2283 Glide64 video plugin.")
2284 (license license:gpl2+)))
2285
2286 (define-public mupen64plus-video-glide64mk2
2287 (package
2288 (name "mupen64plus-video-glide64mk2")
2289 (version "2.5")
2290 (source
2291 (origin
2292 (method url-fetch)
2293 (uri (string-append
2294 "https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/"
2295 version ".tar.gz"))
2296 (file-name (string-append name "-" version ".tar.gz"))
2297 (sha256
2298 (base32 "1ihl4q293d6svba26b4mhapjcdg12p90gibz79b4mx423jlcxxj9"))))
2299 (build-system gnu-build-system)
2300 (native-inputs
2301 `(("pkg-config" ,pkg-config)
2302 ("which" ,which)))
2303 (inputs
2304 `(("boost" ,boost)
2305 ("libpng" ,libpng)
2306 ("mesa" ,mesa)
2307 ("mupen64plus-core" ,mupen64plus-core)
2308 ("sdl2" ,sdl2)
2309 ("zlib" ,zlib)))
2310 (arguments
2311 '(#:phases
2312 (modify-phases %standard-phases
2313 ;; The mupen64plus build system has no configure phase.
2314 (delete 'configure)
2315 ;; Makefile is in a subdirectory.
2316 (add-before
2317 'build 'cd-to-project-dir
2318 (lambda _
2319 (chdir "projects/unix"))))
2320 #:make-flags
2321 (let ((out (assoc-ref %outputs "out"))
2322 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2323 (list "all"
2324 (string-append "PREFIX=" out)
2325 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2326 ;; There are no tests.
2327 #:tests? #f))
2328 (home-page "http://www.mupen64plus.org/")
2329 (synopsis "Mupen64Plus Rice Video plugin")
2330 (description
2331 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2332 which is capable of accurately playing many games. This package contains the
2333 Glide64MK2 video plugin.")
2334 (license license:gpl2+)))
2335
2336 (define-public mupen64plus-video-rice
2337 (package
2338 (name "mupen64plus-video-rice")
2339 (version "2.5")
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (string-append
2344 "https://github.com/mupen64plus/mupen64plus-video-rice/archive/"
2345 version ".tar.gz"))
2346 (file-name (string-append name "-" version ".tar.gz"))
2347 (sha256
2348 (base32 "0rd2scjmh285w61aj3mgx71whg5rqrjbry3cdgicczrnyvf8wdvk"))))
2349 (build-system gnu-build-system)
2350 (native-inputs
2351 `(("pkg-config" ,pkg-config)
2352 ("which" ,which)))
2353 (inputs
2354 `(("libpng" ,libpng)
2355 ("mesa" ,mesa)
2356 ("mupen64plus-core" ,mupen64plus-core)
2357 ("sdl2" ,sdl2)))
2358 (arguments
2359 '(#:phases
2360 (modify-phases %standard-phases
2361 ;; The mupen64plus build system has no configure phase.
2362 (delete 'configure)
2363 ;; Makefile is in a subdirectory.
2364 (add-before
2365 'build 'cd-to-project-dir
2366 (lambda _
2367 (chdir "projects/unix"))))
2368 #:make-flags
2369 (let ((out (assoc-ref %outputs "out"))
2370 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2371 (list "all"
2372 (string-append "PREFIX=" out)
2373 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2374 ;; There are no tests.
2375 #:tests? #f))
2376 (home-page "http://www.mupen64plus.org/")
2377 (synopsis "Mupen64Plus Rice Video plugin")
2378 (description
2379 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2380 which is capable of accurately playing many games. This package contains the
2381 Rice Video plugin.")
2382 (license license:gpl2+)))
2383
2384 (define-public mupen64plus-video-z64
2385 (package
2386 (name "mupen64plus-video-z64")
2387 (version "2.0.0")
2388 (source
2389 (origin
2390 (method url-fetch)
2391 (uri (string-append
2392 "https://github.com/mupen64plus/mupen64plus-video-z64/archive/"
2393 version ".tar.gz"))
2394 (file-name (string-append name "-" version ".tar.gz"))
2395 (sha256
2396 (base32 "1x7wsjs5gx2iwx20p4cjcbf696zsjlh31qxmghwv0ifrq8x58s1b"))))
2397 (build-system gnu-build-system)
2398 (native-inputs
2399 `(("pkg-config" ,pkg-config)
2400 ("which" ,which)))
2401 (inputs
2402 `(("glew" ,glew)
2403 ("mupen64plus-core" ,mupen64plus-core)
2404 ("sdl2" ,sdl2)))
2405 (arguments
2406 '(#:phases
2407 (modify-phases %standard-phases
2408 ;; The mupen64plus build system has no configure phase.
2409 (delete 'configure)
2410 ;; Makefile is in a subdirectory.
2411 (add-before
2412 'build 'cd-to-project-dir
2413 (lambda _
2414 (chdir "projects/unix")))
2415 ;; XXX Should be unnecessary with the next release.
2416 (add-before
2417 'build 'use-sdl2
2418 (lambda _
2419 (substitute* "Makefile"
2420 (("SDL_CONFIG = (.*)sdl-config" all prefix)
2421 (string-append "SDL_CONFIG = " prefix "sdl2-config"))))))
2422 #:make-flags
2423 (let ((out (assoc-ref %outputs "out"))
2424 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2425 (list "all"
2426 (string-append "PREFIX=" out)
2427 (string-append "APIDIR=" m64p "/include/mupen64plus")))
2428 ;; There are no tests.
2429 #:tests? #f))
2430 (home-page "http://www.mupen64plus.org/")
2431 (synopsis "Mupen64Plus Z64 video plugin")
2432 (description
2433 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2434 which is capable of accurately playing many games. This package contains the
2435 Z64 video plugin.")
2436 (license license:gpl2+)))
2437
2438 (define-public mupen64plus-ui-console
2439 (package
2440 (name "mupen64plus-ui-console")
2441 (version "2.5")
2442 (source
2443 (origin
2444 (method url-fetch)
2445 (uri (string-append
2446 "https://github.com/mupen64plus/mupen64plus-ui-console/archive/"
2447 version ".tar.gz"))
2448 (file-name (string-append name "-" version ".tar.gz"))
2449 (sha256
2450 (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2"))
2451 (patches (search-patches "mupen64plus-ui-console-notice.patch"))))
2452 (build-system gnu-build-system)
2453 (native-inputs
2454 `(("pkg-config" ,pkg-config)
2455 ("which" ,which)))
2456 (inputs
2457 `(("sdl2" ,sdl2)))
2458 ;; Mupen64Plus supports a single data directory and a single plugin
2459 ;; directory in its configuration, yet we need data and plugin files from
2460 ;; a variety of packages. The best way to deal with this is to install
2461 ;; all packages from which data and plugin files are needed into one's
2462 ;; profile, and point the configuration there. Hence, propagate the most
2463 ;; important packages here to save the user from the bother. The patch
2464 ;; mupen64plus-ui-console-notice also gives users instructions on what
2465 ;; they need to do in order to point the configuration to their profile.
2466 (propagated-inputs
2467 `(("mupen64plus-core" ,mupen64plus-core)
2468 ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl)
2469 ("mupen64plus-input-sdl" ,mupen64plus-input-sdl)
2470 ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle)
2471 ("mupen64plus-video-glide64" ,mupen64plus-video-glide64)
2472 ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2)
2473 ("mupen64plus-video-rice" ,mupen64plus-video-rice)))
2474 (arguments
2475 '(#:phases
2476 (modify-phases %standard-phases
2477 ;; The mupen64plus build system has no configure phase.
2478 (delete 'configure)
2479 ;; Makefile is in a subdirectory.
2480 (add-before
2481 'build 'cd-to-project-dir
2482 (lambda _
2483 (chdir "projects/unix"))))
2484 #:make-flags
2485 (let ((out (assoc-ref %outputs "out"))
2486 (m64p (assoc-ref %build-inputs "mupen64plus-core")))
2487 (list "all"
2488 (string-append "PREFIX=" out)
2489 (string-append "APIDIR=" m64p "/include/mupen64plus")
2490 ;; Trailing slash matters here.
2491 (string-append "COREDIR=" m64p "/lib/")))
2492 ;; There are no tests.
2493 #:tests? #f))
2494 (home-page "http://www.mupen64plus.org/")
2495 (synopsis "Mupen64Plus SDL input plugin")
2496 (description
2497 "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator
2498 which is capable of accurately playing many games. This package contains the
2499 command line user interface. Installing this package is the easiest way
2500 towards a working Mupen64Plus for casual users.")
2501 (license license:gpl2+)))
2502
2503 (define-public nestopia-ue
2504 (package
2505 (name "nestopia-ue")
2506 (version "1.47")
2507 (source (origin
2508 (method url-fetch)
2509 (uri (string-append
2510 "https://github.com/rdanbrook/nestopia/archive/"
2511 version ".tar.gz"))
2512 (file-name (string-append name "-" version ".tar.gz"))
2513 (sha256
2514 (base32
2515 "1dzrrjmvyqks64q5l5pfly80jb6qcsbj5b3dm40fijd5xnpbapci"))
2516 (modules '((guix build utils)))
2517 (snippet
2518 '(begin
2519 ;; We don't need libretro for the GNU/Linux build.
2520 (delete-file-recursively "libretro")
2521 ;; Use system zlib.
2522 (delete-file-recursively "source/zlib")
2523 (substitute* "source/core/NstZlib.cpp"
2524 (("#include \"../zlib/zlib.h\"") "#include <zlib.h>"))))))
2525 (build-system gnu-build-system)
2526 (native-inputs
2527 `(("pkg-config" ,pkg-config)))
2528 (inputs
2529 `(("ao" ,ao)
2530 ("glu" ,glu)
2531 ("gtk+" ,gtk+)
2532 ("libarchive" ,libarchive)
2533 ("mesa" ,mesa)
2534 ("sdl2" ,sdl2)
2535 ("zlib" ,zlib)))
2536 (arguments
2537 '(#:phases
2538 (modify-phases %standard-phases
2539 ;; The Nestopia build system consists solely of a Makefile.
2540 (delete 'configure)
2541 (add-before 'build 'remove-xdg-desktop-menu-call
2542 (lambda _
2543 (substitute* "Makefile"
2544 (("xdg-desktop-menu install .*") ""))))
2545 (add-before 'build 'remove-gdkwayland-include
2546 (lambda _
2547 (substitute* "source/unix/gtkui/gtkui.h"
2548 (("#include <gdk/gdkwayland\\.h>") "")))))
2549 #:make-flags (let ((out (assoc-ref %outputs "out")))
2550 (list "CC=gcc" "CXX=g++" (string-append "PREFIX=" out)))
2551 ;; There are no tests.
2552 #:tests? #f))
2553 (home-page "http://0ldsk00l.ca/nestopia/")
2554 (synopsis "Nintendo Entertainment System (NES/Famicom) emulator")
2555 (description
2556 "Nestopia UE (Undead Edition) is a fork of the Nintendo Entertainment
2557 System (NES/Famicom) emulator Nestopia, with enhancements from members of the
2558 emulation community. It provides highly accurate emulation.")
2559 (license license:gpl2+)))
2560
2561 (define-public emulation-station
2562 (let ((commit "646bede3d9ec0acf0ae378415edac136774a66c5"))
2563 (package
2564 (name "emulation-station")
2565 (version "2.0.1")
2566 (source (origin
2567 (method git-fetch) ; no tarball available
2568 (uri (git-reference
2569 (url "https://github.com/Aloshi/EmulationStation.git")
2570 (commit commit))) ; no version tag
2571 (file-name (string-append name "-" version "-checkout"))
2572 (sha256
2573 (base32
2574 "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"))))
2575 (build-system cmake-build-system)
2576 (arguments
2577 '(#:tests? #f)) ; no tests
2578 (inputs
2579 `(("alsa-lib" ,alsa-lib)
2580 ("boost" ,boost)
2581 ("curl" ,curl)
2582 ("eigin" ,eigen)
2583 ("freeimage" ,freeimage)
2584 ("freetype" ,freetype)
2585 ("mesa" ,mesa)
2586 ("sdl2" ,sdl2)))
2587 (synopsis "Video game console emulator front-end")
2588 (description "EmulationStation provides a graphical front-end to a large
2589 number of video game console emulators. It features an interface that is
2590 usable with any game controller that has at least 4 buttons, theming support,
2591 and a game metadata scraper.")
2592 (home-page "http://www.emulationstation.org")
2593 (license license:expat))))
2594
2595 (define openttd-engine
2596 (package
2597 (name "openttd-engine")
2598 (version "1.7.1")
2599 (source
2600 (origin (method url-fetch)
2601 (uri (string-append "http://binaries.openttd.org/releases/"
2602 version "/openttd-" version "-source.tar.xz"))
2603 (sha256
2604 (base32
2605 "0dhv5bbbg1dmmq7fi3xss0a9jq2rqgb5sf9fsqzlsjcdm590j6b1"))
2606 (modules '((guix build utils)))
2607 (snippet
2608 ;; The DOS port contains proprietary software.
2609 '(delete-file-recursively "os/dos"))))
2610 (build-system gnu-build-system)
2611 (arguments
2612 `(#:tests? #f ; no "check" target
2613 #:phases
2614 (modify-phases %standard-phases
2615 ;; The build process fails if the configure script is passed the
2616 ;; option "--enable-fast-install".
2617 (replace 'configure
2618 (lambda* (#:key inputs outputs (configure-flags '())
2619 #:allow-other-keys)
2620 (let ((out (assoc-ref outputs "out"))
2621 (lzo (assoc-ref inputs "lzo")))
2622 (zero?
2623 (apply system* "./configure"
2624 (string-append "--prefix=" out)
2625 ;; Provide the "lzo" path.
2626 (string-append "--with-liblzo2="
2627 lzo "/lib/liblzo2.a")
2628 ;; Put the binary in 'bin' instead of 'games'.
2629 "--binary-dir=bin"
2630 configure-flags))))))))
2631 (native-inputs `(("pkg-config" ,pkg-config)))
2632 (inputs
2633 `(("allegro" ,allegro-4)
2634 ("fontconfig" ,fontconfig)
2635 ("freetype" ,freetype)
2636 ("icu4c" ,icu4c)
2637 ("libpng" ,libpng)
2638 ("lzo" ,lzo)
2639 ("sdl" ,sdl)
2640 ("xz" ,xz)
2641 ("zlib" ,zlib)))
2642 (synopsis "Transportation economics simulator")
2643 (description "OpenTTD is a game in which you transport goods and
2644 passengers by land, water and air. It is a re-implementation of Transport
2645 Tycoon Deluxe with many enhancements including multiplayer mode,
2646 internationalization support, conditional orders and the ability to clone,
2647 autoreplace and autoupdate vehicles. This package only includes the game
2648 engine. When you start it you will be prompted to download a graphics set.")
2649 (home-page "http://openttd.org/")
2650 ;; This package is GPLv2, except for a few files located in
2651 ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
2652 ;; licenses. In addition, this software contains an in-game downloader
2653 ;; from which the user may find non-functional data licensed under
2654 ;; different terms.
2655 (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
2656
2657 (define openttd-opengfx
2658 (package
2659 (name "openttd-opengfx")
2660 (version "0.5.2")
2661 (source
2662 (origin
2663 (method url-fetch)
2664 (uri (string-append "http://binaries.openttd.org/extra/opengfx/"
2665 version "/opengfx-" version "-source.tar.xz"))
2666 (sha256
2667 (base32
2668 "0iz66q7p1mf00njfjbc4vibh3jaybki7armkl18iz7p6x4chp9zv"))))
2669 (build-system gnu-build-system)
2670 (arguments
2671 '(#:make-flags (list "CC=gcc"
2672 (string-append "INSTALL_DIR="
2673 (assoc-ref %outputs "out")
2674 "/share/games/openttd/baseset/opengfx"))
2675 #:phases
2676 (modify-phases %standard-phases
2677 (replace 'configure
2678 (lambda _
2679 ;; Make sure HOME is writable for GIMP.
2680 (setenv "HOME" (getcwd))
2681
2682 ;; Redirect stdout, not stderr, to /dev/null. This prevents
2683 ;; dos2unix from receiving its version information as a flag.
2684 (substitute* "Makefile"
2685 (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
2686 "$(UNIX2DOS) -q --version 1>/dev/null")))))
2687 ;; The check phase for this package only checks the md5sums of the built
2688 ;; GRF files against the md5sums of the release versions. Because we use
2689 ;; different software versions than upstream does, some of the md5sums
2690 ;; are different. However, the package is still reproducible, it's safe
2691 ;; to disable this test.
2692 #:tests? #f
2693 #:parallel-build? #f))
2694 (native-inputs `(("dos2unix" ,dos2unix)
2695 ("gimp" ,gimp)
2696 ("grfcodec" ,grfcodec)
2697 ("nml" ,nml)
2698 ("python" ,python-2)))
2699 (home-page "http://dev.openttdcoop.org/projects/opengfx")
2700 (synopsis "Base graphics set for OpenTTD")
2701 (description
2702 "The OpenGFX projects is an implementation of the OpenTTD base grahics
2703 set that aims to ensure the best possible out-of-the-box experience.
2704
2705 OpenGFX provides you with...
2706 @enumerate
2707 @item All graphics you need to enjoy OpenTTD.
2708 @item Uniquely drawn rail vehicles for every climate.
2709 @item Completely snow-aware rivers.
2710 @item Different river and sea water.
2711 @item Snow-aware buoys.
2712 @end enumerate")
2713 (license license:gpl2)))
2714
2715 (define openttd-opensfx
2716 (package
2717 (name "openttd-opensfx")
2718 (version "0.2.3")
2719 (source
2720 (origin
2721 (method url-fetch)
2722 (uri (string-append
2723 "https://binaries.openttd.org/extra/opensfx/"
2724 version "/opensfx-" version "-source.tar.gz"))
2725 (sha256
2726 (base32
2727 "03jxgp02ks31hmsdh4xh0xcpkb70ds8jakc9pfc1y9vdrdavh4p5"))))
2728 (build-system gnu-build-system)
2729 (native-inputs
2730 `(("catcodec" ,catcodec)
2731 ("python" ,python2-minimal)))
2732 (arguments
2733 `(#:make-flags
2734 (list (string-append "INSTALL_DIR=" %output
2735 "/share/games/openttd/baseset/opensfx"))
2736 #:phases
2737 (modify-phases %standard-phases
2738 (add-after 'unpack 'make-reproducible
2739 (lambda _
2740 ;; Remove the time dependency of the installed tarball by setting
2741 ;; the modification times if its members to 0.
2742 (substitute* "scripts/Makefile.def"
2743 (("-cf") " --mtime=@0 -cf"))
2744 #t))
2745 (delete 'configure))))
2746 (home-page "http://dev.openttdcoop.org/projects/opensfx")
2747 (synopsis "Base sounds for OpenTTD")
2748 (description "OpenSFX is a set of free base sounds for OpenTTD which make
2749 it possible to play OpenTTD without requiring the proprietary sound files from
2750 the original Transport Tycoon Deluxe.")
2751 (license license:cc-sampling-plus-1.0)))
2752
2753 (define openttd-openmsx
2754 (package
2755 (name "openttd-openmsx")
2756 (version "0.3.1")
2757 (source
2758 (origin
2759 (method url-fetch)
2760 (uri (string-append
2761 "https://binaries.openttd.org/extra/openmsx/"
2762 version "/openmsx-" version "-source.tar.gz"))
2763 (sha256
2764 (base32
2765 "0nskq97a6fsv1v6d62zf3yb8whzhqnlh3lap3va3nzvj7csjgf7c"))))
2766 (build-system gnu-build-system)
2767 (native-inputs
2768 `(("python" ,python2-minimal)))
2769 (arguments
2770 `(#:make-flags
2771 (list (string-append "INSTALL_DIR=" %output
2772 "/share/games/openttd/baseset"))
2773 #:phases
2774 (modify-phases %standard-phases
2775 (delete 'configure)
2776 (add-after 'install 'post-install
2777 ;; Rename openmsx-version to openmsx
2778 (lambda* (#:key outputs #:allow-other-keys)
2779 (let ((install-directory (string-append (assoc-ref outputs "out")
2780 "/share/games/openttd/baseset")))
2781 (rename-file (string-append install-directory "/openmsx-" ,version)
2782 (string-append install-directory "/openmsx"))
2783 #t))))))
2784 (home-page "http://dev.openttdcoop.org/projects/openmsx")
2785 (synopsis "Music set for OpenTTD")
2786 (description "OpenMSX is a music set for OpenTTD which makes it possible
2787 to play OpenTTD without requiring the proprietary music from the original
2788 Transport Tycoon Deluxe.")
2789 (license license:gpl2)))
2790
2791 (define-public openttd
2792 (package
2793 (inherit openttd-engine)
2794 (name "openttd")
2795 (arguments
2796 `(#:configure-flags
2797 (list (string-append "--with-midi=" (assoc-ref %build-inputs "timidity++")
2798 "/bin/timidity"))
2799 ,@(substitute-keyword-arguments (package-arguments openttd-engine)
2800 ((#:phases phases)
2801 `(modify-phases ,phases
2802 (add-after 'install 'install-data
2803 (lambda* (#:key inputs outputs #:allow-other-keys)
2804 (for-each
2805 (lambda (input)
2806 (copy-recursively (assoc-ref inputs input)
2807 (assoc-ref outputs "out")))
2808 (list "opengfx" "openmsx" "opensfx"))
2809 #t)))))))
2810 (inputs
2811 `(("timidity++" ,timidity++)
2812 ,@(package-inputs openttd-engine)))
2813 (native-inputs
2814 `(("opengfx" ,openttd-opengfx)
2815 ("openmsx" ,openttd-openmsx)
2816 ("opensfx" ,openttd-opensfx)
2817 ,@(package-native-inputs openttd-engine)))))
2818
2819 (define-public openrct2
2820 (package
2821 (name "openrct2")
2822 (version "0.1.1")
2823 (source
2824 (origin
2825 (method url-fetch)
2826 (uri (string-append "https://github.com/OpenRCT2/OpenRCT2/archive/v"
2827 version ".tar.gz"))
2828 (sha256
2829 (base32
2830 "1bahkzlf9k92cc4zs4nk4wy59323kiw8d3wm0vjps3kp7iznqyjx"))
2831 (file-name (string-append name "-" version ".tar.gz"))))
2832 (build-system cmake-build-system)
2833 (arguments
2834 `(#:tests? #f ;; no tests available
2835 #:phases
2836 (modify-phases %standard-phases
2837 (add-after 'unpack 'fix-usr-share-paths
2838 (lambda* (#:key make-flags outputs #:allow-other-keys)
2839 ;; Fix some references to /usr/share.
2840 (substitute* "src/openrct2/platform/linux.c"
2841 (("/usr/share")
2842 (string-append (assoc-ref %outputs "out") "/share")))))
2843 (add-after 'build 'fix-cmake-install-file
2844 (lambda _
2845 ;; The build system tries to download a file and compare hashes.
2846 ;; Since we have no network, remove this so the install doesn't fail.
2847 (substitute* "cmake_install.cmake"
2848 (("EXPECTED_HASH SHA1=b587d83de508d0b104d14c599b76f8565900fce0")
2849 "")))))))
2850 (inputs `(("curl", curl)
2851 ("fontconfig", fontconfig)
2852 ("freetype", freetype)
2853 ("jansson", jansson)
2854 ("libpng", libpng)
2855 ("libzip", libzip)
2856 ("mesa", mesa)
2857 ("openssl", openssl)
2858 ("sdl2", sdl2)
2859 ("speexdsp", speexdsp)
2860 ("zlib", zlib)))
2861 (native-inputs
2862 `(("pkg-config", pkg-config)))
2863 (home-page "https://github.com/OpenRCT2/OpenRCT2")
2864 (synopsis "Free software re-implementation of RollerCoaster Tycoon 2")
2865 (description "OpenRCT2 is a free software re-implementation of
2866 RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and
2867 maintaining an amusement park containing attractions, shops and facilities.
2868
2869 Note that this package does @emph{not} provide the game assets (sounds,
2870 images, etc.)")
2871 ;; See <https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files>
2872 ;; regarding assets.
2873 (license license:gpl3+)))
2874
2875 (define-public pinball
2876 (package
2877 (name "pinball")
2878 (version "0.3.1")
2879 (source
2880 (origin (method url-fetch)
2881 (uri (string-append "mirror://sourceforge/pinball/pinball/"
2882 "pinball-" version "/"
2883 "pinball-" version ".tar.gz"))
2884 (sha256
2885 (base32
2886 "1f2whlrfidwfh8lvr8cspcyirc6840r5d1ajm7x99qmngygrhixs"))
2887 (patches (search-patches "pinball-const-fix.patch"
2888 "pinball-cstddef.patch"
2889 "pinball-missing-separators.patch"
2890 "pinball-src-deps.patch"
2891 "pinball-system-ltdl.patch"))))
2892 (build-system gnu-build-system)
2893 (inputs
2894 `(("glu" ,glu)
2895 ("mesa" ,mesa)
2896 ("sdl" ,sdl)
2897 ("sdl-image" ,sdl-image)
2898 ("sdl-mixer" ,sdl-mixer)))
2899 (arguments
2900 '(#:configure-flags
2901 (list (string-append "CPPFLAGS=-I"
2902 (assoc-ref %build-inputs "sdl-image")
2903 "/include/SDL -I"
2904 (assoc-ref %build-inputs "sdl-mixer")
2905 "/include/SDL"))))
2906 (home-page "http://pinball.sourceforge.net")
2907 (synopsis "Pinball simulator")
2908 (description "The Emilia Pinball Project is a pinball simulator. There
2909 are only two levels to play with, but they are very addictive.")
2910 (license license:gpl2)))
2911
2912 (define-public pioneers
2913 (package
2914 (name "pioneers")
2915 (version "15.4")
2916 (source (origin
2917 (method url-fetch)
2918 (uri (string-append "http://downloads.sourceforge.net/pio/"
2919 "pioneers-" version ".tar.gz"))
2920 (sha256
2921 (base32
2922 "1p1d18hrfmqcnghip3shkzcs5qkz6j99jvkdkqfi7pqdvjc323cs"))))
2923 (build-system gnu-build-system)
2924 (inputs `(("gtk+" ,gtk+)
2925 ("librsvg" ,librsvg)
2926 ("avahi" ,avahi)))
2927 (native-inputs `(("intltool" ,intltool)
2928 ("pkg-config" ,pkg-config)))
2929 (synopsis "Board game inspired by The Settlers of Catan")
2930 (description "Pioneers is an emulation of the board game The Settlers of
2931 Catan. It can be played on a local network, on the internet, and with AI
2932 players.")
2933 (home-page "http://pio.sourceforge.net/")
2934 (license license:gpl2+)))
2935
2936 (define-public desmume
2937 (package
2938 (name "desmume")
2939 (version "0.9.11")
2940 (source
2941 (origin
2942 (method url-fetch)
2943 (uri (string-append
2944 "mirror://sourceforge/desmume/desmume/"
2945 version "/desmume-" version ".tar.gz"))
2946 (sha256
2947 (base32
2948 "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"))))
2949 (build-system gnu-build-system)
2950 (arguments
2951 ;; Enable support for WiFi and microphone.
2952 `(#:configure-flags '("--enable-wifi"
2953 "--enable-openal")))
2954 (native-inputs
2955 `(("pkg-config" ,pkg-config)
2956 ("intltool" ,intltool)))
2957 (inputs
2958 `(("zlib" ,zlib)
2959 ("sdl" ,sdl)
2960 ("glib" ,glib)
2961 ("gtk+" ,gtk+-2)
2962 ("glu" ,glu)))
2963 (home-page "http://desmume.org/")
2964 (synopsis "Nintendo DS emulator")
2965 (description
2966 "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")
2967 (license license:gpl2)))
2968
2969 (define-public einstein
2970 (package
2971 (name "einstein")
2972 (version "2.0")
2973 (source (origin
2974 (method url-fetch)
2975 (uri (string-append "http://http.debian.net/debian/pool/main/e/"
2976 "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
2977 (sha256
2978 (base32
2979 "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
2980 (patches (search-patches "einstein-build.patch"))))
2981 (build-system gnu-build-system)
2982 (inputs
2983 `(("freetype" ,freetype)
2984 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf)))
2985 ("zlib" ,zlib)))
2986 (native-inputs
2987 `(("font-dejavu" ,font-dejavu)))
2988 (arguments
2989 `(#:tests? #f ; no check target
2990 #:phases
2991 (modify-phases %standard-phases
2992 (replace 'configure
2993 (lambda* (#:key outputs inputs #:allow-other-keys)
2994 (let ((out (assoc-ref outputs "out"))
2995 (dejavu (string-append (assoc-ref inputs "font-dejavu")
2996 "/share/fonts/truetype/DejaVuSans.ttf")))
2997 (substitute* "Makefile"
2998 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
2999 ;; The patch above registers a free font for use by the binary,
3000 ;; but the font is copied during the compile phase into a
3001 ;; resources file, so we need to make the ttf file available.
3002 (symlink dejavu "res/DejaVuSans.ttf")
3003 #t))))))
3004 (synopsis "Logic puzzle game")
3005 (description "The goal of this logic game is to open all cards in a 6x6
3006 grid, using a number of hints as to their relative position. The game idea
3007 is attributed to Albert Einstein.")
3008 ;; The original home page has disappeared.
3009 (home-page (string-append "http://web.archive.org/web/20120521062745/"
3010 "http://games.flowix.com/en/index.html"))
3011 ;; License according to
3012 ;; http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
3013 ;; The source code is a DFSG-sanitized tarball and does not contain any
3014 ;; license information.
3015 (license license:gpl3+)))
3016
3017 (define-public powwow
3018 (package
3019 (name "powwow")
3020 (version "1.2.17")
3021 (source (origin
3022 (method url-fetch)
3023 (uri (string-append
3024 "https://www.hoopajoo.net/static/projects/powwow-"
3025 version ".tar.gz"))
3026 (file-name (string-append name "-" version ".tar.gz"))
3027 (sha256
3028 (base32
3029 "1xmsg2y7qcvj67i9ilnih0mvfxcpni7fzrz343x9rdfnkkzf3pp8"))))
3030 (inputs
3031 `(("ncurses" ,ncurses)))
3032 (build-system gnu-build-system)
3033 (home-page "http://www.hoopajoo.net/projects/powwow.html")
3034 (synopsis "MUD and telnet client")
3035 (description
3036 "POWWOW is a client software which can be used for telnet as well as for
3037 @dfn{Multi-User Dungeon} (MUD). Additionally it can serve as a nice client for
3038 the chat server psyced with the specific config located at
3039 http://lavachat.symlynx.com/unix/")
3040 (license license:gpl2+)))
3041
3042 (define-public red-eclipse
3043 (let ((release "1.5.8")
3044 (revision 2)
3045 (data-sources
3046 '(("acerspyro" "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
3047 ("actors" "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
3048 ("appleflap" "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
3049 ("blendbrush" "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
3050 ("caustics" "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
3051 ("crosshairs" "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
3052 ("dziq" "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
3053 ("elyvisions" "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
3054 ("fonts" "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
3055 ("freezurbern" "020gpgcpy4rqjd9d18npfm96j8f02jcjnccbxcgzk1yb58y687ya")
3056 ("john" "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
3057 ("jojo" "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
3058 ("jwin" "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
3059 ("luckystrike" "1bm0xdqjv35ry5xwbzw3a3v1xf2gj1jwfg29nyl6w3ch0h6crr11")
3060 ("maps" "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
3061 ("mayhem" "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
3062 ("mikeplus64" "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
3063 ("misc" "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
3064 ("nieb" "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
3065 ("nobiax" "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
3066 ("particles" "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
3067 ("philipk" "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
3068 ("projectiles" "03ay8ik52n3vx723swqlnl5gpkzf1v1gadwj3zcnh43ch7nd2bqh")
3069 ("props" "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
3070 ("skyboxes" "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
3071 ("snipergoth" "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
3072 ("sounds" "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
3073 ("textures" "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
3074 ("torley" "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
3075 ("trak" "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
3076 ("ulukai" "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
3077 ("unnamed" "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
3078 ("vanities" "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
3079 ("vegetation" "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
3080 ("weapons" "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
3081 ("wicked" "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
3082 (package
3083 (name "red-eclipse")
3084 (version (if (zero? revision)
3085 release
3086 (string-append release "-"
3087 (number->string revision))))
3088 (source (origin
3089 (method url-fetch)
3090 (uri (string-append "https://github.com/red-eclipse/base"
3091 "/archive/v" release ".tar.gz"))
3092 (file-name (string-append name "-" version ".tar.gz"))
3093 (sha256
3094 (base32
3095 "0r66rsqxvd7hxrhb0fahqqmf3r0cw2drhv5vndbswcq90l1bxfmf"))))
3096 (build-system gnu-build-system)
3097 (arguments
3098 `(#:tests? #f ; no check target
3099 #:make-flags (list "CC=gcc" "-Csrc"
3100 (string-append "INSTDIR="
3101 (assoc-ref %outputs "out") "/bin")
3102 (string-append "prefix="
3103 (assoc-ref %outputs "out")))
3104 #:phases
3105 (modify-phases %standard-phases
3106 (add-after 'unpack 'unpack-data
3107 (lambda* (#:key inputs #:allow-other-keys)
3108 (delete-file-recursively "data")
3109 (mkdir "data")
3110 (for-each (lambda (name)
3111 (system* "tar" "-xvf"
3112 (assoc-ref inputs name)
3113 "-Cdata"
3114 "--transform"
3115 (string-append "s/"
3116 name "-" ,release "/"
3117 name "/")))
3118 (list ,@(map car data-sources)))
3119 #t))
3120 (add-after 'unpack-data 'add-store-data-package-path-as-default
3121 (lambda* (#:key outputs #:allow-other-keys)
3122 (substitute* "src/engine/server.cpp"
3123 (("(else[[:space:]]*)((addpackagedir\\()\"data\"(\\);))" _ else_part addpackagedir_original addpackagedir_open addpackagedir_close)
3124 (string-append else_part
3125 "{ "
3126 addpackagedir_open
3127 "\""
3128 (assoc-ref outputs "out")
3129 "/share/redeclipse/data\""
3130 addpackagedir_close
3131 " "
3132 addpackagedir_original
3133 " }")))
3134 #t))
3135 (delete 'configure) ; no configure script
3136 (add-after 'set-paths 'set-sdl-paths
3137 (lambda* (#:key inputs #:allow-other-keys)
3138 (setenv "CPATH"
3139 (string-append (assoc-ref inputs "sdl-union")
3140 "/include/SDL2"))
3141 #t))
3142 (add-after 'install 'copy-data
3143 (lambda* (#:key outputs #:allow-other-keys)
3144 (let ((out (assoc-ref outputs "out")))
3145 (copy-recursively "config"
3146 (string-append out "/config"))
3147 (copy-file "doc/examples/servinit.cfg"
3148 (string-append out "/config/servinit.cfg"))
3149 (copy-recursively "data"
3150 (string-append out "/share/redeclipse/data"))
3151 (mkdir-p (string-append out "/lib/redeclipse"))
3152 (symlink (string-append out "/share/redeclipse/data")
3153 (string-append out "/lib/redeclipse/data")))
3154 #t))
3155 (add-after 'copy-data 'wrap-program
3156 (lambda* (#:key inputs outputs #:allow-other-keys)
3157 (let* ((out (assoc-ref outputs "out"))
3158 (bin (string-append out "/bin")))
3159 (with-directory-excursion bin
3160 (rename-file "redeclipse_linux"
3161 ".redeclipse_linux-real")
3162 (rename-file "redeclipse_server_linux"
3163 ".redeclipse_server_linux-real")
3164 (call-with-output-file "redeclipse_linux"
3165 (lambda (port)
3166 (format port "#!~a/bin/sh
3167 # Run the thing from its home, otherwise it just bails out.
3168 cd \"~a\"
3169 exec -a \"$0\" ~a/.redeclipse_linux-real~%"
3170 (assoc-ref inputs "bash") ;implicit input
3171 (string-append out)
3172 (string-append bin))))
3173 (call-with-output-file "redeclipse_server_linux"
3174 (lambda (port)
3175 (format port "#!~a/bin/sh
3176 # Run the thing from its home, otherwise it just bails out.
3177 cd \"~a\"
3178 exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
3179 (assoc-ref inputs "bash") ;implicit input
3180 (string-append out)
3181 (string-append bin))))
3182 (chmod "redeclipse_linux" #o555)
3183 (chmod "redeclipse_server_linux" #o555)))
3184 #t)))))
3185 (native-inputs `(("pkg-config" ,pkg-config)))
3186 (inputs
3187 `(("curl" ,curl)
3188 ("glu" ,glu)
3189 ("sdl-union" ,(sdl-union (list sdl2
3190 sdl2-image
3191 sdl2-mixer)))
3192 ;; Create origin records for the many separate data packages.
3193 ,@(map (match-lambda
3194 ((name hash)
3195 (list name
3196 (origin
3197 (method url-fetch)
3198 (uri (string-append
3199 "https://github.com/red-eclipse/"
3200 name "/archive/v" release ".tar.gz"))
3201 (sha256 (base32 hash))
3202 (file-name (string-append name "-" version
3203 ".tar.gz"))))))
3204 data-sources)))
3205 (home-page "http://redeclipse.net/")
3206 (synopsis "Arena shooter derived from the Cube 2 engine")
3207 (description
3208 "Red Eclipse is an arena shooter, created from the Cube2 engine.
3209 Offering an innovative parkour system and distinct but all potent weapons,
3210 Red Eclipse provides fast paced and accessible gameplay.")
3211 ;; The engine is under Zlib; data files are covered by the other
3212 ;; licenses. More details at <http://redeclipse.net/wiki/License>.
3213 (license (list license:expat
3214 license:zlib
3215 license:cc-by-sa3.0
3216 license:cc-by3.0
3217 license:cc0)))))
3218
3219 (define-public higan
3220 (package
3221 (name "higan")
3222 (version "106")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (string-append
3227 "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
3228 version))
3229 (file-name (string-append name "-" version ".tar.gz"))
3230 (sha256
3231 (base32 "0y42pra0dxzlbkyzcp3r8a39pji2bj3p9fl40425f60af2igr4rw"))
3232 (patches (search-patches "higan-remove-march-native-flag.patch"))))
3233 (build-system gnu-build-system)
3234 (native-inputs
3235 `(("pkg-config" ,pkg-config)))
3236 (inputs
3237 `(("alsa-lib" ,alsa-lib)
3238 ("ao" ,ao)
3239 ("eudev" ,eudev)
3240 ("gtk+" ,gtk+-2)
3241 ("gtksourceview-2" ,gtksourceview-2)
3242 ("libxv" ,libxv)
3243 ("mesa" ,mesa)
3244 ("openal" ,openal)
3245 ("pulseaudio" ,pulseaudio)
3246 ("sdl" ,sdl)))
3247 (arguments
3248 '(#:phases
3249 (let ((build-phase (assoc-ref %standard-phases 'build))
3250 (install-phase (assoc-ref %standard-phases 'install)))
3251 (modify-phases %standard-phases
3252 ;; The higan build system has no configure phase.
3253 (delete 'configure)
3254 (add-before 'build 'chdir-to-higan
3255 (lambda _
3256 (chdir "higan")))
3257 (add-before 'install 'create-/share/applications
3258 (lambda* (#:key outputs #:allow-other-keys)
3259 (let ((out (assoc-ref outputs "out")))
3260 ;; It seems the author forgot to do this in the Makefile.
3261 (mkdir-p (string-append out "/share/applications")))))
3262 (add-after 'install 'chdir-to-icarus
3263 (lambda _
3264 (chdir "../icarus")))
3265 (add-after 'chdir-to-icarus 'build-icarus build-phase)
3266 (add-after 'build-icarus 'install-icarus install-phase)
3267 (add-after 'install-icarus 'wrap-higan-executable
3268 (lambda* (#:key inputs outputs #:allow-other-keys)
3269 (let* ((out (assoc-ref outputs "out"))
3270 (bin (string-append out "/bin"))
3271 (higan (string-append bin "/higan"))
3272 (higan-original (string-append higan "-original"))
3273 (bash (string-append (assoc-ref inputs "bash")
3274 "/bin/bash"))
3275 (coreutils (assoc-ref inputs "coreutils"))
3276 (mkdir (string-append coreutils "/bin/mkdir"))
3277 (cp (string-append coreutils "/bin/cp"))
3278 (cp-r (string-append cp " -r --no-preserve=mode")))
3279 ;; First, have the executable make sure ~/.local/share/higan
3280 ;; contains up to date files. Higan insists on looking there
3281 ;; for these data files.
3282 (rename-file higan higan-original)
3283 (with-output-to-file higan
3284 (lambda ()
3285 (display
3286 (string-append
3287 "#!" bash "\n"
3288 ;; higan doesn't respect $XDG_DATA_HOME
3289 mkdir " -p ~/.local/share\n"
3290 cp-r " " out "/share/higan ~/.local/share\n"
3291 "exec " higan-original))))
3292 (chmod higan #o555)
3293 ;; Second, make sure higan will find icarus in PATH.
3294 (wrap-program higan
3295 `("PATH" ":" prefix (,bin))))))))
3296 #:make-flags
3297 (list "compiler=g++"
3298 (string-append "prefix=" (assoc-ref %outputs "out")))
3299 ;; There is no test suite.
3300 #:tests? #f))
3301 (home-page "http://byuu.org/emulation/higan/")
3302 (synopsis "Nintendo multi-system emulator")
3303 (description
3304 "higan (formerly bsnes) is an emulator for multiple Nintendo video game
3305 consoles, including the Nintendo Entertainment System (NES/Famicom), Super
3306 Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
3307 Color (GBC), and Game Boy Advance (GBA). It also supports the subsystems
3308 Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
3309 ;; As noted in these files among more:
3310 ;; - icarus/icarus.cpp
3311 ;; - higan/emulator/emulator.hpp
3312 (license license:gpl3)))
3313
3314 (define-public mgba
3315 (package
3316 (name "mgba")
3317 (version "0.6.1")
3318 (source (origin
3319 (method url-fetch)
3320 (uri (string-append "https://github.com/mgba-emu/mgba/archive/"
3321 version ".tar.gz"))
3322 (file-name (string-append name "-" version ".tar.gz"))
3323 (sha256
3324 (base32
3325 "0xmq1q1j71hnpd49wm91cqq8w5zdhb921cm17jchp4qjmaqgwy3w"))
3326 (modules '((guix build utils)))
3327 (snippet
3328 ;; Make sure we don't use the bundled software.
3329 '(for-each
3330 (lambda (subdir)
3331 (let ((lib-subdir (string-append "src/third-party/" subdir)))
3332 (delete-file-recursively lib-subdir)))
3333 '("libpng" "lzma" "sqlite3" "zlib")))))
3334 (build-system cmake-build-system)
3335 (arguments
3336 `(#:tests? #f ;no "test" target
3337 #:configure-flags
3338 (list "-DUSE_LZMA=OFF" ;do not use bundled LZMA
3339 "-DUSE_LIBZIP=OFF"))) ;use "zlib" instead
3340 (native-inputs `(("pkg-config" ,pkg-config)))
3341 (inputs `(("ffmpeg" ,ffmpeg)
3342 ("imagemagick" ,imagemagick)
3343 ("libedit" ,libedit)
3344 ("libepoxy" ,libepoxy)
3345 ("libpng" ,libpng)
3346 ("mesa" ,mesa)
3347 ("minizip" ,minizip)
3348 ("ncurses" ,ncurses)
3349 ("qtbase" ,qtbase)
3350 ("qtmultimedia" ,qtmultimedia)
3351 ("qttools" ,qttools)
3352 ("sdl2" ,sdl2)
3353 ("sqlite" ,sqlite)
3354 ("zlib" ,zlib)))
3355 (home-page "https://mgba.io")
3356 (synopsis "Game Boy Advance emulator")
3357 (description
3358 "mGBA is an emulator for running Game Boy Advance games. It aims to be
3359 faster and more accurate than many existing Game Boy Advance emulators, as
3360 well as adding features that other emulators lack. It also supports Game Boy
3361 and Game Boy Color games.")
3362 ;; Code is mainly MPL 2.0. "blip_buf.c" is LGPL 2.1+ and "inih.c" is
3363 ;; BSD-3.
3364 (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
3365
3366 (define-public grue-hunter
3367 (package
3368 (name "grue-hunter")
3369 (version "1.0")
3370 (source (origin
3371 (method url-fetch)
3372 (uri (string-append "https://jxself.org/" name ".tar.gz"))
3373 (sha256
3374 (base32
3375 "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
3376 (build-system trivial-build-system) ; no Makefile.PL
3377 (arguments `(#:modules ((guix build utils))
3378 #:builder
3379 (begin
3380 (use-modules (guix build utils))
3381 (use-modules (srfi srfi-1))
3382
3383 (let* ((tarball (assoc-ref %build-inputs "tarball"))
3384 (perl (string-append (assoc-ref %build-inputs
3385 "perl")
3386 "/bin"))
3387 (gzip (string-append (assoc-ref %build-inputs
3388 "gzip")
3389 "/bin/gzip"))
3390 (tar (string-append (assoc-ref %build-inputs
3391 "tar")
3392 "/bin/tar"))
3393 (out (assoc-ref %outputs "out"))
3394 (bin (string-append out "/bin"))
3395 (doc (string-append out
3396 "/share/doc/grue-hunter")))
3397 (begin
3398 (copy-file tarball "grue-hunter.tar.gz")
3399 (zero? (system* gzip "-d" "grue-hunter.tar.gz"))
3400 (zero? (system* tar "xvf" "grue-hunter.tar"))
3401
3402 (mkdir-p bin)
3403 (copy-file "grue-hunter/gh.pl"
3404 (string-append bin "/grue-hunter"))
3405 (patch-shebang (string-append bin "/grue-hunter")
3406 (list perl))
3407
3408 (install-file "grue-hunter/AGPLv3.txt" doc))))))
3409 (inputs `(("perl" ,perl)
3410 ("tar" ,tar)
3411 ("gzip" ,gzip)
3412 ("tarball" ,source)))
3413 (home-page "http://jxself.org/grue-hunter.shtml")
3414 (synopsis "Text adventure game")
3415 (description
3416 "Grue Hunter is a text adventure game written in Perl. You must make
3417 your way through an underground cave system in search of the Grue. Can you
3418 capture it and get out alive?")
3419 (license license:agpl3+)))
3420
3421 (define-public lierolibre
3422 (package
3423 (name "lierolibre")
3424 (version "0.5")
3425 (source (origin
3426 (method url-fetch)
3427 (uri (string-append "https://launchpad.net/lierolibre/trunk/"
3428 version "/+download/lierolibre-"
3429 version ".tar.xz"))
3430 (sha256
3431 (base32
3432 "1cf1gvsn4qq190lrf9k5bpjnqwlcfw7pajvdnh7z5r4jqw0rsbl9"))
3433 (patches
3434 (search-patches "lierolibre-check-unaligned-access.patch"
3435 "lierolibre-try-building-other-arch.patch"
3436 "lierolibre-remove-arch-warning.patch"
3437 "lierolibre-newer-libconfig.patch"
3438 "lierolibre-is-free-software.patch"))
3439 (modules '((guix build utils)))
3440 (snippet
3441 '(begin
3442 ;; Delete pre-compiled files.
3443 (delete-file "data/LIERO.CHR")
3444 (delete-file "data/LIERO.SND")
3445 #t))))
3446 (build-system gnu-build-system)
3447 (native-inputs
3448 `(("imagemagick" ,imagemagick)
3449 ("pkg-config" ,pkg-config)
3450 ("util-linux" ,util-linux)
3451 ("sox" ,sox)))
3452 (inputs
3453 `(("boost" ,boost)
3454 ("libconfig" ,libconfig)
3455 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
3456 ("zlib" ,zlib)))
3457 (home-page "https://gitlab.com/lierolibre/lierolibre")
3458 (synopsis "Old-school earthworm action game")
3459 (description
3460 "lierolibre is an earthworm action game where you fight another player
3461 (or the computer) underground using a wide array of weapons.
3462
3463 Features:
3464 @itemize
3465 @item 2 worms, 40 weapons, great playability, two game modes: Kill'em All
3466 and Game of Tag, plus AI-players without true intelligence!
3467 @item Dat nostalgia.
3468 @item Extensions via a hidden F1 menu:
3469 @itemize
3470 @item Replays
3471 @item Game controller support
3472 @item Powerlevel palettes
3473 @end itemize
3474 @item Ability to write game variables to plain text files.
3475 @item Ability to load game variables from both EXE and plain text files.
3476 @item Scripts to extract and repack graphics, sounds and levels.
3477 @end itemize
3478
3479 To switch between different window sizes, use F6, F7 and F8, to switch to
3480 fullscreen, use F5 or Alt+Enter.")
3481 ;; Code mainly BSD-2, some parts under Boost 1.0. All assets are WTFPL2.
3482 (license (list license:bsd-2 license:boost1.0 license:wtfpl2))))
3483
3484 (define-public warzone2100
3485 (package
3486 (name "warzone2100")
3487 (version "3.2.1")
3488 (source (origin
3489 (method url-fetch)
3490 (uri (string-append "mirror://sourceforge/" name
3491 "/releases/" version "/" name "-" version
3492 ".tar.xz"))
3493 (sha256
3494 (base32
3495 "1nd609s0g4sya3r4amhkz3f4dpdmm94vsd2ii76ap665a1nbfrhg"))))
3496 (build-system gnu-build-system)
3497 (arguments
3498 `(#:phases
3499 (modify-phases %standard-phases
3500 (add-after 'unpack 'link-tests-with-qt
3501 (lambda _
3502 (substitute* "tests/Makefile.in"
3503 (("(framework_linktest_LDADD|maptest_LDADD) = " prefix)
3504 (string-append prefix "$(QT5_LIBS) ")))
3505 #t))
3506 (add-after 'unpack 'remove-reference-to-missing-file
3507 (lambda _
3508 (substitute* "icons/Makefile.in"
3509 (("\\$\\(INSTALL_DATA\\) \\$\\(srcdir\\)/warzone2100.appdata.xml.*") ""))
3510 #t))
3511 (add-after 'unpack 'patch-for-qt5.8
3512 (lambda _
3513 (substitute* "lib/widget/editbox.cpp"
3514 (("== '\\\\0'")
3515 "== QChar('\\0')"))
3516 #t)))))
3517 (native-inputs `(("pkg-config" ,pkg-config)
3518 ("unzip" ,unzip)
3519 ("zip" ,zip)))
3520 (inputs `(("fontconfig" ,fontconfig)
3521 ("freetype" ,freetype)
3522 ("fribidi" ,fribidi)
3523 ("glew" ,glew)
3524 ("libtheora" ,libtheora)
3525 ("libvorbis" ,libvorbis)
3526 ("libxrandr" ,libxrandr)
3527 ("openal" ,openal)
3528 ("physfs" ,physfs)
3529 ("qtbase" ,qtbase)
3530 ("qtscript" ,qtscript)
3531 ("openssl" ,openssl)
3532 ("quesoglc" ,quesoglc)
3533 ("sdl2" ,sdl2)))
3534 (home-page "http://wz2100.net")
3535 (synopsis "3D Real-time strategy and real-time tactics game")
3536 (description
3537 "Warzone 2100 offers campaign, multi-player, and single-player skirmish
3538 modes. An extensive tech tree with over 400 different technologies, combined
3539 with the unit design system, allows for a wide variety of possible units and
3540 tactics.")
3541 ; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
3542 (license (list license:bsd-3
3543 license:cc0
3544 license:cc-by-sa3.0
3545 license:expat
3546 license:gpl2+
3547 license:lgpl2.1+))))
3548
3549 (define-public starfighter
3550 (package
3551 (name "starfighter")
3552 (version "1.7")
3553 (source (origin
3554 (method url-fetch)
3555 (uri (string-append
3556 "mirror://savannah/starfighter/"
3557 (version-major+minor version) "/"
3558 name "-" version "-src.tar.gz"))
3559 (sha256
3560 (base32
3561 "1646hpjq8bz2fkfkja1dah511hn7zd2r7da4w9c9blhad3p5732v"))))
3562 (build-system gnu-build-system)
3563 (native-inputs
3564 `(("pkg-config" ,pkg-config)))
3565 (inputs
3566 `(("sdl2" ,sdl2)
3567 ("sdl2-image" ,sdl2-image)
3568 ("sdl2-mixer" ,sdl2-mixer)))
3569 (home-page "http://starfighter.nongnu.org/")
3570 (synopsis "2D scrolling shooter game")
3571 (description
3572 "In the year 2579, the intergalactic weapons corporation, WEAPCO, has
3573 dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
3574 their quest to liberate the galaxy from the clutches of WEAPCO. Along the
3575 way, you will encounter new foes, make new allies, and assist local rebels
3576 in strikes against the evil corporation.")
3577 ;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
3578 (license (list license:gpl3+
3579 license:cc-by3.0
3580 license:cc-by-sa3.0
3581 license:cc0
3582 license:public-domain))))
3583
3584 (define-public chromium-bsu
3585 (package
3586 (name "chromium-bsu")
3587 (version "0.9.16.1")
3588 (source (origin
3589 (method url-fetch)
3590 (uri (string-append "mirror://sourceforge/" name
3591 "/Chromium B.S.U. source code/"
3592 name "-" version ".tar.gz"))
3593 (sha256
3594 (base32
3595 "0jk2w5b6s6nkzri585bbz16cif2fhqcnl5l1mq3rd98r9nil3hd1"))))
3596 (build-system gnu-build-system)
3597 (native-inputs `(("pkg-config" ,pkg-config)))
3598 (inputs `(("gettext" ,gettext-minimal)
3599 ("glu" ,glu)
3600 ("quesoglc" ,quesoglc)
3601 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))))
3602 (home-page "http://chromium-bsu.sourceforge.net/")
3603 (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
3604 (description
3605 "In this game you are the captain of the cargo ship Chromium B.S.U. and
3606 are responsible for delivering supplies to the troops on the front line. Your
3607 ship has a small fleet of robotic fighters which you control from the relative
3608 safety of the Chromium vessel.")
3609 ;; Clarified Artistic License for everything but sound, which is covered
3610 ;; by the Expat License.
3611 (license (list license:clarified-artistic license:expat))))
3612
3613 (define-public tuxpaint
3614 (package
3615 (name "tuxpaint")
3616 (version "0.9.22") ;keep VER_DATE below in sync
3617 (source
3618 (origin
3619 (method url-fetch)
3620 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint/"
3621 version "/tuxpaint-" version ".tar.gz"))
3622 (sha256
3623 (base32
3624 "1qrbrdck9yxpcg3si6jb9i11w8lw9h4hqad0pfaxgyiniqpr7gca"))
3625 (modules '((guix build utils)))
3626 (snippet
3627 '(begin
3628 ;; Remove win32 directory which contains binary dll's and the
3629 ;; deprecated visualc directory.
3630 (for-each delete-file-recursively '("win32" "visualc"))
3631 (substitute* "Makefile"
3632 ;; Do not rely on $(GPERF) being an absolute file name
3633 (("\\[ -x \\$\\(GPERF\\) \\]")
3634 "$(GPERF) --version >/dev/null 2>&1"))))
3635 (patches (search-patches "tuxpaint-stamps-path.patch"))))
3636 (build-system gnu-build-system)
3637 (native-inputs
3638 `(("gperf" ,gperf)
3639 ("pkg-config" ,pkg-config)))
3640 (inputs
3641 `(("cairo" ,cairo)
3642 ("fribidi" ,fribidi)
3643 ("gettext" ,gettext-minimal)
3644 ("libpng" ,libpng)
3645 ("librsvg" ,librsvg)
3646 ("libpaper" ,libpaper)
3647 ("netpbm" ,netpbm)
3648 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf sdl-image)))))
3649 ;; TODO: Use system fonts rather than those in data/fonts
3650 (arguments
3651 `(#:make-flags `("VER_DATE=2014-08-23"
3652 "GPERF=gperf" "CC=gcc"
3653 "SDL_PCNAME=sdl SDL_image SDL_mixer SDL_ttf"
3654 ,(string-append "PREFIX=" %output)
3655 "GNOME_PREFIX=$(PREFIX)"
3656 "COMPLETIONDIR=$(PREFIX)/etc/bash_completion.d")
3657 #:parallel-build? #f ;fails on some systems
3658 #:tests? #f ;No tests
3659 #:phases (modify-phases %standard-phases
3660 (delete 'configure) ;no configure phase
3661 (add-after 'install 'fix-import
3662 (lambda* (#:key inputs outputs #:allow-other-keys)
3663 (let* ((out (assoc-ref outputs "out"))
3664 (net (assoc-ref inputs "netpbm"))
3665 (tpi (string-append out "/bin/tuxpaint-import")))
3666 (substitute* tpi
3667 ;; Point to installation prefix so that the default
3668 ;; configure file is found.
3669 (("/usr/local") out))
3670 ;; tuxpaint-import uses a bunch of programs from
3671 ;; netpbm, so make sure it knows where those are
3672 (wrap-program tpi
3673 `("PATH" ":" prefix
3674 (,(string-append net "/bin"))))))))))
3675 (native-search-paths
3676 (list (search-path-specification
3677 (variable "TUXPAINT_STAMPS_PATH")
3678 (files '("share/tuxpaint/stamps")))))
3679 (home-page "http://www.tuxpaint.org")
3680 (synopsis "Drawing software for children")
3681 (description
3682 "Tux Paint is a free drawing program designed for young children (kids
3683 ages 3 and up). It has a simple, easy-to-use interface; fun sound effects;
3684 and an encouraging cartoon mascot who helps guide children as they use the
3685 program. It provides a blank canvas and a variety of drawing tools to help
3686 your child be creative.")
3687 (license license:gpl2+)))
3688
3689 (define-public tuxpaint-stamps
3690 (package
3691 (name "tuxpaint-stamps")
3692 (version "2014.08.23")
3693 (source
3694 (origin
3695 (method url-fetch)
3696 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-stamps/"
3697 (string-map (λ (x) (if (eq? x #\.) #\- x)) version)
3698 "/tuxpaint-stamps-" version ".tar.gz"))
3699 (sha256
3700 (base32
3701 "0rhlwrjz44wp269v3rid4p8pi0i615pzifm1ym6va64gn1bms06q"))))
3702 (build-system trivial-build-system)
3703 (native-inputs
3704 `(("tar" ,tar)
3705 ("gzip" ,gzip)))
3706 (arguments
3707 `(#:modules ((guix build utils))
3708 #:builder (begin
3709 (use-modules (guix build utils))
3710 (setenv "PATH"
3711 (string-append
3712 (assoc-ref %build-inputs "tar") "/bin" ":"
3713 (assoc-ref %build-inputs "gzip") "/bin"))
3714 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
3715 (chdir (string-append ,name "-" ,version))
3716 (let ((dir (string-append %output "/share/tuxpaint/stamps")))
3717 (mkdir-p dir)
3718 (copy-recursively "stamps" dir)))))
3719 (home-page (package-home-page tuxpaint))
3720 (synopsis "Stamp images for Tux Paint")
3721 (description
3722 "This package contains a set of \"Rubber Stamp\" images which can be used
3723 with the \"Stamp\" tool within Tux Paint.")
3724 (license license:gpl2+)))
3725
3726 (define-public tuxpaint-config
3727 (package
3728 (name "tuxpaint-config")
3729 (version "0.0.13") ;keep VER_DATE below in sync
3730 (source
3731 (origin
3732 (method url-fetch)
3733 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-config/"
3734 version "/tuxpaint-config-" version ".tar.gz"))
3735 (sha256
3736 (base32
3737 "1z12s46mvy87qs3vgq9m0ki9pp21zqc52mmgphahpihw3s7haf6v"))))
3738 (build-system gnu-build-system)
3739 (native-inputs
3740 `(("gettext" ,gettext-minimal)))
3741 (inputs
3742 `(("fltk" ,fltk)
3743 ("libpaper" ,libpaper)
3744 ;; TODO: Should the following be propagated by fltk?
3745 ("libx11" ,libx11)
3746 ("libxft" ,libxft)
3747 ("mesa" ,mesa)))
3748 (arguments
3749 `(#:make-flags `("VER_DATE=2014-08-23"
3750 "CONFDIR=/etc/tuxpaint" ;don't write to store
3751 ,(string-append "PREFIX=" %output)
3752 "GNOME_PREFIX=$(PREFIX)")
3753 #:parallel-build? #f ;race conditions
3754 #:tests? #f ;no tests
3755 #:phases (modify-phases %standard-phases
3756 (delete 'configure) ;no configure phase
3757 (add-before 'install 'gzip-no-name
3758 (lambda* _
3759 (substitute* "Makefile"
3760 ;; tuxpaint-config compresses its own documentation;
3761 ;; make sure it uses flags for reproducibility.
3762 (("gzip") "gzip --no-name"))))
3763 (add-before 'install 'make-install-dirs
3764 (lambda* (#:key outputs #:allow-other-keys)
3765 (let ((out (assoc-ref outputs "out")))
3766 (mkdir-p (string-append out "/bin"))
3767 #t))))))
3768 (home-page (package-home-page tuxpaint))
3769 (synopsis "Configure Tux Paint")
3770 (description
3771 "Tux Paint Config is a graphical configuration editor for Tux Paint.")
3772 (license license:gpl2))) ;no "or later" present
3773
3774 (define-public supertux
3775 (package
3776 (name "supertux")
3777 (version "0.5.1")
3778 (source (origin
3779 (method url-fetch)
3780 (uri (string-append "https://github.com/SuperTux/supertux/"
3781 "releases/download/v" version "/SuperTux-v"
3782 version "-Source.tar.gz"))
3783 (sha256
3784 (base32
3785 "1i8avad7w7ikj870z519j383ldy29r6f956bs38cbr8wk513pp69"))))
3786 (arguments
3787 '(#:tests? #f
3788 #:configure-flags '("-DINSTALL_SUBDIR_BIN=bin"
3789 "-DENABLE_BOOST_STATIC_LIBS=OFF")))
3790 (build-system cmake-build-system)
3791 (inputs `(("sdl2" ,sdl2)
3792 ("sdl2-image" ,sdl2-image)
3793 ("sdl2-mixer" ,sdl2-mixer)
3794 ("openal" ,openal)
3795 ("mesa" ,mesa)
3796 ("glew" ,glew)
3797 ("libvorbis" ,libvorbis)
3798 ("libogg" ,libogg)
3799 ("physfs" ,physfs)
3800 ("curl" ,curl)
3801 ("boost" ,boost)))
3802 (native-inputs `(("pkg-config" ,pkg-config)))
3803 (synopsis "2D platformer game")
3804 (description "SuperTux is a free classic 2D jump'n run sidescroller game
3805 in a style similar to the original Super Mario games covered under
3806 the GNU GPL.")
3807 (home-page "https://supertuxproject.org/")
3808 (license license:gpl3+)))
3809
3810 (define-public tintin++
3811 (package
3812 (name "tintin++")
3813 (version "2.01.2")
3814 (source (origin
3815 (method url-fetch)
3816 (uri (string-append "mirror://sourceforge/tintin"
3817 "/TinTin++ Source Code/" version
3818 "/tintin" "-" version ".tar.gz"))
3819 (sha256
3820 (base32
3821 "13h39agyhlhm17zyqlb56bmbbxpimikyf5pana3gd3ylvqy1xq81"))))
3822 (inputs
3823 `(("gnutls" ,gnutls)
3824 ("pcre" ,pcre)
3825 ("readline" ,readline)
3826 ("zlib" ,zlib)))
3827 (arguments
3828 '(#:tests? #f ; no test suite
3829 #:phases
3830 (modify-phases %standard-phases
3831 ;; The source is in tt/src.
3832 (add-before 'configure 'chdir
3833 (lambda _
3834 (chdir "src")
3835 #t)))))
3836 (build-system gnu-build-system)
3837 (home-page "http://tintin.sourceforge.net/")
3838 (synopsis "MUD client")
3839 (description
3840 "TinTin++ is a MUD client which supports MCCP (Mud Client Compression Protocol),
3841 MMCP (Mud Master Chat Protocol), xterm 256 colors, most TELNET options used by MUDs,
3842 as well as those required to login via telnet on Linux / Mac OS X servers, and an
3843 auto mapper with a VT100 map display.")
3844 (license license:gpl2+)))
3845
3846 (define-public laby
3847 (package
3848 (name "laby")
3849 (version "0.6.4")
3850 (source
3851 (origin (method url-fetch)
3852 (uri (string-append
3853 "https://github.com/sgimenez/laby/archive/"
3854 name "-" version ".tar.gz"))
3855 (sha256
3856 (base32
3857 "0gyrfa95l1qka7gbjf7l6mk7mbfvph00l0c995ia272qdw7rjhyf"))
3858 (patches (search-patches "laby-make-install.patch"))))
3859 (build-system gnu-build-system)
3860 (inputs
3861 `(("lablgtk" ,lablgtk)
3862 ("ocaml" ,ocaml)
3863 ("ocaml-findlib" ,ocaml-findlib)))
3864 (arguments
3865 '(#:phases
3866 (modify-phases %standard-phases
3867 (delete 'configure)
3868 (add-before 'build 'setenv
3869 (lambda* (#:key inputs #:allow-other-keys)
3870 (let ((lablgtk (assoc-ref inputs "lablgtk")))
3871 (setenv "LD_LIBRARY_PATH"
3872 (string-append lablgtk "/lib/ocaml/stublibs"))))))
3873 #:tests? #f ; no 'check' target
3874 #:make-flags
3875 (list (string-append "PREFIX=" (assoc-ref %outputs "out")) "all")))
3876 (home-page "https://sgimenez.github.io/laby/")
3877 (synopsis "Programming game")
3878 (description "Learn programming, playing with ants and spider webs ;-)
3879 Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
3880 Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced
3881 programmers may also add their own favorite language.")
3882 (license license:gpl3+)))
3883
3884 (define-public bambam
3885 (package
3886 (name "bambam")
3887 (version "0.5")
3888 (source
3889 (origin
3890 (method url-fetch)
3891 (uri (string-append "https://github.com/porridge/bambam/archive/"
3892 version ".tar.gz"))
3893 (file-name (string-append name "-" version ".tar.gz"))
3894 (sha256
3895 (base32
3896 "10w110mjdwbvddzihh9rganvvjr5jfiz8cs9n7w12zndwwcc3ria"))))
3897 (build-system python-build-system)
3898 (arguments
3899 `(#:python ,python-2
3900 #:tests? #f ; no tests
3901 #:phases
3902 (modify-phases %standard-phases
3903 (delete 'build)
3904 (add-before 'install 'patch-data-dir-location
3905 (lambda _
3906 (substitute* "bambam.py"
3907 (("'data'") "'../share/bambam/data'"))
3908 #t))
3909 (replace 'install
3910 (lambda* (#:key outputs #:allow-other-keys)
3911 (let* ((out (assoc-ref outputs "out"))
3912 (bin (string-append out "/bin"))
3913 (share (string-append out "/share")))
3914 (mkdir-p bin)
3915 (copy-file "bambam.py" (string-append bin "/bambam"))
3916 (install-file "bambam.6" (string-append share "/man/man6"))
3917 (copy-recursively "data" (string-append share "/bambam/data")))
3918 #t)))))
3919 (inputs
3920 `(("python-pygame" ,python-pygame)))
3921 (home-page "https://github.com/porridge/bambam")
3922 (synopsis "Keyboard mashing and doodling game for babies")
3923 (description "Bambam is a simple baby keyboard (and gamepad) masher
3924 application that locks the keyboard and mouse and instead displays bright
3925 colors, pictures, and sounds.")
3926 (license license:gpl3+)))
3927
3928 (define-public mrrescue
3929 (package
3930 (name "mrrescue")
3931 (version "1.02e")
3932 (source (origin
3933 (method url-fetch)
3934 (uri (string-append
3935 "https://github.com/SimonLarsen/mrrescue/releases/"
3936 "download/" version "/" name version ".love"))
3937 (file-name (string-append name "-" version ".love"))
3938 (sha256
3939 (base32
3940 "0jwzbwkgp1l5ia6c7s760gmdirbsncp6nfqp7vqdqsfb63la9gl2"))))
3941 (build-system trivial-build-system)
3942 (arguments
3943 '(#:modules ((guix build utils))
3944 #:builder
3945 (begin
3946 (use-modules (guix build utils))
3947 (let* ((out (assoc-ref %outputs "out"))
3948 (bindir (string-append out "/bin"))
3949 (prog (string-append bindir "/mrrescue"))
3950 (source (assoc-ref %build-inputs "source"))
3951 (bash (string-append (assoc-ref %build-inputs "bash")
3952 "/bin/bash"))
3953 (love (string-append (assoc-ref %build-inputs "love")
3954 "/bin/love")))
3955 (mkdir-p bindir)
3956 (with-output-to-file prog
3957 (lambda ()
3958 (format #t "#!~a~%" bash)
3959 (format #t "exec -a mrrescue \"~a\" \"~a\"~%" love source)))
3960 (chmod prog #o755)
3961 #t))))
3962 (inputs
3963 `(("bash" ,bash)
3964 ("love" ,love)))
3965 (home-page "http://tangramgames.dk/games/mrrescue")
3966 (synopsis "Arcade-style fire fighting game")
3967 (description
3968 "Mr. Rescue is an arcade styled 2d action game centered around evacuating
3969 civilians from burning buildings. The game features fast paced fire
3970 extinguishing action, intense boss battles, a catchy soundtrack and lots of
3971 throwing people around in pseudo-randomly generated buildings.")
3972 (license (list license:zlib ; for source code
3973 license:cc-by-sa3.0)))) ; for graphics and music assets
3974
3975 (define-public hyperrogue
3976 (package
3977 (name "hyperrogue")
3978 (version "10.0g")
3979 ;; When updating this package, be sure to update the "hyperrogue-data"
3980 ;; origin in native-inputs.
3981 (source (origin
3982 (method url-fetch)
3983 (uri (string-append
3984 "http://www.roguetemple.com/z/hyper/"
3985 name (string-join (string-split version #\.) "")
3986 "-src.tgz"))
3987 (sha256
3988 (base32
3989 "0f68pcnsgl406dhm91ckn3f364bar9m9i5njp9vrmvhvv9p2icy0"))))
3990 (build-system gnu-build-system)
3991 (arguments
3992 `(#:tests? #f ; no check target
3993 #:make-flags '("CXXFLAGS=-std=c++11")
3994 #:phases
3995 (modify-phases %standard-phases
3996 (add-after 'set-paths 'set-sdl-paths
3997 (lambda* (#:key inputs #:allow-other-keys)
3998 (setenv "CPATH"
3999 (string-append (assoc-ref inputs "sdl-union")
4000 "/include/SDL"))))
4001 ;; Fix font and music paths.
4002 (replace 'configure
4003 (lambda* (#:key inputs outputs #:allow-other-keys)
4004 (let* ((out (assoc-ref outputs "out"))
4005 (share-dir (string-append out "/share/hyperrogue"))
4006 (dejavu-dir (string-append
4007 (assoc-ref inputs "font-dejavu")
4008 "/share/fonts/truetype"))
4009 (dejavu-font "DejaVuSans-Bold.ttf")
4010 (music-file "hyperrogue-music.txt"))
4011 (substitute* "basegraph.cpp"
4012 ((dejavu-font)
4013 (string-append dejavu-dir "/" dejavu-font)))
4014 (substitute* "sound.cpp"
4015 (((string-append "\\./" music-file))
4016 (string-append share-dir "/" music-file))
4017 (("sounds/")
4018 (string-append share-dir "/sounds/")))
4019 (substitute* music-file
4020 (("\\*/")
4021 (string-append share-dir "/sounds/"))))
4022 #t))
4023 (replace 'install
4024 (lambda* (#:key inputs outputs #:allow-other-keys)
4025 (let* ((out (assoc-ref outputs "out"))
4026 (bin (string-append out "/bin"))
4027 (share-dir (string-append out "/share/hyperrogue")))
4028 (mkdir-p bin)
4029 (copy-file "hyper" (string-append bin "/hyperrogue"))
4030 (install-file "hyperrogue-music.txt" share-dir))
4031 #t))
4032 (add-after 'install 'install-data
4033 (lambda* (#:key inputs outputs #:allow-other-keys)
4034 (let* ((data (assoc-ref inputs "hyperrogue-data"))
4035 (out (assoc-ref outputs "out"))
4036 (sounds (string-append out "/share/hyperrogue/sounds"))
4037 (unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
4038 (and
4039 ;; Extract media license information into sounds directory.
4040 (zero?
4041 (system* unzip "-j" data
4042 (string-append
4043 "hyperrogue"
4044 (string-join (string-split ,version #\.) "")
4045 "/sounds/credits.txt") "-d" sounds))
4046 ;; Extract sounds and music into sounds directory.
4047 (zero?
4048 (system* "unzip" "-j" data
4049 (string-append
4050 "hyperrogue"
4051 (string-join (string-split ,version #\.) "")
4052 "/*.ogg") "-d" sounds)))))))))
4053 (native-inputs
4054 `(("hyperrogue-data"
4055 ,(origin
4056 (method url-fetch)
4057 (uri
4058 (string-append
4059 "http://www.roguetemple.com/z/hyper/" name
4060 (string-join (string-split version #\.) "")
4061 "-win.zip"))
4062 (sha256
4063 (base32
4064 "0bnp077qvlmxjlz1jjd6kpghlv9flxc19ac1xq3m3wyq1w9p3pab"))))
4065 ("unzip" ,unzip)))
4066 (inputs
4067 `(("font-dejavu" ,font-dejavu)
4068 ("glew" ,glew)
4069 ("libpng" ,libpng)
4070 ("sdl-union" ,(sdl-union (list sdl
4071 sdl-gfx
4072 sdl-mixer
4073 sdl-ttf)))))
4074 (home-page "http://www.roguetemple.com/z/hyper/")
4075 (synopsis "Non-euclidean graphical rogue-like game")
4076 (description
4077 "HyperRogue is a game in which the player collects treasures and fights
4078 monsters -- rogue-like but for the fact that it is played on the hyperbolic
4079 plane and not in euclidean space.
4080
4081 In HyperRogue, the player can move through different parts of the world, which
4082 are home to particular creatures and may be subject to their own rules of
4083 \"physics\".
4084
4085 While the game can use ASCII characters to display the the classical rogue
4086 symbols, it still needs graphics to render the non-euclidean world.")
4087 (license (list license:bsd-3 ; glew.c, mtrand.*
4088 license:cc-by-sa3.0 ; music
4089 license:cc-by-sa4.0 ; sounds
4090 license:cc0
4091 license:public-domain ; direntx.*, some sounds
4092 license:zlib ; savepng.*
4093 license:gpl2+)))) ; remaining files
4094
4095 (define-public kobodeluxe
4096 (package
4097 (name "kobodeluxe")
4098 (version "0.5.1")
4099 (source (origin
4100 (method url-fetch)
4101 (uri (string-append "http://olofson.net/kobodl/download/KoboDeluxe-"
4102 version ".tar.bz2"))
4103 (sha256
4104 (base32
4105 "0b2wvdpnmaibsy419c16dfwj5kvd3pccby2aaqvm964x74592yqg"))
4106 (patches (search-patches
4107 "kobodeluxe-const-charp-conversion.patch"
4108 "kobodeluxe-enemies-pipe-decl.patch"
4109 "kobodeluxe-graphics-window-signed-char.patch"
4110 "kobodeluxe-manpage-minus-not-hyphen.patch"
4111 "kobodeluxe-midicon-segmentation-fault.patch"
4112 "kobodeluxe-paths.patch"))))
4113 (build-system gnu-build-system)
4114 (arguments
4115 '(#:configure-flags
4116 (list (string-append "CPPFLAGS=-I"
4117 (assoc-ref %build-inputs "sdl-union")
4118 "/include/SDL"))))
4119 (inputs `(("sdl-union" ,(sdl-union (list sdl sdl-image)))))
4120 (synopsis "Shooter with space station destruction")
4121 (description
4122 "Kobo Deluxe is an enhanced version of Akira Higuchi's XKobo graphical game
4123 for Un*x systems with X11.")
4124 (home-page "http://olofson.net/kobodl/")
4125 (license license:gpl2+)))
4126
4127 (define-public freeciv
4128 (package
4129 (name "freeciv")
4130 (version "2.5.7")
4131 (source
4132 (origin
4133 (method url-fetch)
4134 (uri (list (string-append
4135 "http://files.freeciv.org/stable/freeciv-"
4136 version ".tar.bz2")
4137 (string-append
4138 "mirror://sourceforge/freeciv/Freeciv%20"
4139 (version-major+minor version) "/" version
4140 "/freeciv-" version ".tar.bz2")))
4141 (sha256
4142 (base32
4143 "1lmydnnqraa947l7gdz6xgm0bgks1ywsivp9h4v8jr3avcv6gqzz"))))
4144 (build-system gnu-build-system)
4145 (inputs
4146 `(("curl" ,curl)
4147 ("cyrus-sasl" ,cyrus-sasl)
4148 ("gtk+" ,gtk+)
4149 ("sdl-mixer" ,sdl-mixer)
4150 ("zlib" ,zlib)))
4151 (native-inputs
4152 `(("pkg-config" ,pkg-config)))
4153 (home-page "http://www.freeciv.org/")
4154 (synopsis "Turn based empire building strategy game")
4155 (description "Freeciv is a turn based empire building strategy game
4156 inspired by the history of human civilization. The game commences in
4157 prehistory and your mission is to lead your tribe from the Stone Age
4158 to the Space Age.")
4159 (license license:gpl2+)))
4160
4161 (define-public no-more-secrets
4162 (package
4163 (name "no-more-secrets")
4164 (version "0.3.3")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 (uri (string-append "https://github.com/bartobri/no-more-secrets/"
4169 "archive/v" version ".tar.gz"))
4170 (file-name (string-append name "-" version ".tar.gz"))
4171 (sha256
4172 (base32
4173 "1kpx1rirc3i7fb4lymp0hx5rqr0s2ay4za261rw3bcy6d23l1kyg"))))
4174 (build-system gnu-build-system)
4175 (arguments
4176 `(#:tests? #f
4177 #:make-flags (list "CC=gcc" "all-ncurses"
4178 (string-append "prefix="
4179 (assoc-ref %outputs "out")))
4180 #:phases
4181 (modify-phases %standard-phases
4182 (delete 'configure))))
4183 (inputs
4184 `(("ncurses" ,ncurses)))
4185 (home-page "https://github.com/bartobri/no-more-secrets")
4186 (synopsis "Recreation of data decryption effect in \"Sneakers\"")
4187 (description
4188 "@code{No More Secrets} provides a command line tool called \"nms\"
4189 that recreates the famous data decryption effect seen on screen in the 1992
4190 movie \"Sneakers\".
4191
4192 This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and
4193 it will apply the hollywood effect, initially showing encrypted data, then
4194 starting a decryption sequence to reveal the original plaintext characters.")
4195 (license license:expat)))
4196
4197 (define-public megaglest-data
4198 (package
4199 (name "megaglest-data")
4200 (version "3.13.0")
4201 (source
4202 (origin
4203 (method url-fetch)
4204 (uri (string-append
4205 "https://github.com/MegaGlest/megaglest-data"
4206 "/releases/download/" version "/megaglest-data-"
4207 version ".tar.xz"))
4208 (sha256
4209 (base32
4210 "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
4211 (build-system cmake-build-system)
4212 (arguments
4213 `(#:tests? #f))
4214 (home-page "https://megaglest.org/")
4215 (synopsis "Data files for MegaGlest")
4216 (description "This package contains the data files required for MegaGlest.")
4217 (license license:cc-by-sa3.0)))
4218
4219 (define-public megaglest
4220 (package
4221 (name "megaglest")
4222 (version "3.13.0")
4223 (source
4224 (origin
4225 (method url-fetch)
4226 (uri (string-append
4227 "https://github.com/MegaGlest/megaglest-source"
4228 "/releases/download/" version "/megaglest-source-"
4229 version ".tar.xz"))
4230 (sha256
4231 (base32
4232 "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
4233 (build-system cmake-build-system)
4234 (inputs
4235 `(("curl" ,curl)
4236 ("fontconfig" ,fontconfig)
4237 ("ftgl" ,ftgl)
4238 ("glew" ,glew)
4239 ("libjpeg-turbo" ,libjpeg-turbo)
4240 ("megaglest-data" ,megaglest-data)
4241 ("mesa" ,mesa)
4242 ("miniupnpc" ,miniupnpc)
4243 ("openal" ,openal)
4244 ("libircclient" ,libircclient)
4245 ("libpng" ,libpng)
4246 ("libvorbis" ,libvorbis)
4247 ("lua" ,lua)
4248 ("sdl2" ,sdl2)
4249 ("wxwidgets" ,wxwidgets)))
4250 (native-inputs
4251 `(("cppunit" ,cppunit)
4252 ("pkg-config" ,pkg-config)))
4253 (arguments
4254 `(#:configure-flags
4255 (list (string-append "-DCUSTOM_DATA_INSTALL_PATH="
4256 (assoc-ref %build-inputs "megaglest-data")
4257 "/share/megaglest")
4258 "-DBUILD_MEGAGLEST_TESTS=ON")
4259 #:phases
4260 (modify-phases %standard-phases
4261 (add-after 'unpack 'fix-ini-search-path
4262 (lambda* (#:key outputs #:allow-other-keys)
4263 (substitute* "source/glest_game/global/config.cpp"
4264 (("/usr/share/megaglest/")
4265 (string-append (assoc-ref outputs "out")
4266 "/share/megaglest/"))))))
4267 #:test-target "megaglest_tests"))
4268 (home-page "https://megaglest.org/")
4269 (synopsis "3D real-time strategy (RTS) game")
4270 (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
4271 game, where you control the armies of one of seven different factions: Tech,
4272 Magic, Egypt, Indians, Norsemen, Persian or Romans.")
4273 (license license:gpl2+)))
4274
4275 (define-public freegish
4276 (let ((commit "8795cd7adc95957883f2d3465eb9036a774667a7")
4277 (revision "1"))
4278 (package
4279 (name "freegish")
4280 (version (string-append "0-" revision "." (string-take commit 9)))
4281 (source (origin
4282 (method git-fetch)
4283 (uri (git-reference
4284 (url "https://github.com/freegish/freegish.git")
4285 (commit commit)))
4286 (sha256
4287 (base32
4288 "1p1zf5qqagmcpi1db2bs02cnalpy3qiymp6yzan7k1bhmv859gsx"))
4289 (modules '((guix build utils)))
4290 ;; The audio files in the "music" directory are licensed under
4291 ;; CC-BY-NC, so we delete them.
4292 (snippet
4293 '(begin
4294 (delete-file-recursively "music")
4295 #t))))
4296 (build-system cmake-build-system)
4297 (arguments
4298 `(#:tests? #f ; no tests included
4299 #:configure-flags
4300 (list "-DCMAKE_INSTALL_FHS=ON")
4301 #:phases
4302 (modify-phases %standard-phases
4303 (add-after 'unpack 'set-DATAPATH
4304 (lambda* (#:key outputs #:allow-other-keys)
4305 (substitute* "CMakeLists.txt"
4306 (("^option\\(INSTALL_FHS" line)
4307 (string-append "add_definitions(-DDATAPATH=\""
4308 (assoc-ref outputs "out") "/share/freegish\")\n"
4309 line)))
4310 #t)))))
4311 (inputs
4312 `(("sdl-union" ,(sdl-union (list sdl sdl-mixer)))
4313 ("openal" ,openal)
4314 ("libvorbis" ,libvorbis)
4315 ("libogg" ,libogg)
4316 ("mesa" ,mesa)
4317 ("libpng" ,libpng)
4318 ("zlib" ,zlib)))
4319 (home-page "https://github.com/freegish/freegish")
4320 (synopsis "Side-scrolling physics platformer with a ball of tar")
4321 (description "In FreeGish you control Gish, a ball of tar who lives
4322 happily with his girlfriend Brea, until one day a mysterious dark creature
4323 emerges from a sewer hole and pulls her below ground.")
4324 ;; The textures are available under the Expat license. All other assets
4325 ;; (including levels) are covered under CC-BY-SA or public domain. The
4326 ;; source code is under GPLv2+.
4327 (license (list license:gpl2+
4328 license:expat
4329 license:public-domain
4330 license:cc-by-sa3.0)))))
4331
4332 (define-public cdogs-sdl
4333 (package
4334 (name "cdogs-sdl")
4335 (version "0.6.6")
4336 (source (origin
4337 (method url-fetch)
4338 (uri (string-append "https://github.com/cxong/cdogs-sdl/"
4339 "archive/" version ".tar.gz"))
4340 (file-name (string-append name "-" version ".tar.gz"))
4341 (sha256
4342 (base32
4343 "08gbx6vqqir48xs6qdfa4kv70gj4j96wzs90pg7qldfasxz34ljm"))))
4344 (build-system cmake-build-system)
4345 (arguments
4346 `(#:configure-flags
4347 (list (string-append "-DCDOGS_DATA_DIR="
4348 (assoc-ref %outputs "out")
4349 "/share/cdogs-sdl/"))))
4350 (inputs
4351 `(("mesa" ,mesa)
4352 ("sdl2" ,sdl2)
4353 ("sdl2-image" ,sdl2-image)
4354 ("sdl2-mixer" ,sdl2-mixer)))
4355 (home-page "https://cxong.github.io/cdogs-sdl/")
4356 (synopsis "Classic overhead run-and-gun game")
4357 (description "C-Dogs SDL is a classic overhead run-and-gun game,
4358 supporting up to 4 players in co-op and deathmatch modes. Customize your
4359 player, choose from many weapons, and blast, slide and slash your way through
4360 over 100 user-created campaigns.")
4361 ;; GPLv2+ for code (includes files under BSD-2 and BSD-3),
4362 ;; CC0/CC-BY/CC-BY-SA for assets.
4363 (license (list license:gpl2+
4364 license:bsd-2
4365 license:bsd-3
4366 license:cc0
4367 license:cc-by3.0
4368 license:cc-by-sa3.0))))
4369
4370 (define-public kiki
4371 (package
4372 (name "kiki")
4373 (version "1.0.2")
4374 (source (origin
4375 (method url-fetch)
4376 (uri (string-append "mirror://sourceforge/kiki/kiki-src/"
4377 version "/kiki-" version "-src.tgz"))
4378 (sha256
4379 (base32
4380 "0ihjdsxbn8z3cz0gpcprafiipcqaiskgdnh1rhmw4qff8dszalbn"))
4381 (modules '((guix build utils)))
4382 (snippet
4383 '(begin
4384 (for-each delete-file (find-files "." "\\.dll$"))
4385 #t))
4386 (patches
4387 (search-patches "kiki-level-selection-crash.patch"
4388 "kiki-makefile.patch"
4389 "kiki-missing-includes.patch"
4390 "kiki-portability-64bit.patch"))))
4391 (build-system gnu-build-system)
4392 (arguments
4393 `(#:tests? #f ; there are no tests
4394 #:make-flags '("CXX=g++")
4395 #:phases
4396 (modify-phases %standard-phases
4397 (replace 'configure
4398 (lambda* (#:key inputs outputs #:allow-other-keys)
4399 (setenv "CPLUS_INCLUDE_PATH"
4400 (string-append (assoc-ref inputs "sdl-union")
4401 "/include/SDL:"
4402 (assoc-ref inputs "python")
4403 "/include/python2.7:"
4404 (getenv "CPLUS_INCLUDE_PATH")))
4405 (substitute* "src/main/main.cpp"
4406 (("#include <SDL.h>" line)
4407 (string-append line "
4408 #define K_INCLUDE_GLUT
4409 #include \"KIncludeTools.h\""))
4410 (("// initialize SDL" line)
4411 (string-append "glutInit(&argc,argv);\n" line)))
4412 (substitute* "src/main/KikiController.cpp"
4413 (("getenv\\(\"KIKI_HOME\"\\)")
4414 (string-append "\"" (assoc-ref outputs "out") "/share/kiki/\"")))
4415 (substitute* "linux/Makefile"
4416 (("CXXOPTS =" line)
4417 (string-append line " -fpermissive"))
4418 (("PYTHON_VERSION=.*") "PYTHON_VERSION=2.7")
4419 (("PYTHONHOME =.*")
4420 (string-append "PYTHONHOME = "
4421 (assoc-ref inputs "python")
4422 "/lib/python2.7/"))
4423 (("\\$\\(GLLIBS\\)" line)
4424 (string-append line " -lm -lpython2.7")))
4425 (substitute* "src/main/KikiPythonWidget.h"
4426 (("#define __KikiPythonWidget" line)
4427 (string-append line "\n#include \"KikiPython.h\"")))
4428 #t))
4429 (add-before 'build 'build-kodilib
4430 (lambda* (#:key make-flags #:allow-other-keys)
4431 (with-directory-excursion "kodilib/linux"
4432 (zero? (apply system* "make" make-flags)))))
4433 (add-after 'build-kodilib 'chdir
4434 (lambda _ (chdir "linux") #t))
4435 (replace 'install
4436 (lambda* (#:key outputs #:allow-other-keys)
4437 (let* ((out (assoc-ref outputs "out"))
4438 (bin (string-append out "/bin"))
4439 (share (string-append out "/share/kiki")))
4440 (mkdir-p bin)
4441 (mkdir-p share)
4442 (install-file "kiki" bin)
4443 (copy-recursively "../py" (string-append share "/py"))
4444 (copy-recursively "../sound" (string-append share "/sound"))
4445 #t))))))
4446 (inputs
4447 `(("glu" ,glu)
4448 ;; Kiki builds fine with freeglut 3.0.0 but segfaults on start.
4449 ("freeglut" ,freeglut-2.8)
4450 ("sdl-union" ,(sdl-union (list sdl
4451 sdl-mixer
4452 sdl-image)))
4453 ("python" ,python-2)))
4454 (native-inputs
4455 `(("swig" ,swig)))
4456 (home-page "http://kiki.sourceforge.net/")
4457 (synopsis "3D puzzle game")
4458 (description "Kiki the nano bot is a 3D puzzle game. It is basically a
4459 mixture of the games Sokoban and Kula-World. Your task is to help Kiki, a
4460 small robot living in the nano world, repair its maker.")
4461 ;; See <http://metadata.ftp-master.debian.org/changelogs/main/k/
4462 ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright>
4463 ;; for a statement from the author.
4464 (license license:public-domain)))
4465
4466 (define-public teeworlds
4467 (package
4468 (name "teeworlds")
4469 (version "0.6.4")
4470 (source (origin
4471 (method url-fetch)
4472 (uri (string-append "https://github.com/teeworlds/teeworlds/"
4473 "archive/" version "-release.tar.gz"))
4474 (file-name (string-append name "-" version ".tar.gz"))
4475 (sha256
4476 (base32
4477 "1mqhp6xjl75l49050cid36wxyjn1qr0vjx1c709dfg1lkvmgs6l3"))
4478 (modules '((guix build utils)))
4479 (snippet
4480 '(begin
4481 (for-each delete-file-recursively
4482 '("src/engine/external/wavpack/"
4483 "src/engine/external/zlib/"))
4484 #t))
4485 (patches
4486 (search-patches "teeworlds-use-latest-wavpack.patch"))))
4487 (build-system gnu-build-system)
4488 (arguments
4489 `(#:tests? #f ; no tests included
4490 #:phases
4491 (modify-phases %standard-phases
4492 (replace 'configure
4493 (lambda* (#:key outputs #:allow-other-keys)
4494 ;; Embed path to assets.
4495 (substitute* "src/engine/shared/storage.cpp"
4496 (("#define DATA_DIR.*")
4497 (string-append "#define DATA_DIR \""
4498 (assoc-ref outputs "out")
4499 "/share/teeworlds/data"
4500 "\"")))
4501
4502 ;; Bam expects all files to have a recent time stamp.
4503 (for-each (lambda (file)
4504 (utime file 1 1))
4505 (find-files "."))
4506
4507 ;; Do not use bundled libraries.
4508 (substitute* "bam.lua"
4509 (("if config.zlib.value == 1 then")
4510 "if true then")
4511 (("wavpack = .*")
4512 "wavpack = {}
4513 settings.link.libs:Add(\"wavpack\")\n"))
4514 (substitute* "src/engine/client/sound.cpp"
4515 (("#include <engine/external/wavpack/wavpack.h>")
4516 "#include <wavpack/wavpack.h>"))
4517 #t))
4518 (replace 'build
4519 (lambda _
4520 (zero? (system* "bam" "-a" "-v" "release"))))
4521 (replace 'install
4522 (lambda* (#:key outputs #:allow-other-keys)
4523 (let* ((out (assoc-ref outputs "out"))
4524 (bin (string-append out "/bin"))
4525 (data (string-append out "/share/teeworlds/data")))
4526 (mkdir-p bin)
4527 (mkdir-p data)
4528 (for-each (lambda (file)
4529 (install-file file bin))
4530 '("teeworlds" "teeworlds_srv"))
4531 (copy-recursively "data" data)
4532 #t))))))
4533 ;; FIXME: teeworlds bundles the sources of "pnglite", a two-file PNG
4534 ;; library without a build system.
4535 (inputs
4536 `(("freetype" ,freetype)
4537 ("glu" ,glu)
4538 ("mesa" ,mesa)
4539 ("sdl-union" ,(sdl-union (list sdl
4540 sdl-mixer
4541 sdl-image)))
4542 ("wavpack" ,wavpack)
4543 ("zlib" ,zlib)))
4544 (native-inputs
4545 `(("bam" ,bam)
4546 ("python" ,python-2)))
4547 (home-page "https://www.teeworlds.com")
4548 (synopsis "2D retro multiplayer shooter game")
4549 (description "Teeworlds is an online multiplayer game. Battle with up to
4550 16 players in a variety of game modes, including Team Deathmatch and Capture
4551 The Flag. You can even design your own maps!")
4552 (license license:bsd-3)))
4553
4554 (define-public enigma
4555 (package
4556 (name "enigma")
4557 (version "1.21")
4558 (source (origin
4559 (method url-fetch)
4560 (uri (string-append "mirror://sourceforge/enigma-game/"
4561 "Release%20" version "/enigma-"
4562 version ".tar.gz"))
4563 (sha256
4564 (base32
4565 "00ffh9pypj1948pg3q9sjp1nmiabh52p5c8wpg9n1dcfgl3cywnq"))))
4566 (build-system gnu-build-system)
4567 (arguments
4568 `(#:configure-flags
4569 (list "--with-system-enet")
4570 #:phases
4571 (modify-phases %standard-phases
4572 (add-after 'unpack 'find-sdl
4573 (lambda _
4574 (substitute* "configure"
4575 (("SDL_ttf.h") "SDL/SDL_ttf.h"))
4576 (substitute* '("tools/ttf2bmf.cc"
4577 "lib-src/enigma-core/ecl_font.cc"
4578 "lib-src/enigma-core/ecl_video.cc"
4579 "lib-src/enigma-core/ecl_buffer.hh"
4580 "src/SoundEngine.cc"
4581 "src/SoundEngine.hh"
4582 "src/MusicManager.cc"
4583 "src/MusicManager.hh"
4584 "src/d_models.cc"
4585 "src/main.cc"
4586 "src/network.cc")
4587 (("#include \"SDL_(image|ttf|mixer|types|syswm|mutex).h\"" line header)
4588 (string-append "#include \"SDL/SDL_" header ".h\"")))
4589 (substitute* "src/main.cc"
4590 (("#include <SDL_(image|ttf|mixer).h>" line header)
4591 (string-append "#include \"SDL/SDL_" header ".h\"")))
4592 #t)))))
4593 (inputs
4594 `(("xerces-c" ,xerces-c)
4595 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)))
4596 ("curl" ,curl)
4597 ("enet" ,enet)))
4598 (native-inputs
4599 `(("pkg-config" ,pkg-config)
4600 ("imagemagick" ,imagemagick)))
4601 (home-page "http://www.nongnu.org/enigma")
4602 (synopsis "Puzzle game with a dexterity component")
4603 (description "Enigma is a puzzle game with 550 unique levels. The object
4604 of the game is to find and uncover pairs of identically colored ‘Oxyd’ stones.
4605 Simple? Yes. Easy? Certainly not! Hidden traps, vast mazes, laser beams,
4606 and most of all, countless hairy puzzles usually block your direct way to the
4607 Oxyd stones. Enigma’s game objects (and there are hundreds of them, lest you
4608 get bored) interact in many unexpected ways, and since many of them follow the
4609 laws of physics (Enigma’s special laws of physics, that is), controlling them
4610 with the mouse isn’t always trivial.")
4611 (license license:gpl2+)))
4612
4613 (define-public fillets-ng
4614 (package
4615 (name "fillets-ng")
4616 (version "1.0.1")
4617 (source (origin
4618 (method url-fetch)
4619 (uri (string-append "mirror://sourceforge/fillets/"
4620 "Fish%20Fillets%20-%20Next%20Generation/"
4621 version "/fillets-ng-" version ".tar.gz"))
4622 (sha256
4623 (base32
4624 "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"))))
4625 (build-system gnu-build-system)
4626 (arguments
4627 `(#:configure-flags
4628 (list (string-append "--with-lua="
4629 (assoc-ref %build-inputs "lua")))
4630 #:make-flags
4631 (list (string-append "CFLAGS=-I"
4632 (assoc-ref %build-inputs "sdl-union")
4633 "/include/SDL")
4634 (string-append "CXXFLAGS=-I"
4635 (assoc-ref %build-inputs "sdl-union")
4636 "/include/SDL"))
4637 #:phases
4638 (modify-phases %standard-phases
4639 ;; Lua 5.1 does not provide it.
4640 (add-after 'unpack 'do-not-link-with-lualib
4641 (lambda _
4642 (substitute* "configure"
4643 (("-llualib") ""))
4644 #t))
4645 (add-after 'install 'install-data
4646 (lambda* (#:key inputs outputs #:allow-other-keys)
4647 (let ((data (string-append (assoc-ref outputs "out")
4648 "/share/games/fillets-ng")))
4649 (mkdir-p data)
4650 (zero? (system* "tar" "-xvf"
4651 (assoc-ref inputs "fillets-ng-data")
4652 "--strip-components=1"
4653 "-C" data))))))))
4654 (inputs
4655 `(("sdl-union" ,(sdl-union (list sdl
4656 sdl-mixer
4657 sdl-image
4658 sdl-ttf)))
4659 ("fribidi" ,fribidi)
4660 ("libx11" ,libx11)
4661 ("lua" ,lua-5.1)))
4662 (native-inputs
4663 `(("pkg-config" ,pkg-config)
4664 ("fillets-ng-data"
4665 ,(origin
4666 (method url-fetch)
4667 (uri (string-append "mirror://sourceforge/fillets/"
4668 "Fish%20Fillets%20-%20Next%20Generation/"
4669 version "/fillets-ng-data-" version ".tar.gz"))
4670 (sha256
4671 (base32
4672 "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"))))))
4673 (home-page "http://fillets.sourceforge.net/")
4674 (synopsis "Puzzle game")
4675 (description "Fish Fillets NG is strictly a puzzle game. The goal in
4676 every of the seventy levels is always the same: find a safe way out. The fish
4677 utter witty remarks about their surroundings, the various inhabitants of their
4678 underwater realm quarrel among themselves or comment on the efforts of your
4679 fish. The whole game is accompanied by quiet, comforting music.")
4680 (license license:gpl2+)))
4681
4682 (define-public crawl
4683 (package
4684 (name "crawl")
4685 (version "0.20.1")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (list
4690 ;; Older releases get moved into a versioned directory
4691 (string-append "http://crawl.develz.org/release/"
4692 (version-major+minor version) "/stone_soup-"
4693 version "-nodeps.tar.xz")
4694 ;; Only the latest release is in this directory
4695 (string-append "http://crawl.develz.org/release/stone_soup-"
4696 version "-nodeps.tar.xz")))
4697 (sha256
4698 (base32
4699 "0cagx7687r5ln7pmzl60akjhjpyqd62z9zhfr2mqfk53wl9jbsbj"))
4700 (patches (search-patches "crawl-upgrade-saves.patch"))))
4701 (build-system gnu-build-system)
4702 (inputs
4703 `(("lua51" ,lua-5.1)
4704 ("ncurses" ,ncurses)
4705 ("sqlite" ,sqlite)
4706 ("zlib" ,zlib)))
4707 (native-inputs
4708 `(("bison" ,bison)
4709 ("flex" ,flex)
4710 ("perl" ,perl)
4711 ("pkg-config" ,pkg-config)))
4712 (arguments
4713 '(#:make-flags
4714 (let* ((sqlite (assoc-ref %build-inputs "sqlite"))
4715 (out (assoc-ref %outputs "out")))
4716 (list (string-append "SQLITE_INCLUDE_DIR=" sqlite "/include")
4717 (string-append "prefix=" out)
4718 "SAVEDIR=~/.crawl"
4719 ;; don't build any bundled dependencies
4720 "BUILD_LUA="
4721 "BUILD_SQLITE="
4722 "BUILD_ZLIB="
4723 "-Csource"))
4724 #:phases
4725 (modify-phases %standard-phases
4726 (delete 'configure)
4727 (delete 'check)
4728 ;; Test cases require the source to be rebuild with the -DDEBUG define.
4729 ;; Do 'check before 'build to avoid a 3rd build on make install.
4730 (add-before 'build 'check
4731 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
4732 (setenv "HOME" (getcwd))
4733 ;; Fake a terminal for the test cases.
4734 (setenv "TERM" "xterm-256color")
4735 (zero? (apply system* "make" "debug" "test"
4736 (format #f "-j~d" (parallel-job-count))
4737 ;; Force command line build for test cases.
4738 (append make-flags '("GAME=crawl" "TILES=")))))))))
4739 (synopsis "Roguelike dungeon crawler game")
4740 (description "Dungeon Crawl Stone Soup is a roguelike adventure through
4741 dungeons filled with dangerous monsters in a quest to find the mystifyingly
4742 fabulous Orb of Zot.")
4743 (home-page "https://crawl.develz.org")
4744 (license (list license:gpl2+
4745 license:bsd-2
4746 license:bsd-3
4747 license:cc0
4748 license:expat
4749 license:zlib
4750 license:asl2.0))))
4751
4752 ;; The linter here claims that patch file names should start with the package
4753 ;; name. But, in this case, the patches are inherited from crawl with the
4754 ;; "crawl-" prefix instead of "crawl-tiles-".
4755 (define-public crawl-tiles
4756 (package
4757 (inherit crawl)
4758 (name "crawl-tiles")
4759 (arguments
4760 (substitute-keyword-arguments
4761 (package-arguments crawl)
4762 ((#:make-flags flags)
4763 `(let ((dejavu (assoc-ref %build-inputs "font-dejavu")))
4764 (cons*
4765 (string-append "PROPORTIONAL_FONT=" dejavu
4766 "/share/fonts/truetype/DejaVuSans.ttf")
4767 (string-append "MONOSPACED_FONT=" dejavu
4768 "/share/fonts/truetype/DejaVuSansMono.ttf")
4769 "TILES=y"
4770 ;; Rename the executable to allow parallel installation with crawl.
4771 "GAME=crawl-tiles"
4772 ,flags)))))
4773 (inputs
4774 `(,@(package-inputs crawl)
4775 ("font-dejavu" ,font-dejavu)
4776 ("freetype6" ,freetype)
4777 ("glu" ,glu)
4778 ("libpng" ,libpng)
4779 ("sdl2" ,sdl2)
4780 ("sdl2-image" ,sdl2-image)
4781 ("sdl2-mixer" ,sdl2-mixer)))
4782 (native-inputs
4783 `(,@(package-native-inputs crawl)
4784 ("pngcrush" ,pngcrush)
4785 ("which" ,which)))
4786 (synopsis "Graphical roguelike dungeon crawler game")))
4787
4788 (define-public lugaru
4789 (package
4790 (name "lugaru")
4791 (version "1.2")
4792 (source (origin
4793 (method url-fetch)
4794 (uri (string-append "https://bitbucket.org/osslugaru/lugaru/downloads/"
4795 name "-" version ".tar.xz"))
4796 (sha256
4797 (base32
4798 "15zgcshy22q51rm72zi6y9z7qlgnz5iw3gczjdlir4bqmxy4gspk"))))
4799 (build-system cmake-build-system)
4800 (arguments
4801 `(#:configure-flags
4802 (list "-DSYSTEM_INSTALL=ON")
4803 ;; no test target
4804 #:tests? #f))
4805 (native-inputs
4806 `(("pkg-config" ,pkg-config)))
4807 (inputs
4808 `(("sdl2" ,sdl2)
4809 ("glu" ,glu)
4810 ("libjpeg" ,libjpeg-turbo)
4811 ("libpng" ,libpng)
4812 ("openal" ,openal)
4813 ("vorbis" ,libvorbis)
4814 ("zlib" ,zlib)))
4815 (home-page "https://osslugaru.gitlab.io")
4816 (synopsis "Cross-platform third-person action game")
4817 (description "Lugaru is a third-person action game. The main character,
4818 Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills.
4819 In his quest to find those responsible for slaughtering his village, he uncovers
4820 a far-reaching conspiracy involving the corrupt leaders of the rabbit republic
4821 and the starving wolves from a nearby den. Turner takes it upon himself to
4822 fight against their plot and save his fellow rabbits from slavery.")
4823 (license (list license:gpl2+ ; code
4824 ;; assets:
4825 license:cc-by-sa3.0
4826 license:cc-by-sa4.0))))
4827
4828 (define-public 0ad-data
4829 (package
4830 (name "0ad-data")
4831 (version "0.0.22-alpha")
4832 (source
4833 (origin
4834 (method url-fetch)
4835 (uri (string-append "http://releases.wildfiregames.com/0ad-"
4836 version "-unix-data.tar.xz"))
4837 (file-name (string-append name "-" version ".tar.xz"))
4838 (sha256
4839 (base32
4840 "0vknk9ay9h2p34r7mym2g066f3s3c5d5vmap0ckcs5b86h5cscjc"))
4841 (modules '((guix build utils)))
4842 (snippet
4843 #~(begin
4844 (for-each
4845 (lambda (name)
4846 (let* ((dir (string-append "binaries/data/mods/" name))
4847 (file (string-append dir "/" name ".zip"))
4848 (unzip #$(file-append unzip "/bin/unzip")))
4849 (system* unzip "-d" dir file)
4850 (delete-file file)))
4851 '("mod" "public"))
4852 #t))))
4853 (build-system trivial-build-system)
4854 (native-inputs `(("tar" ,tar)
4855 ("xz" ,xz)))
4856 (arguments
4857 `(#:modules ((guix build utils))
4858 #:builder
4859 (begin
4860 (use-modules (guix build utils))
4861 (let ((out (assoc-ref %outputs "out"))
4862 (source (assoc-ref %build-inputs "source"))
4863 (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
4864 (xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
4865 (setenv "PATH" xz-path)
4866 (mkdir out)
4867 (zero? (system* tar "xvf" source "-C" out "--strip=3"))))))
4868 (synopsis "Data files for 0ad")
4869 (description "0ad-data provides the data files required by the game 0ad.")
4870 (home-page "https://play0ad.com")
4871 (license (list (license:fsdg-compatible
4872 "http://tavmjong.free.fr/FONTS/ArevCopyright.txt"
4873 (license:license-comment
4874 (package-license font-bitstream-vera)))
4875 (package-license font-bitstream-vera)
4876 license:cc-by-sa3.0
4877 license:expat
4878 license:gfl1.0
4879 license:gpl2+
4880 license:gpl3+))))
4881
4882 (define-public 0ad
4883 (package
4884 (name "0ad")
4885 (version "0.0.22-alpha")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (string-append "http://releases.wildfiregames.com/0ad-"
4890 version "-unix-build.tar.xz"))
4891 (file-name (string-append name "-" version ".tar.xz"))
4892 (sha256
4893 (base32
4894 "1cgmr4g5g9wv36v7ylbrvqhsjwgcsdgbqwc8zlqmnayk9zgkdpgx"))
4895 ;; A snippet here would cause a build failure because of timestamps
4896 ;; reset. See https://bugs.gnu.org/26734.
4897 ))
4898 (inputs
4899 `(("0ad-data" ,0ad-data)
4900 ("curl" ,curl)
4901 ("enet" ,enet)
4902 ("gloox" ,gloox)
4903 ("icu4c" ,icu4c)
4904 ("libpng" ,libpng)
4905 ("libvorbis" ,libvorbis)
4906 ("libxcursor" ,libxcursor)
4907 ("libxml2" ,libxml2)
4908 ("miniupnpc" ,miniupnpc)
4909 ("mozjs-38" ,mozjs-38)
4910 ("openal" ,openal)
4911 ("sdl2" ,sdl2)
4912 ("wxwidgets" ,wxwidgets)
4913 ("zlib" ,zlib)))
4914 (native-inputs
4915 `(("boost" ,boost)
4916 ("cmake" ,cmake)
4917 ("mesa" ,mesa)
4918 ("pkg-config" ,pkg-config)
4919 ("python-2" ,python-2)))
4920 (build-system gnu-build-system)
4921 (arguments
4922 `(#:phases
4923 (modify-phases %standard-phases
4924 (add-after 'unpack 'delete-bundles
4925 (lambda _
4926 (delete-file-recursively "libraries/source/spidermonkey")
4927 #t))
4928 (add-after 'unpack 'fix-x11-includes
4929 (lambda _
4930 (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
4931 (("<Xlib.h>") "<X11/Xlib.h>"))
4932 (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
4933 (("<Xatom.h>") "<X11/Xatom.h>"))
4934 (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
4935 (("<Xcursor/Xcursor.h>") "<X11/Xcursor/Xcursor.h>"))
4936 #t))
4937 (replace 'configure
4938 (lambda* (#:key inputs outputs #:allow-other-keys)
4939 (let* ((jobs (number->string (parallel-job-count)))
4940 (out (assoc-ref outputs "out"))
4941 (lib (string-append out "/lib"))
4942 (data (string-append out "/share/0ad")))
4943 (setenv "JOBS" (string-append "-j" jobs))
4944 (setenv "CC" "gcc")
4945 (with-directory-excursion "build/workspaces"
4946 (zero? (system* "./update-workspaces.sh"
4947 (string-append "--libdir=" lib)
4948 (string-append "--datadir=" data)
4949 "--minimal-flags"
4950 ;; TODO: "--with-system-nvtt"
4951 "--with-system-mozjs38"))))))
4952 (add-before 'build 'chdir
4953 (lambda _
4954 (chdir "build/workspaces/gcc")
4955 #t))
4956 (delete 'check)
4957 (replace 'install
4958 (lambda* (#:key inputs outputs #:allow-other-keys)
4959 (chdir "../../../binaries")
4960 (let* ((out (assoc-ref outputs "out"))
4961 (bin (string-append out "/bin"))
4962 (lib (string-append out "/lib"))
4963 (data (string-append out "/share/0ad"))
4964 (applications (string-append out "/share/applications"))
4965 (pixmaps (string-append out "/share/pixmaps"))
4966 (0ad-data (assoc-ref inputs "0ad-data")))
4967 ;; data
4968 (copy-recursively "data" data)
4969 (for-each (lambda (file)
4970 (symlink (string-append 0ad-data "/" file)
4971 (string-append data "/" file)))
4972 '("config" "mods/mod" "mods/public" "tools"))
4973 ;; libraries
4974 (for-each (lambda (file)
4975 (install-file file lib))
4976 (find-files "system" "\\.so$"))
4977 ;; binaries
4978 (install-file "system/pyrogenesis" bin)
4979 (with-directory-excursion bin
4980 (symlink "pyrogenesis" "0ad"))
4981 ;; resources
4982 (with-directory-excursion "../build/resources"
4983 (install-file "0ad.desktop" applications)
4984 (install-file "0ad.png" pixmaps))
4985 #t)))
4986 (add-after 'install 'check
4987 (lambda _
4988 (with-directory-excursion "system"
4989 (zero? (system* "./test"))))))))
4990 (home-page "https://play0ad.com")
4991 (synopsis "3D real-time strategy game of ancient warfare")
4992 (description "0 A.D. is a real-time strategy (RTS) game of ancient
4993 warfare. It's a historically-based war/economy game that allows players to
4994 relive or rewrite the history of twelve ancient civilizations, each depicted
4995 at their peak of economic growth and military prowess.
4996
4997 0ad needs a window manager that supports 'Extended Window Manager Hints'.")
4998 (license (list license:bsd-2
4999 license:bsd-3
5000 license:expat
5001 license:gpl2+
5002 license:ibmpl1.0
5003 license:isc
5004 license:lgpl2.1
5005 license:lgpl3
5006 license:mpl2.0
5007 license:zlib))))
5008
5009 ;; There have been no official releases.
5010 (define-public open-adventure
5011 (let* ((commit "d43854f0f6bb8e9eea7fbce80348150e7e7fc34d")
5012 (revision "2"))
5013 (package
5014 (name "open-adventure")
5015 (version (string-append "2.5-" revision "." (string-take commit 7)))
5016 (source (origin
5017 (method git-fetch)
5018 (uri (git-reference
5019 (url "https://gitlab.com/esr/open-adventure")
5020 (commit commit)))
5021 (file-name (string-append name "-" version "-checkout"))
5022 (sha256
5023 (base32
5024 "08bwrvf4axb1rsfd6ia1fddsky9pc1p350vjskhaakg2czc6dsk0"))))
5025 (build-system gnu-build-system)
5026 (arguments
5027 `(#:make-flags (list "CC=gcc")
5028 #:parallel-build? #f ; not supported
5029 #:phases
5030 (modify-phases %standard-phases
5031 (replace 'configure
5032 (lambda* (#:key inputs outputs #:allow-other-keys)
5033 ;; Linenoise is meant to be included, so we have to
5034 ;; copy it into the working directory.
5035 (let* ((linenoise (assoc-ref inputs "linenoise"))
5036 (noisepath (string-append linenoise "/include/linenoise"))
5037 (out (assoc-ref outputs "out")))
5038 (copy-recursively noisepath "linenoise"))
5039 #t))
5040 (add-before 'build 'use-echo
5041 (lambda _
5042 (substitute* "tests/Makefile"
5043 (("/bin/echo") (which "echo")))
5044 #t))
5045 (add-after 'build 'build-manpage
5046 (lambda _
5047 ;; This target is missing a dependency
5048 (substitute* "Makefile"
5049 ((".adoc.6:" line)
5050 (string-append line " advent.adoc")))
5051 (zero? (system* "make" ".adoc.6"))))
5052 ;; There is no install target
5053 (replace 'install
5054 (lambda* (#:key outputs #:allow-other-keys)
5055 (let* ((out (assoc-ref outputs "out"))
5056 (bin (string-append out "/bin"))
5057 (man (string-append out "/share/man/man6")))
5058 (install-file "advent" bin)
5059 (install-file "advent.6" man))
5060 #t)))))
5061 (native-inputs
5062 `(("asciidoc" ,asciidoc)
5063 ("linenoise" ,linenoise)
5064 ("python" ,python)
5065 ("python-pyyaml" ,python-pyyaml)))
5066 (home-page "https://gitlab.com/esr/open-adventure")
5067 (synopsis "Colossal Cave Adventure")
5068 (description "The original Colossal Cave Adventure from 1976 was the
5069 origin of all text adventures, dungeon-crawl (computer) games, and
5070 computer-hosted roleplaying games. This is the last version released by
5071 Crowther & Woods, its original authors, in 1995. It has been known as
5072 \"adventure 2.5\" and \"430-point adventure\".")
5073 (license license:bsd-2))))
5074
5075 (define-public tome4
5076 (package
5077 (name "tome4")
5078 (version "1.5.5")
5079 (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
5084 version ".tar.bz2"))
5085 (sha256
5086 (base32
5087 "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03"))
5088 (modules '((guix build utils)))
5089 (snippet
5090 '(substitute* '("src/music.h" "src/tSDL.h")
5091 (("#elif defined(__FreeBSD__)" line)
5092 (string-append
5093 line " || defined(__GNUC__)"))))))
5094 (build-system gnu-build-system)
5095 (native-inputs
5096 `(("unzip" ,unzip)))
5097 (inputs
5098 `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
5099 ("glu" ,glu)
5100 ("premake4" ,premake4)
5101 ("openal" ,openal)
5102 ("vorbis" ,libvorbis)
5103 ("luajit" ,luajit)))
5104 (arguments
5105 `(#:make-flags '("CC=gcc" "config=release")
5106 #:phases (modify-phases %standard-phases
5107 (replace 'configure
5108 (lambda _
5109 (zero? (system* "premake4" "gmake"))
5110 #t))
5111 (add-after 'set-paths 'set-sdl-paths
5112 (lambda* (#:key inputs #:allow-other-keys)
5113 (setenv "CPATH"
5114 (string-append (assoc-ref inputs "sdl-union")
5115 "/include/SDL2"))
5116 #t))
5117 (delete 'check)
5118 ;; premake doesn't provide install target
5119 (replace 'install
5120 (lambda* (#:key inputs outputs #:allow-other-keys)
5121 (let* ((out (assoc-ref outputs "out"))
5122 (usr (string-append out "/usr"))
5123 (bin (string-append out "/bin"))
5124 (licenses (string-append out "/share/licenses"))
5125 (documents (string-append out "/share/doc"))
5126 (pixmaps (string-append out "/share/pixmaps"))
5127 (icon "te4-icon.png")
5128 (data (string-append out "/share/" ,name))
5129 (applications (string-append
5130 out "/share/applications"))
5131 (unzip (string-append
5132 (assoc-ref inputs "unzip") "/bin/unzip"))
5133 (wrapper (string-append bin "/" ,name)))
5134 ;; icon
5135 (mkdir-p pixmaps)
5136 (system* unzip "-j"
5137 (string-append
5138 "game/engines/te4-" ,version ".teae")
5139 (string-append
5140 "data/gfx/" icon) "-d" pixmaps)
5141 ;; game executable
5142 (install-file "t-engine" data)
5143 (mkdir-p bin)
5144 (with-output-to-file wrapper
5145 (lambda ()
5146 (display
5147 (string-append
5148 "#!/bin/sh\n"
5149 ;; No bootstrap code found,
5150 ;; defaulting to working directory
5151 ;; for engine code!
5152 "cd " data "\n"
5153 "exec -a tome4 ./t-engine \"$@\"\n"))))
5154 (chmod wrapper #o555)
5155 ;; licenses
5156 (for-each (lambda (file)
5157 (install-file file licenses))
5158 '("COPYING" "COPYING-MEDIA"))
5159 ;; documents
5160 (for-each (lambda (file)
5161 (install-file file documents))
5162 '("CONTRIBUTING" "CREDITS"))
5163 ;; data
5164 (copy-recursively "bootstrap" (string-append
5165 data "/bootstrap"))
5166 (copy-recursively "game" (string-append data "/game"))
5167 ;; launcher
5168 (mkdir-p applications)
5169 (with-output-to-file (string-append applications "/"
5170 ,name ".desktop")
5171 (lambda ()
5172 (display
5173 (string-append
5174 "[Desktop Entry]
5175 Name=ToME4
5176 Comment=" ,synopsis "\n"
5177 "Exec=" ,name "\n"
5178 "Icon=" icon "\n"
5179 "Terminal=false
5180 Type=Application
5181 Categories=Game;RolePlaying;\n")))))
5182 #t)))))
5183 (home-page "https://te4.org")
5184 (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
5185 combat and advanced character building. Play as one of many unique races and
5186 classes in the lore-filled world of Eyal, exploring random dungeons, facing
5187 challenging battles, and developing characters with your own tailored mix of
5188 abilities and powers. With a modern graphical and customisable interface,
5189 intuitive mouse control, streamlined mechanics and deep, challenging combat,
5190 Tales of Maj’Eyal offers engaging roguelike gameplay for the 21st century.")
5191 (license license:gpl3+)))
5192
5193 (define-public quakespasm
5194 (package
5195 (name "quakespasm")
5196 (version "0.93.0")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
5201 version ".tgz"))
5202 (sha256
5203 (base32
5204 "0b2nz7w4za32pc34r62ql270z692qcjs2pm0i3svkxkvfammhdfq"))))
5205 (arguments
5206 `(#:tests? #f
5207 #:make-flags '("CC=gcc"
5208 "MP3LIB=mpg123"
5209 "USE_CODEC_FLAC=1"
5210 "USE_CODEC_MIKMOD=1"
5211 "USE_SDL2=1"
5212 "-CQuake")
5213 #:phases (modify-phases %standard-phases
5214 (delete 'configure)
5215 (add-after 'unpack 'fix-makefile-paths
5216 (lambda* (#:key outputs #:allow-other-keys)
5217 (let ((out (assoc-ref outputs "out")))
5218 (mkdir-p (string-append out "/bin"))
5219 (substitute* "Quake/Makefile"
5220 (("/usr/local/games")
5221 (string-append out "/bin")))
5222 #t))))))
5223 (build-system gnu-build-system)
5224 (inputs `(("libmikmod" ,libmikmod)
5225 ("libvorbis" ,libvorbis)
5226 ("flac" ,flac)
5227 ("mesa" ,mesa)
5228 ("mpg123" ,mpg123)
5229 ("sdl2" ,sdl2)))
5230 (synopsis "First person shooter engine for Quake 1")
5231 (description "Quakespasm is a modern engine for id software's Quake 1.
5232 It includes support for 64 bit CPUs, custom music playback, a new sound driver,
5233 some graphical niceities, and numerous bug-fixes and other improvements.")
5234 (home-page "http://quakespasm.sourceforge.net/")
5235 (license license:gpl2+)))
5236
5237 (define-public yamagi-quake2
5238 (package
5239 (name "yamagi-quake2")
5240 (version "7.10")
5241 (source
5242 (origin
5243 (method url-fetch)
5244 (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
5245 version ".tar.xz"))
5246 (sha256
5247 (base32
5248 "0psinbg25mysd58k99s1n34w31w5hj1vppb39gdjb0zqi6sl6cps"))))
5249 (build-system gnu-build-system)
5250 (arguments
5251 `(#:tests? #f
5252 #:make-flags
5253 (list "CC=gcc"
5254 ;; link openAL instead of using dlopen at runtime
5255 "DLOPEN_OPENAL=\"no\""
5256 ;; an optional directory where it will look for quake2 data files
5257 ;; in addition to the current working directory
5258 "WITH_SYSTEMWIDE=yes"
5259 "WITH_SYSTEMDIR=\"/opt/quake2\"")
5260 #:phases
5261 (modify-phases %standard-phases
5262 (delete 'configure)
5263 (replace 'install
5264 (lambda* (#:key outputs #:allow-other-keys)
5265 (let ((out (assoc-ref outputs "out")))
5266 (mkdir-p (string-append out "/lib"))
5267 (mkdir-p (string-append out "/bin"))
5268 ;; The yamagi-quake2 binary must be in the same directory
5269 ;; as it's engine libraries, but symlinking it to /bin is okay
5270 ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
5271 (copy-recursively "release"
5272 (string-append out "/lib/yamagi-quake2"))
5273 (symlink (string-append out "/lib/yamagi-quake2/quake2")
5274 (string-append out "/bin/yamagi-quake2"))
5275 (symlink (string-append out "/lib/yamagi-quake2/q2ded")
5276 (string-append out "/bin/yamagi-q2ded"))))))))
5277 (inputs `(("sdl2" ,sdl2)
5278 ("mesa" ,mesa)
5279 ("libvorbis" ,libvorbis)
5280 ("zlib" ,zlib)
5281 ("openal" ,openal)))
5282 (native-inputs `(("pkg-config" ,pkg-config)))
5283 (synopsis "First person shooter engine based on quake2")
5284 (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
5285 The main focus is an unchanged single player experience like back in 1997,
5286 thus the gameplay and the graphics are unaltered. However the user may use one
5287 of the unofficial retexturing packs. In comparison with the official client,
5288 over 1000 bugs were fixed and an extensive code audit done,
5289 making Yamagi Quake II one of the most solid Quake II implementations available.")
5290 (home-page "https://www.yamagi.org/quake2/")
5291 (license (list license:gpl2+ ; game and server
5292 (license:non-copyleft ; info-zip
5293 "file://LICENSE"
5294 "See Info-Zip section.")
5295 license:public-domain)))) ; stb
5296
5297 (define-public the-butterfly-effect
5298 (package
5299 (name "the-butterfly-effect")
5300 (version "0.9.3.1")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (string-append
5305 "https://github.com/the-butterfly-effect/tbe/archive/"
5306 "v" version ".tar.gz"))
5307 (file-name (string-append name "-" version ".tar.gz"))
5308 (sha256
5309 (base32
5310 "18qkp7fgdvyl3haqqa693mgyic7afsznsxgz98z9wn4csaqxsnby"))))
5311 (build-system gnu-build-system)
5312 (arguments
5313 `(#:phases
5314 (modify-phases %standard-phases
5315 (delete 'configure)
5316 ;; There is no "install" phase. By default, tbe is installed
5317 ;; in the build directory. Provide our own installation.
5318 (replace 'install
5319 (lambda* (#:key outputs #:allow-other-keys)
5320 (let* ((out (assoc-ref outputs "out"))
5321 (bin (string-append out "/bin"))
5322 (share (string-append out "/share")))
5323 (install-file "usr/games/tbe" bin)
5324 (mkdir-p share)
5325 (copy-recursively "usr/share" share)
5326 #t))))
5327 ;; Test suite requires a running Xorg server. Even when
5328 ;; provided, it fails with "D-Bus library appears to be
5329 ;; incorrectly set up; failed to read machine uuid: Failed to
5330 ;; open "/etc/machine-id": No such file or directory" along
5331 ;; with multiple "QPainter:: ... Painter not active" warnings.
5332 #:tests? #f))
5333 (inputs
5334 `(("qtbase" ,qtbase)
5335 ("qtsvg" ,qtsvg)))
5336 (native-inputs
5337 `(("cmake" ,cmake)
5338 ("gettext-minimal" ,gettext-minimal)
5339 ("qttools" ,qttools)))
5340 (synopsis "Realistic physics puzzle game")
5341 (description "The Butterfly Effect (tbe) is a game that uses
5342 realistic physics simulations to combine lots of simple mechanical
5343 elements to achieve a simple goal in the most complex way possible.")
5344 (home-page "http://the-butterfly-effect.org/")
5345 ;; Main license is GPL2-only. However, artwork is distributed
5346 ;; under various licenses, listed here.
5347 (license (list license:gpl2 license:public-domain license:expat
5348 license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))
5349
5350 (define-public pioneer
5351 (package
5352 (name "pioneer")
5353 (version "20171001")
5354 (source (origin
5355 (method url-fetch)
5356 (uri (string-append "https://github.com/pioneerspacesim/pioneer/"
5357 "archive/" version ".tar.gz"))
5358 (file-name (string-append name "-" version ".tar.gz"))
5359 (sha256
5360 (base32
5361 "1nxhx22swfqq6lfvcnpfm31wig3sjv5pp0rslj79nbxc7nyihh8m"))))
5362 (build-system gnu-build-system)
5363 (native-inputs
5364 `(("autoconf" ,autoconf)
5365 ("automake" ,automake)
5366 ("pkg-config" ,pkg-config)))
5367 (inputs
5368 `(("assimp" ,assimp)
5369 ("curl" ,curl)
5370 ("freetype" ,freetype)
5371 ("glu" ,glu)
5372 ("libpng" ,libpng)
5373 ("libsigc++" ,libsigc++)
5374 ("libvorbis" ,libvorbis)
5375 ("lua" ,lua-5.2) ;not compatible with 5.3
5376 ("mesa" ,mesa)
5377 ("sdl" ,(sdl-union (list sdl2 sdl2-image)))))
5378 (arguments
5379 `(#:tests? #f ;tests are broken
5380 #:configure-flags (list "--with-external-liblua"
5381 (string-append "PIONEER_DATA_DIR="
5382 %output "/share/games/pioneer"))
5383 #:phases (modify-phases %standard-phases
5384 (add-after 'unpack 'bootstrap
5385 (lambda _ (zero? (system* "sh" "bootstrap"))))
5386 (add-before 'bootstrap 'fix-lua-check
5387 (lambda _
5388 (substitute* "configure.ac"
5389 (("lua5.2")
5390 (string-append "lua-" ,(version-major+minor
5391 (package-version lua-5.2))))))))))
5392 (home-page "http://pioneerspacesim.net")
5393 (synopsis "Game of lonely space adventure")
5394 (description
5395 "Pioneer is a space adventure game set in our galaxy at the turn of the
5396 31st century. The game is open-ended, and you are free to eke out whatever
5397 kind of space-faring existence you can think of. Look for fame or fortune by
5398 exploring the millions of star systems. Turn to a life of crime as a pirate,
5399 smuggler or bounty hunter. Forge and break alliances with the various
5400 factions fighting for power, freedom or self-determination. The universe is
5401 whatever you make of it.")
5402 (license license:gpl3)))