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