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