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