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