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