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