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