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