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