gnu: Add PadWalker.
[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 © 2014 David Thompson <dthompson2@worcester.edu>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
6 ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
7 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
8 ;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages games)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix utils)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages admin)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages guile)
43 #:use-module (gnu packages libcanberra)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages xorg)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages sdl)
52 #:use-module (gnu packages texinfo)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages qt)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages zip)
62 #:use-module (gnu packages xiph)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages lua)
65 #:use-module (gnu packages video)
66 #:use-module (gnu packages xml)
67 #:use-module (guix build-system trivial)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system trivial))
71
72 (define-public gnubg
73 (package
74 (name "gnubg")
75 (version "1.02")
76 (source
77 (origin
78 (method url-fetch)
79 (uri (string-append "http://files.gnubg.org/media/sources/gnubg-release-"
80 version ".000-sources." "tar.gz"))
81 (sha256
82 (base32
83 "015mvjk2iw1cg1kxwxfnvp2rxb9cylf6yc39i30fdy414k07zkky"))))
84 (build-system gnu-build-system)
85 (inputs `(("glib" ,glib)
86 ("readline" ,readline)
87 ("gtk+" ,gtk+-2)
88 ("mesa" ,mesa)
89 ("glu" ,glu)
90 ("gtkglext" ,gtkglext)
91 ("sqlite" ,sqlite)
92 ("libcanberra" ,libcanberra)))
93 (native-inputs `(("python-2" ,python-2)
94 ("pkg-config" ,pkg-config)))
95 (home-page "http://gnubg.org")
96 (synopsis "Backgammon game")
97 (description "The GNU backgammon application can be used for playing, analyzing and
98 teaching the game. It has an advanced evaluation engine based on artificial
99 neural networks suitable for both beginners and advanced players. In
100 addition to a command-line interface, it also features an attractive, 3D
101 representation of the playing board.")
102 (license license:gpl3+)))
103
104 (define-public gnubik
105 (package
106 (name "gnubik")
107 (version "2.4.1")
108 (source
109 (origin
110 (method url-fetch)
111 (uri (string-append "mirror://gnu/gnubik/gnubik-"
112 version ".tar.gz"))
113 (sha256
114 (base32
115 "0mfpwz341i1qpzi2qgslpc5i7d4fv7i01kv392m11pczqdc7i7m5"))))
116 (build-system gnu-build-system)
117 (inputs `(("gtk+" ,gtk+-2)
118 ("mesa" ,mesa)
119 ("glu" ,glu)
120 ("libx11" ,libx11)
121 ("guile" ,guile-2.0)
122 ("gtkglext" ,gtkglext)))
123 (native-inputs `(("gettext" ,gnu-gettext)
124 ("pkg-config" ,pkg-config)))
125 (home-page "https://www.gnu.org/software/gnubik/")
126 (synopsis "3d Rubik's cube game")
127 (description
128 "GNUbik is a puzzle game in which you must manipulate a cube to make
129 each of its faces have a uniform color. The game is customizable, allowing
130 you to set the size of the cube (the default is 3x3) or to change the colors.
131 You may even apply photos to the faces instead of colors. The game is
132 scriptable with Guile.")
133 (license license:gpl3+)))
134
135 (define-public abbaye
136 (package
137 (name "abbaye")
138 (version "1.13")
139 (source
140 (origin
141 (method url-fetch)
142 (uri (string-append "http://abbaye-for-linux.googlecode.com/files/abbaye-for-linux-src-"
143 version ".tar.gz"))
144 (sha256
145 (base32
146 "1wgvckgqa2084rbskxif58wbb83xbas8s1i8s7d57xbj08ryq8rk"))))
147 (build-system gnu-build-system)
148 (arguments
149 '(#:modules ((ice-9 match)
150 (guix build gnu-build-system)
151 (guix build utils))
152 #:phases (alist-cons-after
153 'set-paths 'set-sdl-paths
154 (lambda* (#:key inputs outputs (search-paths '()) #:allow-other-keys)
155 (define input-directories
156 (match inputs
157 (((_ . dir) ...)
158 dir)))
159 ;; This package does not use pkg-config, so modify CPATH
160 ;; variable to point to include/SDL for SDL header files.
161 (set-path-environment-variable "CPATH"
162 '("include/SDL")
163 input-directories))
164 (alist-cons-after
165 'patch-source-shebangs 'patch-makefile
166 (lambda* (#:key outputs #:allow-other-keys)
167 ;; Replace /usr with package output directory.
168 (for-each (lambda (file)
169 (substitute* file
170 (("/usr") (assoc-ref outputs "out"))))
171 '("makefile" "src/pantallas.c" "src/comun.h")))
172 (alist-cons-before
173 'install 'make-install-dirs
174 (lambda* (#:key outputs #:allow-other-keys)
175 (let ((prefix (assoc-ref outputs "out")))
176 ;; Create directories that the makefile assumes exist.
177 (mkdir-p (string-append prefix "/bin"))
178 (mkdir-p (string-append prefix "/share/applications"))
179 (mkdir-p (string-append prefix "/share/pixmaps"))))
180 ;; No configure script.
181 (alist-delete 'configure %standard-phases))))
182 #:tests? #f)) ;; No check target.
183 (native-inputs `(("pkg-config" ,pkg-config)))
184 (inputs `(("sdl" ,sdl)
185 ("sdl-gfx" ,sdl-gfx)
186 ("sdl-image" ,sdl-image)
187 ("sdl-mixer" ,sdl-mixer)
188 ("sdl-ttf" ,sdl-ttf)))
189 (home-page "http://code.google.com/p/abbaye-for-linux/")
190 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
191 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
192 France. The Cathars, who preach about good Christian beliefs, were being
193 expelled by the Catholic Church out of the Languedoc region in France. One of
194 them, called Jean Raymond, found an old church in which to hide, not knowing
195 that beneath its ruins lay buried an ancient evil.")
196 (license license:gpl3+)))
197
198 (define-public pingus
199 (package
200 (name "pingus")
201 (version "0.7.6")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (string-append "http://pingus.googlecode.com/files/pingus-"
206 version ".tar.bz2"))
207 (sha256
208 (base32
209 "0q34d2k6anzqvb0mf67x85q92lfx9jr71ry13dlp47jx0x9i573m"))
210 (patches (list (search-patch "pingus-sdl-libs-config.patch")))))
211 (build-system gnu-build-system)
212 (native-inputs `(("pkg-config" ,pkg-config)
213 ("scons" ,scons)))
214 (inputs `(("sdl" ,sdl)
215 ("sdl-image" ,sdl-image)
216 ("sdl-mixer" ,sdl-mixer)
217 ("mesa" ,mesa)
218 ("glu" ,glu)
219 ("libpng" ,libpng)
220 ("boost" ,boost)))
221 (arguments
222 '(#:tests? #f ;no check target
223 #:phases
224 (alist-delete
225 'configure
226 (alist-replace
227 'install
228 (lambda* (#:key outputs #:allow-other-keys)
229 (zero? (system* "make" "install"
230 (string-append "PREFIX="
231 (assoc-ref outputs "out")))))
232 %standard-phases))))
233 (home-page "http://pingus.seul.org/welcome.html")
234 (synopsis "Lemmings clone")
235 (description
236 "Pingus is a free Lemmings-like puzzle game in which the player takes
237 command of a bunch of small animals and has to guide them through levels.
238 Since the animals walk on their own, the player can only influence them by
239 giving them commands, like build a bridge, dig a hole, or redirect all animals
240 in the other direction. Multiple such commands are necessary to reach the
241 level's exit. The game is presented in a 2D side view.")
242 ;; Some source files are under bsd-3 and gpl2+ licenses.
243 (license license:gpl3+)))
244
245 (define-public talkfilters
246 (package
247 (name "talkfilters")
248 (version "2.3.8")
249 (source
250 (origin
251 (method url-fetch)
252 (uri (string-append "http://www.hyperrealm.com/" name "/"
253 name "-" version ".tar.gz"))
254 (sha256
255 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
256 (build-system gnu-build-system)
257 (home-page "http://www.gnu.org/software/talkfilters")
258 (synopsis "Convert English text to humorous dialects")
259 (description "The GNU Talk Filters are programs that convert English text
260 into stereotyped or otherwise humorous dialects. The filters are provided as
261 a C library, so they can easily be integrated into other programs.")
262 (license license:gpl2+)))
263
264 (define-public cmatrix
265 (package
266 (name "cmatrix")
267 (version "1.2a")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (string-append "http://www.asty.org/cmatrix/dist/cmatrix-" version
272 ".tar.gz"))
273 (sha256
274 (base32
275 "0k06fw2n8nzp1pcdynhajp5prba03gfgsbj91bknyjr5xb5fd9hz"))))
276 (build-system gnu-build-system)
277 (arguments
278 '(#:phases
279 (alist-replace 'configure
280 (lambda* (#:key outputs #:allow-other-keys)
281 ;; This old `configure' script doesn't support
282 ;; variables passed as arguments.
283 (let ((out (assoc-ref outputs "out")))
284 (setenv "CONFIG_SHELL" (which "bash"))
285 (zero?
286 (system* "./configure"
287 (string-append "--prefix=" out)))))
288 %standard-phases)))
289 (inputs `(("ncurses" ,ncurses)))
290 (home-page "http://www.asty.org/cmatrix")
291 (synopsis "Simulate the display from \"The Matrix\"")
292 (description "CMatrix simulates the display from \"The Matrix\" and is
293 based on the screensaver from the movie's website. It works with terminal
294 settings up to 132x300 and can scroll lines all at the same rate or
295 asynchronously and at a user-defined speed.")
296 (license license:gpl2+)))
297
298 (define-public chess
299 (package
300 (name "chess")
301 (version "6.1.1")
302 (source
303 (origin
304 (method url-fetch)
305 (uri (string-append "mirror://gnu/chess/gnuchess-" version
306 ".tar.gz"))
307 (sha256
308 (base32
309 "1jckpg1qi1vjr3pqs0dnip3rmn0mgklx63xflrpqiv3cx2qlz8kn"))))
310 (build-system gnu-build-system)
311 (home-page "http://www.gnu.org/software/chess")
312 (synopsis "Full chess implementation")
313 (description "GNU Chess is a chess engine. It allows you to compete
314 against the computer in a game of chess, either through the default terminal
315 interface or via an external visual interface such as GNU XBoard.")
316 (license license:gpl3+)))
317
318 (define freedink-engine
319 (package
320 (name "freedink-engine")
321 (version "108.4")
322 (source (origin
323 (method url-fetch)
324 (uri (string-append "mirror://gnu/freedink/freedink-" version
325 ".tar.gz"))
326 (sha256
327 (base32
328 "08c51imfjfcydm7h0va09z8qfw5nc837bi2x754ni2z737hb5kw2"))))
329 (build-system gnu-build-system)
330 (arguments `(#:configure-flags '("--disable-embedded-resources")))
331 (native-inputs `(("gettext" ,gnu-gettext)
332 ("pkg-config" ,pkg-config)))
333 (inputs `(("sdl" ,sdl)
334 ("sdl-image" ,sdl-image)
335 ("sdl-mixer" ,sdl-mixer)
336 ("sdl-ttf" ,sdl-ttf)
337 ("sdl-gfx" ,sdl-gfx)
338 ("fontconfig" ,fontconfig)
339 ("check" ,check)))
340 (home-page "http://www.gnu.org/software/freedink/")
341 (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
342 (description
343 "GNU FreeDink is a free and portable re-implementation of the engine
344 for the role-playing game Dink Smallwood. It supports not only the original
345 game data files but it also supports user-produced game mods or \"D-Mods\".
346 To that extent, it also includes a front-end for managing all of your D-Mods.")
347 (license license:gpl3+)))
348
349 (define freedink-data
350 (package
351 (name "freedink-data")
352 (version "1.08.20140901")
353 (source (origin
354 (method url-fetch)
355 (uri (string-append "mirror://gnu/freedink/freedink-data-"
356 version ".tar.gz"))
357 (sha256
358 (base32
359 "04f1aa8gfz30qkgv7chjz5n1s8v5hbqs01h2113cq1ylm3isd5sp"))))
360 (build-system gnu-build-system)
361 (arguments
362 `(#:phases (alist-delete 'configure (alist-delete 'check %standard-phases))
363 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
364 (home-page "http://www.gnu.org/software/freedink/")
365 (synopsis "Game data for GNU Freedink")
366 (description
367 "This package contains the game data of GNU Freedink.")
368 (license license:gpl3+)))
369
370 ;; TODO: Add freedink-dfarc when there's a wxWidgets package.
371
372 (define-public freedink
373 ;; This is a wrapper that tells the engine where to find the data.
374 (package (inherit freedink-engine)
375 (name "freedink")
376 (build-system trivial-build-system)
377 (arguments
378 '(#:builder (begin
379 (use-modules (guix build utils))
380
381 (let* ((output (assoc-ref %outputs "out"))
382 (bin (string-append output "/bin"))
383 (executable (string-append bin "/freedink")))
384 (mkdir-p bin)
385 (call-with-output-file executable
386 (lambda (port)
387 (format port "#!~a/bin/sh
388 exec ~a/bin/freedink -refdir ~a/share/dink\n"
389 (assoc-ref %build-inputs "bash")
390 (assoc-ref %build-inputs "engine")
391 (assoc-ref %build-inputs "data"))
392 (chmod port #o777)))))
393 #:modules ((guix build utils))))
394 (inputs `(("engine" ,freedink-engine)
395 ("data" ,freedink-data)
396 ("bash" ,bash)))
397 (native-inputs '())))
398
399 (define-public xboard
400 (package
401 (name "xboard")
402 (version "4.8.0")
403 (source
404 (origin
405 (method url-fetch)
406 (uri (string-append "mirror://gnu/xboard/xboard-" version
407 ".tar.gz"))
408 (sha256
409 (base32
410 "05rdj0nyirc4g1qi5hhrjy45y52ihp1j3ldq2c5bwrz0gzy4i3y8"))))
411 (build-system gnu-build-system)
412 (inputs `(("cairo" ,cairo)
413 ("librsvg" ,librsvg)
414 ("libxt" ,libxt)
415 ("libxaw" ,libxaw)))
416 (native-inputs `(("texinfo" ,texinfo)
417 ("pkg-config" ,pkg-config)))
418 (home-page "http://www.gnu.org/software/xboard")
419 (synopsis "Graphical user interface for chess programs")
420 (description "GNU XBoard is a graphical board for all varieties of chess,
421 including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
422 and Makruk. Several lesser-known variants are also supported. It presents a
423 fully interactive graphical interface and it can load and save games in the
424 Portable Game Notation.")
425 (license license:gpl3+)))
426
427
428 (define-public xboing
429 (package
430 (name "xboing")
431 (version "2.4")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (string-append "http://www.techrescue.org/xboing/xboing"
436 version ".tar.gz"))
437 (sha256
438 (base32 "16m2si8wmshxpifk861vhpqviqxgcg8bxj6wfw8hpnm4r2w9q0b7"))))
439 (arguments
440 `(#:tests? #f
441 #:phases
442 (alist-replace
443 'configure
444 (lambda* (#:key outputs #:allow-other-keys)
445
446 (substitute* "Imakefile"
447 (("XPMINCLUDE[\t ]*= -I/usr/X11/include/X11")
448 (string-append "XPMINCLUDE = -I" (assoc-ref %build-inputs "libxpm")
449 "/include/X11")))
450
451 (substitute* "Imakefile"
452 (("XBOING_DIR = \\.") "XBOING_DIR=$(PROJECTROOT)"))
453
454 ;; FIXME: HIGH_SCORE_FILE should be set to somewhere writeable
455
456 (zero? (system* "xmkmf" "-a"
457 (string-append "-DProjectRoot="
458 (assoc-ref outputs "out")))))
459 (alist-replace 'install
460 (lambda* (#:key outputs #:allow-other-keys)
461 (and
462 (zero? (system* "make" "install.man"))
463 (zero? (system* "make" "install"))))
464 %standard-phases))))
465 (inputs `(("libx11" ,libx11)
466 ("libxext" ,libxext)
467 ("libxpm" ,libxpm)))
468 (native-inputs `(("imake" ,imake)
469 ("inetutils" ,inetutils)
470 ("makedepend" ,makedepend)))
471 (build-system gnu-build-system)
472 (home-page "http://www.techrescue.org/xboing")
473 (synopsis "Ball and paddle game")
474 (description "XBoing is a blockout type game where you have a paddle which
475 you control to bounce a ball around the game zone destroying blocks with a
476 proton ball. Each block carries a different point value. The more blocks you
477 destroy, the better your score. The person with the highest score wins.")
478 (license (license:x11-style "file://COPYING"
479 "Very similar to the X11 licence."))))
480
481 (define-public gtypist
482 (package
483 (name "gtypist")
484 (version "2.9.5")
485 (source (origin
486 (method url-fetch)
487 (uri (string-append "mirror://gnu/gtypist/gtypist-"
488 version ".tar.xz"))
489 (sha256
490 (base32
491 "0xzrkkmj0b1dw3yr0m9hml2y634cc4h61im6zwcq57s7285z8fn1"))
492 (modules '((guix build utils)))
493 (snippet
494 ;; We do not provide `ncurses.h' within an `ncursesw'
495 ;; sub-directory, so patch the source accordingly. See
496 ;; <http://bugs.gnu.org/19018>.
497 '(for-each (lambda (file)
498 (substitute* file
499 (("ncursesw/ncurses.h")
500 "ncurses.h")))
501 (find-files "." "configure$|\\.c$")))))
502 (build-system gnu-build-system)
503 (inputs `(("ncurses" ,ncurses)
504 ("perl" ,perl)))
505 (home-page "http://www.gnu.org/software/gtypist/")
506 (synopsis "Typing tutor")
507 (description
508 "GNU Typist is a universal typing tutor. It can be used to learn and
509 practice touch-typing. Several tutorials are included; in addition to
510 tutorials for the standard QWERTY layout, there are also tutorials for the
511 alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
512 are primarily in English, however some in other languages are provided.")
513 (license license:gpl3+)))
514
515 (define-public openal
516 (package
517 (name "openal")
518 (version "1.15.1")
519 (source (origin
520 (method url-fetch)
521 (uri (string-append
522 "http://kcat.strangesoft.net/openal-releases/openal-soft-"
523 version ".tar.bz2"))
524 (sha256
525 (base32
526 "0mmhdqiyb3c9dzvxspm8h2v8jibhi8pfjxnf6m0wn744y1ia2a8f"))))
527 (build-system cmake-build-system)
528 (arguments
529 `(#:tests? #f)) ; no check target
530 (inputs
531 `(("alsa-lib" ,alsa-lib)
532 ("pulseaudio" ,pulseaudio)))
533 (synopsis "3D audio API")
534 (description
535 "OpenAL provides capabilities for playing audio in a virtual 3D
536 environment. Distance attenuation, doppler shift, and directional sound
537 emitters are among the features handled by the API. More advanced effects,
538 including air absorption, occlusion, and environmental reverb, are available
539 through the EFX extension. It also facilitates streaming audio, multi-channel
540 buffers, and audio capture.")
541 (home-page "http://kcat.strangesoft.net/openal.html")
542 (license license:lgpl2.0+)))
543
544 (define-public irrlicht
545 (package
546 (name "irrlicht")
547 (version "1.8.1")
548 (source (origin
549 (method url-fetch)
550 (uri (string-append
551 "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
552 (version-major+minor version)
553 "/" version "/irrlicht-" version ".zip"))
554 (sha256
555 (base32
556 "0yz9lvsc8aqk8wj4rnpanxrw90gqpwn9w5hxp94r8hnm2q0vjjw1"))))
557 (build-system gnu-build-system)
558 (arguments
559 '(#:phases (alist-cons-after
560 'unpack 'fix-build-env
561 (lambda* (#:key outputs #:allow-other-keys)
562 (let ((out (assoc-ref outputs "out")))
563 (substitute* "Makefile"
564 (("INSTALL_DIR = /usr/local/lib")
565 (string-append "INSTALL_DIR = " out "/lib")))
566 ;; The Makefile assumes these directories exist.
567 (mkdir-p (string-append out "/lib"))
568 (mkdir-p (string-append out "/include"))))
569 (alist-replace
570 'unpack
571 (lambda* (#:key source #:allow-other-keys)
572 (and (zero? (system* "unzip" source))
573 ;; The actual source is buried a few directories deep.
574 (chdir "irrlicht-1.8.1/source/Irrlicht/")))
575 (alist-cons-after
576 'unpack 'apply-patch/mesa-10-fix
577 (lambda* (#:key inputs #:allow-other-keys)
578 (zero? (system* "patch" "--force" "-p3" "-i"
579 (assoc-ref inputs "patch/mesa-10-fix"))))
580 ;; No configure script
581 (alist-delete 'configure %standard-phases))))
582 #:tests? #f ; no check target
583 #:make-flags '("CC=gcc" "sharedlib")))
584 (native-inputs
585 `(("patch/mesa-10-fix" ,(search-patch "irrlicht-mesa-10.patch"))
586 ("unzip" ,unzip)))
587 (inputs
588 `(("mesa" ,mesa)
589 ("glu" ,glu)))
590 (synopsis "3D game engine written in C++")
591 (description
592 "The Irrlicht Engine is a high performance realtime 3D engine written in
593 C++. Features include an OpenGL renderer, extensible materials, scene graph
594 management, character animation, particle and other special effects, support
595 for common mesh file formats, and collision detection.")
596 (home-page "http://irrlicht.sourceforge.net/")
597 (license license:zlib)))
598
599 (define minetest-data
600 (package
601 (name "minetest-data")
602 (version "0.4.11")
603 (source (origin
604 (method url-fetch)
605 (uri (string-append
606 "https://github.com/minetest/minetest_game/archive/"
607 version ".tar.gz"))
608 (file-name (string-append name "-" version ".tar.gz"))
609 (sha256
610 (base32
611 "0hzb27srv6f2j84dpxx2p0p0aaq9vdp5jvbrfpklb5q5ssdjxvc6"))))
612 (build-system trivial-build-system)
613 (native-inputs
614 `(("source" ,source)
615 ("tar" ,tar)
616 ("gzip" ,(@ (gnu packages compression) gzip))))
617 (arguments
618 `(#:modules ((guix build utils))
619 #:builder (begin
620 (use-modules (guix build utils))
621 (let ((tar (string-append (assoc-ref %build-inputs "tar")
622 "/bin/tar"))
623 (install-dir (string-append
624 %output
625 "/share/minetest/games/minetest_game"))
626 (path (string-append (assoc-ref %build-inputs
627 "gzip")
628 "/bin")))
629 (setenv "PATH" path)
630 (system* tar "xvf" (assoc-ref %build-inputs "source"))
631 (chdir (string-append "minetest_game-" ,version))
632 (mkdir-p install-dir)
633 (copy-recursively "." install-dir)))))
634 (synopsis "Main game data for the Minetest game engine")
635 (description
636 "Game data for the Minetest infinite-world block sandox game.")
637 (home-page "http://minetest.net")
638 (license license:lgpl2.1+)))
639
640 (define-public minetest
641 (package
642 (name "minetest")
643 (version "0.4.11")
644 (source (origin
645 (method url-fetch)
646 (uri (string-append
647 "https://github.com/minetest/minetest/archive/"
648 version ".tar.gz"))
649 (file-name (string-append name "-" version ".tar.gz"))
650 (sha256
651 (base32
652 "0h223svzkvp63b77nqfxy7k8whw4543gahs3kxd3x4myi5ax5z5f"))))
653 (build-system cmake-build-system)
654 (arguments
655 '(#:modules ((guix build utils)
656 (guix build cmake-build-system)
657 (ice-9 match))
658 #:phases (alist-cons-before
659 'configure 'set-cpath
660 (lambda* (#:key inputs #:allow-other-keys)
661 (use-modules (ice-9 match))
662 ;; Adjust the CPATH so that cmake can find irrlicht,
663 ;; openal, and curl headers.
664 (set-path-environment-variable "CPATH"
665 '("include/AL"
666 "include/irrlicht"
667 "include/curl"
668 "include")
669 (map (match-lambda
670 ((_ . dir) dir))
671 inputs)))
672 %standard-phases)
673 #:configure-flags '("-DRUN_IN_PLACE=0"
674 "-DENABLE_FREETYPE=1"
675 "-DENABLE_GETTEXT=1")
676 #:tests? #f)) ; no check target
677 (native-search-paths
678 (list (search-path-specification
679 (variable "MINETEST_SUBGAME_PATH")
680 (files '("share/minetest/games")))))
681 (native-inputs
682 `(("pkg-config" ,pkg-config)))
683 (inputs
684 `(("irrlicht" ,irrlicht)
685 ("libpng" ,libpng)
686 ("libjpeg-8" ,libjpeg-8)
687 ("libxxf86vm" ,libxxf86vm)
688 ("mesa" ,mesa)
689 ("libogg" ,libogg)
690 ("libvorbis" ,libvorbis)
691 ("openal" ,openal)
692 ("freetype" ,(@ (gnu packages fontutils) freetype))
693 ("curl" ,curl)
694 ("luajit" ,luajit)
695 ("gettext" ,gnu-gettext)
696 ("sqlite" ,sqlite)))
697 (propagated-inputs
698 `(("minetest-data" ,minetest-data)))
699 (synopsis "Infinite-world block sandbox game")
700 (description
701 "Minetest is a sandbox construction game. Players can create and destroy
702 various types of blocks in a three-dimensional open world. This allows
703 forming structures in every possible creation, on multiplayer servers or as a
704 single player. Mods and texture packs allow players to personalize the game
705 in different ways.")
706 (home-page "http://minetest.net")
707 (license license:lgpl2.1+)))
708
709 (define glkterm
710 (package
711 (name "glkterm")
712 (version "1.0.4")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
717 "glk/implementations/glkterm-104.tar.gz"))
718 (sha256
719 (base32
720 "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
721 (build-system gnu-build-system)
722 (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
723 (arguments
724 '(#:tests? #f ; no check target
725 #:phases
726 (alist-replace
727 'install
728 (lambda* (#:key outputs #:allow-other-keys)
729 (let* ((out (assoc-ref outputs "out"))
730 (inc (string-append out "/include")))
731 (mkdir-p inc)
732 (for-each
733 (lambda (file)
734 (copy-file file (string-append inc "/" file)))
735 '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
736 (mkdir (string-append out "/lib"))
737 (copy-file "libglkterm.a" (string-append out "/lib/libglkterm.a"))))
738 (alist-delete 'configure %standard-phases))))
739 (home-page "http://www.eblong.com/zarf/glk/")
740 (synopsis "Curses Implementation of the Glk API")
741 (description
742 "Glk defines a portable API for applications with text UIs. It was
743 primarily designed for interactive fiction, but it should be suitable for many
744 interactive text utilities, particularly those based on a command line.
745 This is an implementation of the Glk library which runs in a terminal window,
746 using the curses.h library for screen control.")
747 (license (license:fsf-free "file://README"))))
748
749 (define-public glulxe
750 (package
751 (name "glulxe")
752 (version "0.5.2")
753 (source
754 (origin
755 (method url-fetch)
756 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
757 "glulx/interpreters/glulxe/glulxe-052.tar.gz"))
758 (sha256
759 (base32
760 "19iw6kl8ncqcy9pv4gsqfh3xsa1n94zd234rqavvmxccnf3nj19g"))))
761 (build-system gnu-build-system)
762 (inputs `(("glk" ,glkterm)))
763 (arguments
764 '(#:tests? #f ; no check target
765 #:make-flags
766 (let* ((glk (assoc-ref %build-inputs "glk")))
767 (list (string-append "GLKINCLUDEDIR=" glk "/include")
768 (string-append "GLKLIBDIR=" glk "/lib")
769 (string-append "GLKMAKEFILE=" "Make.glkterm")))
770 #:phases
771 (alist-replace
772 'install
773 (lambda* (#:key outputs #:allow-other-keys)
774 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
775 (mkdir-p bin)
776 (copy-file "glulxe" (string-append bin "/glulxe"))))
777 (alist-delete 'configure %standard-phases))))
778 (home-page "http://www.eblong.com/zarf/glulx/")
779 (synopsis "Interpreter for Glulx VM")
780 (description
781 "Glulx is a 32-bit portable virtual machine intended for writing and
782 playing interactive fiction. It was designed by Andrew Plotkin to relieve
783 some of the restrictions in the venerable Z-machine format. This is the
784 reference interpreter, using Glk API.")
785 (license (license:fsf-free "file://README"))))
786
787 (define-public retroarch
788 (package
789 (name "retroarch")
790 (version "1.0.0.3-beta")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (string-append "https://github.com/libretro/RetroArch/archive/"
795 version ".tar.gz"))
796 (file-name (string-append name "-" version ".tar.gz"))
797 (sha256
798 (base32 "1iqcrb076xiih20sk8n1w79xsp4fb8pj4vkmdc1xn562h56y4nxx"))))
799 (build-system gnu-build-system)
800 (arguments
801 '(#:tests? #f ; no tests
802 #:phases
803 (alist-replace
804 'configure
805 (lambda _
806 (substitute* "qb/qb.libs.sh"
807 (("/bin/true") (which "true")))
808 (zero? (system*
809 "./configure"
810 (string-append "--prefix=" %output)
811 (string-append "--global-config-dir=" %output "/etc"))))
812 %standard-phases)))
813 (inputs
814 `(("alsa-lib" ,alsa-lib)
815 ("ffmpeg" ,ffmpeg)
816 ("freetype" ,freetype)
817 ("libxinerama" ,libxinerama)
818 ("libxkbcommon" ,libxkbcommon)
819 ("libxml2" ,libxml2)
820 ("libxv" ,libxv)
821 ("mesa" ,mesa)
822 ("openal" ,openal)
823 ("pulseaudio" ,pulseaudio)
824 ("python" ,python)
825 ("sdl" ,sdl2)
826 ("udev" ,eudev)
827 ("zlib" ,zlib)))
828 (native-inputs
829 `(("pkg-config" ,pkg-config)
830 ("which" ,which)))
831 (home-page "http://www.libretro.com/")
832 (synopsis "Reference frontend for the libretro API")
833 (description
834 "Libretro is a simple but powerful development interface that allows for
835 the easy creation of emulators, games and multimedia applications that can plug
836 straight into any libretro-compatible frontend. RetroArch is the official
837 reference frontend for the libretro API, currently used by most as a modular
838 multi-system game/emulator system.")
839 (license license:gpl3+)))
840
841 (define-public gnugo
842 (package
843 (name "gnugo")
844 (version "3.8")
845 (source (origin
846 (method url-fetch)
847 (uri (string-append "mirror://gnu/gnugo/gnugo-" version
848 ".tar.gz"))
849 (sha256
850 (base32
851 "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
852 (build-system gnu-build-system)
853 (inputs `(("readline" ,readline)))
854 (synopsis "Play the game of Go")
855 (description "GNU Go is a program that plays the game of Go, in which
856 players place stones on a grid to form territory or capture other stones.
857 While it can be played directly from the terminal, rendered in ASCII
858 characters, it is also possible to play GNU Go with 3rd party graphical
859 interfaces or even in Emacs. It supports the standard game storage format
860 (SGF, Smart Game Format) and inter-process communication format (GMP, Go
861 Modem Protocol).")
862 (home-page "http://www.gnu.org/software/gnugo/")
863 (license license:gpl3+)))