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