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