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