projects/guix·blob java-team · refs

14501 lines · 587.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 John Darrington <[email protected]>
3;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
4;;; Copyright © 2014, 2015 David Thompson <[email protected]>
5;;; Copyright © 2014-2025 Eric Bavier <[email protected]>
6;;; Copyright © 2014 Cyrill Schenkel <[email protected]>
7;;; Copyright © 2014 Sylvain Beucler <[email protected]>
8;;; Copyright © 2014-2015, 2018-2019, 2021, 2026 Ludovic Courtès <[email protected]>
9;;; Copyright © 2014, 2015, 2016, 2024 宋文武 <[email protected]>
10;;; Copyright © 2014, 2015, 2019 Mark H Weaver <[email protected]>
11;;; Copyright © 2015, 2016 Andreas Enge <[email protected]>
12;;; Copyright © 2015 David Hashe <[email protected]>
13;;; Copyright © 2015, 2017, 2018, 2021 Christine Lemmer-Webber <[email protected]>
14;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus <[email protected]>
15;;; Copyright © 2015, 2016, 2017 Alex Kost <[email protected]>
16;;; Copyright © 2015 Paul van der Walt <[email protected]>
17;;; Copyright © 2016, 2017 Rodger Fox <[email protected]>
18;;; Copyright © 2016, 2017, 2018 Nikita <[email protected]>
19;;; Copyright © 2016 Albin Söderqvist <[email protected]>
20;;; Copyright © 2016, 2017, 2018, 2019, 2020 Kei Kebreau <[email protected]>
21;;; Copyright © 2016 Alex Griffin <[email protected]>
22;;; Copyright © 2016-2021, 2023-2025 Efraim Flashner <[email protected]>
23;;; Copyright © 2016 Jan Nieuwenhuizen <[email protected]>
24;;; Copyright © 2016 Steve Webber <[email protected]>
25;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <[email protected]>
26;;; Copyright © 2017, 2018, 2020 Arun Isaac <[email protected]>
27;;; Copyright © 2017–2024 Tobias Geerinckx-Rice <[email protected]>
28;;; Copyright © 2017, 2019 nee <[email protected]>
29;;; Copyright © 2017 Clément Lassieur <[email protected]>
30;;; Copyright © 2017, 2019, 2020 Marius Bakke <[email protected]>
31;;; Copyright © 2017, 2018 Rutger Helling <[email protected]>
32;;; Copyright © 2017 Roel Janssen <[email protected]>
33;;; Copyright © 2017-2026 Nicolas Goaziou <[email protected]>
34;;; Copyright © 2018 okapi <[email protected]>
35;;; Copyright © 2018 Tim Gesthuizen <[email protected]>
36;;; Copyright © 2018 Madalin Ionel-Patrascu <[email protected]>
37;;; Copyright © 2018 Benjamin Slade <[email protected]>
38;;; Copyright © 2018 Alex Vong <[email protected]>
39;;; Copyright © 2019, 2020 Pierre Neidhardt <[email protected]>
40;;; Copyright © 2019, 2020, 2024 Oleg Pykhalov <[email protected]>
41;;; Copyright © 2019 Pierre Langlois <[email protected]>
42;;; Copyright © 2019 Julien Lepiller <[email protected]>
43;;; Copyright © 2019, 2020 Jesse Gibbons <[email protected]>
44;;; Copyright © 2019 Dan Frumin <[email protected]>
45;;; Copyright © 2019-2023 Guillaume Le Vaillant <[email protected]>
46;;; Copyright © 2019, 2020 Timotej Lazar <[email protected]>
47;;; Copyright © 2019 Josh Holland <[email protected]>
48;;; Copyright © 2019 Pkill -9 <[email protected]>
49;;; Copyright © 2017, 2019 Hartmut Goebel <[email protected]>
50;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <[email protected]>
51;;; Copyright © 2020 Naga Malleswari <[email protected]>
52;;; Copyright © 2020 Vitaliy Shatrov <[email protected]>
53;;; Copyright © 2020 Jack Hill <[email protected]>
54;;; Copyright © 2020 Vincent Legoll <[email protected]>
55;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
56;;; Copyright © 2020 Trevor Hass <[email protected]>
57;;; Copyright © 2020, 2021 Liliana Marie Prikler <[email protected]>
58;;; Copyright © 2020 Lu hux <[email protected]>
59;;; Copyright © 2020, 2026 Tomas Ortin Fernandez (quanrong) <[email protected]>
60;;; Copyright © 2021 Olivier Rojon <[email protected]>
61;;; Copyright © 2021 Stefan Reichör <[email protected]>
62;;; Copyright © 2021, 2022 Greg Hogan <[email protected]>
63;;; Copyright © 2021, 2024 David Pflug <[email protected]>
64;;; Copyright © 2021, 2022 Felix Gruber <[email protected]>
65;;; Copyright © 2021 Solene Rapenne <[email protected]>
66;;; Copyright © 2021, 2022, 2024 Noisytoot <[email protected]>
67;;; Copyright © 2021 Petr Hodina <[email protected]>
68;;; Copyright © 2021, 2022 Brendan Tildesley <[email protected]>
69;;; Copyright © 2021 Christopher Baines <[email protected]>
70;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
71;;; Copyright © 2022, 2023 Yovan Naumovski <[email protected]>
72;;; Copyright © 2022 Roman Riabenko <[email protected]>
73;;; Copyright © 2022, 2023, 2025 zamfofex <[email protected]>
74;;; Copyright © 2022 Gabriel Arazas <[email protected]>
75;;; Copyright © 2022-2026 Maxim Cournoyer <[email protected]>
76;;; Copyright © 2022 Hendursaga <[email protected]>
77;;; Copyright © 2022 Parnikkapore <[email protected]>
78;;; Copyright © 2022 Cairn <[email protected]>
79;;; Copyright © 2022 Morgan Smith <[email protected]>
80;;; Copyright © 2023 Zheng Junjie <[email protected]>
81;;; Copyright © 2023 Florian Pelz <[email protected]>
82;;; Copyright © 2023 Ivana Drazovic <[email protected]>
83;;; Copyright © 2023, 2024 gemmaro <[email protected]>
84;;; Copyright © 2023 Wilko Meyer <[email protected]>
85;;; Copyright © 2024 Vagrant Cascadian <[email protected]>
86;;; Copyright © 2024 Sébastien Lerique <[email protected]>
87;;; Copyright © 2024 James Smith <[email protected]>
88;;; Copyright © 2024 Jan Wielkiewicz <[email protected]>
89;;; Copyright © 2024 Ashvith Shetty <[email protected]>
90;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
91;;; Copyright © 2023-2025 Adam Faiz <[email protected]>
92;;; Copyright © 2025 Andrew Wong <[email protected]>
93;;; Copyright © 2025 Nigko Yerden <[email protected]>
94;;; Copyright © 2025 Adrien 'neox' Bourmault <[email protected]>
95;;; Copyright © 2025 Ada Stevenson <[email protected]>
96;;; Copyright © 2025 Gabriel Santos <[email protected]>
97;;; Copyright © 2025 Aiden Isik <[email protected]>
98;;; Copyright © 2026 Cayetano Santos <[email protected]>
99;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
100;;; Copyright © 2026 Nikita Alkhovik <[email protected]>
101;;; Copyright © 2026 bdunahu <[email protected]>
102;;; Copyright © 2026 Konstantin Suntsov <[email protected]>
103;;;
104;;; This file is part of GNU Guix.
105;;;
106;;; GNU Guix is free software; you can redistribute it and/or modify it
107;;; under the terms of the GNU General Public License as published by
108;;; the Free Software Foundation; either version 3 of the License, or (at
109;;; your option) any later version.
110;;;
111;;; GNU Guix is distributed in the hope that it will be useful, but
112;;; WITHOUT ANY WARRANTY; without even the implied warranty of
113;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114;;; GNU General Public License for more details.
115;;;
116;;; You should have received a copy of the GNU General Public License
117;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
118
119(define-module (gnu packages games)
120 #:autoload (gnu packages pascal) (fpc)
121 #:use-module (gnu packages acl)
122 #:use-module (gnu packages admin)
123 #:use-module (gnu packages algebra)
124 #:use-module (gnu packages assembly)
125 #:use-module (gnu packages audio)
126 #:use-module (gnu packages autotools)
127 #:use-module (gnu packages backup)
128 #:use-module (gnu packages base)
129 #:use-module (gnu packages bash)
130 #:use-module (gnu packages bison)
131 #:use-module (gnu packages boost)
132 #:use-module (gnu packages build-tools)
133 #:use-module (gnu packages c)
134 #:use-module (gnu packages calendar)
135 #:use-module (gnu packages check)
136 #:use-module (gnu packages cmake)
137 #:use-module (gnu packages code)
138 #:use-module (gnu packages compression)
139 #:use-module (gnu packages cpp)
140 #:use-module (gnu packages crypto)
141 #:use-module (gnu packages curl)
142 #:use-module (gnu packages cyrus-sasl)
143 #:use-module (gnu packages databases)
144 #:use-module (gnu packages dns)
145 #:use-module (gnu packages docbook)
146 #:use-module (gnu packages documentation)
147 #:use-module (gnu packages emacs)
148 #:use-module (gnu packages emulators)
149 #:use-module (gnu packages compiler-tools)
150 #:use-module (gnu packages fltk)
151 #:use-module (gnu packages fonts)
152 #:use-module (gnu packages fontutils)
153 #:use-module (gnu packages freedesktop)
154 #:use-module (gnu packages fribidi)
155 #:use-module (gnu packages game-development)
156 #:use-module (gnu packages gcc)
157 #:use-module (gnu packages gettext)
158 #:use-module (gnu packages ghostscript)
159 #:use-module (gnu packages gimp)
160 #:use-module (gnu packages gl)
161 #:use-module (gnu packages glib)
162 #:use-module (gnu packages gnome)
163 #:use-module (gnu packages gnu-doc)
164 #:use-module (gnu packages gnupg)
165 #:use-module (gnu packages gnuzilla)
166 #:use-module (gnu packages golang-build)
167 #:use-module (gnu packages golang-xyz)
168 #:use-module (gnu packages gperf)
169 #:use-module (gnu packages graphics)
170 #:use-module (gnu packages graphviz)
171 #:use-module (gnu packages groff)
172 #:use-module (gnu packages gsasl)
173 #:use-module (gnu packages gstreamer)
174 #:use-module (gnu packages gtk)
175 #:use-module (gnu packages guile)
176 #:use-module (gnu packages haskell)
177 #:use-module (gnu packages haskell-check)
178 #:use-module (gnu packages haskell-crypto)
179 #:use-module (gnu packages haskell-xyz)
180 #:use-module (gnu packages icu4c)
181 #:use-module (gnu packages image)
182 #:use-module (gnu packages imagemagick)
183 #:use-module (gnu packages javascript)
184 #:use-module (gnu packages kde-frameworks)
185 #:use-module (gnu packages less)
186 #:use-module (gnu packages toolkits)
187 #:use-module (gnu packages libcanberra)
188 #:use-module (gnu packages libedit)
189 #:use-module (gnu packages libffi)
190 #:use-module (gnu packages libidn)
191 #:use-module (gnu packages libunwind)
192 #:use-module (gnu packages libusb)
193 #:use-module (gnu packages linux)
194 #:use-module (gnu packages lisp)
195 #:use-module (gnu packages llvm)
196 #:use-module (gnu packages logging)
197 #:use-module (gnu packages lua)
198 #:use-module (gnu packages man)
199 #:use-module (gnu packages maths)
200 #:use-module (gnu packages messaging)
201 #:use-module (gnu packages mp3)
202 #:use-module (gnu packages multiprecision)
203 #:use-module (gnu packages music)
204 #:use-module (gnu packages ncurses)
205 #:use-module (gnu packages netpbm)
206 #:use-module (gnu packages networking)
207 #:use-module (gnu packages node)
208 #:use-module (gnu packages ocaml)
209 #:use-module (gnu packages oneapi)
210 #:use-module (gnu packages opencl)
211 #:use-module (gnu packages pcre)
212 #:use-module (gnu packages perl)
213 #:use-module (gnu packages perl-check)
214 #:use-module (gnu packages perl-compression)
215 #:use-module (gnu packages pkg-config)
216 #:use-module (gnu packages pretty-print)
217 #:use-module (gnu packages protobuf)
218 #:use-module (gnu packages pulseaudio)
219 #:use-module (gnu packages python)
220 #:use-module (gnu packages python-build)
221 #:use-module (gnu packages python-check)
222 #:use-module (gnu packages python-compression)
223 #:use-module (gnu packages python-web)
224 #:use-module (gnu packages python-xyz)
225 #:use-module (gnu packages qt)
226 #:use-module (gnu packages readline)
227 #:use-module (gnu packages regex)
228 #:use-module (gnu packages ruby-xyz)
229 #:use-module (gnu packages rust)
230 #:use-module (gnu packages sdl)
231 #:use-module (gnu packages serialization)
232 #:use-module (gnu packages shells)
233 #:use-module (gnu packages sqlite)
234 #:use-module (gnu packages squirrel)
235 #:use-module (gnu packages stb)
236 #:use-module (gnu packages swig)
237 #:use-module (gnu packages tcl)
238 #:use-module (gnu packages terminals)
239 #:use-module (gnu packages texinfo)
240 #:use-module (gnu packages textutils)
241 #:use-module (gnu packages tls)
242 #:use-module (gnu packages unicode)
243 #:use-module (gnu packages upnp)
244 #:use-module (gnu packages video)
245 #:use-module (gnu packages vulkan)
246 #:use-module (gnu packages web)
247 #:use-module (gnu packages wget)
248 #:use-module (gnu packages wxwidgets)
249 #:use-module (gnu packages xdisorg)
250 #:use-module (gnu packages xiph)
251 #:use-module (gnu packages xml)
252 #:use-module (gnu packages xorg)
253 #:use-module (gnu packages)
254 #:use-module (guix build-system cargo)
255 #:use-module (guix build-system cmake)
256 #:use-module (guix build-system copy)
257 #:use-module (guix build-system glib-or-gtk)
258 #:use-module (guix build-system gnu)
259 #:use-module (guix build-system go)
260 #:use-module (guix build-system haskell)
261 #:use-module (guix build-system meson)
262 #:use-module (guix build-system perl)
263 #:use-module (guix build-system pyproject)
264 #:use-module (guix build-system qt)
265 #:use-module (guix build-system scons)
266 #:use-module (guix build-system trivial)
267 #:use-module (guix download)
268 #:use-module (guix gexp)
269 #:use-module (guix git-download)
270 #:use-module ((guix licenses) #:prefix license:)
271 #:use-module (guix packages)
272 #:use-module (guix svn-download)
273 #:use-module (guix utils)
274 #:use-module (ice-9 match)
275 #:use-module ((srfi srfi-1) #:hide (zip))
276 #:use-module (srfi srfi-26))
277
278(define-public hexahop
279 (package
280 (name "hexahop")
281 (version "1.1.0")
282 (source
283 (origin
284 (method url-fetch)
285 (uri (string-append "mirror://sourceforge/hexahop/" version "/"
286 "hex-a-hop-" version ".tar.gz"))
287
288 (sha256
289 (base32 "1mm069wpwc8nrrzfn2f64vh550634xlfws64bfmhqhx86vcikgw0"))))
290 (build-system gnu-build-system)
291 (arguments
292 (list #:configure-flags
293 #~(list (string-append "--with-sdl-prefix="
294 #$(this-package-input "sdl-union")))))
295 (native-inputs
296 (list pkg-config))
297 (inputs
298 (list (sdl-union (list sdl sdl-mixer sdl-ttf))))
299 (home-page "https://sourceforge.net/projects/hexahop/")
300 (synopsis "Puzzle game navigating paths over hexagons")
301 (description
302 "Hex-a-hop is a puzzle game in which a girl has to destroy green hexagons
303by stepping on them.")
304 (license license:gpl2+)))
305
306(define-public abe
307 (package
308 (name "abe")
309 (version "1.1")
310 (source
311 (origin
312 (method url-fetch)
313 (uri (string-append "mirror://sourceforge/abe/abe/abe-" version
314 "/abe-" version ".tar.gz"))
315 (sha256
316 (base32 "1xvpnq1y6y48fn3pvn2lk0h1ilmalv7nb7awpid1g4jcq1sfmi6z"))))
317 (build-system gnu-build-system)
318 (arguments
319 `(#:configure-flags
320 (list (string-append "--with-data-dir="
321 (assoc-ref %outputs "out")
322 "/share/abe"))
323 #:phases
324 (modify-phases %standard-phases
325 (replace 'bootstrap
326 (lambda _ (invoke "sh" "autogen.sh")))
327 (add-before 'build 'set-SDL
328 ;; Set correct environment for SDL.
329 (lambda* (#:key inputs #:allow-other-keys)
330 (setenv "CPATH"
331 (string-append
332 (assoc-ref inputs "sdl") "/include/SDL:"
333 (or (getenv "CPATH") "")))
334 #t))
335 (add-after 'install 'finalize-install
336 (lambda* (#:key outputs #:allow-other-keys)
337 (let ((share (string-append (assoc-ref outputs "out") "/share")))
338 ;; Installation script does not copy game data files.
339 (let ((data (string-append share "/abe")))
340 (for-each (lambda (dir)
341 (let ((target (string-append data "/" dir)))
342 (mkdir-p target)
343 (copy-recursively dir target)))
344 '("images" "maps" "sounds")))
345 ;; Create desktop file.
346 (let ((apps (string-append share "/applications")))
347 (mkdir-p apps)
348 (make-desktop-entry-file
349 (string-append apps "/abe.desktop")
350 #:name "Abe's Amazing Adventure"
351 #:exec ,name
352 #:categories '("AdventureGame" "Game")
353 #:keywords
354 '("side-scrolling" "adventure" "pyramid" "singleplayer")
355 #:comment
356 '(("de" "Ein sich seitwärts bewegendes Abenteuerspiel")
357 (#f "Side-scrolling game")))))
358 #t)))))
359 (native-inputs
360 (list autoconf automake))
361 (inputs
362 `(("libxi" ,libxi)
363 ("libxmu" ,libxmu)
364 ("libxt" ,libxt)
365 ("sdl" ,(sdl-union (list sdl sdl-mixer)))))
366 (home-page "https://abe.sourceforge.net")
367 (synopsis "Scrolling, platform-jumping, ancient pyramid exploring game")
368 (description
369 "Abe's Amazing Adventure is a scrolling,
370platform-jumping, key-collecting, ancient pyramid exploring game, vaguely in
371the style of similar games for the Commodore+4.")
372 (license license:gpl2+)))
373
374(define-public adanaxisgpl
375 (let* ((version "1.2.5")
376 (commit (string-append "ADANAXIS_"
377 (string-join (string-split version #\.) "_")
378 "_RELEASE_X11")))
379 (package
380 (name "adanaxisgpl")
381 (version version)
382 (source
383 (origin
384 (method git-fetch)
385 (uri (git-reference
386 (url "https://github.com/mushware/adanaxis")
387 (commit commit)))
388 (file-name (git-file-name name version))
389 (sha256
390 (base32 "1vbg17lzbm0xl9yy9qymd1vgpz6f7fbr2hffl2ap0nm4zg0mnafm"))
391 (modules '((guix build utils)))
392 (snippet
393 '(begin
394 ;; Necessary for building with gcc >=4.7.
395 (substitute* "src/Mushcore/MushcoreSingleton.h"
396 (("SingletonPtrSet\\(new SingletonType\\);")
397 "MushcoreSingleton::SingletonPtrSet(new SingletonType);"))
398 ;; Avoid an "invalid conversion from const char* to char*" error.
399 (substitute* "src/Platform/X11/PlatformMiscUtils.cpp"
400 (("char \\*end, \\*result;")
401 (string-append "const char *end;\n"
402 "char *result;")))
403 ;; autogen.pl will throw misleading errors if these don't exist.
404 (for-each mkdir-p '("src/MushSecret" "data-adanaxis"))
405 ;; Create these missing files at the right later moment.
406 (substitute* "autogen.pl"
407 (("automake")
408 "automake --add-missing"))))))
409 (build-system gnu-build-system)
410 (arguments
411 `(#:tests? #f ; no check target
412 #:phases
413 (modify-phases %standard-phases
414 (add-after 'unpack 'unpack-inputs
415 (lambda* (#:key inputs #:allow-other-keys)
416 (copy-recursively
417 (dirname (search-input-directory inputs "pixelsrc"))
418 "data-adanaxis")
419 (copy-recursively
420 (dirname (search-input-file inputs "MushBase.rb"))
421 "data-adanaxis/mushruby")))
422 (replace 'bootstrap
423 (lambda _
424 (invoke "perl" "autogen.pl" "adanaxis"
425 "--type=gpl" "--dist=debian")))
426 (add-after 'install 'install-data
427 ;; XXX This was copied from the original (pre-Git) adanaxisgpl
428 ;; package. While the game appears to play fine without it,
429 ;; I cannot prove that it's not missing *something*, so keep it.
430 (lambda* (#:key inputs outputs #:allow-other-keys)
431 (let ((share (string-append (assoc-ref outputs "out")
432 "/share/" ,name "-" ,version)))
433 (copy-recursively (search-input-directory inputs "mush")
434 (string-append share "/mush"))))))))
435 (native-inputs
436 (list (origin
437 (method git-fetch)
438 (uri (git-reference
439 (url "https://github.com/mushware/adanaxis-data")
440 ;; XXX There is a tag matching COMMIT, but it does not
441 ;; contain the .mush files installed by 'install-data.
442 ;; Use this later commit as long as we install them.
443 (commit "6a5b5ad8ee82c10e67bc4c12b16404944fd5754d")))
444 (file-name (git-file-name "adanaxis-data" version))
445 (sha256
446 (base32 "15am9ziq1i53sz0r7sjh2z329b52fkzj6fz7ms1nqqzdfmp11r3d")))
447 (origin
448 (method git-fetch)
449 (uri (git-reference
450 (url "https://github.com/mushware/adanaxis-mushruby")
451 (commit commit)))
452 (file-name (git-file-name "adanaxis-mushruby" version))
453 (sha256
454 (base32 "0pzcvchysjj37420rpvarky580gi5d6pfv93kwa91rg6m5r1zwks")))
455 autoconf
456 automake
457 perl))
458 (inputs
459 (list expat
460 freeglut
461 glu
462 libjpeg-turbo
463 libogg
464 libtiff
465 libvorbis
466 libx11
467 libxcrypt
468 libxext
469 pcre
470 sdl
471 sdl-mixer))
472 (home-page "https://www.mushware.com")
473 (synopsis "Action game in four spatial dimensions")
474 (description
475 "Adanaxis is a fast-moving first person shooter set in deep space, where
476the fundamentals of space itself are changed. By adding another dimension to
477space this game provides an environment with movement in four directions and
478six planes of rotation. Initially the game explains the 4D control system via
479a graphical sequence, before moving on to 30 levels of gameplay with numerous
480enemy, ally, weapon and mission types. Features include simulated 4D texturing,
481mouse and joystick control, and original music.")
482 (license license:gpl2))))
483
484(define-public anarch
485 (let ((commit "2d78d0c69a3aac14dbd8f8aca62d0cbd9d27c860")
486 (revision "1"))
487 (package
488 (name "anarch")
489 (version (git-version "1.1d" revision commit))
490 (source (origin
491 (method git-fetch)
492 (uri (git-reference
493 (url "https://gitlab.com/drummyfish/anarch")
494 (commit commit)))
495 (file-name (git-file-name name version))
496 (sha256
497 (base32
498 "1lg9r6q1davn5yj181ccygmvaigvm8fr9q2s1bc77a1vkz68vzdk"))))
499 (build-system gnu-build-system)
500 (arguments
501 (list #:tests? #f ;no tests
502 #:phases #~(modify-phases %standard-phases
503 (delete 'configure) ;no configure script
504 (replace 'build
505 (lambda _
506 (invoke "./make.sh" "sdl")))
507 (replace 'install
508 (lambda _
509 (let ((bin (string-append #$output "/bin")))
510 (install-file "anarch" bin)))))))
511 (inputs (list alsa-lib libxcursor libxrandr sdl2))
512 (home-page "https://drummyfish.gitlab.io/anarch/")
513 (synopsis "Public domain 90s-style shooter game")
514 (description "Anarch is a small, completely public domain, 90s-style
515Doom clone shooter game.")
516 (license license:cc0))))
517
518(define-public antimicrox
519 (package
520 (name "antimicrox")
521 (version "3.5.1")
522 (home-page "https://github.com/AntiMicroX/antimicrox")
523 (source
524 (origin
525 (method git-fetch)
526 (uri (git-reference
527 (url home-page)
528 (commit version)))
529 (file-name (git-file-name name version))
530 (sha256
531 (base32 "0p350l8d6rx72cjmmagsyvrmvzcgqypqas2nfjjbasd94f1y30b4"))))
532 (build-system cmake-build-system)
533 (arguments
534 (list
535 #:tests? #f ;Tests are unmaintained
536 #:configure-flags #~(list "-DCHECK_FOR_UPDATES=NO" "-DWITH_TESTS=NO"
537 #$(string-append "-DANTIMICROX_PKG_VERSION="
538 version))
539 #:phases #~(modify-phases %standard-phases
540 (add-after 'unpack 'patch-installation-target
541 (lambda _
542 (substitute* "CMakeLists.txt"
543 (("/usr(/lib/udev/rules.d)" _ lib)
544 (string-append #$output lib))))))))
545 (native-inputs (list extra-cmake-modules gettext-minimal itstool qttools))
546 (inputs (list libxtst libx11 qtbase sdl2))
547 (synopsis "Control your system with a gamepad")
548 (description
549 "AntiMicroX is a graphical program used to map gamepad keys to keyboard, mouse,
550scripts, and macros under both X.org and Wayland. With it you can control
551your system using a gamepad or play games that don't natively support
552gamepads. It can also be used for generating SDL2 configurations.
553
554For unprivileged access to input events, this package provides udev rules for
555use with @code{udev-service-type}.")
556 (license license:gpl3+)))
557
558(define-public armagetronad
559 (package
560 (name "armagetronad")
561 (version "0.2.9.3.0")
562 (source (origin
563 (method url-fetch)
564 (uri (string-append "mirror://sourceforge/armagetronad/stable/"
565 version "/armagetronad-" version ".tbz"))
566 (sha256
567 (base32
568 "1q1zlbhbcimr6bw0ms1pr8hz4q850ivi3hvxn3467jfgiq22f3cy"))))
569 (build-system gnu-build-system)
570 (arguments
571 (list #:configure-flags
572 #~(list "--disable-games" ;don't nest everything in ‘games/’
573 "--disable-uninstall") ;pointless (and broken) in Guix
574 #:phases
575 #~(modify-phases %standard-phases
576 (add-after 'unpack 'omit-broken-symlinks
577 ;; v0.2.9.2.0 added relative_path() which I think broke
578 ;; install_link(). It now creates a broken armagetronad-master
579 ;; symlink that causes the 'validate-runpath phase to fail.
580 (lambda _
581 (substitute* "batch/sysinstall.in"
582 (("^install_link .*BINDIR.*") "")))))))
583 (native-inputs (list pkg-config))
584 (inputs (list libxml2
585 curl
586 (sdl-union (list sdl sdl-image sdl-mixer))
587 freeglut
588 libpng
589 libjpeg-turbo))
590 (home-page "https://www.armagetronad.org")
591 (synopsis "Tron clone in 3D")
592 (description
593 "Armagetron Advanced is a multiplayer game in 3d that
594attempts to emulate and expand on the lightcycle sequence from the movie Tron.
595It's an old school arcade game slung into the 21st century. Highlights
596include a customizable playing arena, HUD, unique graphics, and AI bots. For
597the more advanced player there are new game modes and a wide variety of
598physics settings to tweak as well.")
599 (license license:gpl2+)))
600
601(define-public astromenace
602 (package
603 (name "astromenace")
604 (version "1.4.3")
605 (source
606 (origin
607 (method git-fetch)
608 (uri (git-reference
609 (url "https://github.com/viewizard/astromenace")
610 (commit (string-append "v" version))))
611 (file-name (git-file-name name version))
612 (sha256
613 (base32 "0683a6bb4rvbz3jaqs6pc4msy6l3vr7fafxi4nmbvziv5kr7x9sv"))))
614 (build-system cmake-build-system)
615 (arguments
616 (list
617 #:tests? #f ;no tests
618 #:configure-flags
619 #~(list (string-append "-DDATADIR=" #$output "/share/astromenace"))
620 #:phases
621 #~(modify-phases %standard-phases
622 (replace 'install
623 ;; Upstream provides no install phase.
624 (lambda _
625 (let* ((bin (string-append #$output "/bin"))
626 (share (string-append #$output "/share"))
627 (apps (string-append share "/applications"))
628 (data (string-append share "/astromenace"))
629 (icons (string-append share "/icons/hicolor/64x64/apps")))
630 (install-file "astromenace" bin)
631 (install-file "gamedata.vfs" data)
632 (with-directory-excursion (string-append #$source "/share")
633 (install-file "astromenace.desktop" apps)
634 (mkdir-p icons)
635 (copy-file "astromenace_64.png"
636 (string-append icons "/astromenace.png")))))))))
637 (inputs
638 (list freealut
639 freetype
640 glu
641 libogg
642 libvorbis
643 openal
644 sdl2))
645 (home-page "https://www.viewizard.com/")
646 (synopsis "3D space shooter with spaceship upgrade possibilities")
647 (description
648 "Space is a vast area, an unbounded territory where it seems there is
649a room for everybody, but reversal of fortune put things differently. The
650hordes of hostile creatures crawled out from the dark corners of the universe,
651craving to conquer your homeland. Their force is compelling, their legions
652are interminable. However, humans didn't give up without a final showdown and
653put their best pilot to fight back. These malicious invaders chose the wrong
654galaxy to conquer and you are to prove it! Go ahead and make alien aggressors
655regret their insolence.")
656 ;; Game is released under GPL3+ terms. Artwork is subject to CC
657 ;; BY-SA 4.0, and fonts to OFL1.1.
658 (license (list license:gpl3+ license:cc-by-sa4.0 license:silofl1.1))))
659
660(define-public barony
661 (package
662 (name "barony")
663 (version "3.3.7")
664 (source
665 (origin
666 (method git-fetch)
667 (uri (git-reference
668 (url "https://github.com/TurningWheel/Barony")
669 (commit (string-append "v" version))))
670 (file-name (git-file-name name version))
671 (sha256
672 (base32 "1y72k6zrqqhib3p05zkdklays2d218v51n87k7k68m0s7nnxa4vy"))
673 ;; Fix textures for SDL 2.0.14.
674 ;; See <https://github.com/TurningWheel/Barony/pull/582>.
675 (patches (search-patches "barony-fix-textures.patch"))))
676 (build-system cmake-build-system)
677 (arguments
678 '(#:configure-flags
679 (list "-DOPENAL_ENABLED=ON" ; enable sound
680 "-DEDITOR_EXE_NAME=barony-editor") ; instead of generic "editor"
681 #:tests? #f ; there are no tests
682 #:phases
683 (modify-phases %standard-phases
684 (add-before 'configure 'fix-installation
685 (lambda _
686 (substitute* "CMakeLists.txt"
687 (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/lang")
688 "${CMAKE_SOURCE_DIR}/lang")))))))
689 (inputs
690 (list glu
691 libpng
692 libvorbis
693 openal
694 physfs
695 rapidjson
696 sdl2
697 sdl2-image
698 sdl2-net
699 sdl2-ttf
700 zlib))
701 (native-inputs
702 (list pkg-config))
703 (home-page "https://baronygame.com")
704 (synopsis "3D first-person roguelike game")
705 (description
706 "Barony is a first-person roguelike role-playing game with cooperative
707play. The player must descend a dark dungeon and destroy an undead lich while
708avoiding traps and fighting monsters. The game features randomly generated
709dungeons, 13 character classes, hundreds of items and artifacts, and
710cooperative multiplayer for up to four players. This package does @emph{not}
711provide the game assets.")
712 (license license:bsd-2)))
713
714(define-public bastet
715 (package
716 (name "bastet")
717 (version "0.43.2")
718 (source
719 (origin
720 (method git-fetch)
721 (uri (git-reference
722 (url "https://github.com/fph/bastet")
723 (commit version)))
724 (file-name (git-file-name name version))
725 (sha256
726 (base32 "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn"))
727 (patches
728 (search-patches "bastet-change-source-of-unordered_set.patch"))))
729 (build-system gnu-build-system)
730 (arguments
731 `(#:make-flags
732 (list (string-append "CXXFLAGS=-I"
733 (assoc-ref %build-inputs "boost") "/include"))
734 #:phases
735 (modify-phases %standard-phases
736 (delete 'configure) ; no configure script
737 (replace 'check
738 ;; The 'Test' target builds the tests, but doesn't actually run them.
739 (lambda* (#:key make-flags #:allow-other-keys)
740 (apply invoke "make" "Test" make-flags)
741 (setenv "HOME" ".")
742 (invoke "./Test")))
743 (replace 'install
744 (lambda* (#:key outputs #:allow-other-keys)
745 (let* ((out (assoc-ref outputs "out"))
746 (share (string-append out "/share"))
747 (hicolor (string-append share "/icons/hicolor")))
748 (install-file "bastet"
749 (string-append out "/bin"))
750
751 (install-file "bastet.desktop"
752 (string-append share "/applications"))
753 (install-file "bastet.svg"
754 (string-append hicolor "/scalable/apps"))
755
756 (install-file "bastet.appdata.xml"
757 (string-append share "/appdata"))
758
759 (install-file "bastet.6"
760 (string-append out "/share/man/man6"))
761 #t))))))
762 (native-inputs
763 (list hicolor-icon-theme))
764 (inputs
765 (list boost ncurses))
766 (home-page "https://fph.altervista.org/prog/bastet.html")
767 (synopsis "Antagonistic Tetris-style falling brick game for text terminals")
768 (description
769 "Bastet (short for Bastard Tetris) is a simple ncurses-based falling brick
770game. Unlike normal Tetris, Bastet does not choose the next brick at random.
771Instead, it uses a special algorithm to choose the worst brick possible.
772
773Playing bastet can be a painful experience, especially if you usually make
774canyons and wait for the long I-shaped block to clear four rows at a time.")
775 (license license:gpl3+)))
776
777(define-public go-codeberg-org-anaseto-gothic
778 (package
779 (name "go-codeberg-org-anaseto-gothic")
780 (version "0.2.0")
781 (source
782 (origin
783 (method git-fetch)
784 (uri (git-reference
785 (url "https://codeberg.org/anaseto/gothic")
786 (commit (string-append "v" version))))
787 (file-name (git-file-name name version))
788 (sha256
789 (base32 "194vjskwkz6h51spk2661khmk5nrzrrwc6iwb8n0viqa8rr8z8cd"))))
790 (build-system go-build-system)
791 (arguments
792 (list
793 #:import-path "codeberg.org/anaseto/gothic"))
794 (propagated-inputs (list tcl tk))
795 (home-page "https://codeberg.org/anaseto/gothic")
796 (synopsis "Tcl/Tk Go bindings")
797 (description
798 "This package provides Tcl/Tk Go bindings, the API is a bit Tk-oriented.")
799 (license license:expat)))
800
801(define-public boohu
802 (package
803 (name "boohu")
804 (version "0.14.1")
805 (source
806 (origin
807 (method git-fetch)
808 (uri (git-reference
809 (url "https://codeberg.org/anaseto/boohu")
810 (commit (string-append "v" version))))
811 (file-name (git-file-name name version))
812 (sha256
813 (base32 "0xh8b4fj2vd92ihh70rmmlq45ir0sb44g63blswfw96rb3jl3pk2"))))
814 (build-system go-build-system)
815 (arguments
816 (list
817 #:install-source? #f
818 #:import-path "codeberg.org/anaseto/boohu"))
819 (native-inputs (list go-codeberg-org-anaseto-gothic
820 go-codeberg-org-anaseto-gruid
821 go-github-com-gdamore-tcell-v2))
822 (home-page "https://anaseto.codeberg.page/games/boohu")
823 (synopsis "Break Out Of Hareka's Underground, a roguelike game")
824 (description
825 "@acronym{Boohu, Break Out Of Hareka's Underground} is a roguelike game
826mainly inspired from DCSS and its tavern, with some ideas from Brogue, but
827aiming for very short games, almost no character building, and a simplified
828inventory.
829
830@quotation
831Every year, the elders send someone to collect medicinal simella plants in the
832Underground. This year, the honor fell upon you, and so here you
833are. According to the elders, deep in the Underground, a magical monolith will
834lead you back to your village. Along the way, you will collect simellas, as
835well as various items that will help you deal with monsters, which you may
836fight or flee@dots{}
837@end quotation")
838 (license license:expat)))
839
840(define-public boohu-tk
841 (package
842 (inherit boohu)
843 (name "boohu-tk")
844 (arguments
845 (substitute-keyword-arguments arguments
846 ((#:tests? _ #t) #f)
847 ((#:build-flags _ #~())
848 #~(list "--tags=tk"))
849 ((#:phases _ #~%standard-phases)
850 #~(modify-phases %standard-phases
851 (add-after 'install 'fix-name-collision
852 (lambda _
853 (rename-file (string-append #$output "/bin/boohu")
854 (string-append #$output "/bin/boohu-tk"))))))))))
855
856(define-public tetrinet
857 (package
858 (name "tetrinet")
859 (version "0.11")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (string-append
864 "http://tetrinet.or.cz/download/tetrinet-" version
865 ".tar.bz2"))
866 (sha256
867 (base32
868 "0b4pddqz6is1771qmvcj8qqlr4in2djdbkk13agvp9yhfah2v8x7"))))
869 (build-system gnu-build-system)
870 (inputs
871 (list ncurses))
872 (arguments
873 `(#:tests? #f ;no tests
874 #:make-flags '("CC=gcc"
875 "CFLAGS=-O2 -DHAVE_IPV6 -g -Wall -fcommon")
876 #:phases
877 (modify-phases %standard-phases
878 (delete 'configure) ;no configure script
879 (add-after 'unpack 'fix-install-dir
880 (lambda* (#:key outputs #:allow-other-keys)
881 (let ((out (assoc-ref outputs "out")))
882 (mkdir-p (string-append out "/bin"))
883 (substitute* "Makefile"
884 (("/usr/games") (string-append out "/bin"))))))
885 (add-after 'install 'install-documentation
886 (lambda* (#:key outputs #:allow-other-keys)
887 (let* ((out (assoc-ref outputs "out"))
888 (doc (string-append out "/share/doc/" ,name "-" ,version)))
889 (for-each (lambda (file)
890 (install-file file doc))
891 (list "README" "tetrinet.txt"))))))))
892 (home-page "http://tetrinet.or.cz")
893 (synopsis "Terminal-based multiplayer Tetris clone")
894 (description "Tetrinet is a multiplayer Tetris-like game with powerups and
895attacks you can use on opponents.")
896 (license license:public-domain)))
897
898(define-public vdrift-data
899 ;; There are no tags or releases for the vdrift data; use the latest SVN
900 ;; revision available.
901 (let ((commit 1464)
902 (revision "0"))
903 ;; The package is hidden as the game data is *required* by the install
904 ;; target of vdrift itself, and there is no need for users to manually
905 ;; install it.
906 (hidden-package
907 (package
908 (name "vdrift-data")
909 ;; The date is the last modified time shown next to the 'vdrift-data'
910 ;; directory when visiting
911 ;; https://sourceforge.net/p/vdrift/code/HEAD/tree/.
912 (version (format #f "2024-10-23-~a.~a" revision commit))
913 (source (origin
914 (method svn-fetch)
915 (uri (svn-reference
916 (url "https://svn.code.sf.net/p/vdrift/code/vdrift-data")
917 (revision commit)))
918 (file-name (string-append name "-" version "-checkout"))
919 (sha256
920 (base32
921 "0q0raw7xjnf710xxls6cjqqvkn754bbndqjs9dzkpr40s8zrgnvf"))))
922 (build-system copy-build-system)
923 (arguments (list #:install-plan #~'(("." "share/games/vdrift/data"))))
924 (home-page "https://vdrift.net/")
925 (synopsis "Game data for Vdrift")
926 (description "This package contains the assets for the Vdrift racing
927game.")
928 (license license:gpl3+))))) ;assumed same as Vdrift itself
929
930(define-public vdrift
931 ;; The latest release is from 2014, and lacks build system and other
932 ;; unreleased improvements; use the latest commit.
933 (let ((commit "f835edaef1abe586b8d5bebeaa8c41f85e6dbea4")
934 (revision "1"))
935 (package
936 (name "vdrift")
937 (version (git-version "2014-10-20" revision commit))
938 (source (origin
939 (method git-fetch)
940 (uri (git-reference
941 (url "https://github.com/VDrift/vdrift")
942 (commit commit)))
943 (file-name (git-file-name name version))
944 (sha256
945 (base32
946 "19kqnncv5c7ssbjcplmfn2rq0mabi2idyv2wmx05pqg09y571cv1"))))
947 (build-system scons-build-system)
948 (arguments
949 (list
950 #:tests? #f ;no test suite
951 #:scons-flags #~(list (string-append "prefix=" #$output)
952 "release=1"
953 "verbose=1")
954 #:phases
955 #~(modify-phases %standard-phases
956 (add-after 'unpack 'setup-vdrift-data
957 (lambda _
958 ;; The locale data must be made writable, as gettext
959 ;; translation files are generated and written there as part
960 ;; of the installation script.
961 (copy-recursively (search-input-directory
962 %build-inputs
963 "share/games/vdrift/data")
964 "data")
965 (for-each make-file-writable (find-files "data/locale")))))))
966 (native-inputs (list gettext-minimal pkg-config vdrift-data))
967 (inputs (list bullet curl libvorbis mesa sdl3 zlib))
968 (home-page "https://vdrift.net/")
969 (synopsis "Racing simulator")
970 (description "VDrift aims to provide an accurate driving physics
971emulation, based on real world data of the actual vehicles, employing a full
972rigid body simulation and a complex tire model. VDrift features:
973@itemize
974@item Over 45 tracks based on famous real-world tracks
975@item Over 45 cars based on real-world vehicles
976@item Very realistic, simulation-grade driving physics
977@item Mouse/joystick/gamepad/wheel/keyboard support
978@item Fully modeled tracks, scenery and terrain
979@item Several different camera modes
980@item Basic replay system with Skip Forward/Skip Backward
981@item Fully customizable controls
982@item Joystick, mouse and keyboard input filtering
983@item Brake and reverse lights
984@item Driver aids: automatic shifting, traction control, anti-lock braking
985@item Experimental force feedback
986@item Race against up to 3 AI with variable difficultly
987@item Engine and road sounds
988@end itemize
989The recommended input method is a steering wheel with pedals and force
990feedback support.")
991 (license license:gpl3+))))
992
993(define-public vitetris
994 (package
995 (name "vitetris")
996 (version "0.59.1")
997 (source
998 (origin
999 (method git-fetch)
1000 (uri (git-reference
1001 (url "https://github.com/vicgeralds/vitetris")
1002 (commit (string-append "v" version))))
1003 (sha256
1004 (base32 "1ah1c5g7abksif0n8v5rb7r4pn2az20c3mkp4ak13vgs23ddmds5"))
1005 (file-name (git-file-name name version))))
1006 (build-system gnu-build-system)
1007 (arguments
1008 `(#:tests? #f ;no test
1009 #:make-flags
1010 (list ,(string-append "CC=" (cc-for-target))
1011 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1012 "CFLAGS=-g -O2 -Wno-error=implicit-int")
1013 #:phases
1014 (modify-phases %standard-phases
1015 (replace 'configure
1016 (lambda _
1017 ;; the non standard configure script does not accept
1018 ;; standard parameters -> invoke configure by hand
1019 (invoke "./configure" "prefix=")
1020 ;; src/src-conf.mk must be writable for the build step
1021 (make-file-writable "src/src-conf.mk"))))))
1022 (home-page "http://victornils.net/tetris/")
1023 (synopsis "Terminal-based Tetris clone")
1024 (description "Vitetris is a classic multiplayer Tetris clone for the
1025terminal.")
1026 (license license:bsd-2)))
1027
1028(define-public blobwars
1029 (package
1030 (name "blobwars")
1031 (version "2.00")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (string-append "mirror://sourceforge/blobwars/"
1036 "blobwars-" version ".tar.gz"))
1037 (sha256
1038 (base32 "16aagvkx6azf75gm5kaa94bh5npydvhqp3fvdqyfsanzdjgjf1n4"))))
1039 (build-system gnu-build-system)
1040 (arguments
1041 `(#:tests? #f ;no test
1042 #:make-flags
1043 (let ((out (assoc-ref %outputs "out")))
1044 (list (string-append "PREFIX=" out)
1045 (string-append "BINDIR=" out "/bin/")
1046 "USEPAK=1"
1047 "RELEASE=1"))
1048 #:phases
1049 (modify-phases %standard-phases
1050 (add-after 'unpack 'patch-sources
1051 (lambda _
1052 (substitute* "Makefile" (("-Werror") ""))
1053 ;; glibc 2.38 includes strlcpy and strlcat.
1054 (substitute* "src/headers.h"
1055 (("static inline void strlcat.*") "")
1056 (("static inline void strlcpy.*") ""))))
1057 (delete 'configure)))) ;no configure script
1058 (native-inputs
1059 `(("gettext" ,gettext-minimal)
1060 ("pkg-config" ,pkg-config)))
1061 (inputs
1062 `(("hicolor-icon-theme" ,hicolor-icon-theme)
1063 ("sdl" ,(sdl-union (list sdl2
1064 sdl2-image
1065 sdl2-mixer
1066 sdl2-ttf
1067 sdl2-net)))))
1068 (home-page "https://sourceforge.net/projects/blobwars/")
1069 (synopsis "Platform action game featuring a blob with a lot of weapons")
1070 (description "Blobwars: Metal Blob Solid is a 2D platform game, the first
1071in the Blobwars series. You take on the role of a fearless Blob agent. Your
1072mission is to infiltrate various enemy bases and rescue as many MIAs as
1073possible, while battling many vicious aliens.")
1074 (license (list license:gpl2 ; For code and graphics
1075 license:cc0 ; Music and sounds have specific licenses
1076 license:cc-by3.0 ; see /doc/readme
1077 license:cc-by-sa3.0
1078 license:lgpl2.1+
1079 license:bsd-2))))
1080
1081(define-public bsd-games
1082 (package
1083 (name "bsd-games")
1084 (version "2.17.0")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri "https://ibiblio.org/pub/linux/games/bsd-games-2.17.tar.gz")
1089 (sha256
1090 (base32 "0q7zdyyfvn15y0w4g54kq3gza89h61py727m8slmw73cxx594vq6"))
1091 (patches
1092 (search-patches
1093 ;; thanks Arch, and Debian
1094 "bsd-games-2.17-64bit.patch"
1095 "bsd-games-bad-ntohl-cast.patch"
1096 "bsd-games-gamescreen.h.patch"
1097 "bsd-games-getline.patch"
1098 "bsd-games-null-check.patch"
1099 "bsd-games-number.c-and-test.patch"
1100 "bsd-games-stdio.h.patch"
1101 "bsd-games-prevent-name-collisions.patch"
1102 ;; Guix customizations
1103 "bsd-games-add-configure-config.patch"
1104 "bsd-games-dont-install-empty-files.patch"
1105 "bsd-games-add-wrapper.patch"))))
1106 (build-system gnu-build-system)
1107 (native-inputs
1108 (list flex bison))
1109 (inputs
1110 `(("curses" ,ncurses)
1111 ("pager" ,less)
1112 ("miscfiles" ,miscfiles)
1113 ("openssl" ,openssl))) ;used only by 'factor'
1114 (arguments
1115 `(#:phases
1116 (modify-phases %standard-phases
1117 (add-after 'unpack 'gcc14
1118 ;; See line 84 of
1119 ;; https://github.com/NixOS/nixpkgs/pull/369352/files#diff-d4e7b24a8c4ebea52238a5421f96f293576ae2be634cd72c1c1521ee043a01fdR84
1120 (lambda _
1121 (substitute* "hunt/hunt/otto.c"
1122 (("sigpause\\(old_mask\\);") ""))))
1123 (replace 'configure
1124 (lambda* (#:key outputs inputs #:allow-other-keys)
1125 (let* ((out (assoc-ref outputs "out"))
1126 (bin (string-append out "/bin"))
1127 (doc (string-append out "/share/doc/bsd-games-" ,version))
1128 (man (string-append out "/share/man"))
1129 (word-list (search-input-file inputs "/share/web2"))
1130 (static-data (string-append out "/share/games/bsd-games"))
1131 ;; Not a "./" because of substitute* in 'patch-install
1132 ;; below. The .// allow us not to mess with the games'
1133 ;; code any further: we just use a wrapper script that
1134 ;; cd's to a BSD_GAMES_DIR. :]
1135 (save-files ".//"))
1136 (substitute* "configure"
1137 (("/usr/share/man") man)
1138 (("/usr/share/doc/bsd-games") doc)
1139 (("/usr/share/[^\n/]*") static-data)
1140 (("/var/games") save-files)
1141 (("/usr/bin/less") (which "less"))
1142 (("(/usr/bin|/usr/games)") bin))
1143 (substitute* "config.params" (("WORD_LIST") word-list))
1144 (substitute* "wrapper" (("STATIC_DATA") static-data))
1145 (invoke "./configure"))
1146 #t))
1147 (add-before 'install 'patch-install
1148 ;; Some games need a writable directory containing pre-maded files.
1149 ;; The files get installed to the Store. Then the wrapper kicks in.
1150 (lambda* (#:key outputs #:allow-other-keys)
1151 (let* ((out (assoc-ref outputs "out"))
1152 (static-data (string-append out "/share/games/bsd-games"))
1153 (save-files ".//"))
1154 (substitute* "Makeconfig" ((save-files) static-data)))
1155 #t))
1156 (add-after 'install 'install-documents
1157 (lambda* (#:key outputs #:allow-other-keys)
1158 (let* ((out (assoc-ref outputs "out"))
1159 (doc (string-append out "/share/doc/bsd-games-" ,version)))
1160 (rename-file "phantasia/COPYRIGHT" "phantasia-COPYRIGHT")
1161 (for-each
1162 (lambda(file) (install-file file doc))
1163 '("AUTHORS" "BUGS" "README" "SECURITY" "THANKS"
1164 "phantasia-COPYRIGHT")))
1165 #t)))))
1166 (home-page "https://github.com/vattam/BSDGames")
1167 (synopsis "Collection of the old text-based games and amusements")
1168 (description
1169 "These are the BSD games.
1170
1171Action: atc (keep the airplanes safe), hack (explore the dangerous Dungeon),
1172hunt (kill the others for the Pair of Boots, multi-player only), robots (avoid
1173the evil robots), sail (game of naval warfare with wooden ships), snake (steal
1174the $$ from the cave, anger the snake, and get out alive), tetris (game of
1175lining up the falling bricks of different shapes), and worm (eat, grow big,
1176and neither bite your tail, nor ram the wall).
1177
1178Amusements: banner (prints a large banner), bcd & morse & ppt (print a punch
1179card, or paper tape, or Morse codes), caesar & rot13 (ciphers and deciphers
1180the input), factor (factorizes a number), number (translates numbers into
1181text), pig (translates from English to Pig Latin), pom (should print the
1182Moon's phase), primes (generates primes), rain & worms (plays an screen-saver
1183in terminal), random (prints randomly chosen lines from files, or returns a
1184random exit-code), and wtf (explains what do some acronyms mean).
1185
1186Board: backgammon (lead the men out of board faster than the friend do),
1187boggle (find the words in the square of letters), dab (game of dots and
1188boxes), gomoku (game of five in a row), hangman (guess a word before man is
1189hanged), and monop (game of monopoly, hot-seat only). Also the card-games:
1190canfield, cribbage, fish (juniors game), and mille.
1191
1192Quests: adventure (search for treasures with the help of wizard),
1193battlestar (explore the world around, starting from dying spaceship),
1194phantasia (role-play as an rogue), trek (hunt the Klingons, and save the
1195Federation), and wump (hunt the big smelly Wumpus in a dark cave).
1196
1197Quizzes: arithmetic and quiz.")
1198 ;; "Auxiliary and data files, distributed with the games in NetBSD, but
1199 ;; not bearing copyright notices, probably fall under the terms of the UCB
1200 ;; or NetBSD copyrights and licences. The file "fortune/Notes" contains a
1201 ;; warning in regard to the fortune databases."
1202 (license (list
1203 ;; Most games. Files: countmail/countmail.6, dab/dab.6,
1204 ;; lib/strlcpy.c, wargames/wargames.6
1205 license:bsd-3
1206 ;; dab and hunt. Files: adventure/extern.h,
1207 ;; backgammon/backgammon/backlocal.h, caesar/rot13.in,
1208 ;; countmail/countmail, dm/utmpentry.c, dm/utmpentry.h,
1209 ;; hack/extern.h, robots/auto.c, sail/display.h,
1210 ;; sail/restart.h, wargames/wargames
1211 license:bsd-4
1212 ;; wtf (the game)
1213 license:public-domain
1214 ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3)
1215 (license:fsf-free "file:///phantasia/COPYRIGHT")))))
1216
1217(define-public rogue
1218 (package
1219 (name "rogue")
1220 (version "5.4.4")
1221 (source (origin
1222 (method git-fetch)
1223 (uri (git-reference
1224 (url "https://github.com/Davidslv/rogue")
1225 (commit "cf9bd26d564a72fac4cf56b55c96c2435270d29a")))
1226 (file-name (git-file-name name version))
1227 (sha256
1228 (base32
1229 "0mk03l120scas4dcn6xccnhslnwmcx2blshbf925z06yk7rkzias"))))
1230 (build-system gnu-build-system)
1231 (arguments
1232 `(#:tests? #f
1233 #:make-flags (list "CFLAGS=-DNCURSES_INTERNALS")))
1234 (inputs (list ncurses))
1235 (synopsis "Original rogue game")
1236 (description
1237 "This package provides ``Rogue: Exploring the Dungeons of Doom'', the
1238original rogue game found on 4.2BSD.")
1239 (home-page "https://github.com/Davidslv/rogue")
1240 (license license:bsd-3)))
1241
1242(define-public sgt-puzzles
1243 (let ((commit "7ad37c64af3bc891372ec16db1531cee599b6e3a")
1244 (revision "0"))
1245 (package
1246 (name "sgt-puzzles")
1247 (version (git-version "20260622" revision commit))
1248 (source
1249 (origin
1250 (method git-fetch)
1251 (uri (git-reference
1252 (url "https://git.tartarus.org/simon/puzzles.git")
1253 (commit commit)))
1254 (file-name (git-file-name name version))
1255 (sha256
1256 (base32 "0aldj32fr51wmdnmr7dywf19s3a8l9sxfnnk34wi8fgzzmskl0z9"))))
1257 (build-system cmake-build-system)
1258 (arguments
1259 (list
1260 #:tests? #f ;No tests.
1261 #:configure-flags #~(list "-DNAME_PREFIX=sgt-")
1262 #:phases
1263 #~(modify-phases %standard-phases
1264 (add-after 'unpack 'set-xdg-open-path
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 (substitute* "gtk.c"
1267 (("(#define HELP_BROWSER_PATH).+" all define)
1268 (format #f "~a ~s~%" define
1269 (search-input-file inputs "/bin/xdg-open")))))))))
1270 (inputs (list gtk+ xdg-utils))
1271 (native-inputs (list pkg-config perl imagemagick halibut))
1272 (home-page "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/")
1273 (synopsis "Simon Tatham's portable puzzle collection")
1274 (description "Simon Tatham's Portable Puzzle Collection contains a number of
1275popular puzzle games for one player.")
1276 (license license:expat))))
1277
1278(define-public bzflag
1279 (package
1280 (name "bzflag")
1281 (version "2.4.30")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (string-append "https://download.bzflag.org/bzflag/source/"
1286 version "/bzflag-" version ".tar.bz2"))
1287 (sha256
1288 (base32 "0kc9ag8yq3iqmwlrdwhbqp3sqjcan1mr0ddx25yamrxwwx8bfy5v"))))
1289 (build-system gnu-build-system)
1290 (arguments
1291 (list
1292 #:phases
1293 #~(modify-phases %standard-phases
1294 (add-after 'install 'install-desktop-file-and-icons
1295 (lambda _
1296 (let* ((share (string-append #$output "/share"))
1297 (data (string-append share "/bzflag"))
1298 (hicolor (string-append share "/icons/hicolor"))
1299 (applications (string-append share "/applications")))
1300 ;; Move desktop file.
1301 (install-file (string-append data "/bzflag.desktop")
1302 applications)
1303 ;; Install icons.
1304 (for-each (lambda (size)
1305 (let* ((dim (string-append size "x" size))
1306 (dir (string-append hicolor "/" dim "/apps")))
1307 (mkdir-p dir)
1308 (copy-file
1309 (string-append data "/bzflag-" dim ".png")
1310 (string-append dir "/bzflag.png"))))
1311 '("48" "256"))))))))
1312 (native-inputs
1313 (list pkg-config))
1314 (inputs
1315 (list c-ares
1316 curl
1317 glew
1318 glu
1319 sdl2
1320 zlib))
1321 (home-page "https://www.bzflag.org/")
1322 (synopsis "3D first person tank battle game")
1323 (description
1324 "BZFlag is a 3D multi-player multiplatform tank battle game that
1325allows users to play against each other in a network environment.
1326There are five teams: red, green, blue, purple and rogue (rogue tanks
1327are black). Destroying a player on another team scores a win, while
1328being destroyed or destroying a teammate scores a loss. Rogues have
1329no teammates (not even other rogues), so they cannot shoot teammates
1330and they do not have a team score.
1331
1332There are two main styles of play: capture-the-flag and free-for-all.
1333In capture-the-flag, each team (except rogues) has a team base and
1334each team with at least one player has a team flag. The object is to
1335capture an enemy team's flag by bringing it to your team's base. This
1336destroys every player on the captured team, subtracts one from that
1337team's score, and adds one to your team's score. In free-for-all,
1338there are no team flags or team bases. The object is simply to get as
1339high a score as possible.")
1340 ;; The game is dual-licensed.
1341 (license (list license:lgpl2.1 license:mpl2.0))))
1342
1343(define-public cataclysm-dda
1344 (package
1345 (name "cataclysm-dda")
1346 (version "0.I")
1347 (source
1348 (origin
1349 (method git-fetch)
1350 (uri (git-reference
1351 (url "https://github.com/CleverRaven/Cataclysm-DDA")
1352 (commit version)))
1353 (sha256
1354 (base32 "0lk9akkwxjd06739qyhg8iypaw13y9xd2yc249sy91m3llvylccz"))
1355 (file-name (git-file-name name version))))
1356 (build-system gnu-build-system)
1357 (arguments
1358 (list
1359 #:make-flags
1360 #~(list (string-append "PREFIX=" #$output)
1361 "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1" "WARNINGS=-w"
1362 "LOCALIZE=1" "LANGUAGES=all")
1363 #:phases
1364 #~(modify-phases %standard-phases
1365 (delete 'configure))
1366 ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
1367 ;; input in order to support tests.
1368 #:tests? #f))
1369 (native-inputs
1370 (list astyle gcc-13 gettext-minimal pkg-config))
1371 (inputs
1372 (list freetype ncurses))
1373 (home-page "https://cataclysmdda.org/")
1374 (synopsis "Survival horror roguelike video game")
1375 (description
1376 "Cataclysm: Dark Days Ahead (or \"DDA\" for short) is a roguelike set
1377in a post-apocalyptic world. Struggle to survive in a harsh, persistent,
1378procedurally generated world. Scavenge the remnants of a dead civilization
1379for food, equipment, or, if you are lucky, a vehicle with a full tank of gas
1380to get you out of Dodge. Fight to defeat or escape from a wide variety of
1381powerful monstrosities, from zombies to giant insects to killer robots and
1382things far stranger and deadlier, and against the others like yourself, that
1383want what you have.")
1384 (license license:cc-by-sa3.0)))
1385
1386(define-public cataclysm-dda-tiles
1387 (package
1388 (inherit cataclysm-dda)
1389 (name "cataclysm-dda-tiles")
1390 (arguments
1391 (substitute-keyword-arguments arguments
1392 ((#:make-flags flags)
1393 #~(cons* "TILES=1" "SOUND=1" #$flags))))
1394 (inputs
1395 (modify-inputs inputs
1396 (delete "ncurses")
1397 (append libogg
1398 libvorbis
1399 sdl2
1400 sdl2-image
1401 sdl2-mixer
1402 sdl2-ttf)))
1403 (synopsis
1404 (string-append (package-synopsis cataclysm-dda)
1405 ", with graphics and sound"))
1406 (description
1407 (string-append (package-description cataclysm-dda)
1408 "\n\nThis package includes graphical tiles and sound."))))
1409
1410(define-public cockatrice
1411 (let ((release-date "2026-05-23"))
1412 (package
1413 (name "cockatrice")
1414 (version "3.0.1")
1415 (source
1416 (origin
1417 (method git-fetch)
1418 (uri (git-reference
1419 (url "https://github.com/Cockatrice/Cockatrice")
1420 (commit (string-append release-date "-Release-" version))))
1421 (file-name (git-file-name name version))
1422 (sha256
1423 (base32
1424 "1bjn39lvk6clr6w98qki3lidkvaxsky3235izkdsbvysz4j6664p"))
1425 (modules '((guix build utils)))
1426 (snippet
1427 ;; Strip image URLs as they point towards non-free web services
1428 '(substitute* "libcockatrice_settings/libcockatrice/settings/download_settings.cpp"
1429 (("\"https://.*\",?") "")))))
1430 (build-system qt-build-system)
1431 (arguments
1432 (list
1433 #:qtbase qtbase
1434 #:configure-flags #~(list "-DWITH_SERVER=1"
1435 "-DWITH_CLIENT=1"
1436 "-DWITH_ORACLE=1"
1437 "-DTEST=1")))
1438 (native-inputs
1439 (list googletest pkg-config))
1440 (inputs
1441 (list protobuf
1442 qtmultimedia
1443 qtsvg
1444 qttools
1445 qttranslations
1446 qtwebsockets
1447 qtwayland
1448 xz
1449 zlib))
1450 (home-page "https://cockatrice.github.io")
1451 (synopsis "Tabletop card game simulator")
1452 (description "Cockatrice is a program for playing tabletop card games
1453over a network. Its server design prevents users from manipulating the game
1454for unfair advantage. The client also provides a single-player mode, which
1455allows users to brew while offline.")
1456 (license license:gpl2))))
1457
1458(define-public corsix-th
1459 (package
1460 (name "corsix-th")
1461 (version "0.67")
1462 (source
1463 (origin
1464 (method git-fetch)
1465 (uri (git-reference
1466 (url "https://github.com/CorsixTH/CorsixTH")
1467 (commit (string-append "v" version))))
1468 (file-name (git-file-name name version))
1469 (sha256
1470 (base32 "14996kbrwdrd0gpz19il2i4p650qdhjw8v8ka3aigk6pl4kda3sq"))))
1471 (build-system cmake-build-system)
1472 (arguments
1473 (list
1474 #:phases
1475 #~(modify-phases %standard-phases
1476 (add-after 'install 'wrap-binary
1477 (lambda _
1478 ;; Set Lua module paths and default MIDI soundfont on startup.
1479 (let* ((fluid #$(this-package-input "fluid-3"))
1480 (lua-version #$(version-major+minor (package-version lua)))
1481 (lua-cpath
1482 (map (lambda (lib)
1483 (string-append
1484 (assoc-ref %build-inputs (string-append "lua-" lib))
1485 "/lib/lua/" lua-version "/?.so"))
1486 '("filesystem" "lpeg"))))
1487 (wrap-program (string-append #$output "/bin/corsix-th")
1488 `("LUA_CPATH" ";" = ,lua-cpath)
1489 `("SDL_SOUNDFONTS" ":" suffix
1490 (,(string-append fluid "/share/soundfonts/FluidR3Mono_GM.sf3"))))))))
1491 #:tests? #f)) ; TODO need busted package to run tests
1492 ;; Omit Lua-Socket dependency to disable automatic updates.
1493 (inputs
1494 (list bash-minimal
1495 ffmpeg
1496 fluid-3
1497 freetype
1498 lua
1499 lua-filesystem
1500 lua-lpeg
1501 sdl2
1502 sdl2-mixer))
1503 (home-page "https://corsixth.com")
1504 (synopsis "Implementation of the @i{Theme Hospital} game engine")
1505 (description
1506 "This package provides a reimplementation of the 1997 Bullfrog business
1507simulation game @i{Theme Hospital}. As well as faithfully recreating the
1508original engine, CorsixTH adds support for high resolutions, custom levels and
1509more. This package does @emph{not} provide the game assets.")
1510 (license (list
1511 license:expat ; main license
1512 license:bsd-3)))) ; CorsixTH/Src/random.c
1513
1514(define-public cowsay
1515 ;; This is a continuation of Tony Monroe's now-unmaintained original, that
1516 ;; aims to become the ‘canonical modern fork’. We'll see. What it gives
1517 ;; us today is a bunch of fixes that other distros shipped as patches.
1518 (package
1519 (name "cowsay")
1520 (version "3.8.4")
1521 (source
1522 (origin
1523 (method git-fetch)
1524 (uri (git-reference
1525 (url "https://github.com/cowsay-org/cowsay")
1526 (commit (string-append "v" version))))
1527 (file-name (git-file-name name version))
1528 (sha256
1529 (base32 "0as4axm1v37d2bm86sksi6wrd0yc4jm2lyfdhr5k179b1mvnfx4v"))))
1530 (build-system gnu-build-system)
1531 (arguments
1532 (list #:make-flags
1533 #~(list (string-append "prefix=" #$output))
1534 #:phases
1535 #~(modify-phases %standard-phases
1536 (delete 'configure) ; no configure script
1537 (delete 'check)
1538 (add-after 'install 'check
1539 (lambda* (#:key outputs #:allow-other-keys)
1540 (invoke (string-append (assoc-ref outputs "out")
1541 "/bin/cowsay")
1542 "We're done!"))))))
1543 (inputs
1544 (list perl))
1545 (home-page (string-append "https://web.archive.org/web/20071026043648/"
1546 "http://www.nog.net:80/~tony/warez/cowsay.shtml"))
1547 (synopsis "Speaking cow text filter")
1548 (description "Cowsay is basically a text filter. Send some text into it,
1549and you get a cow saying your text. If you think a talking cow isn't enough,
1550cows can think too: all you have to do is run @command{cowthink}. If you're
1551tired of cows, a variety of other ASCII-art messengers are available.")
1552 (license license:gpl3+)))
1553
1554(define-public deal
1555 (package
1556 (name "deal")
1557 (version "3.1.11")
1558 (source (origin
1559 (method git-fetch)
1560 (uri (git-reference
1561 (url "https://github.com/gtwilliams/deal")
1562 (commit (string-append "v" version))))
1563 (file-name (git-file-name name version))
1564 (sha256
1565 (base32
1566 "1wcrx3yq5ycnkdnygcq80ljpgc9iwyrr8zayprzvbibvj77hdm0c"))))
1567 (build-system gnu-build-system)
1568 (arguments
1569 (list
1570 #:test-target "test"
1571 #:make-flags
1572 #~(let* ((tcl #$(this-package-input "tcl"))
1573 (tcl-version #$(version-major+minor (package-version tcl))))
1574 (list "CPPFLAGS += -O3"
1575 (string-append "CC=" #$(cc-for-target))
1576 (string-append "TCL_INCL=" tcl "/include")
1577 (string-append "LDFLAGS=-L" tcl "/lib"
1578 " -ltcl" tcl-version
1579 " -lm")
1580 (string-append "DATA_DIR=" #$output "/share/deal/")))
1581 #:phases
1582 #~(modify-phases %standard-phases
1583 (add-after 'unpack 'locate-pod2man
1584 (lambda* (#:key inputs #:allow-other-keys)
1585 (substitute* "Makefile"
1586 (("/usr/bin/pod2man")
1587 (search-input-file inputs "/bin/pod2man")))))
1588 (delete 'configure) ;no configure script
1589 ;; Prevent the error: "Makefile:248: Make.dep: No such file
1590 ;; or directory".
1591 (add-before 'build 'create-Make.dep
1592 (lambda _
1593 (call-with-output-file "Make.dep" (const #t))))
1594 ;; There is no install target. Do everything manually.
1595 (replace 'install
1596 (lambda _
1597 (let ((bin (string-append #$output "/bin"))
1598 (man (string-append #$output "/share/man/man6"))
1599 (data (string-append #$output "/share/deal")))
1600 (install-file "deal" bin)
1601 (install-file "deal.6" man)
1602 (install-file "deal.tcl" data)
1603 (for-each (lambda (d)
1604 (let ((target (string-append data "/" d)))
1605 (mkdir-p target)
1606 (copy-recursively d target)))
1607 '("ex" "format" "input" "lib")))))
1608 ;; Tests need to happen once the data is properly installed
1609 ;; because the "deal.tcl" script file location is hard-coded
1610 ;; in the "deal" binary.
1611 (delete 'check)
1612 (add-after 'install 'check
1613 (assoc-ref %standard-phases 'check)))))
1614 (native-inputs
1615 (list perl))
1616 (inputs
1617 (list tcl))
1618 (home-page "https://bridge.thomasoandrews.com/deal/")
1619 (synopsis "Bridge hand generator")
1620 (description
1621 "This program generates bridge hands. It can be told to generate only
1622hands satisfying conditions like being balanced, having a range of
1623High Cards Points (HCP), controls, or other user-definable properties.
1624Hands can be output in various formats, like PBN for feeding to other
1625bridge programs, Deal itself, or split up into a file per player for
1626practise.")
1627 (license (list license:gpl2+
1628 license:gpl1+ ;ansidecl.h
1629 license:bsd-3)))) ;random.c
1630
1631(define-public doom-runner
1632 (package
1633 (name "doom-runner")
1634 (version "1.9.1")
1635 (source
1636 (origin
1637 (method git-fetch)
1638 (uri (git-reference
1639 (url "https://github.com/Youda008/DoomRunner")
1640 (commit (string-append "v" version))))
1641 (file-name (git-file-name name version))
1642 (sha256
1643 (base32 "19jq5cj6rc8d5ghd9321a2f3v0b7z928990d7dj6ynyhkpcj769p"))
1644 (modules '((guix build utils)))
1645 (snippet #~(delete-file-recursively "Screenshots")))) ;Save 1.4MiB.
1646 (build-system qt-build-system)
1647 (arguments
1648 (list
1649 #:qtbase qtbase
1650 #:tests? #f ;no tests
1651 #:modules '((guix build qt-build-system)
1652 ((guix build gnu-build-system) #:prefix gnu:)
1653 (guix build utils))
1654 #:phases
1655 #~(modify-phases %standard-phases
1656 (replace 'configure
1657 (lambda _
1658 (invoke "qmake" "DoomRunner.pro" "-spec" "linux-g++"
1659 "\"CONFIG+=release\""
1660 (string-append "INSTALL_DIR=" #$output))))
1661 (replace 'build (assoc-ref gnu:%standard-phases 'build))
1662 (replace 'install (assoc-ref gnu:%standard-phases 'install))
1663 (add-after 'install 'install-xdg
1664 (lambda _
1665 (with-directory-excursion #$output
1666 (install-file "DoomRunner" "bin/")
1667 (delete-file "DoomRunner"))
1668 (with-directory-excursion "Install/XDG"
1669 (install-file "DoomRunner.desktop"
1670 (string-append #$output "/share/applications"))
1671 (install-file "io.github.Youda008.DoomRunner.appdata.xml"
1672 (string-append #$output "/share/metainfo"))
1673 (for-each
1674 (lambda (size)
1675 (let ((filename (simple-format #f "DoomRunner.~sx~s.png"
1676 size size)))
1677 (chmod filename #o444)
1678 (install-file
1679 filename
1680 (simple-format #f "~a/share/icons/hicolor/~sx~s/apps"
1681 #$output size size))))
1682 '(16 24 32 48 64 128))))))))
1683 (home-page "https://github.com/Youda008/DoomRunner")
1684 (synopsis "Launcher for Doom engine games")
1685 (description "Doom Runner is yet another launcher of common Doom source
1686ports (e.g. GZDoom, Zandronum, PrBoom) with a graphical user interface. It
1687is written in C++ and Qt, and it is designed around the idea of presets for
1688various multi-file modifications to allow one-click switching between them.")
1689 (license license:gpl3)))
1690
1691(define-public falltergeist
1692 (package
1693 (name "falltergeist")
1694 (version "0.3.1")
1695 (source (origin
1696 (method git-fetch)
1697 (uri (git-reference
1698 (url "https://github.com/falltergeist/falltergeist")
1699 (commit version)))
1700 (file-name (git-file-name name version))
1701 (sha256
1702 (base32
1703 "05cg58i2g32wbmrvmdsicic8xs83gld3qr1p7r4lnlckcl1l7dy4"))))
1704 (build-system cmake-build-system)
1705 (arguments
1706 `(#:tests? #f)) ; no tests provided
1707 (native-inputs (list pkg-config))
1708 (inputs `(("sdl" ,(sdl-union (list sdl2
1709 sdl2-image
1710 sdl2-mixer)))
1711 ("glew" ,glew)
1712 ("glm" ,glm)))
1713 (home-page "https://falltergeist.org/")
1714 (synopsis "Fallout 2 game engine")
1715 (description "This package provides the Fallout 2 game engine. Game data
1716should be placed in @file{~/.local/share/falltergeist}.")
1717 (license license:gpl3+)))
1718
1719(define-public foobillard++
1720 ;; Even though this latest revision is old already, stable release is
1721 ;; lagging way behind it, and has issues with textures rendering.
1722 (let ((svn-revision 170))
1723 (package
1724 (name "foobillard++")
1725 (version (string-append "3.43-r" (number->string svn-revision)))
1726 (source
1727 (origin
1728 (method svn-fetch)
1729 (uri (svn-reference
1730 (url "svn://svn.code.sf.net/p/foobillardplus/code/")
1731 (revision svn-revision)))
1732 (file-name (git-file-name name version))
1733 (sha256
1734 (base32 "00b693ys5zvzjbjzzj3dqfzm5xw64gwjf9m8qv6bkmf0klbhmayk"))
1735 (patches
1736 (search-patches "foobillard++-pkg-config.patch"))
1737 (modules '((guix build utils)))
1738 (snippet
1739 '(begin
1740 ;; Unfortunately, the game includes background music with
1741 ;; a non-commercial clause. Delete it.
1742 (for-each delete-file (find-files "data/music" "\\.ogg$"))
1743 #t))))
1744 (build-system gnu-build-system)
1745 (arguments
1746 `(#:configure-flags
1747 (list
1748 ;; Install data in a less exotic location.
1749 (string-append "--prefix=" (assoc-ref %outputs "out") "/share")
1750 ;; Prevent a build error about undefined trigonometric functions.
1751 "--enable-fastmath=no")
1752 #:phases
1753 (modify-phases %standard-phases
1754 (add-after 'unpack 'fix-makefile
1755 ;; Remove hard-coded directories. Also fix installation
1756 ;; rule: it tries to move around non-existent files or
1757 ;; files already moved.
1758 (lambda* (#:key outputs #:allow-other-keys)
1759 (substitute* "Makefile.am"
1760 (("/usr") (assoc-ref outputs "out"))
1761 (("cp .*?/foobillardplus\\.desktop.*") "")
1762 (("cp .*?/foobillardplus\\.(png|xbm) \\$\\(datarootdir\\).*")
1763 ""))
1764 #t))
1765 (add-after 'unpack 'unbundle-font
1766 ;; XXX: The package ships with LinBiolinum_aSB.ttf and
1767 ;; LinBiolinum_aS.ttf, which are not provided by
1768 ;; `font-linuxlibertine' package. Therefore, we cannot replace
1769 ;; them yet.
1770 (lambda* (#:key inputs #:allow-other-keys)
1771 (let ((dejavu (string-append (assoc-ref inputs "font-dejavu")
1772 "/share/fonts/truetype/")))
1773 (with-directory-excursion "data"
1774 (for-each (lambda (f)
1775 (delete-file f)
1776 (symlink (string-append dejavu f) f))
1777 '("DejaVuSans-Bold.ttf" "DejaVuSans.ttf"))))
1778 #t))
1779 (replace 'bootstrap
1780 (lambda _
1781 (invoke "aclocal" "--force")
1782 (invoke "autoconf" "-f")
1783 (invoke "autoheader" "-f")
1784 (invoke "automake" "-a" "-c" "-f")))
1785 (add-before 'build 'prepare-build
1786 ;; Set correct environment for SDL.
1787 (lambda* (#:key inputs #:allow-other-keys)
1788 (setenv "CPATH"
1789 (string-append
1790 (search-input-directory inputs "include/SDL")
1791 ":" (or (getenv "CPATH") "")))))
1792 (add-before 'build 'fix-settings-directory
1793 ;; Hide foobillardplus settings directory in $HOME.
1794 (lambda _
1795 (substitute* "src/history.c"
1796 (("/foobillardplus-data") "/.foobillardplus"))
1797 #t))
1798 (add-before 'install 'create-directories
1799 ;; Install process does not create directories before
1800 ;; trying to move file in it.
1801 (lambda* (#:key outputs #:allow-other-keys)
1802 (let ((out (assoc-ref outputs "out")))
1803 (mkdir-p (string-append out "/share/icons"))
1804 (mkdir-p (string-append out "/share/applications")))
1805 #t))
1806 (add-after 'install 'symlink-executable
1807 ;; Symlink executable to $out/bin.
1808 (lambda* (#:key outputs #:allow-other-keys)
1809 (let* ((out (assoc-ref outputs "out"))
1810 (bin (string-append out "/bin")))
1811 (mkdir-p bin)
1812 (with-directory-excursion bin
1813 (symlink "../share/foobillardplus/bin/foobillardplus"
1814 "foobillardplus"))
1815 #t))))))
1816 (native-inputs
1817 (list autoconf automake pkg-config))
1818 (inputs
1819 `(("font-dejavu" ,font-dejavu)
1820 ("freetype" ,freetype)
1821 ("glu" ,glu)
1822 ("libpng" ,libpng)
1823 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net)))))
1824 (home-page "https://foobillardplus.sourceforge.net/")
1825 (synopsis "3D billiard game")
1826 (description "FooBillard++ is an advanced 3D OpenGL billiard game
1827based on the original foobillard 3.0a sources from Florian Berger.
1828You can play it with one or two players or against the computer.
1829
1830The game features:
1831
1832@itemize
1833@item Wood paneled table with gold covers and gold diamonds.
1834@item Reflections on balls.
1835@item Zoom in and out, rotation, different angles and bird's eye view.
1836@item Different game modes: 8 or 9-ball, Snooker or Carambole.
1837@item Tournaments. Compete against other players.
1838@item Animated cue with strength and eccentric hit adjustment.
1839@item Jump shots and snipping.
1840@item Realistic gameplay and billiard sounds.
1841@item Red-Green stereo.
1842@item And much more.
1843@end itemize")
1844 (license (list license:gpl2 license:silofl1.1)))))
1845
1846(define-public freedoom
1847 (package
1848 (name "freedoom")
1849 (version "0.13.0")
1850 (source
1851 (origin
1852 (method git-fetch)
1853 (uri (git-reference
1854 (url "https://github.com/freedoom/freedoom")
1855 (commit (string-append "v" version))))
1856 (file-name (git-file-name name version))
1857 (sha256
1858 (base32 "01fwzwi4a68n26d627dkcn85jz854mc3zfnzzkvinmx9yy3z5qmq"))))
1859 (build-system gnu-build-system)
1860 (arguments
1861 '(#:make-flags
1862 (list (string-append "prefix=" (assoc-ref %outputs "out")))
1863 #:tests? #f ; no check target
1864 #:phases
1865 (modify-phases %standard-phases
1866 (delete 'bootstrap)
1867 (replace 'configure
1868 (lambda* (#:key inputs outputs #:allow-other-keys)
1869 (let* ((freedoom (assoc-ref outputs "out"))
1870 (wad-dir (string-append freedoom "/share/games/doom")))
1871 ;; Make sure that the install scripts know where to find
1872 ;; the appropriate WAD files.
1873 (substitute* "dist/freedoom"
1874 (("IWAD=freedm.wad")
1875 (string-append "IWAD=" wad-dir "/freedm.wad"))
1876 (("IWAD=freedoom1.wad")
1877 (string-append "IWAD=" wad-dir "/freedoom1.wad"))
1878 (("IWAD=freedoom2.wad")
1879 (string-append "IWAD=" wad-dir "/freedoom2.wad")))
1880 #t))))))
1881 (native-inputs
1882 (list asciidoc deutex python python-pillow))
1883 (home-page "https://freedoom.github.io/")
1884 (synopsis "Free content game based on the Doom engine")
1885 (native-search-paths
1886 (list (search-path-specification
1887 (variable "DOOMWADDIR")
1888 (files '("share/games/doom")))
1889 (search-path-specification
1890 (variable "DOOMWADPATH")
1891 (files '("share/games/doom")))))
1892 (description
1893 "The Freedoom project aims to create a complete free content first person
1894shooter game. Freedoom by itself is just the raw material for a game: it must
1895be paired with a compatible game engine (such as @code{prboom-plus}) to be
1896played. Freedoom complements the Doom engine with free levels, artwork, sound
1897effects and music to make a completely free game.")
1898 (license license:bsd-3)))
1899
1900(define-public freedroidrpg
1901 (package
1902 (name "freedroidrpg")
1903 (version "1.0")
1904 (source
1905 (origin
1906 (method url-fetch)
1907 (uri (let ((major+minor
1908 (version-major+minor
1909 (string-replace-substring version "rc" "."))))
1910 (string-append "http://ftp.osuosl.org/pub/freedroid/"
1911 "freedroidRPG-" major+minor "/"
1912 "freedroidRPG-" version ".tar.gz")))
1913 (sha256
1914 (base32 "1kxvyg70r9x8q40kn5lr3h1q60d6jx9mkvxls4aflj22b45vg5br"))))
1915 (build-system gnu-build-system)
1916 (arguments
1917 (list
1918 #:configure-flags
1919 #~(list
1920 (string-append "CFLAGS=-fcommon "
1921 "-I" #$(this-package-input "sdl-gfx") "/include/SDL "
1922 "-I" #$(this-package-input "sdl-image") "/include/SDL "
1923 "-I" #$(this-package-input "sdl-mixer") "/include/SDL")
1924 "--enable-opengl")
1925 ;; FIXME: the test suite fails with the following error output:
1926 ;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
1927 ;; SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
1928 #:tests? #f))
1929 (native-inputs
1930 (list pkg-config))
1931 (inputs
1932 (list glew
1933 glu
1934 libjpeg-turbo
1935 libogg
1936 libpng
1937 libvorbis
1938 mesa
1939 python-wrapper
1940 sdl
1941 sdl-gfx
1942 sdl-image
1943 sdl-mixer
1944 zlib))
1945 (home-page "https://www.freedroid.org/")
1946 (synopsis "Isometric role-playing game against killer robots")
1947 (description
1948 "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
1949The game tells the story of a world destroyed by a conflict between robots and
1950their human masters. To restore peace to humankind, the player must complete
1951numerous quests while fighting off rebelling robots---either by taking control
1952of them, or by simply blasting them to pieces with melee and ranged weapons in
1953real-time combat.")
1954 (license (list license:expat ; lua/
1955 license:gpl3 ; src/gen_savestruct.py
1956 license:gpl2+)))) ; the rest
1957
1958(define-public golly
1959 (package
1960 (name "golly")
1961 (version "5.0")
1962 (source (origin
1963 (method url-fetch)
1964 (uri (string-append "mirror://sourceforge/golly/golly/golly-"
1965 version "/golly-" version
1966 "-src.tar.gz"))
1967 (sha256
1968 (base32
1969 "049n634abxfpgh4imh3s5qqfn9nbwmcl6jm91f29ngqm53jcsdaq"))))
1970 (build-system gnu-build-system)
1971 (arguments
1972 (list
1973 #:make-flags
1974 #~(list "CC=gcc"
1975 (string-append "GOLLYDIR="
1976 #$output
1977 "/share/golly"))
1978 #:tests? #f ; no check target
1979 #:phases
1980 #~(modify-phases %standard-phases
1981 (delete 'configure)
1982 (replace 'build
1983 (lambda* (#:key make-flags #:allow-other-keys)
1984 (with-directory-excursion "gui-wx"
1985 (apply invoke `("make" ,@make-flags "-f" "makefile-gtk")))))
1986 (replace 'install
1987 (lambda _
1988 (let* ((bin (string-append #$output "/bin"))
1989 (doc (string-append #$output "/share/doc/golly"))
1990 (pixmaps (string-append #$output "/share/pixmaps"))
1991 (share (string-append #$output "/share/golly")))
1992 (for-each (lambda (binary)
1993 (install-file binary bin))
1994 (list "bgolly" "golly"))
1995 (for-each (lambda (document)
1996 (install-file
1997 (string-append "docs/" document ".html")
1998 doc))
1999 (list "License" "ReadMe" "ToDo"))
2000 (install-file "gui-wx/icons/appicon.xpm" pixmaps)
2001 (for-each (lambda (folder)
2002 (copy-recursively
2003 folder
2004 (string-append share "/" folder)))
2005 (list "Help" "Patterns" "Rules" "Scripts"))))))))
2006 (native-inputs
2007 (list lua
2008 python-setuptools))
2009 (inputs
2010 (list glu
2011 mesa
2012 python
2013 sdl2
2014 wxwidgets
2015 zlib))
2016 (home-page "https://golly.sourceforge.net/")
2017 (synopsis "Software for exploring cellular automata")
2018 (description
2019 "Golly simulates Conway's Game of Life and many other types of cellular
2020automata. The following features are available:
2021@enumerate
2022@item Support for bounded and unbounded universes, with cells of up to 256
2023 states.
2024@item Support for multiple algorithms, including Bill Gosper's Hashlife
2025 algorithm.
2026@item Loading patterns from BMP, PNG, GIF and TIFF image files.
2027@item Reading RLE, macrocell, Life 1.05/1.06, dblife and MCell files.
2028@item Scriptable via Lua or Python.
2029@item Extracting patterns, rules and scripts from zip files.
2030@item Downloading patterns, rules and scripts from online archives.
2031@item Pasting patterns from the clipboard.
2032@item Unlimited undo/redo.
2033@item Configurable keyboard shortcuts.
2034@item Auto fit option to keep patterns within the view.
2035@end enumerate")
2036 (license license:gpl2+)))
2037
2038(define-public joycond
2039 ;; Important: Do *not* update to a newer commit until an issue causing a
2040 ;; 100% CPU usage in the next commit
2041 ;; cdec32865c6093bd4761326ea461aaa2fcf7d1b4 is resolved (see:
2042 ;; https://github.com/DanielOgorchock/joycond/issues/153).
2043 (let ((commit "5b590ecc9bca181d8bc21377e752126bc9180319")
2044 (revision "2"))
2045 (package
2046 (name "joycond")
2047 (version (git-version "0.1.0" revision commit))
2048 (source
2049 (origin
2050 (method git-fetch)
2051 (uri (git-reference
2052 (url "https://github.com/DanielOgorchock/joycond")
2053 (commit commit)))
2054 (file-name (git-file-name name version))
2055 (sha256
2056 (base32 "18aig7x5n8hh8ffw0qk2hx2b93xrs4jp652vp8cxklw9xyy33f15"))))
2057 (build-system cmake-build-system)
2058 (arguments
2059 (list #:tests? #f ;no test suite
2060 #:phases
2061 #~(modify-phases %standard-phases
2062 (add-after 'unpack 'fix-bin-location
2063 (lambda* (#:key inputs #:allow-other-keys)
2064 (substitute* "CMakeLists.txt"
2065 (("/lib/udev/rules.d")
2066 (string-append #$output "/lib/udev/rules.d"))
2067 (("/etc/systemd/system")
2068 (string-append #$output "/etc/systemd/system"))
2069 (("/etc/modules-load.d")
2070 (string-append #$output "/etc/modules-load.d"))
2071 (("/usr/bin")
2072 (string-append #$output "/bin")))
2073 (substitute* "udev/89-joycond.rules"
2074 (("/bin/setfacl")
2075 (search-input-file inputs "bin/setfacl"))))))))
2076 (native-inputs (list pkg-config))
2077 (inputs (list acl eudev libevdev))
2078 (home-page "https://github.com/DanielOgorchock/joycond")
2079 (synopsis "Joy-Con controller daemon")
2080 (description "This package provides a userspace daemon for the Nintendo
2081Joy-Con controllers.")
2082 (license license:gpl3+))))
2083
2084(define-public julius
2085 (package
2086 (name "julius")
2087 (version "1.7.0")
2088 (source
2089 (origin
2090 (method git-fetch)
2091 (uri (git-reference
2092 (url "https://github.com/bvschaik/julius")
2093 (commit (string-append "v" version))))
2094 (file-name (git-file-name name version))
2095 (sha256
2096 (base32 "0w7kmgz9ya0ck9cxhsyralarg7y6ydx4plmh33r4mkxkamlr7493"))
2097 ;; Remove unused bundled libraries.
2098 (modules '((guix build utils)))
2099 (snippet
2100 '(begin
2101 (with-directory-excursion "ext"
2102 (for-each delete-file-recursively '("dirent" "png" "SDL2" "zlib")))
2103 #t))))
2104 (build-system cmake-build-system)
2105 (inputs
2106 (list libpng sdl2 sdl2-mixer))
2107 (home-page "https://github.com/bvschaik/julius")
2108 (synopsis "Re-implementation of Caesar III game engine")
2109 (description
2110 "Engine for Caesar III, a city-building real-time strategy game.
2111Julius includes some UI enhancements while preserving the logic (including
2112bugs) of the original game, so that saved games are compatible. This package
2113does not include game data.")
2114 (license (list license:agpl3
2115 license:zlib)))) ; ext/tinyfiledialogs
2116
2117(define-public augustus
2118 (package
2119 (inherit julius)
2120 (name "augustus")
2121 (version "3.2.0")
2122 (source
2123 (origin
2124 (method git-fetch)
2125 (uri (git-reference
2126 (url "https://github.com/Keriew/augustus")
2127 (commit (string-append "v" version))))
2128 (file-name (git-file-name name version))
2129 (sha256
2130 (base32 "0d1k5279imc17mk3lxn8amc4ljgcj4v6x6lj2w3bph1z0a7a4bim"))
2131 ;; Remove unused bundled libraries.
2132 (modules '((guix build utils)))
2133 (snippet
2134 '(begin
2135 (with-directory-excursion "ext"
2136 (for-each delete-file-recursively
2137 '("dirent" "expat" "png" "SDL2" "zlib")))))))
2138 (arguments
2139 ;; No tests. See https://github.com/Keriew/augustus/issues/82.
2140 `(#:tests? #f))
2141 (inputs (modify-inputs inputs
2142 (prepend expat)))
2143 (home-page "https://github.com/Keriew/augustus")
2144 (synopsis "Re-implementation of Caesar III game engine with gameplay changes")
2145 (description
2146 "Fork of Julius, an engine for the a city-building real-time strategy
2147game Caesar III. Gameplay enhancements include:
2148
2149@itemize
2150@item roadblocks;
2151@item market special orders;
2152@item global labour pool;
2153@item partial warehouse storage;
2154@item increased game limits;
2155@item zoom controls.
2156@end itemize\n")))
2157
2158(define-public meandmyshadow
2159 (package
2160 (name "meandmyshadow")
2161 (version "0.5a")
2162 (source (origin
2163 (method url-fetch)
2164 (uri (string-append "mirror://sourceforge/meandmyshadow/"
2165 version "/meandmyshadow-" version
2166 "-src.tar.gz"))
2167 (sha256
2168 (base32
2169 "0i98v6cgmpsxy7mbb0s2y6f6qq6mkwzk2nrv1nz39ncf948aky2h"))))
2170 (build-system cmake-build-system)
2171 (arguments
2172 `(#:tests? #f)) ; there are no tests
2173 (native-inputs
2174 (list pkg-config))
2175 (inputs
2176 `(("curl" ,curl)
2177 ("libarchive" ,libarchive)
2178 ("lua" ,lua)
2179 ("sdl" ,(sdl-union (list sdl2
2180 sdl2-image
2181 sdl2-mixer
2182 sdl2-ttf)))))
2183 (home-page "https://acmepjz.github.io/meandmyshadow/")
2184 (synopsis "Puzzle/platform game")
2185 (description "Me and My Shadow is a puzzle/platform game in which you try
2186to reach the exit by solving puzzles. Spikes, moving blocks, fragile blocks
2187and much more stand between you and the exit. Record your moves and let your
2188shadow mimic them to reach blocks you couldn't reach alone.")
2189 (license license:gpl3+)))
2190
2191(define-public opensurge
2192 (package
2193 (name "opensurge")
2194 (version "0.6.1.1")
2195 (source
2196 (origin
2197 (method git-fetch)
2198 (uri (git-reference
2199 (url "https://github.com/alemart/opensurge")
2200 (commit (string-append "v" version))))
2201 (file-name (git-file-name name version))
2202 (sha256
2203 (base32 "1hwnjgkbywspmsmpmmnndqil86qqyd21y2q5krs8znwi35ychd3q"))))
2204 (build-system cmake-build-system)
2205 (arguments
2206 (list #:tests? #f ; there are no tests
2207 #:configure-flags
2208 #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
2209 (string-append "-DGAME_BINDIR=" #$output "/bin") ; not games
2210 (string-append "-DGAME_DATADIR=" #$output "/share/" #$name)
2211 (string-append "-DDESKTOP_ENTRY_PATH=" #$output "/share/applications")
2212 (string-append "-DDESKTOP_ICON_PATH=" #$output "/share/pixmaps")
2213 (string-append "-DDESKTOP_METAINFO_PATH=" #$output "/share/metainfo"))
2214 #:phases
2215 #~(modify-phases %standard-phases
2216 (add-after 'unpack 'fix-xdg-open-path
2217 (lambda* (#:key inputs #:allow-other-keys)
2218 ;; Look for xdg-open in the store.
2219 (substitute* "src/core/web.c"
2220 (("/usr/(bin/xdg-open)" _ bin)
2221 (search-input-file inputs bin)))))
2222 (add-after 'unpack 'unbundle-fonts
2223 (lambda* (#:key inputs #:allow-other-keys)
2224 ;; Replace bundled fonts with links to the store.
2225 (with-directory-excursion "fonts"
2226 (for-each (lambda (font)
2227 (let ((file (string-append "share/fonts/truetype/"
2228 font)))
2229 (delete-file font)
2230 (symlink (search-input-file inputs file) font)))
2231 '("Roboto-Black.ttf"
2232 "Roboto-Bold.ttf"
2233 "Roboto-Medium.ttf"))))))))
2234 (inputs
2235 (list allegro font-google-roboto mesa physfs surgescript xdg-utils))
2236 (home-page "https://opensurge2d.org")
2237 (synopsis "2D retro side-scrolling game")
2238 (description "@code{Open Surge} is a 2D retro side-scrolling platformer
2239inspired by the Sonic games. The player runs at high speeds through each
2240level while collecting items and avoiding obstacles. The game includes a
2241built-in level editor.")
2242 (license
2243 ;; Code is under GPL 3+, assets are under various licenses.
2244 ;; See src/misc/credits.c for details.
2245 (list license:gpl3+
2246 license:cc0
2247 license:cc-by3.0
2248 license:cc-by-sa3.0
2249 license:expat
2250 license:public-domain
2251 license:silofl1.1))))
2252
2253(define-public kgames
2254 (package
2255 (name "kgames")
2256 (version "2.4.1")
2257 (source (origin
2258 (method git-fetch)
2259 (uri (git-reference
2260 (url "https://github.com/keith-packard/kgames")
2261 (commit version)))
2262 (file-name (git-file-name name version))
2263 (sha256
2264 (base32
2265 "09alaszhwnzzv5b0cxv5dia9y0fm63n2igv42ydkq299h7avb5fq"))))
2266 (build-system meson-build-system)
2267 (arguments
2268 (list #:configure-flags
2269 #~'("-Duser-menu=false"
2270 "-Dbindir=bin")))
2271 (native-inputs
2272 (list bison flex pkg-config))
2273 (inputs
2274 (list cairo
2275 fontconfig
2276 freetype
2277 librsvg
2278 libx11
2279 libxaw
2280 libxft
2281 libxmu
2282 libxpm
2283 libxrender
2284 ncurses))
2285 (synopsis "Xaw based solitaire games")
2286 (home-page "https://github.com/keith-packard/kgames")
2287 (description
2288 "This package provides a collection of solitaire games: kaces, kcanfield,
2289kcribbage, kdominos, kklondike, kmcarlo, kmontana, kslyfox, kspider, ktabby,
2290kthieves, ktowers, xmille and xreversi.")
2291 ;; Code is under BSD-3 and Expat, card images are under CC0.
2292 (license (list license:bsd-3 license:expat license:cc0))))
2293
2294(define-public black-hole-solver
2295 (package
2296 (name "black-hole-solver")
2297 (version "1.14.0")
2298 (source
2299 (origin
2300 (method url-fetch)
2301 (uri (string-append
2302 "https://fc-solve.shlomifish.org/downloads/fc-solve/black-hole-solver-"
2303 version ".tar.xz"))
2304 (sha256
2305 (base32 "1h2panbi4jkcijyknyxi74fkgd0jgjmp1mhg155hy5mv7l4vsisw"))))
2306 (build-system cmake-build-system)
2307 (arguments
2308 (list
2309 #:phases
2310 #~(modify-phases %standard-phases
2311 (add-after 'unpack 'delete-failing-tests
2312 (lambda _
2313 (delete-file "t/style-trailing-space.t"))))))
2314 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2315 ;; which are mutually incompatible
2316 (native-inputs
2317 (list `(,glib "bin")
2318 perl
2319 perl-class-xsaccessor
2320 perl-dir-manifest
2321 perl-env-path
2322 perl-file-find-object
2323 perl-file-find-object-rule
2324 perl-file-which
2325 perl-inline
2326 perl-inline-c
2327 perl-number-compare
2328 perl-path-tiny-0.150
2329 perl-test-differences
2330 perl-test-runvalgrind
2331 perl-test-some
2332 perl-test-trailingspace
2333 perl-text-glob
2334 pkg-config
2335 python))
2336 (inputs (list rinutils))
2337 (home-page "https://fc-solve.shlomifish.org/")
2338 (synopsis "Solver of various solitaire games")
2339 (description
2340 "Black-hole Solver is a program that automatically solves layouts of Black Hole and
2341similar variants of Card Solitaire such as Golf, and All in a Row.")
2342 (license license:expat)))
2343
2344(define-public freecell-solver
2345 (package
2346 (name "freecell-solver")
2347 (version "6.14.0")
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (string-append
2352 "https://fc-solve.shlomifish.org/downloads/fc-solve/freecell-solver-"
2353 version ".tar.xz"))
2354 (sha256
2355 (base32 "1p775imxqycpky3j3pa5whzqcxjbr3kv2z1d20hxbg12akc2a48x"))))
2356 (build-system cmake-build-system)
2357 (arguments
2358 (list
2359 #:configure-flags
2360 #~(list "-DFCS_DISABLE_PATSOLVE=1")
2361 #:phases
2362 #~(modify-phases %standard-phases
2363 (add-after 'unpack 'delete-failing-tests
2364 (lambda _
2365 (delete-file "t/t/tidyall.t")
2366 (delete-file "t/t/sh-shabang.t")
2367 (delete-file "t/t/py-flake8.t")
2368 (delete-file "t/t/style-trailing-space.t"))))))
2369 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2370 ;; which are mutually incompatible
2371 (native-inputs
2372 (list cmocka
2373 `(,glib "bin")
2374 gperf
2375 perl
2376 perl-chi
2377 perl-file-find-object
2378 perl-file-find-object-rule
2379 perl-moo-2
2380 perl-number-compare
2381 perl-path-tiny-0.150
2382 perl-task-freecellsolver-testing
2383 perl-task-test-run-allplugins
2384 perl-test-runvalgrind
2385 perl-template-toolkit
2386 perl-code-tidyall-plugin-testcount
2387 pkg-config
2388 python
2389 python-cffi
2390 python-freecell-solver
2391 python-pycotap
2392 python-six
2393 the-silver-searcher
2394 tidyall))
2395 (inputs (list rinutils))
2396 (propagated-inputs (list python-pysol-cards))
2397 (home-page "https://fc-solve.shlomifish.org/")
2398 (synopsis "Solver of various solitaire games")
2399 (description
2400 "Freecell Solver is a program that automatically solves layouts of Freecell and
2401similar variants of Card Solitaire such as Eight Off, Forecell, and Seahaven Towers, as
2402well as Simple Simon boards.")
2403 (license license:expat)))
2404
2405(define-public knightsgame
2406 (package
2407 (name "knightsgame")
2408 (version "025")
2409 (source (origin
2410 (method url-fetch)
2411 (uri (string-append "http://www.knightsgame.org.uk/files/knights_"
2412 version "_src.tar.gz"))
2413 (sha256
2414 (base32
2415 "18vp2ygvn0s0jz8rm585jqf6hjqkam1ximq81k0r9hpmfj7wb88f"))
2416 (modules '((guix build utils)))
2417 (snippet
2418 ;; Fix a missing include for std::map.
2419 #~(substitute* "src/shared/impl/lua_func_wrapper.cpp"
2420 (("#include \"misc[.]hpp\"" x)
2421 (string-append "#include <map>\n" x))))))
2422 (build-system gnu-build-system)
2423 (arguments
2424 '(#:make-flags
2425 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2426 "CXXFLAGS=-lpthread")
2427 #:phases
2428 (modify-phases %standard-phases
2429 ;; No configure script.
2430 (delete 'configure))
2431 #:tests? #f)) ;; No check target.
2432 (inputs
2433 `(("boost" ,boost-1.83)
2434 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
2435 ("freetype" ,freetype)
2436 ("fontconfig" ,fontconfig)
2437 ("curl" ,curl)))
2438 (native-inputs
2439 (list pkg-config))
2440 (home-page "http://www.knightsgame.org.uk/")
2441 (synopsis "Multiplayer dungeon game involving knights and quests")
2442 (description "Knights is a multiplayer game involving several knights who
2443must run around a dungeon and complete various quests. Each game revolves
2444around a quest – for example, you might have to find some items and carry them
2445back to your starting point. This may sound easy, but as there are only
2446enough items in the dungeon for one player to win, you may end up having to
2447kill your opponents to get their stuff! Other quests involve escaping from
2448the dungeon, fighting a duel to the death against the enemy knights, or
2449destroying an ancient book using a special wand.")
2450 ;; This package includes modified sources of lua (X11), enet (Expat), and
2451 ;; guichan (BSD-3). The "Coercri" library is released under the Boost
2452 ;; license. The whole package is released under GPLv3+.
2453 (license license:gpl3+)))
2454
2455(define-public ghosthop
2456 (let ((commit "9fefc22830ff8fde484452d7a249f4c54feec0fc")
2457 (revision "1"))
2458 (package
2459 (name "ghosthop")
2460 (version (git-version "0" revision commit))
2461 (source
2462 (origin
2463 (method git-fetch)
2464 (uri (git-reference
2465 (url "https://gitlab.com/gcmas/ghosthop.git")
2466 (commit commit)))
2467 (file-name (git-file-name name version))
2468 (sha256
2469 (base32
2470 "021awll73bgjk61r6y6cbqn0dpmki9jp627km7yhx5px15panslq"))
2471 (modules '((guix build utils)))
2472 (snippet '(delete-file-recursively "vendor"))))
2473 (build-system copy-build-system)
2474 (arguments
2475 (list
2476 #:install-plan
2477 ;; 'ghosthop' loads 'asset' and 'scm' from the current directory.
2478 #~'(("ghosthop" "opt/ghosthop/")
2479 ("asset" "opt/ghosthop/")
2480 ("scm" "opt/ghosthop/"))
2481 #:phases
2482 #~(modify-phases %standard-phases
2483 (add-before 'install 'build
2484 ;; Avoid its Makefile to build with system libraries.
2485 (lambda* (#:key inputs #:allow-other-keys)
2486 (with-output-to-file "rlbind.c"
2487 (lambda ()
2488 (invoke "repl" "rlbind.scm")))
2489 (invoke #$(cc-for-target)
2490 "-o" "ghosthop"
2491 "-O3" "-lm" "-lraylib"
2492 (search-input-file inputs "/share/s7/s7.c")
2493 "rlbind.c" "src/init.c")
2494 (invoke #$(strip-for-target) "ghosthop")))
2495 (add-after 'install 'install-launcher
2496 ;; Create a launcher script for 'ghosthop'.
2497 (lambda* (#:key inputs outputs #:allow-other-keys)
2498 (let* ((out (assoc-ref outputs "out"))
2499 (bindir (string-append out "/bin"))
2500 (gamedir (string-append out "/opt/ghosthop"))
2501 (launcher (string-append bindir "/ghosthop"))
2502 (bash (search-input-file inputs "/bin/bash")))
2503 (mkdir (dirname launcher))
2504 (with-output-to-file launcher
2505 (lambda ()
2506 (format #t "#!~a~%" bash)
2507 (format #t "cd ~a~%" gamedir)
2508 (format #t "exec -a ghosthop ~a~%"
2509 (string-append gamedir "/ghosthop"))))
2510 (chmod launcher #o755)))))))
2511 (native-inputs (list s7))
2512 (inputs (list bash-minimal raylib))
2513 (home-page "https://gitlab.com/gcmas/ghosthop")
2514 (synopsis "Puzzle game with colored rules")
2515 (description "This is a small puzzle game made for the 2024 Spring Lisp
2516Game Jam. The objective is to reach the goal by assigning rules to colors.")
2517 (license (list license:gpl3+ ;code and other assets
2518 license:cc-by-sa3.0))))) ;music
2519
2520(define-public gnome-2048
2521 (package
2522 (name "gnome-2048")
2523 (version "50.2")
2524 (source (origin
2525 (method url-fetch)
2526 (uri (string-append "mirror://gnome/sources/gnome-2048/"
2527 (version-major version) "/"
2528 "gnome-2048-" version ".tar.xz"))
2529 (sha256
2530 (base32
2531 "1a9dpm14lk2b3p9g8gh0qhyp6yv6ijphi2arkv4z130jlrldy5bd"))))
2532 (build-system meson-build-system)
2533 (arguments
2534 (list
2535 ;; The 'libgnome-games-support-tests' test fails (see:
2536 ;; <https://gitlab.gnome.org/GNOME/gnome-2048/-/work_items/56>).
2537 #:tests? #f
2538 #:glib-or-gtk? #t
2539 #:imported-modules
2540 `((guix build cargo-build-system)
2541 ,@%meson-build-system-modules)
2542 #:modules '((guix build meson-build-system)
2543 ((guix build cargo-build-system) #:prefix cargo:)
2544 (guix build utils))
2545 #:phases
2546 #~(modify-phases %standard-phases
2547 (add-after 'unpack 'prepare-cargo-build-system
2548 (lambda args
2549 (substitute* "src/meson.build"
2550 ;; The build system sets CARGO_HOME itself, which is also used
2551 ;; by the cargo configure phase.
2552 ((".*cargo_env.set.*CARGO_HOME.*") ""))
2553 (for-each
2554 (lambda (phase)
2555 (format #t "Running cargo phase: ~a~%" phase)
2556 (apply (assoc-ref cargo:%standard-phases phase)
2557 #:vendor-dir ".cargo/vendor"
2558 #:cargo-target #$(cargo-triplet)
2559 args))
2560 '(unpack-rust-crates
2561 configure
2562 check-for-pregenerated-files
2563 patch-cargo-checksums))))
2564 (add-after 'unpack 'skip-gtk-update-icon-cache
2565 ;; Don't create 'icon-theme.cache'.
2566 (lambda _
2567 (substitute* "meson.build"
2568 (("gtk_update_icon_cache: true")
2569 "gtk_update_icon_cache: false")))))))
2570 (native-inputs
2571 (cons* desktop-file-utils
2572 gettext-minimal
2573 `(,glib "bin") ; for desktop-file-validate and appstream-util
2574 itstool
2575 pkg-config
2576 rust
2577 `(,rust "cargo")
2578 vala
2579 (or (and=> (%current-target-system)
2580 (compose list make-rust-sysroot))
2581 '())))
2582 (inputs
2583 (cons* libadwaita
2584 gtk
2585 (cargo-inputs 'gnome-2048)))
2586 (home-page "https://gitlab.gnome.org/GNOME/gnome-2048")
2587 (synopsis "Move the tiles until you obtain the 2048 tile")
2588 (description "GNOME 2048 provides a 2D grid for playing 2048, a
2589single-player sliding tile puzzle game. The objective of the game is to merge
2590together adjacent tiles of the same number until the sum of 2048 is achieved
2591in one tile.")
2592 (license license:gpl3+)))
2593
2594(define-public gnome-chess
2595 (package
2596 (name "gnome-chess")
2597 (version "46.0")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (string-append "mirror://gnome/sources/gnome-chess/"
2601 (version-major version) "/"
2602 "gnome-chess-" version ".tar.xz"))
2603 (sha256
2604 (base32
2605 "1rzx8qxrfsicdmkyka434nv7adrh4x4qn6dri5bjqcallzh91g52"))))
2606 (build-system meson-build-system)
2607 (arguments
2608 '(#:glib-or-gtk? #t
2609 #:phases
2610 (modify-phases %standard-phases
2611 (add-after 'unpack 'skip-gtk-update-icon-cache
2612 ;; Don't create 'icon-theme.cache'.
2613 (lambda _
2614 (substitute* "meson.build"
2615 (("gtk_update_icon_cache: true")
2616 "gtk_update_icon_cache: false")
2617 (("update_desktop_database: true")
2618 "update_desktop_database: false")))))))
2619 (inputs
2620 (list gtk libadwaita librsvg))
2621 (native-inputs
2622 (list gettext-minimal
2623 `(,glib "bin") ; for desktop-file-validate and appstream-util
2624 itstool
2625 pkg-config
2626 vala))
2627 (home-page "https://wiki.gnome.org/Apps/Chess")
2628 (synopsis "Chess board for GNOME")
2629 (description "GNOME Chess provides a 2D board for playing chess games
2630against human or computer players. It supports loading and saving games in
2631Portable Game Notation. To play against a computer, install a chess engine
2632such as chess or stockfish.")
2633 (license license:gpl3+)))
2634
2635(define-public gnubg
2636 (package
2637 (name "gnubg")
2638 (version "1.08.003")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (string-append "mirror://gnu/gnubg/gnubg-release-"
2643 version "-sources.tar.gz"))
2644 (sha256
2645 (base32
2646 "0yar8j6g2f1q9zz9m9ha9xzvjr6mwp2qrzwhp9ppizyg2fdrczbg"))))
2647 (build-system gnu-build-system)
2648 (inputs (list ;; XXX: Build with an older Pango for 'pango_font_get_hb_font' and
2649 ;; 'pango_coverage_get_type'. Try removing this for versions > 1.08.003.
2650 pango-1.42
2651 glib
2652 readline
2653 gtk+-2
2654 mesa
2655 glu
2656 gtkglext
2657 sqlite
2658 libcanberra))
2659 (native-inputs (list flex
2660 python
2661 pkg-config))
2662 (arguments
2663 `(#:configure-flags
2664 ;; SSE instructions are available on Intel systems only.
2665 (list ,@(if (any (cute string-prefix? <> (or (%current-target-system)
2666 (%current-system)))
2667 '("x86_64" "i686"))
2668 '("--enable-simd=sse2") ; prevent avx instructions
2669 '()))
2670 #:phases
2671 (modify-phases %standard-phases
2672 (add-after 'install 'install-desktop-file
2673 (lambda* (#:key outputs #:allow-other-keys)
2674 (let* ((out (assoc-ref outputs "out"))
2675 (apps (string-append out "/share/applications")))
2676 (mkdir-p apps)
2677 (with-output-to-file (string-append apps "/gnubg.desktop")
2678 (lambda _
2679 (format #t
2680 "[Desktop Entry]~@
2681 Name=GNU Backgammon~@
2682 Exec=~a/bin/gnubg -w~@
2683 Icon=gnubg~@
2684 Categories=Game;~@
2685 Terminal=false~@
2686 Type=Application~%"
2687 out))))
2688 #t)))))
2689 (home-page "https://www.gnu.org/software/gnubg/")
2690 (synopsis "Backgammon game")
2691 (description "The GNU backgammon application (also known as \"gnubg\") can
2692be used for playing, analyzing and teaching the game. It has an advanced
2693evaluation engine based on artificial neural networks suitable for both
2694beginners and advanced players. In addition to a command-line interface, it
2695also features an attractive, 3D representation of the playing board.")
2696 (license license:gpl3+)))
2697
2698(define-public gnubik
2699 (package
2700 (name "gnubik")
2701 (version "2.4.3")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (string-append "mirror://gnu/gnubik/gnubik-"
2706 version ".tar.gz"))
2707 (sha256
2708 (base32
2709 "1vlf924mq8hg93bsjj0rzvs0crc6psmlxyc6zn0fr7msnmpx6gib"))))
2710 (build-system gnu-build-system)
2711 (arguments
2712 '(#:phases (modify-phases %standard-phases
2713 (add-after 'unpack 'skip-gtk-update-icon-cache
2714 (lambda _
2715 ;; Do not attempt to run 'gtk-update-icon-cache', which is
2716 ;; unnecessary and causes a needless dependency on glib.
2717 (substitute* "Makefile.in"
2718 (("gtk-update-icon-cache")
2719 "true"))
2720 #t)))))
2721 (inputs (list gtk+-2
2722 mesa
2723 glu
2724 libx11
2725 guile-2.0
2726 gtkglext))
2727 (native-inputs `(("gettext" ,gettext-minimal)
2728 ("pkg-config" ,pkg-config)))
2729 (home-page "https://www.gnu.org/software/gnubik/")
2730 (synopsis "3d Rubik's cube game")
2731 (description
2732 "GNUbik is a puzzle game in which you must manipulate a cube to make
2733each of its faces have a uniform color. The game is customizable, allowing
2734you to set the size of the cube (the default is 3x3) or to change the colors.
2735You may even apply photos to the faces instead of colors. The game is
2736scriptable with Guile.")
2737 (license license:gpl3+)))
2738
2739(define-public gnushogi
2740 (package
2741 (name "gnushogi")
2742 (version "1.4.2")
2743 (source (origin
2744 (method url-fetch)
2745 (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
2746 ".tar.gz"))
2747 (sha256
2748 (base32
2749 "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
2750 (modules '((guix build utils)))
2751 ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
2752 ;; identifier [-Wpedantic]"
2753 (snippet '(begin
2754 (substitute* "gnushogi/dspwrappers.c"
2755 (("__FUNCTION__")
2756 "__extension__ __FUNCTION__"))))))
2757 (arguments
2758 `(#:configure-flags (list (string-append
2759 "CFLAGS="
2760 (string-join '("-Wno-format"
2761 "-Wno-unused-but-set-variable"
2762 "-Wno-bool-compare")
2763 " ")))
2764 #:make-flags '("LDFLAGS=-z muldefs")
2765 #:phases (modify-phases %standard-phases
2766 ;; Skip --enable-fast-install flag
2767 (replace 'configure
2768 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2769 (let ((out (assoc-ref outputs "out")))
2770 (setenv "CONFIG_SHELL"
2771 (which "sh"))
2772 (setenv "SHELL"
2773 (which "sh"))
2774 (apply invoke "./configure"
2775 (string-append "--prefix=" out) configure-flags)))))
2776 #:test-target "sizetest"))
2777 (build-system gnu-build-system)
2778 (home-page "https://www.gnu.org/software/gnushogi/")
2779 (synopsis "Game of Shogi (Japanese chess)")
2780 (description
2781 "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
2782It is similar to standard chess but this variant is far more complicated.")
2783 (license license:gpl3+)))
2784
2785(define-public ltris
2786 (package
2787 (name "ltris")
2788 (version "1.3")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (string-append "mirror://sourceforge/lgames/ltris/"
2793 "ltris-" version ".tar.gz"))
2794 (sha256
2795 (base32 "144zvnnky79z5ychyyb2wsp7h2pcbl50fbzd9w9dvxkw6adz4yip"))))
2796 (build-system gnu-build-system)
2797 (arguments
2798 '(#:phases
2799 (modify-phases %standard-phases
2800 (add-after 'set-paths 'set-sdl-paths
2801 (lambda* (#:key inputs #:allow-other-keys)
2802 (setenv "CPATH"
2803 (string-append
2804 (search-input-directory inputs "include/SDL")
2805 ":" (or (getenv "CPATH") ""))))))))
2806 (inputs
2807 (list (sdl-union (list sdl sdl-mixer))))
2808 (home-page "https://lgames.sourceforge.net/LTris/")
2809 (synopsis "Tetris clone based on the SDL library")
2810 (description
2811 "LTris is a tetris clone: differently shaped blocks are falling down the
2812rectangular playing field and can be moved sideways or rotated by 90 degree
2813units with the aim of building lines without gaps which then disappear (causing
2814any block above the deleted line to fall down). LTris has three game modes: In
2815Classic you play until the stack of blocks reaches the top of the playing field
2816and no new blocks can enter. In Figures the playing field is reset to a new
2817figure each level and later on tiles and lines suddenly appear. In Multiplayer
2818up to three players (either human or CPU) compete with each other sending
2819removed lines to all opponents. There is also a Demo mode in which you can
2820watch your CPU playing while enjoying a cup of tea!")
2821 (license license:gpl2+)))
2822
2823(define-public nethack
2824 (package
2825 (name "nethack")
2826 (version "5.0.0")
2827 (source
2828 (origin
2829 (method git-fetch)
2830 (uri (git-reference
2831 (url "https://github.com/NetHack/NetHack/")
2832 (commit (string-append "NetHack-" version "_Released"))))
2833 (file-name (git-file-name name version))
2834 (sha256
2835 (base32 "1zc2gn3kcrsg3xj4rpsh2k1jz4s8pwqr92ajn3bi5404253fqp5m"))))
2836 (build-system gnu-build-system)
2837 (arguments
2838 (list
2839 ;; Building in parallel might lead to a race condition where lua
2840 ;; is copied twice, resulting in this error:
2841 ;; cp: cannot create regular file
2842 ;; 'lib/lua/liblua-5.4.8.a': Permission denied
2843 #:parallel-build? #f
2844 ;; There are tests, but they won't run.
2845 ;; The tests in sys/libnh/test seem to be MacOS specific.
2846 ;; The tests in the top level test directory require human interaction.
2847 #:tests? #f
2848 #:make-flags
2849 #~(list
2850 (string-append "PREFIX=" #$output)
2851 ;; Without this, build system assumes ncurses and tinfo are combined.
2852 "LIBS=-ltinfo"
2853 (string-append "CC=" #$(cc-for-target))
2854 (string-append "GREPPATH="
2855 (search-input-file %build-inputs "/bin/grep"))
2856 "WANT_WIN_CURSES=1"
2857 "WANT_WIN_TTY=1")
2858 #:phases
2859 #~(modify-phases %standard-phases
2860 (add-before 'configure 'do-not-change-to-hackdir
2861 ;; The Nethack binary must be run in the HACKDIR (playground).
2862 ;; The HACKDIR consists files which are installed in the 'install'
2863 ;; phase and is also assumed to be writable.
2864 ;; The usual way to start nethack is via this provided wrapper
2865 ;; script which handles setting HACKDIR to the location of the
2866 ;; installed files and changing to its directory before running the
2867 ;; executable. We will create another wrapper to solve the problem
2868 ;; of a writable HACKDIR later; for now, assume that we are already
2869 ;; in HACKDIR when executing this wrapper by removing the line to
2870 ;; change to it.
2871 ;; Removing CHDIR also making the default behavior of Nethack to
2872 ;; treat the current dir as HACKDIR rather than change to some
2873 ;; compiled-in directory.
2874 (lambda _
2875 (substitute* "sys/unix/nethack.sh"
2876 (("cd \\$HACKDIR") ""))
2877 (substitute* "include/config.h"
2878 (("^.*define CHDIR.*$") ""))))
2879 (add-before 'configure 'patch-paths
2880 (lambda* (#:key inputs #:allow-other-keys)
2881 (substitute* "sys/unix/Makefile.top"
2882 (("LUAHEADERS *=[^\n]+")
2883 (string-append
2884 "LUAHEADERS ="
2885 (dirname (search-input-file inputs "/include/lua.h"))))
2886 (("LUATOP *=[^\n]+")
2887 (string-append
2888 "LUATOP = "
2889 (dirname (search-input-file inputs "/lib/liblua.so"))))
2890 ;; Replace the ../ in this line:
2891 ;; @echo '#include "../$(LUAHEADERS)/lua.h"' >> $@
2892 (("include \"../") "include \""))
2893 (substitute* "sys/unix/setup.sh"
2894 (("^/bin/sh") (search-input-file inputs "/bin/bash")))
2895 (substitute* "sys/unix/sysconf"
2896 (("^.*GREPPATH[^\n]+")
2897 (string-append "GREPPATH="
2898 (search-input-file inputs "/bin/grep"))))
2899 (substitute* "sys/unix/hints/linux.500"
2900 (("/bin/gzip") (search-input-file inputs "bin/gzip")))))
2901 (add-before 'configure 'make-reproducible
2902 (lambda _
2903 (substitute* "include/config.h"
2904 (("^/\\* *#*define *REPRODUCIBLE_BUILD *\\*/")
2905 ;; Honor SOURCE_DATE_EPOCH.
2906 "#define REPRODUCIBLE_BUILD"))
2907 ;; Note: 'makedefs' rejects and ignores dates that are too old
2908 ;; or too new, so we must choose something reasonable here.
2909 (setenv "SOURCE_DATE_EPOCH" "1531865062")))
2910 (replace 'configure
2911 (lambda _
2912 (with-directory-excursion "sys/unix"
2913 (invoke "./setup.sh" "hints/linux.500"))))
2914 (add-after 'install 'make-writable-hackdir
2915 (lambda* (#:key inputs #:allow-other-keys)
2916 (let* ((nethack-script (string-append #$output "/bin/nethack")))
2917 (mkdir-p (string-append #$output "/games/lib/nethackuserdir"))
2918 (for-each
2919 (lambda (file)
2920 (rename-file
2921 (string-append #$output "/games/lib/nethackdir/" file)
2922 (string-append #$output "/games/lib/nethackuserdir/" file)))
2923 ;; These HACKDIR files include the user's save games and are
2924 ;; assumed to be writable. Set them aside, as described in
2925 ;; https://nethackwiki.com/wiki/Playground.
2926 '("xlogfile" "logfile" "perm" "record" "save"))
2927 (mkdir-p (string-append #$output "/bin"))
2928 (call-with-output-file nethack-script
2929 ;; Our custom wrapper script, which runs before the provided
2930 ;; wrapper (see phase 'do-not-change-to-hackdir').
2931 ;; Ensure all writable runtime files are in the user's home,
2932 ;; then symlink everything into a temporary HACKDIR and change
2933 ;; to it.
2934 (lambda (port)
2935 (format port "#!~a/bin/sh
2936if [ ! -d ~~/.config/nethack ]; then
2937 mkdir -p ~~/.config/nethack
2938 cp -r ~a/games/lib/nethackuserdir/* ~~/.config/nethack
2939 chmod -R +w ~~/.config/nethack
2940fi
2941
2942RUNDIR=$(mktemp -d)
2943
2944cleanup() {
2945 rm -rf $RUNDIR
2946}
2947trap cleanup EXIT
2948
2949cd $RUNDIR
2950for i in ~~/.config/nethack/*; do
2951 ln -s $i $(basename $i)
2952done
2953for i in ~a/games/lib/nethackdir/*; do
2954 ln -s $i $(basename $i)
2955done
2956~a/games/nethack \"$@\""
2957 (search-input-file inputs "/bin/bash")
2958 #$output
2959 #$output
2960 #$output)))
2961 (chmod nethack-script #o555)))))))
2962 (native-inputs
2963 (list groff-minimal
2964 pkg-config))
2965 (inputs
2966 (list grep
2967 gzip
2968 less
2969 lua-5.4
2970 ncurses/tinfo
2971 perl))
2972 (home-page "https://nethack.org")
2973 (synopsis "Classic dungeon crawl game")
2974 (description "NetHack is a single player dungeon exploration game that runs
2975on a wide variety of computer systems, with a variety of graphical and text
2976interfaces all using the same game engine. Unlike many other Dungeons &
2977Dragons-inspired games, the emphasis in NetHack is on discovering the detail of
2978the dungeon and not simply killing everything in sight - in fact, killing
2979everything in sight is a good way to die quickly. Each game presents a
2980different landscape - the random number generator provides an essentially
2981unlimited number of variations of the dungeon and its denizens to be discovered
2982by the player in one of a number of characters: you can pick your race, your
2983role, and your gender.")
2984 (license
2985 (license:fsdg-compatible
2986 "https://nethack.org/common/license.html"))))
2987
2988(define-public nethack-qt
2989 (package
2990 (inherit nethack)
2991 (name "nethack-qt")
2992 (arguments
2993 (substitute-keyword-arguments arguments
2994 ((#:imported-modules imported-modules %default-gnu-imported-modules)
2995 `(,@%qt-build-system-modules ,@imported-modules))
2996 ((#:modules modules '((guix build utils)
2997 (guix build gnu-build-system)))
2998 `(((guix build qt-build-system) #:prefix qt:)
2999 ,@modules))
3000 ((#:make-flags flags)
3001 #~(cons* "WANT_WIN_QT6=1"
3002 "WANT_DEFAULT=Qt"
3003 #$flags))
3004 ((#:phases phases)
3005 #~(modify-phases #$phases
3006 (add-after 'unpack 'fix-qt-dir-nonsense
3007 (lambda _
3008 (substitute* '("sys/unix/hints/linux.500")
3009 (("(QTDIR=)[^\n]+" _ f)
3010 (string-append f #$(this-package-input "qtbase"))))))
3011 (add-after 'make-writable-hackdir 'rename-binary
3012 (lambda _
3013 (with-directory-excursion #$output
3014 ;; Allows parallel installation with nethack.
3015 (rename-file "bin/nethack"
3016 "bin/nethack-qt"))))
3017 (add-after 'rename-binary 'qt-wrap
3018 (lambda args
3019 (apply (assoc-ref qt:%standard-phases 'qt-wrap)
3020 #:qtbase #$(this-package-input "qtbase")
3021 args)))))))
3022 (inputs
3023 (modify-inputs inputs
3024 (prepend qtbase qtmultimedia)))
3025 (synopsis "Classic dungeon crawl game (Qt interface)")))
3026
3027(define-public netpanzer
3028 (package
3029 (name "netpanzer")
3030 (version "0.9.0-RC-7") ;0.8.7 was released 8 years ago
3031 (source
3032 (origin
3033 (method git-fetch)
3034 (uri (git-reference
3035 (url "https://github.com/netpanzer/netpanzer")
3036 (commit version)))
3037 (file-name (git-file-name name version))
3038 (sha256
3039 (base32 "1bc29cxjragbhgsg89sliyiqw289nd37wb1f9qarknir73ijnfac"))))
3040 (build-system meson-build-system)
3041 (arguments
3042 (list #:tests? #f)) ;2/2 (trivial) tests fail, need filesystem access
3043 (native-inputs (list pkg-config))
3044 (inputs (list freetype
3045 lua
3046 physfs
3047 sdl2
3048 sdl2-mixer
3049 sdl2-ttf))
3050 (home-page "https://github.com/netpanzer/netpanzer")
3051 (synopsis "Online tactical warfare game")
3052 (description
3053 "NetPanzer is an online multiplayer tactical warfare game. It is based
3054on quick tactical action and unit management in real-time. Battles progress
3055constantly as destroyed players respawn with a set of new units. Players can
3056join or leave multiplayer games at any time.")
3057 (license license:gpl2+)))
3058
3059(define-public pipewalker
3060 (package
3061 (name "pipewalker")
3062 (version "0.9.4")
3063 (source
3064 (origin
3065 (method url-fetch)
3066 (uri (string-append "mirror://sourceforge/pipewalker/pipewalker/"
3067 version "/pipewalker-" version ".tar.gz"))
3068 (sha256
3069 (base32 "1x46wgk0s55562pd96cxagxkn6wpgglq779f9b64ff1k3xzp3myn"))))
3070 (build-system gnu-build-system)
3071 (arguments
3072 `(#:configure-flags
3073 (list (string-append "--docdir=" (assoc-ref %outputs "out")
3074 "/share/doc/" ,name "-" ,version))
3075 #:phases
3076 (modify-phases %standard-phases
3077 (add-after 'configure 'patch-docdir
3078 ;; Makefile.in ignores configure's ‘--docdir=...’ option. Fix that.
3079 (lambda _
3080 (substitute* "Makefile"
3081 (("(pkgdocdatadir = ).*" _ assignment)
3082 (string-append assignment "$(docdir)\n")))
3083 #t)))))
3084 (inputs
3085 (list libpng mesa sdl))
3086 (home-page "https://pipewalker.sourceforge.net/")
3087 (synopsis "Logical tile puzzle")
3088 (description
3089 "PipeWalker is a simple puzzle game with many different themes: connect all
3090computers to one network server, bring water from a source to the taps, etc.
3091The underlying mechanism is always the same: you must turn each tile in the
3092grid in the right direction to combine all components into a single circuit.
3093Every puzzle has a complete solution, although there may be more than one.")
3094 (license license:gpl3+)))
3095
3096(define-public dsda-doom
3097 (package
3098 (name "dsda-doom")
3099 (version "0.29.3")
3100 (source
3101 (origin
3102 (method git-fetch)
3103 (uri (git-reference
3104 (url "https://github.com/kraflab/dsda-doom")
3105 (commit (string-append "v" version))))
3106 (file-name (git-file-name name version))
3107 (sha256
3108 (base32 "1nhlwxwhs69ibsi873cdjanfdlpqcb4ybcp8c2j8j9l07xpgvk1n"))))
3109 (build-system cmake-build-system)
3110 (arguments
3111 (list
3112 #:tests? #f ;no tests
3113 #:phases #~(modify-phases %standard-phases
3114 (add-after 'unpack 'chdir
3115 (lambda _
3116 (chdir "prboom2"))))))
3117 (inputs
3118 (list sdl2
3119 sdl2-mixer
3120 fluidsynth
3121 portmidi
3122 libmad
3123 libzip
3124 glu
3125 dumb
3126 libvorbis))
3127 (home-page "https://github.com/kraflab/dsda-doom")
3128 (synopsis "Doom source port, successor of PrBoom+")
3129 (description
3130 "DSDA-Doom is a Doom source port and successor of PrBoom+, with extra
3131features for demo recording/playback and quality of life. In particular, its
3132features include support for the Heretic, Hexen, MBF21, Doom-in-Hexen and UDMF
3133map formats, MAPINFO support, full controller support, debug and scripting
3134features, rewinding, and a strict mode for speedrunning.")
3135 (license license:gpl2+)))
3136
3137(define-public redeal
3138 (let ((commit "abcf328546b1147525122c5d6660118a70d5c149")
3139 (revision "2"))
3140 (package
3141 (name "redeal")
3142 (version (git-version "0.2.0" revision commit))
3143 (source
3144 (origin
3145 (method git-fetch)
3146 (uri (git-reference
3147 (url "https://github.com/anntzer/redeal")
3148 (commit commit)))
3149 (file-name (git-file-name name version))
3150 (sha256
3151 (base32
3152 "02rqadv6f9fsrbrh0d8brgjqgym3glm1mhdcjbf91gas1ckmfv9f"))))
3153 (build-system pyproject-build-system)
3154 (arguments
3155 (list
3156 #:tests? #f
3157 #:phases
3158 #~(modify-phases %standard-phases
3159 (add-after 'unpack 'unbundle-dds
3160 (lambda* (#:key inputs #:allow-other-keys)
3161 (substitute* "setup.py"
3162 (("cmdclass=.*") ""))
3163 (let ((libdds (search-input-file inputs "lib/libdds.so")))
3164 (substitute* "redeal/dds.py"
3165 ((" and os.path.exists\\(dll_path\\)") "")
3166 (("dll = DLL\\(dll_path\\)")
3167 (format #f "dll = DLL(~s)" libdds))))))
3168 (add-after 'install 'install-examples
3169 (lambda _
3170 (let* ((doc (string-append #$output "/share/doc/"))
3171 (examples
3172 (string-append doc #$name "-" #$version "/examples")))
3173 (mkdir-p examples)
3174 (copy-recursively "examples" examples)))))))
3175 (inputs (list dds `(,python "tk")))
3176 (propagated-inputs (list python-colorama))
3177 (native-inputs (list python-setuptools python-wheel))
3178 (home-page "https://github.com/anntzer/redeal")
3179 (synopsis
3180 "Deal generator for bridge card game, written in Python")
3181 (description
3182 "Redeal is a deal generator written in Python. It outputs deals
3183satisfying whatever conditions you specify --- deals with a double void, deals
3184with a strong 2♣ opener opposite a yarborough, etc. Using Bo Haglund's double
3185dummy solver, it can even solve the hands it has generated for you.")
3186 (license license:gpl3))))
3187
3188(define-public retux
3189 (let ((release "1.6.2")
3190 (revision 0))
3191 (package
3192 (name "retux")
3193 (version (if (zero? revision)
3194 release
3195 (string-append release "-"
3196 (number->string revision))))
3197 (source
3198 (origin
3199 (method url-fetch)
3200 (uri (string-append "https://github.com/retux-game/retux/"
3201 "releases/download/v" version
3202 "/retux-" release "-src.zip"))
3203 (sha256
3204 (base32 "1fzsjg4k25mxjjc28ykz8n3dx5xzwxnp772fwzz5jy1wrxmjkl4x"))))
3205 (build-system pyproject-build-system)
3206 (arguments
3207 (list
3208 #:tests? #f ;no check target
3209 #:phases
3210 #~(modify-phases %standard-phases
3211 ;; no setup.py script
3212 (delete 'build)
3213 (replace 'install
3214 (lambda _
3215 (let* ((bin (string-append #$output "/bin"))
3216 (data (string-append #$output "/share/retux")))
3217 (mkdir-p bin)
3218
3219 (substitute* "retux.py"
3220 ;; Use the correct data directory.
3221 (("os\\.path\\.join\\(os\\.path\\.dirname\\(__file__\\), \"data\"\\),")
3222 (string-append "\"" data "\",")))
3223
3224 (copy-file "retux.py" (string-append bin "/retux"))
3225 (copy-recursively "data" data)))))))
3226 (native-inputs (list unzip python-setuptools))
3227 (inputs (list python-sge python-xsge))
3228 (home-page "https://retux-game.github.io/")
3229 (synopsis "Action platformer game")
3230 (description
3231 "ReTux is an action platformer loosely inspired by the Mario games,
3232utilizing the art assets from the @code{SuperTux} project.")
3233 ;; GPL version 3 or later is the license for the code and some art.
3234 ;; The rest of the licenses are for the art exclusively, as listed in
3235 ;; data/LICENSES.
3236 (license (list license:cc0
3237 license:cc-by3.0
3238 license:cc-by-sa3.0
3239 license:cc-by-sa4.0
3240 license:gpl2+
3241 license:gpl3+)))))
3242
3243(define-public robotfindskitten
3244 (package
3245 (name "robotfindskitten")
3246 (version "2.8284271.702") ; 1600003_201b is older, see ChangeLog
3247 (source (origin
3248 (method url-fetch)
3249 (uri (string-append "https://github.com/" name "/" name
3250 "/releases/download/" version "/"
3251 name "-" version ".tar.gz"))
3252 (sha256
3253 (base32
3254 "1bwrkxm83r9ajpkd6x03nqvmdfpf5vz6yfy0c97pq3v3ykj74082"))))
3255 (build-system gnu-build-system)
3256 (arguments
3257 (list
3258 #:tests? #f ; there are no tests
3259 #:make-flags
3260 #~(list
3261 ;; Required for colorized output, see <http://bugs.gnu.org/54607>.
3262 "CFLAGS=-D_XOPEN_SOURCE=600"
3263 (string-append "execgamesdir=" #$output "/bin"))))
3264 (inputs (list ncurses))
3265 (outputs (list "out" "debug"))
3266 (synopsis "Thematic meditative game")
3267 (description
3268 "You are a robot moving around in a realm filled with ASCII characters.
3269Examine humorously described though useless items as you search for a kitten
3270among them. The theme of this Zen simulation is continued in its
3271documentation.")
3272 (home-page "http://robotfindskitten.org/")
3273 (license license:gpl2+)))
3274
3275(define-public roguebox-adventures
3276 (package
3277 (name "roguebox-adventures")
3278 (version "3.0.1")
3279 (source
3280 (origin
3281 (method url-fetch)
3282 (uri (string-append
3283 "http://download.tuxfamily.org/rba/RogueBoxAdventures_v"
3284 (string-join (string-split version #\.) "_") "_Source.zip"))
3285 (file-name (string-append name "-" version ".zip"))
3286 (sha256
3287 (base32 "05zd03s5w9kcpklfgcggbaa6rwf59nm0q9vcj6gh9v2lh402k067"))))
3288 (build-system copy-build-system)
3289 (arguments
3290 (list
3291 #:install-plan
3292 #~(let ((share "share/games/roguebox-adventures/"))
3293 `(("AUDIO" ,share)
3294 ("FONT" ,share)
3295 ("GRAPHIC" ,share)
3296 ("LIB" ,share)
3297 ("LICENSE" ,share)
3298 ("." ,share #:include ("icon_big.png" "icon_small.png"))
3299 ("DOC" "share/doc/roguebox-adventures")))
3300 #:phases
3301 #~(modify-phases %standard-phases
3302 (replace 'unpack
3303 (lambda* (#:key source #:allow-other-keys)
3304 (and (invoke "unzip" source)
3305 ;; The actual source is buried a few directories deep.
3306 (chdir (string-append "RogueBoxAdventures_v"
3307 (string-join
3308 (string-split #$version #\.) "_")
3309 "_Source")))))
3310 (add-after 'unpack 'patch
3311 (lambda _
3312 (let ((data (string-append #$output
3313 "/share/games/roguebox-adventures")))
3314 ;; Use the correct data directory.
3315 (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py")
3316 (("basic_path + os\\.sep + 'DATA'")
3317 (string-append "'" data "'"))
3318 (("^basic_path.*$")
3319 (string-append "basic_path ='" data "'\n")))
3320 (substitute* "LIB/dialog.py"
3321 (("d_path = os\\.path\\.dirname\\(.*\\)\\)")
3322 (string-append "d_path = '" data "'")))
3323 (substitute* "LIB/gra_files.py"
3324 (("basic_path = b_path\\.replace\\('/LIB',''\\)")
3325 (string-append "basic_path ='" data "'\n")))
3326
3327 ;; The game must save in the user's home directory because
3328 ;; the store is read-only.
3329 (substitute* "main.py"
3330 (("home_save = False")
3331 "home_save = True")
3332 (("'icon_small.png'")
3333 (string-append "'" data "/icon_small.png'")))
3334 ;; Use the right python.
3335 (substitute* '("LIB/text.py" "main.py")
3336 (("#! /usr/bin/python")
3337 (format #f "#!~a" (which "python3")))))))
3338 (add-after 'install 'wrap
3339 (lambda _
3340 (let* ((bin (string-append #$output "/bin/roguebox-adventures"))
3341 (share (string-append #$output
3342 "/share/games/roguebox-adventures"))
3343 (lib (string-append share "/LIB")))
3344 (for-each
3345 (lambda (file)
3346 (chmod file #o555)
3347 (install-file file lib))
3348 (list "main.py" "run.py"))
3349
3350 (mkdir-p (dirname bin))
3351 (call-with-output-file bin
3352 (lambda (p)
3353 (format p "#!~a
3354export GUIX_PYTHONPATH=~a/LIB:~a
3355exec -a ~s ~s \"$@\"
3356"
3357 (which "bash")
3358 share
3359 (getenv "GUIX_PYTHONPATH")
3360 (which "python3")
3361 (string-append lib "/main.py"))))
3362 (chmod bin #o555)))))))
3363 (native-inputs (list unzip python-setuptools))
3364 (inputs (list python python-pygame))
3365 (home-page "https://rogueboxadventures.tuxfamily.org")
3366 (synopsis "Classical roguelike/sandbox game")
3367 (description
3368 "RogueBox Adventures is a graphical roguelike with strong influences
3369from sandbox games like Minecraft or Terraria. The main idea of RogueBox
3370Adventures is to offer the player a kind of roguelike toy-world. This world
3371can be explored and changed freely.")
3372 ;; The GPL3+ is for code, the rest are for art.
3373 (license (list license:cc0
3374 license:cc-by3.0
3375 license:gpl3+
3376 license:silofl1.1))))
3377
3378(define-public seahorse-adventures
3379 (package
3380 (name "seahorse-adventures")
3381 (version "1.4")
3382 (source
3383 (origin
3384 (method git-fetch)
3385 (uri (git-reference
3386 (url "https://github.com/dulsi/seahorse-adventures")
3387 (commit (string-append "Release-" version))))
3388 (file-name (git-file-name name version))
3389 (sha256
3390 (base32 "1dxysa79cz5mflr2953fyk838h1jwvi1ngn8wlpms0ag35yv21s8"))
3391 (modules '((guix build utils)
3392 (ice-9 ftw)
3393 (srfi srfi-1)))
3394 ;; Remove non-free (non-commercial) font.
3395 (snippet
3396 #~(begin
3397 (for-each delete-file (find-files "data/fonts" "."))))))
3398 (build-system pyproject-build-system)
3399 (arguments
3400 (list
3401 #:tests? #f ;no test
3402 #:phases
3403 #~(modify-phases %standard-phases
3404 (delete 'build) ;pure Python
3405 (replace 'install ;no install script
3406 (lambda* (#:key inputs #:allow-other-keys)
3407 (let* ((bin (string-append #$output "/bin"))
3408 (share (string-append #$output "/share"))
3409 (applications (string-append share "/applications"))
3410 (data (string-append share "/seahorse-adventures")))
3411 ;; Install data.
3412 (for-each (lambda (f)
3413 (chmod f #o555)
3414 (install-file f data))
3415 '("leveledit.py" "run_game.py" "tileedit.py"))
3416 (for-each (lambda (dir)
3417 (let ((target (string-append data "/" dir)))
3418 (mkdir-p target)
3419 (copy-recursively dir target)))
3420 '("data" "lib"))
3421 ;; Create executable.
3422 (mkdir-p bin)
3423 (let ((executable (string-append bin "/seahorse-adventures")))
3424 (call-with-output-file executable
3425 (lambda (p)
3426 (format p
3427 "#!~a~@
3428 export GUIX_PYTHONPATH=~a:~a~@
3429 exec -a \"~a\" ~a \"$@\"~%"
3430 (search-input-file inputs "/bin/bash")
3431 data
3432 (getenv "GUIX_PYTHONPATH")
3433 (search-input-file inputs "/bin/python3")
3434 (string-append data "/run_game.py"))))
3435 (chmod executable #o555))
3436 ;; Add desktop file.
3437 (mkdir-p applications)
3438 (make-desktop-entry-file
3439 (string-append applications "/seahorse-adventures.desktop")
3440 #:name "Seahorse Adventures"
3441 #:comment
3442 '((#f "Help Barbie the seahorse float on bubbles to the moon"))
3443 #:exec #$name
3444 #:icon #$name
3445 #:categories '("Game" "ActionGame")
3446 #:keywords '("game" "retro" "platform"))
3447 ;; Add icons.
3448 (for-each
3449 (lambda (size)
3450 (let ((dir (string-append share "/icons/hicolor/"
3451 size "x" size "/apps")))
3452 (mkdir-p dir)
3453 (copy-file
3454 (string-append "icon" size ".png")
3455 (string-append dir "/searhorse-adventures.png"))))
3456 '("32" "64" "128")))))
3457 (add-after 'install 'unbundle-fonts
3458 ;; Unbundle Bitstream Vera font and replace deleted one.
3459 (lambda* (#:key inputs #:allow-other-keys)
3460 (let ((data (string-append #$output "/share/seahorse-adventures"))
3461 (vera (search-input-file
3462 inputs "/share/fonts/truetype/Vera.ttf")))
3463 (let ((themes-dir (string-append data "/data/themes/")))
3464 (for-each
3465 (lambda (theme)
3466 (let ((target (string-append themes-dir theme "/Vera.ttf")))
3467 (delete-file target)
3468 (symlink vera target)))
3469 '("default" "gray")))
3470 (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
3471 (substitute* (string-append data "/lib/main.py")
3472 (("f_scale = 0.35") "f_scale = 0.47"))))))))
3473 (native-inputs (list python-setuptools))
3474 (inputs
3475 (list font-bitstream-vera python-pygame))
3476 (home-page "http://www.imitationpickles.org/barbie/")
3477 (synopsis "Help Barbie the seahorse float on bubbles to the moon")
3478 (description
3479 "Barbie Seahorse Adventures is a retro style platform arcade game.
3480You are Barbie the seahorse who travels through the jungle, up to the
3481volcano until you float on bubbles to the moon. On the way to your
3482final destination you will encounter various enemies, servants of the
3483evil overlord who has stolen the galaxy crystal. Avoid getting hit
3484and defeat them with your bubbles!")
3485 ;; GPL2+ is for code, CC0 is for art.
3486 (license (list license:gpl2+ license:cc0))))
3487
3488(define-public serious-sam-classic
3489 (package
3490 (name "serious-sam-classic")
3491 (version "1.10.7")
3492 (source
3493 (origin
3494 (method git-fetch)
3495 (uri (git-reference
3496 (url "https://github.com/tx00100xt/SeriousSamClassic")
3497 (commit version)))
3498 (sha256
3499 (base32 "1s1mbj2qpaxdrx0pfhdyk3v1vh7f2dp33w2i5ifpgphkchdx61jg"))
3500 (file-name (git-file-name name version))
3501 (modules '((guix build utils)))
3502 (patches (search-patches "serious-sam-classic-engine-patch-paths.patch"))))
3503 (build-system cmake-build-system)
3504 (arguments
3505 (list
3506 #:tests? #f ; no upstream tests
3507 #:configure-flags
3508 #~(list (string-append "-DCMAKE_INSTALL_PREFIX:PATH="
3509 #$output))
3510 #:phases
3511 #~(modify-phases %standard-phases
3512 (add-after 'unpack 'fix-cmake
3513 (lambda _
3514 (substitute* (list "CMakeLists.txt"
3515 "SamTFE/Sources/CMakeLists.txt"
3516 "SamTSE/Sources/CMakeLists.txt")
3517 (("\"Install to systems directories\" Off")
3518 "\"Install to systems directories\" On")
3519 (("march=native") "mtune=generic")
3520 (("CMAKE_SKIP_RPATH ON") "CMAKE_SKIP_RPATH OFF")
3521 (("/usr") #$output)
3522 (("lib64") "lib"))))
3523 (add-after 'fix-cmake 'fix-paths
3524 (lambda _
3525 (substitute* (list "SamTFE/Sources/Engine/Engine.cpp"
3526 "SamTSE/Sources/Engine/Engine.cpp")
3527 (("@OUTPUT_DIR@") #$output)))))))
3528 (inputs (list sdl2 libvorbis))
3529 (native-inputs (cons* flex bison imagemagick
3530 (maybe-nasm)))
3531 (home-page "https://github.com/tx00100xt/SeriousSamClassic")
3532 (synopsis "SeriousSam engine and Serious Sam: TFE and TSE")
3533 (description
3534 "This is an open-source port of the Serious Engine from
3535Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3536To run, you must put your official game data, @code{Levels} and @code{Help} in
3537@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")
3538 (license license:gpl2)))
3539
3540(define-public serious-sam-classic-vk
3541 (package
3542 (inherit serious-sam-classic)
3543 (name "serious-sam-classic-vk")
3544 (version "1.10.7")
3545 (source
3546 (origin
3547 (method git-fetch)
3548 (uri (git-reference
3549 (url "https://github.com/tx00100xt/SeriousSamClassic-VK")
3550 (commit version)))
3551 (sha256
3552 (base32 "1av3ll3pfdsadm10dz3srxfw9ld1xbg8i5xrgv7qynqsd0x8jxby"))
3553 (file-name (git-file-name name version))
3554 (modules '((guix build utils)))
3555 (patches (search-patches
3556 "serious-sam-classic-engine-patch-paths.patch"))))
3557 (inputs (modify-inputs inputs
3558 (prepend vulkan-loader vulkan-headers)))
3559 (synopsis
3560 "SeriousSam engine and Serious Sam: TFE and TSE with Vulkan renderer")
3561 (description
3562 "This is an open-source port of the Serious Engine from
3563Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3564This variant includes a Vulkan renderer.
3565To run, you must put your official game data, @code{Levels} and @code{Help} in
3566@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")))
3567
3568(define-public shamogu
3569 (package
3570 (name "shamogu")
3571 (version "1.4.1")
3572 (source
3573 (origin
3574 (method git-fetch)
3575 (uri (git-reference
3576 (url "https://codeberg.org/anaseto/shamogu")
3577 (commit (string-append "v" version))))
3578 (file-name (git-file-name name version))
3579 (sha256
3580 (base32 "1xl396gfca9y0q7qrr3ifcy4sahq1h6q013asnr3qkrj22jmrbyd"))))
3581 (build-system go-build-system)
3582 (arguments
3583 (list
3584 #:install-source? #f
3585 #:import-path "codeberg.org/anaseto/shamogu"))
3586 (native-inputs (list go-codeberg-org-anaseto-gruid
3587 go-codeberg-org-anaseto-gruid-js
3588 go-codeberg-org-anaseto-gruid-sdl
3589 go-codeberg-org-anaseto-gruid-tcell
3590 go-github-com-gdamore-tcell-v2))
3591 (home-page "https://anaseto.codeberg.page/games/shamogu/")
3592 (synopsis "Roguelike game by Anaseto")
3593 (description
3594 "Shamogu is a coffee-break roguelike game with a focus on tactical
3595movement and careful timing of totemic spirit invocation and comestible
3596consumption. Visibility and noise stealth mechanics also play an important
3597role.
3598
3599@quotation
3600All life in your mountain is being corrupted. Beasts are losing their minds
3601and becoming aggressive. These disturbing events started to happen after a
3602dungeon portal suddenly appeared at the top of the mountain. As the guardian,
3603you decide to explore that dungeon in order to find and destroy the source of
3604corruption… You hope luck will be on your side!
3605@end quotation")
3606 (license license:isc)))
3607
3608(define-public shamogu-sdl
3609 (package/inherit shamogu
3610 (name "shamogu-sdl")
3611 (arguments
3612 (substitute-keyword-arguments arguments
3613 ((#:tests? _ #t) #f)
3614 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
3615 ((#:phases _ #~%standard-phases)
3616 #~(modify-phases %standard-phases
3617 (add-after 'install 'fix-name-collision
3618 (lambda _
3619 (rename-file (string-append #$output "/bin/shamogu")
3620 (string-append #$output "/bin/shamogu-sdl"))))))))
3621 (native-inputs
3622 (modify-inputs native-inputs
3623 (prepend pkg-config)))))
3624
3625(define-public solarus
3626 (package
3627 (name "solarus")
3628 (version "2.0.3")
3629 (source
3630 (origin
3631 (method git-fetch)
3632 (uri (git-reference
3633 (url "https://gitlab.com/solarus-games/solarus")
3634 (commit (string-append "v" version))))
3635 (file-name (git-file-name name version))
3636 (sha256
3637 (base32 "05a7mlb6xl7d93d34d3bdphb9xgbyp7h1358z6hdsrax8kh9zwl1"))))
3638 (build-system cmake-build-system)
3639 (arguments
3640 (list
3641 #:phases
3642 #~(modify-phases %standard-phases
3643 (add-after 'unpack 'disable-failing-tests
3644 ;; The following tests fail reporting a missing "/dev/dri"
3645 ;; file.
3646 (lambda _
3647 (substitute* "tests/cmake/AddTestMaps.cmake"
3648 ((".*1200_create_shader_from_source.*" all)
3649 (string-append "#" all))
3650 ((".*1210_shader_scaling_factor.*" all)
3651 (string-append "#" all)))))
3652 (add-before 'check 'set-home
3653 ;; Tests fail without setting the following environment
3654 ;; variables.
3655 (lambda _
3656 (setenv "HOME" (getcwd))
3657 (setenv "XDG_RUNTIME_DIR" (getcwd)))))))
3658 (native-inputs (list pkg-config))
3659 (inputs (list glm
3660 libmodplug
3661 libogg
3662 libvorbis
3663 luajit
3664 mesa
3665 openal
3666 physfs
3667 sdl2
3668 sdl2-image
3669 sdl2-ttf))
3670 (home-page "https://www.solarus-games.org/")
3671 (synopsis "Lightweight game engine for Action-RPGs")
3672 (description
3673 "Solarus is a 2D game engine written in C++, that can run games
3674scripted in Lua. It has been designed with 16-bit classic Action-RPGs
3675in mind.")
3676 ;; The source code is licensed under the terms of GPL-3.0.
3677 ;; Resources are licensed under the terms of CC-BY-SA-3.0 and
3678 ;; CC-BY-SA 4.0.
3679 (license (list license:gpl3 license:cc-by-sa3.0 license:cc-by-sa4.0))))
3680
3681(define-public solarus-quest-editor
3682 (package
3683 (inherit solarus)
3684 (name "solarus-quest-editor")
3685 (source
3686 (origin
3687 (inherit (package-source solarus))
3688 (patches (search-patches
3689 "solarus-quest-editor-qlementine-reference.patch"))))
3690 (build-system qt-build-system)
3691 (arguments
3692 (list
3693 #:tests? #f ;no test suite
3694 #:qtbase qtbase
3695 #:phases
3696 #~(modify-phases %standard-phases
3697 (add-before 'configure 'chdir
3698 (lambda _
3699 (chdir "editor"))))))
3700 (native-inputs (modify-inputs native-inputs
3701 (prepend qttools qlementine)))
3702 (inputs (modify-inputs inputs
3703 (prepend solarus)
3704 (append qtbase qtsvg qtwayland)))
3705 (synopsis "Create and modify quests for the Solarus engine")
3706 (description
3707 "Solarus Quest Editor is a graphical user interface to create and modify
3708quests for the Solarus engine.")))
3709
3710(define-public solarus-launcher
3711 (package
3712 (inherit solarus)
3713 (name "solarus-launcher")
3714 (source
3715 (origin
3716 (inherit (package-source solarus))
3717 (patches (search-patches
3718 "solarus-launcher-qlementine-and-qtappinstancemanager-reference.patch"))))
3719 (build-system qt-build-system)
3720 (arguments
3721 (list
3722 #:tests? #f ;no tests
3723 #:qtbase qtbase
3724 #:phases
3725 #~(modify-phases %standard-phases
3726 (add-before 'configure 'chdir
3727 (lambda _
3728 (chdir "launcher"))))))
3729 (native-inputs (modify-inputs (package-inputs solarus)
3730 (prepend qlementine qlementine-icons qtappinstancemanager
3731 qttools)))
3732 (inputs (modify-inputs inputs
3733 (prepend solarus)
3734 (append qtbase qtsvg qtwayland)))
3735 (synopsis "Game launcher and browser for Solarus")
3736 (description
3737 "Solarus Launcher is a game launcher and browser for Solarus. It is
3738written in C++ with QtWidgets.")))
3739
3740(define-public superfluous-returnz-data
3741 (package
3742 (name "superfluous-returnz-data")
3743 (version "13")
3744 (source
3745 (origin
3746 (method url-fetch)
3747 (uri (string-append "https://download.ptilouk.net/superfluous-returnz-d"
3748 version "-data-only"
3749 ".zip"))
3750 (sha256
3751 (base32
3752 "005p1kdm8g5vzf1isvxwiarpw0vciplxdcv9wl4bb47b1gxsh13k"))))
3753 (build-system copy-build-system)
3754 (native-inputs
3755 (list unzip))
3756 (arguments
3757 (list #:install-plan
3758 #~'(("." "."))))
3759 (synopsis "Superfluous Returnz game data")
3760 (description
3761 "This package provides the game data, images, and music of the game
3762Superfluous Returnz.")
3763 (home-page "https://studios.ptilouk.net/superfluous-returnz/")
3764 (license license:cc-by-sa4.0)))
3765
3766(define-public sosage
3767 (package
3768 (name "sosage")
3769 (version "1.6.1")
3770 (source
3771 (origin
3772 (method git-fetch)
3773 (uri (git-reference
3774 (url "https://framagit.org/Gee/sosage")
3775 (commit (string-append "v" version))))
3776 (file-name (git-file-name name version))
3777 (sha256
3778 (base32 "029mcnx2r86gc7chzd0avga4x7gm1yxl2wi3wqxmzhlh51q0p44x"))
3779 (modules '((guix build utils)))
3780 (snippet
3781 #~(begin
3782 (for-each delete-file (find-files "." "\\.jar$"))
3783
3784 ;; The files in 'Third_party' aren't actually bundled libraries,
3785 ;; but are wrappers around the system libraries.
3786 ;; Move them to the 'Utils' directory, to make that clear.
3787 (for-each (lambda (file)
3788 (install-file file "include/Sosage/Utils"))
3789 (find-files "include/Sosage/Third_party" "\\.h$"))
3790 (for-each (lambda (file)
3791 (install-file file "src/Sosage/Utils"))
3792 (find-files "src/Sosage/Third_party" "\\.cpp$"))
3793 (for-each delete-file-recursively '("include/Sosage/Third_party"
3794 "src/Sosage/Third_party"))
3795 (substitute* (find-files ".")
3796 (("Third_party") "Utils"))))))
3797 (build-system cmake-build-system)
3798 (arguments
3799 (list #:tests? #f ; no tests
3800 #:configure-flags
3801 #~(list
3802 (string-append "-DSOSAGE_DATA_FOLDER="
3803 #$(this-package-input "superfluous-returnz-data")))))
3804 (inputs
3805 (list libyaml
3806 lz4
3807 sdl2
3808 sdl2-mixer-x
3809 sdl2-ttf
3810 superfluous-returnz-data))
3811 (synopsis "Superfluous Returnz 2D cartoon puzzle game")
3812 (description
3813 "Superfluous Returnz is a 2D puzzle game set in a colourful cartoon
3814universe. It takes place in the very quiet French village of Fochougny, an
3815open world where players solve puzzles, find secret codes and talk to the
3816village people to solve the mystery of the apple thief. The game is licensed
3817as Free Software and asks for a financial donation through the game site.")
3818 (home-page "https://studios.ptilouk.net/superfluous-returnz/floss/")
3819 (license license:expat)))
3820
3821(define-public superstarfighter
3822 (package
3823 (name "superstarfighter")
3824 (version "0.6.5")
3825 (source
3826 (origin
3827 (method git-fetch)
3828 (uri (git-reference
3829 (url "https://github.com/notapixelstudio/superstarfighter")
3830 ;; The commit is not tagged upstream:
3831 ;; https://github.com/notapixelstudio/superstarfighter/commit/350605bf5454c26ebe2c57d8217edd03689c0573
3832 (commit "32521f467616bb390e3929d07e1936ff43fe64da")))
3833 (file-name (git-file-name name version))
3834 (sha256
3835 (base32 "1ckghzrfgvk9z1n5f4ivnamm6s8h9sbv0a3aq9pp4a3yrhkgld0k"))))
3836 (build-system gnu-build-system)
3837 (arguments
3838 `(#:tests? #f ;there are no tests
3839 #:phases
3840 (modify-phases %standard-phases
3841 (replace 'configure
3842 (lambda _
3843 (chdir "godot")
3844 (setenv "HOME" (getcwd))
3845 (with-output-to-file "export_presets.cfg"
3846 (lambda ()
3847 (display
3848 "[preset.0]
3849name=\"Guix\"
3850platform=\"Linux/X11\"
3851runnable=true
3852[preset.0.options]")))
3853 #t))
3854 (replace 'build
3855 (lambda _
3856 (let ((godot (assoc-ref %build-inputs "godot-headless")))
3857 (invoke (string-append godot "/bin/godot_server")
3858 "--export-pack" "Guix"
3859 "superstarfighter.pck" "project.godot"))
3860 #t))
3861 (replace 'install
3862 (lambda* (#:key inputs outputs #:allow-other-keys)
3863 (let* ((out (assoc-ref outputs "out"))
3864 (bin (string-append out "/bin"))
3865 (share (string-append out "/share"))
3866 (data (string-append share "/superstarfighter"))
3867 (icons (string-append share "/icons/hicolor/256x256/apps")))
3868 (install-file "superstarfighter.pck" data)
3869 (mkdir-p bin)
3870 (call-with-output-file (string-append bin "/superstarfighter")
3871 (lambda (port)
3872 (format port
3873 "#!/bin/sh~@
3874 exec ~a/bin/godot --main-pack ~a/superstarfighter.pck~%"
3875 (assoc-ref inputs "godot")
3876 data)
3877 (chmod port #o755)))
3878 (mkdir-p icons)
3879 (copy-file "icon.png" (string-append icons "/" ,name ".png"))
3880 (make-desktop-entry-file
3881 (string-append share "/applications/" ,name ".desktop")
3882 #:name "SuperStarfighter"
3883 #:comment "Fast-paced arcade combat game"
3884 #:exec ,name
3885 #:icon ,name
3886 #:categories '("Game" "ArcadeGame")))
3887 #t)))))
3888 (native-inputs
3889 `(("godot-headless" ,godot-lts "headless")))
3890 (inputs
3891 (list godot-lts))
3892 (home-page "https://notapixel.itch.io/superstarfighter")
3893 (synopsis "Fast-paced local multiplayer arcade game")
3894 (description "In SuperStarfighter, up to four local players compete in a
38952D arena with fast-moving ships and missiles. Different game types are
3896available, as well as a single-player mode with AI-controlled ships.")
3897 (license (list license:expat ; game
3898 license:silofl1.1)))) ; fonts
3899
3900(define-public tetzle
3901 (package
3902 (name "tetzle")
3903 (version "2.2.2")
3904 (source
3905 (origin
3906 (method url-fetch)
3907 (uri (string-append "https://gottcode.org/tetzle/"
3908 "tetzle-" version ".tar.bz2"))
3909 (sha256
3910 (base32 "0sybryg65j8gz5s7zbsfqky8wlkjwpppkrhksijj6xc7692lfii8"))))
3911 (build-system cmake-build-system)
3912 (arguments
3913 `(#:tests? #f)) ; no tests
3914 (native-inputs (list qttools))
3915 (inputs (list qtbase))
3916 (home-page "https://gottcode.org/tetzle/")
3917 (synopsis "Jigsaw puzzle game that uses tetrominoes for the pieces")
3918 (description
3919 "Tetzle is a jigsaw puzzle game that uses tetrominoes for the pieces. Any image
3920can be imported and used to create puzzles with a wide range of sizes. Games are
3921saved automatically, and you can select between currently in progress games.")
3922 (license license:gpl3+)))
3923
3924(define-public trigger-rally
3925 (package
3926 (name "trigger-rally")
3927 (version "0.6.7")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (string-append "mirror://sourceforge/trigger-rally/"
3932 "trigger-" version "/"
3933 "trigger-rally-" version ".tar.gz"))
3934 (sha256
3935 (base32
3936 "1ryzddf5k0jzv8xhmikajql2qc3gvha7by43r4l7yag17kx921k4"))))
3937 (build-system gnu-build-system)
3938 (inputs
3939 (list freealut
3940 glew
3941 glu
3942 mesa
3943 openal
3944 physfs
3945 (sdl-union (list sdl2 sdl2-image))
3946 tinyxml2))
3947 (arguments
3948 (list
3949 #:make-flags #~(list (string-append "prefix=" #$output)
3950 "bindir=$(prefix)/bin"
3951 "datadir=$(datarootdir)"
3952 "LOC_APPDATAFILE=$(datarootdir)/metainfo"
3953 "LOC_DESKTOPFILE=$(datarootdir)/applications"
3954 "OPTIMS=-Ofast")
3955 #:tests? #f ; No tests present
3956 #:phases
3957 #~(modify-phases %standard-phases
3958 (delete 'configure)
3959 (add-before 'build 'cd-src
3960 (lambda _ (chdir "src")))
3961 (add-before 'build 'remove-timestamps
3962 (lambda _
3963 (substitute* (list "Trigger/menu.cpp"
3964 "PEngine/app.cpp")
3965 ((".*__DATE__.*") ""))))
3966 (add-before 'build 'make-verbose
3967 (lambda _
3968 (substitute* "GNUmakefile"
3969 (("@\\$\\(CXX\\)") "$(CXX)"))))
3970 (add-after 'build 'set-data-path
3971 (lambda _
3972 (substitute* "../bin/trigger-rally.config.defs"
3973 (("<data path=\"C:[^\"]*\"")
3974 (string-append "<data path=\"" #$output "/share/trigger-rally\""))))))))
3975 (home-page "https://trigger-rally.sourceforge.net")
3976 (synopsis "Fast-paced single-player racing game")
3977 (description "Trigger-rally is a 3D rally simulation with great physics
3978for drifting on over 200 maps. Different terrain materials like dirt,
3979asphalt, sand, ice, etc. and various weather, light, and fog conditions give
3980this rally simulation the edge over many other games. You need to make it
3981through the maps in often tight time limits and can further improve by beating
3982the recorded high scores. All attached single races must be finished in time
3983in order to win an event, unlocking additional events and cars. Most maps are
3984equipped with spoken co-driver notes and co-driver icons.")
3985 (license (list license:cc0 ;textures and audio in data.zip
3986 license:gpl2+))))
3987
3988(define-public xshogi
3989 (package
3990 (name "xshogi")
3991 (version "1.4.2")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (string-append "mirror://gnu/gnushogi/xshogi-"
3996 version ".tar.gz"))
3997 (sha256
3998 (base32
3999 "1dns0nhymak44by18sv48m4xb2skiwbi2i3nb9hl6w9iwd2i2brf"))))
4000 (build-system gnu-build-system)
4001 (arguments
4002 (list
4003 #:configure-flags
4004 #~(list "CFLAGS=-Wno-error=implicit-function-declaration")))
4005 (inputs
4006 (list libxaw libxt))
4007 (home-page "https://www.gnu.org/software/gnushogi/")
4008 (synopsis "User interface for gnushogi")
4009 (description "A graphical user interface for the package @code{gnushogi}.")
4010 ;; Contains a copy of GPLv3 but the licence notices simply
4011 ;; state "GNU General Public Licence" without specifying a version.
4012 (license license:gpl1+)))
4013
4014(define-public abbaye
4015 (package
4016 (name "abbaye")
4017 (version "2.0.5")
4018 (source
4019 (origin
4020 (method git-fetch)
4021 (uri (git-reference
4022 (url "https://github.com/nevat/abbayedesmorts-gpl")
4023 (commit (string-append "v" version))))
4024 (file-name (git-file-name name version))
4025 (sha256
4026 (base32 "0jwj6cn4q0ijxdg8ywzd55sxqid5kp5z2bsxh8fpdlm5r7anvqls"))))
4027 (build-system gnu-build-system)
4028 (arguments
4029 (list
4030 #:make-flags #~(list "CC=gcc")
4031 #:phases
4032 #~(modify-phases %standard-phases
4033 (add-after 'set-paths 'set-sdl-paths
4034 (lambda* (#:key inputs #:allow-other-keys)
4035 (setenv "CPATH"
4036 (string-append
4037 (search-input-directory inputs "include/SDL2")
4038 ":" (or (getenv "CPATH") "")))))
4039 (add-after 'patch-source-shebangs 'patch-Makefile-prefix
4040 (lambda _
4041 (substitute* "Makefile"
4042 (("/usr") #$output))))
4043 (add-before 'install 'create-directories
4044 (lambda _
4045 ;; Create directories that the makefile assumes exist.
4046 (mkdir-p (string-append #$output "/bin"))
4047 (mkdir-p (string-append #$output "/share/applications"))
4048 (mkdir-p (string-append #$output "/share/pixmaps"))))
4049 (delete 'configure)) ;no configure script
4050 #:tests? #f)) ;no test suite
4051 (native-inputs (list pkg-config))
4052 (inputs (list (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
4053 (home-page "https://github.com/nevat/abbayedesmorts-gpl")
4054 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
4055 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
4056France. The Cathars, who preach about good Christian beliefs, were being
4057expelled by the Catholic Church out of the Languedoc region in France. One of
4058them, called Jean Raymond, found an old church in which to hide, not knowing
4059that beneath its ruins lay buried an ancient evil.")
4060 (license license:gpl3)))
4061
4062(define-public angband
4063 (package
4064 (name "angband")
4065 (version "4.2.6")
4066 (source
4067 (origin
4068 (method git-fetch)
4069 (uri (git-reference
4070 (url "https://github.com/angband/angband")
4071 (commit version)))
4072 (file-name (git-file-name name version))
4073 (sha256
4074 (base32 "0hgzdvlh0j42w4q9kch9xvhnbvcrypac01xhpksw35gj9my887cp"))
4075 (modules '((guix build utils)))
4076 (snippet
4077 '(begin
4078 (for-each delete-file-recursively
4079 '("lib/tiles/shockbolt" ;nonfree
4080 "src/win")) ;contains .dlls!
4081 ;; Don't build the shockbolt directory either.
4082 (substitute* "lib/tiles/Makefile"
4083 (("shockbolt") ""))))
4084 (patches (search-patches "angband-remove-nonfree-tile-options.patch"))))
4085 (build-system gnu-build-system)
4086 (arguments
4087 `(#:configure-flags (list (string-append "--bindir=" %output "/bin")
4088 "--disable-x11")
4089 #:phases
4090 (modify-phases %standard-phases
4091 (add-after 'unpack 'disable-graphics-and-sounds
4092 (lambda _
4093 (substitute* "lib/Makefile"
4094 ;; Do not build any graphics for this version.
4095 (("gamedata customize help screens fonts tiles sounds icons user")
4096 "gamedata customize help screens user"))))
4097 (add-before 'build 'fix-infinite-loop-on-sighup
4098 ;; XXX Release 4.2.6 has a major bug where sending the process a
4099 ;; SIGHUP when closing the terminal causes it to infinite loop
4100 ;; waiting for input: https://github.com/angband/angband/issues/6558
4101 ;; Reevaluate for future versions.
4102 (lambda _
4103 (substitute* "src/ui-signals.c"
4104 (("(SIGHUP, )SIG_IGN" _ first)
4105 (string-append first "handle_signal_abort")))))
4106 (add-before 'check 'skip-failing-tests
4107 (lambda _
4108 (let ((to-skip '(;; some of these may be fixable, but most try to
4109 ;; create a directory in the user's home directory.
4110 ;; Rather than reading environment variables, they
4111 ;; lookup the username using getpwnam(3) and manually
4112 ;; construct the string.
4113 ;; Generic "Suite died":
4114 "game/basic"
4115 "game/mage"
4116 ;; "Cannot create '//.angband/Angband'":
4117 "effects/chain"
4118 "effects/destruction"
4119 "effects/earthquake"
4120 "object/info"
4121 "object/slays"
4122 "player/calc-inventory"
4123 "player/combine-pack"
4124 "player/digging"
4125 "player/inven-carry-num"
4126 "player/inven-wield"
4127 "player/timed"
4128 ;; This file likes to read /etc/passwd
4129 "z-file/path-normalize")))
4130 (substitute* "src/tests/Makefile"
4131 (("include \\$\\(SUITES\\)" all)
4132 (string-append all "\nTESTPROGS := $(filter-out "
4133 (string-join to-skip " ")
4134 ", $(TESTPROGS))")))))))))
4135 (native-inputs (list autoconf
4136 automake
4137 perl)) ;for tests
4138 (inputs (list ncurses))
4139 (home-page "https://rephial.org/")
4140 (synopsis "Dungeon exploration roguelike")
4141 (description "Angband is a Classic dungeon exploration roguelike. Explore
4142the depths below Angband, seeking riches, fighting monsters, and preparing to
4143fight Morgoth, the Lord of Darkness.")
4144 (license license:gpl2)))
4145
4146(define-public angband-sdl2
4147 (package
4148 (inherit angband)
4149 (name "angband-sdl2")
4150 (arguments
4151 (substitute-keyword-arguments
4152 (package-arguments angband)
4153 ((#:configure-flags flags)
4154 #~(cons* "--enable-sdl2" #$flags))
4155 ((#:phases phases)
4156 #~(modify-phases #$phases
4157 (delete 'disable-graphics-and-sounds)
4158 (add-after 'unpack 'patch-sdl-wrapper-headers
4159 (lambda _
4160 (with-directory-excursion "src"
4161 (substitute* '("snd-sdl.c"
4162 "main-sdl2.c"
4163 "sdl2/pui-win.h")
4164 (("\"SDL_image.h\"") "\"SDL2/SDL_image.h\"")
4165 (("\"SDL_mixer.h\"") "\"SDL2/SDL_mixer.h\"")
4166 (("\"SDL_ttf.h\"") "\"SDL2/SDL_ttf.h\"")))))
4167 (add-after 'unpack 'patch-desktop-file
4168 (lambda* (#:key outputs #:allow-other-keys)
4169 (let ((out (assoc-ref outputs "out")))
4170 (substitute* "lib/icons/angband-sdl2.desktop"
4171 (("Exec=angband" _)
4172 (string-append "Exec=" #$output "/bin/angband-sdl2"))))))
4173 (add-after 'install 'rename-binary
4174 (lambda _
4175 (with-directory-excursion #$output
4176 ;; allows parallel installation with angband
4177 (rename-file "bin/angband"
4178 "bin/angband-sdl2"))))))))
4179 (inputs
4180 (modify-inputs inputs
4181 (prepend sdl2
4182 sdl2-image
4183 sdl2-mixer
4184 sdl2-ttf)))
4185 (description "Angband is a Classic dungeon exploration roguelike. Explore
4186the depths below Angband, seeking riches, fighting monsters, and preparing to
4187fight Morgoth, the Lord of Darkness.
4188
4189This version includes the SDL2 frontend, providing tilesets and sounds which
4190can be enabled through in-game options.")
4191 ;; XXX: fonts and adam bolt tileset are free but being clarified:
4192 ;; https://github.com/angband/angband/issues/6608
4193 ;; For the rest, see:
4194 ;; https://github.com/angband/angband/blob/master/docs/copying.rst
4195 (license (list license:gpl2 ;code, nomad+old tilesets
4196 license:cc-by-sa3.0 ;david gervais tileset
4197 license:cc-by-sa4.0)))) ;sounds
4198
4199(define-public pingus
4200 ;; Latest release is from 2021-12-24.
4201 (let ((commit "7d65221e1cd1026053c8a5a08ad911fbdd13d3ed")
4202 (revision "1"))
4203 (package
4204 (name "pingus")
4205 (version (git-version "0.7.6" revision commit))
4206 (source
4207 (origin
4208 (method git-fetch)
4209 (uri (git-reference
4210 (url "https://github.com/Pingus/pingus")
4211 (commit commit)))
4212 (file-name (git-file-name name version))
4213 (sha256
4214 (base32 "0dc6b192y1zwpiqfcpkyq5gk4xl8hl9hs71cmhag8hz59c5hfdfr"))))
4215 (build-system cmake-build-system)
4216 (arguments
4217 (list
4218 ;; Upstream reported the tests don't work.
4219 ;; See: <https://github.com/Pingus/pingus/blob/8c68e08b0b9530b0078a6e2972786f7accf0d0e6/pingus.nix#L47>
4220 #:tests? #f
4221 #:configure-flags
4222 #~(list "-DBUILD_TESTS=OFF")))
4223 (native-inputs (list googletest pkg-config tinycmmc uitest))
4224 (inputs
4225 (list argpp
4226 boost
4227 fmt-10
4228 geomcpp
4229 glm
4230 glu
4231 libpng
4232 libsigc++-2
4233 logmich
4234 mesa
4235 priocpp
4236 sdl2
4237 sdl2-image
4238 sdl2-mixer
4239 strutcpp
4240 tinygettext-with-sdl2
4241 wstsound
4242 xdgcpp))
4243 (home-page "https://pingus.seul.org/")
4244 (synopsis "Lemmings-like puzzle game")
4245 (description
4246 "Pingus is a free Lemmings-like puzzle game in which the player takes
4247command of a bunch of small animals and has to guide them through levels.
4248Since the animals walk on their own, the player can only influence them by
4249giving them commands, like build a bridge, dig a hole, or redirect all animals
4250in the other direction. Multiple such commands are necessary to reach the
4251level's exit. The game is presented in a 2D side view.")
4252 (license
4253 ;; Project itself is GPL3+, but some files are under distinct licenses.
4254 (list license:bsd-3
4255 license:gpl2+
4256 license:gpl3+)))))
4257
4258(define-public talkfilters
4259 (package
4260 (name "talkfilters")
4261 (version "2.3.8")
4262 (source
4263 (origin
4264 (method url-fetch)
4265 (uri (string-append "http://www.hyperrealm.com/talkfilters/"
4266 "talkfilters-" version ".tar.gz"))
4267 (sha256
4268 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
4269 (build-system gnu-build-system)
4270 (home-page "https://www.gnu.org/software/talkfilters/")
4271 (synopsis "Convert English text to humorous dialects")
4272 (description "The GNU Talk Filters are programs that convert English text
4273into stereotyped or otherwise humorous dialects. The filters are provided as
4274a C library, so they can easily be integrated into other programs.")
4275 (license license:gpl2+)))
4276
4277(define-public taisei
4278 (package
4279 (name "taisei")
4280 (version "1.4.5")
4281 (source
4282 (origin
4283 (method url-fetch)
4284 (uri (string-append "https://github.com/taisei-project/"
4285 "taisei/releases/download/v" version
4286 "/taisei-" version ".tar.xz"))
4287 (sha256
4288 (base32 "17b8cbjryjvid8ckmfn5gy99l8qpqz00llmmp35n5vcb4lapm2rc"))))
4289 (build-system meson-build-system)
4290 (arguments
4291 (list
4292 #:build-type "release" ;comment out for bug-reporting (and cheats)
4293 #:configure-flags #~(list "-Dr_default=gles30"
4294 "-Dr_gles30=enabled"
4295 "-Dshader_transpiler=enabled")))
4296 (native-inputs
4297 (list cmake-minimal
4298 gettext-minimal
4299 pkg-config
4300 python
4301 python-backports-zstd
4302 python-docutils
4303 python-pygments))
4304 (inputs
4305 (list cglm
4306 freetype
4307 glslang
4308 libdecor ; XXX: for sdl3
4309 libpng
4310 libunibreak
4311 libwebp
4312 mesa
4313 openssl
4314 opusfile
4315 sdl3
4316 shaderc
4317 spirv-cross
4318 spirv-tools ; for glslang
4319 vulkan-loader ; XXX: for sdl3?
4320 zlib
4321 (list zstd "lib")))
4322 (home-page "https://taisei-project.org/")
4323 (synopsis "Shoot'em up fangame and libre clone of Touhou Project")
4324 (description
4325 "Taisei is a vertical shoot'em up game, in which the player controls
4326one of three characters. While moving through stages, a large number of
4327enemies and even larger amounts of bullets appear that require careful
4328maneuvers to dodge. By shooting the enemies, players receive powerups
4329for their characters, allowing them to shoot even more.")
4330 (license (list
4331 ;; game
4332 license:expat
4333 ;; resources/00-taisei.pkgdir/bgm/
4334 ;; atlas/portraits/
4335 license:cc-by4.0
4336 ;; miscellaneous
4337 license:cc0
4338 license:public-domain))))
4339
4340(define-public cmatrix
4341 (package
4342 (name "cmatrix")
4343 (version "2.0")
4344 (source
4345 (origin
4346 (method git-fetch)
4347 (uri (git-reference
4348 (url "https://github.com/abishekvashok/cmatrix")
4349 (commit (string-append "v" version))))
4350 (file-name (git-file-name name version))
4351 (sha256
4352 (base32
4353 "1h9jz4m4s5l8c3figaq46ja0km1gimrkfxm4dg7mf4s84icmasbm"))))
4354 (build-system gnu-build-system)
4355 (native-inputs
4356 (list autoconf automake))
4357 (arguments
4358 '(#:phases
4359 (modify-phases %standard-phases
4360 (replace 'configure
4361 (lambda* (#:key outputs #:allow-other-keys)
4362 ;; This old ‘configure’ script doesn't support
4363 ;; variables passed as arguments.
4364 (let ((out (assoc-ref outputs "out")))
4365 (setenv "CONFIG_SHELL" (which "bash"))
4366 (invoke "./configure"
4367 (string-append "--prefix=" out))))))))
4368 (inputs (list ncurses))
4369 (home-page "https://www.asty.org/cmatrix")
4370 (synopsis "Simulate the display from \"The Matrix\"")
4371 (description "CMatrix simulates the display from \"The Matrix\" and is
4372based on the screensaver from the movie's website. It works with terminal
4373settings up to 132x300 and can scroll lines all at the same rate or
4374asynchronously and at a user-defined speed.")
4375 (license license:gpl2+)))
4376
4377(define-public chess
4378 (package
4379 (name "chess")
4380 (version "6.3.0")
4381 (source
4382 (origin
4383 (method url-fetch)
4384 (uri (string-append "mirror://gnu/chess/gnuchess-" version
4385 ".tar.gz"))
4386 (sha256
4387 (base32
4388 "0fm27h1xv56v1g1zq0cd9wlchvfw8iwmsgj4nyaxcalc171bwdqb"))))
4389 (build-system gnu-build-system)
4390 (arguments
4391 '(#:phases
4392 (modify-phases %standard-phases
4393 (add-after 'install 'fix-shell-scripts
4394 (lambda* (#:key outputs #:allow-other-keys)
4395 (let* ((out (assoc-ref outputs "out"))
4396 (bin (string-append out "/bin")))
4397 (chdir bin)
4398 (substitute* '("gnuchessx" "gnuchessu")
4399 (("^gnuchess") (string-append bin "/gnuchess")))))))))
4400 (home-page "https://www.gnu.org/software/chess/")
4401 (synopsis "Full chess implementation")
4402 (description "GNU Chess is a chess engine. It allows you to compete
4403against the computer in a game of chess, either through the default terminal
4404interface or via an external visual interface such as GNU XBoard.")
4405 (properties '((upstream-name . "gnuchess")
4406 (ftp-directory . "/chess")))
4407 (license license:gpl3+)))
4408
4409(define-public freedink-engine
4410 (package
4411 (name "freedink-engine")
4412 (version "109.6")
4413 (source (origin
4414 (method url-fetch)
4415 (uri (string-append "mirror://gnu/freedink/freedink-" version
4416 ".tar.gz"))
4417 (patches (search-patches "freedink-engine-fix-const-char.patch"
4418 "freedink-engine-fix-sdl-hints.patch"))
4419 (sha256
4420 (base32
4421 "00hhk1bjdrc1np2qz44sa5n1mb62qzwxbvsnws3vpms6iyn3a2sy"))))
4422 (build-system gnu-build-system)
4423 (arguments
4424 `(#:configure-flags '("--disable-embedded-resources")
4425 #:phases
4426 (modify-phases %standard-phases
4427 (add-after 'unpack 'disable-graphical-tests
4428 (lambda _
4429 ;; These tests require a graphical interface.
4430 (substitute* "src/Makefile.am"
4431 (("test_gfx_fonts TestIOGfxDisplay") "")
4432 ;; FIXME: Figure out why `TestIOTouchDragAnywhere` fails
4433 (("TestIOTouchDragAnywhere (test_integration)" all _) _))))
4434 (add-before 'bootstrap 'autoreconf
4435 (lambda _
4436 ;; automake is out of date in the source
4437 ;; autoreconf updates the automake scripts
4438 (invoke "autoreconf")
4439 ;; Build fails when autom4te.cache exists.
4440 (delete-file-recursively "autom4te.cache")
4441 #t))
4442 (add-after 'install 'delete-freedinkedit-desktop
4443 (lambda* (#:key outputs #:allow-other-keys)
4444 (let ((out (assoc-ref outputs "out")))
4445 ;; freedinkedit does not know where to find freedink data
4446 ;; freedink data is read-only, so it cannot be edited anyway.
4447 ;; TODO: fix freedink.desktop
4448 (delete-file-recursively (string-append
4449 out "/share/applications"))
4450 #t))))))
4451 (native-inputs `(("autoconf" ,autoconf)
4452 ("automake" ,automake)
4453 ("cxxtest" ,cxxtest)
4454 ("gettext" ,gettext-minimal)
4455 ("help2man" ,help2man)
4456 ("pkg-config" ,pkg-config)))
4457 (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer
4458 sdl2-ttf sdl2-gfx)))
4459 ("fontconfig" ,fontconfig)
4460 ("glm" ,glm)))
4461 (properties '((ftp-directory . "/freedink")
4462 (upstream-name . "freedink")))
4463 (home-page "https://www.gnu.org/software/freedink/")
4464 (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
4465 (description
4466 "GNU FreeDink is a free and portable re-implementation of the engine
4467for the role-playing game Dink Smallwood. It supports not only the original
4468game data files but it also supports user-produced game mods or \"D-Mods\".
4469To that extent, it also includes a front-end for managing all of your D-Mods.")
4470 (license license:gpl3+)))
4471
4472(define-public freedink-data
4473 (package
4474 (name "freedink-data")
4475 (version "1.08.20190120")
4476 (source (origin
4477 (method url-fetch)
4478 (uri (string-append "mirror://gnu/freedink/freedink-data-"
4479 version ".tar.gz"))
4480 (sha256
4481 (base32
4482 "17gvryadlxk172mblbsil7hina1z5wahwaxnr6g3mdq57dvl8pvi"))))
4483 (build-system gnu-build-system)
4484 (arguments
4485 `(#:phases
4486 (modify-phases %standard-phases
4487 (delete 'configure) ; no configure script
4488 (delete 'check)) ; no tests
4489 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4490 (properties '((ftp-directory . "/freedink")))
4491 (home-page "https://www.gnu.org/software/freedink/")
4492 (synopsis "Game data for GNU Freedink")
4493 (description
4494 "This package contains the game data of GNU Freedink.")
4495 (license license:gpl3+)))
4496
4497(define-public freedink-dfarc
4498 (package
4499 (name "freedink-dfarc")
4500 (version "3.14")
4501 (source (origin
4502 (method url-fetch)
4503 (uri (string-append "mirror://gnu/freedink/dfarc-"
4504 version ".tar.gz"))
4505 (sha256
4506 (base32
4507 "1yp8n3w426xnlp10xk06vfi2y3k9xrcfyck7s7qs1v0ys7n284d5"))))
4508 (build-system gnu-build-system)
4509 (native-inputs
4510 (list intltool))
4511 (inputs
4512 (list bzip2 wxwidgets))
4513 (properties '((ftp-directory . "/freedink")
4514 (upstream-name . "dfarc")))
4515 (home-page "https://www.gnu.org/software/freedink/")
4516 (synopsis "Front-end for managing and playing Dink Modules")
4517 (description "DFArc makes it easy to play and manage the GNU FreeDink game
4518and its numerous D-Mods.")
4519 (license license:gpl3+)))
4520
4521(define-public freedink
4522 ;; This is a wrapper that tells the engine where to find the data.
4523 (package (inherit freedink-engine)
4524 (name "freedink")
4525 (build-system trivial-build-system)
4526 (arguments
4527 '(#:builder (begin
4528 (use-modules (guix build utils))
4529
4530 (let* ((output (assoc-ref %outputs "out"))
4531 (bin (string-append output "/bin"))
4532 (executable (string-append bin "/freedink")))
4533 (mkdir-p bin)
4534 (call-with-output-file executable
4535 (lambda (port)
4536 (format port "#!~a/bin/sh
4537exec ~a/bin/freedink -refdir ~a/share/dink\n"
4538 (assoc-ref %build-inputs "bash")
4539 (assoc-ref %build-inputs "engine")
4540 (assoc-ref %build-inputs "data"))
4541 (chmod port #o777)))
4542 #t))
4543 #:modules ((guix build utils))))
4544 (inputs `(("engine" ,freedink-engine)
4545 ("data" ,freedink-data)
4546 ("bash" ,bash)))
4547 (native-inputs '())))
4548
4549(define-public fuzzylite
4550 ;; Use the latest commit from the master branch, as the latest release fails
4551 ;; to build.
4552 (let ((commit "13b3122f5c353c0389ed4e66041d548c44ec9df6")
4553 (revision "0"))
4554 (package
4555 (name "fuzzylite")
4556 (version (git-version "6.0" revision commit))
4557 (source (origin
4558 (method git-fetch)
4559 (uri (git-reference
4560 (url "https://github.com/fuzzylite/fuzzylite")
4561 (commit commit)))
4562 (file-name (git-file-name name version))
4563 (sha256
4564 (base32
4565 "1ai7x5lfy8c1d11crz33ayy21alry740f78qjjxwzdfr6ph7pkzq"))))
4566 (build-system cmake-build-system)
4567 (native-inputs (list catch2))
4568 (home-page "https://www.fuzzylite.com/")
4569 (synopsis "Fuzzy logic control binary")
4570 (description
4571 "This package provides fuzzylite, a fuzzy logic control library which
4572allows one to easily create fuzzy logic controllers in a few steps utilizing
4573object-oriented programming.")
4574 (license license:gpl3+))))
4575
4576(define-public xboard
4577 (package
4578 (name "xboard")
4579 (version "4.9.1")
4580 (source
4581 (origin
4582 (method url-fetch)
4583 (uri (string-append "mirror://gnu/xboard/xboard-" version
4584 ".tar.gz"))
4585 (sha256
4586 (base32
4587 "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
4588 (build-system gnu-build-system)
4589 (arguments
4590 `(#:configure-flags '("CFLAGS=-fcommon")
4591 #:phases
4592 (modify-phases %standard-phases
4593 ;; Fixes https://issues.guix.gnu.org/47195.
4594 (add-after 'unpack 'patch-aplay-path
4595 (lambda* (#:key inputs #:allow-other-keys)
4596 (substitute* "xboard.conf"
4597 (("aplay -q")
4598 (string-append (search-input-file inputs "/bin/aplay")
4599 " -q")))))
4600 ;; Fixes https://issues.guix.gnu.org/45236.
4601 (add-after 'unpack 'patch-default-engine
4602 (lambda* (#:key inputs #:allow-other-keys)
4603 (substitute* "xboard.conf"
4604 (("-firstChessProgram fairymax")
4605 (string-append "-firstChessProgram "
4606 (assoc-ref inputs "chess")
4607 "/bin/gnuchessx"))))))))
4608 (inputs
4609 (list alsa-utils chess gtk+-2 (librsvg-for-system)))
4610 (native-inputs
4611 (list texinfo pkg-config))
4612 (home-page "https://www.gnu.org/software/xboard/")
4613 (synopsis "Graphical user interface for chess programs")
4614 (description "GNU XBoard is a graphical board for all varieties of chess,
4615including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
4616and Makruk. Several lesser-known variants are also supported. It presents a
4617fully interactive graphical interface and it can load and save games in the
4618Portable Game Notation.")
4619 (license license:gpl3+)))
4620
4621(define-public gtypist
4622 (package
4623 (name "gtypist")
4624 (version "2.10.1")
4625 (source (origin
4626 (method url-fetch)
4627 (uri (string-append "mirror://gnu/gtypist/gtypist-"
4628 version ".tar.gz"))
4629 (sha256
4630 (base32
4631 "04rlh706p5drdvm1kvrgs3jaz9krxg4vi5fpipi4973vb42ymz89"))
4632 (modules '((guix build utils)))
4633 (snippet
4634 ;; We do not provide `ncurses.h' within an `ncursesw'
4635 ;; sub-directory, so patch the source accordingly. See
4636 ;; <http://bugs.gnu.org/19018>.
4637 '(begin
4638 (for-each (lambda (file)
4639 (substitute* file
4640 (("ncursesw/ncurses.h")
4641 "ncurses.h")))
4642 (find-files "." "configure$|\\.c$"))))))
4643 (build-system gnu-build-system)
4644 (native-inputs (list emacs-minimal))
4645 (inputs (list ncurses perl))
4646 (home-page "https://www.gnu.org/software/gtypist/")
4647 (synopsis "Typing tutor")
4648 (description
4649 "GNU Typist is a universal typing tutor. It can be used to learn and
4650practice touch-typing. Several tutorials are included; in addition to
4651tutorials for the standard QWERTY layout, there are also tutorials for the
4652alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
4653are primarily in English, however some in other languages are provided.")
4654 (license license:gpl3+)))
4655
4656(define-public libsquish
4657 (package
4658 (name "libsquish")
4659 (version "1.15")
4660 (source
4661 (origin
4662 (method url-fetch/tarbomb)
4663 (uri (string-append "mirror://sourceforge/libsquish/libsquish-" version
4664 ".tgz"))
4665 (sha256
4666 (base32 "0sbj2k98ak1jabna7h1vfakdvjb7d7a81l3178c6d230pbp9d1v2"))))
4667 (build-system gnu-build-system)
4668 (arguments
4669 (list
4670 #:tests? #f ; no tests defined in Makefile, extra/squishtest.cpp fails
4671 ; to build at all
4672 #:make-flags
4673 #~(list (string-append "INSTALL_DIR=" #$output))
4674 #:phases
4675 #~(modify-phases %standard-phases
4676 (add-after 'bootstrap 'use-shared
4677 (lambda _
4678 (substitute* "config"
4679 (("USE_SHARED .*")
4680 "USE_SHARED ?= 1"))))
4681 (delete 'configure)))) ;no configure script
4682 (home-page "https://sourceforge.net/projects/libsquish/")
4683 (synopsis "DXT texture compression library")
4684 (description
4685 "@code{libsquish} is a lossy software DXT texture compression library.
4686It implements the 3 useful DXT flavours (1,3,5) and has SIMD support for
4687x86 (SSE) and powerpc (Altivec). It can be used (as a much slower software
4688fallback) instead of the hardware implementations present on most modern
4689graphics chips.")
4690 (license license:expat)))
4691
4692(define-public irrlicht
4693 (package
4694 (name "irrlicht")
4695 (version "1.8.5")
4696 (source (origin
4697 (method url-fetch)
4698 (uri (string-append
4699 "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
4700 (version-major+minor version)
4701 "/" version "/irrlicht-" version ".zip"))
4702 (sha256
4703 (base32
4704 "0gagjh2l3a3m8hsixxhhhan3m5xl7735ka8m4g79jl4qsgp7pyzg"))
4705 (patches (search-patches "irrlicht-use-system-libs.patch"
4706 "irrlicht-link-against-needed-libs.patch"))
4707 (modules '((guix build utils)))
4708 (snippet
4709 '(begin
4710 (for-each delete-file-recursively
4711 '("bin" ; bundled compiled Windows binaries"
4712 "source/Irrlicht/MacOSX"
4713 "source/Irrlicht/bzip2"
4714 "source/Irrlicht/jpeglib"
4715 "source/Irrlicht/libpng"
4716 "source/Irrlicht/lzma"
4717 "source/Irrlicht/zlib"))
4718 (delete-file "source/Irrlicht/glext.h")
4719 (delete-file "source/Irrlicht/glxext.h")
4720 (delete-file "source/Irrlicht/wglext.h")))))
4721 (build-system gnu-build-system)
4722 (arguments
4723 `(#:phases
4724 (modify-phases %standard-phases
4725 (add-after 'unpack 'chdir-to-source
4726 (lambda _
4727 ;; The actual source is buried a few directories deep.
4728 (chdir "source/Irrlicht/")))
4729 (add-after 'chdir-to-source 'remove-<sys/sysctl.h>
4730 (lambda _
4731 (substitute* "COSOperator.cpp"
4732 (("#include <sys/sysctl.h>") ""))))
4733 (add-after 'chdir-to-source 'delete-broken-install-rule
4734 (lambda _
4735 (substitute* "Makefile"
4736 ;; We neither build nor want a static library. Skip it.
4737 ((".*\\bcp .*\\$\\(STATIC_LIB\\).*") ""))))
4738 (add-after 'chdir-to-source 'fix-build-env
4739 (lambda* (#:key outputs #:allow-other-keys)
4740 (let ((out (assoc-ref outputs "out")))
4741 (substitute* "Makefile"
4742 (("INSTALL_DIR = /usr/local/lib")
4743 (string-append "INSTALL_DIR = " out "/lib"))
4744 ;; Add '-fpermissive' to the CXXFLAGS.
4745 (("-Wall") "-Wall -fpermissive")) ; CImageLoaderJPG.cpp
4746 ;; The Makefile assumes these directories exist.
4747 (mkdir-p (string-append out "/lib"))
4748 (mkdir-p (string-append out "/include")))))
4749 (delete 'configure)) ; no configure script
4750 #:tests? #f ; no check target
4751 #:make-flags
4752 (list (string-append "CC=" ,(cc-for-target))
4753 "sharedlib")))
4754 (inputs
4755 (list bzip2
4756 libjpeg-turbo
4757 libpng
4758 libx11
4759 libxxf86vm
4760 mesa))
4761 (synopsis "3D game engine written in C++")
4762 (description
4763 "The Irrlicht Engine is a high performance realtime 3D engine written in
4764C++. Features include an OpenGL renderer, extensible materials, scene graph
4765management, character animation, particle and other special effects, support
4766for common mesh file formats, and collision detection.")
4767 (home-page "https://irrlicht.sourceforge.io/")
4768 (license license:zlib)))
4769
4770(define-public pegasus-frontend
4771 (let ((commit "c3462e68bf3a178420b44f356998255f8d82a113")
4772 (revision "weekly_2024w38"))
4773 (package
4774 (name "pegasus-frontend")
4775 (version (git-version "0.0" revision commit))
4776 (source
4777 (origin
4778 (method git-fetch)
4779 (uri (git-reference
4780 (url "https://github.com/mmatyas/pegasus-frontend")
4781 (commit commit)))
4782 (sha256
4783 (base32 "1p350nlbif33mw5cbqxwli5yf47dxpransxlj2wp8xvh4w1rb3jx"))
4784 (file-name (git-file-name name version))))
4785 (build-system qt-build-system)
4786 (arguments
4787 (list
4788 #:qtbase qtbase-5
4789 #:make-flags
4790 #~(list (string-append "INSTALL_DESKTOPDIR="
4791 #$output "/share/applications")
4792 (string-append "INSTALL_ICONDIR="
4793 #$output "/share/icons/hicolor"))
4794 #:phases
4795 #~(modify-phases %standard-phases
4796 (add-after 'unpack 'copy-modules
4797 (lambda* (#:key inputs #:allow-other-keys)
4798 (copy-recursively #$(this-package-native-input
4799 "SortFilterProxyModel")
4800 "./thirdparty/SortFilterProxyModel")
4801 (copy-recursively #$(this-package-native-input
4802 "pegasus-theme-grid")
4803 "./src/themes/pegasus-theme-grid")
4804 (copy-recursively #$(this-package-native-input
4805 "pegasus-frontend-translations") "./lang")))
4806 (add-before 'check 'prepare-test-env
4807 (lambda* (#:key tests? #:allow-other-keys)
4808 (when tests?
4809 (setenv "QT_QPA_PLATFORM" "offscreen")
4810 (setenv "QT_QUICK_BACKEND" "software"))))
4811 (add-after 'qt-wrap 'gst-wrap
4812 (lambda* (#:key inputs #:allow-other-keys)
4813 (wrap-program (string-append #$output "/bin/pegasus-fe")
4814 `("GST_PLUGIN_PATH" suffix
4815 ,(search-path-as-list '("lib/gstreamer-1.0")
4816 (map cdr inputs)))))))))
4817 (inputs (list sdl2
4818 bash-minimal
4819 qtbase-5
4820 qtsvg-5
4821 qtdeclarative-5
4822 qtgraphicaleffects
4823 qtmultimedia-5
4824 qtgamepad-5
4825 gst-plugins-base
4826 gst-plugins-bad
4827 gst-plugins-good))
4828 (native-inputs (list qttools-5
4829 (origin
4830 (method git-fetch)
4831 (uri (git-reference
4832 (url
4833 "https://github.com/mmatyas/pegasus-frontend-translations")
4834 (commit
4835 "46c7cecec745bdd4c61bfc7ecb967156ad208642")))
4836 (file-name "pegasus-frontend-translations")
4837 (sha256 (base32
4838 "0rvlx199wdrjxr8pgibga556zf4njq4w2n31fdirqgb631rgyqxd")))
4839 (origin
4840 (method git-fetch)
4841 (uri (git-reference
4842 (url
4843 "https://github.com/mmatyas/pegasus-theme-grid")
4844 (commit
4845 "5951db6f2a4fe0db6a4fd6f00da1f280cadfa536")))
4846 (file-name "pegasus-theme-grid")
4847 (sha256 (base32
4848 "1nfnq6lppdm9ni6jk48l1i7hk90m8w2p13swl5nr4zwczln8dbz1")))
4849 (origin
4850 (method git-fetch)
4851 (uri (git-reference
4852 (url
4853 "https://github.com/mmatyas/SortFilterProxyModel")
4854 (commit
4855 "2061f8136ba372fd06c1928a610258b7d88cb144")))
4856 (file-name "SortFilterProxyModel")
4857 (sha256 (base32
4858 "16va8fcf7v6kfm8r9zym0516qrk4vlsy5wmpd3r3002wpz8q39h2")))))
4859 (synopsis
4860 "Graphical frontend for launching and managing game collection")
4861 (description
4862 "Pegasus is a graphical frontend for browsing your game library and
4863 launching all kinds of games from the same place. It's focusing on
4864 customizability, cross platform support (including embedded)
4865 and high performance.")
4866 (home-page "https://pegasus-frontend.org")
4867 (license license:gpl3+))))
4868
4869(define-public mars
4870 ;; No official release since 2013: use the latest commit.
4871 (let ((commit "84664cda094efe6e49d9b1550e4f4f98c33eefa2")
4872 (revision "2"))
4873 (package
4874 (name "mars")
4875 (version (git-version "0.7.5" revision commit))
4876 (source (origin
4877 (method git-fetch)
4878 (uri (git-reference
4879 (url "https://github.com/thelaui/M.A.R.S.")
4880 (commit commit)))
4881 (file-name (git-file-name name version))
4882 (modules '((guix build utils)))
4883 (snippet
4884 #~(begin
4885 (delete-file-recursively "ext_libs_for_windows")))
4886 (sha256
4887 (base32
4888 "0bdi4ja39rark742qvqixm8khai5k8qd84z5kzim9jcjdvvwyqj9"))))
4889 (build-system cmake-build-system)
4890 (arguments
4891 `(#:tests? #f ; There are no tests
4892 #:configure-flags (list (string-append "-Dmars_EXE_DEST_DIR="
4893 %output "/bin"))
4894 #:phases
4895 (modify-phases %standard-phases
4896 (add-after 'unpack 'fix-data-path
4897 (lambda* (#:key outputs #:allow-other-keys)
4898 (substitute* "src/System/settings.cpp"
4899 (("C_dataPath = \"./data/\";")
4900 (string-append "C_dataPath = \""
4901 (assoc-ref outputs "out")
4902 "/share/games/marsshooter/\";"))))))))
4903 (inputs
4904 (list mesa fribidi taglib sfml-2))
4905 (home-page "https://mars-game.sourceforge.net/")
4906 (synopsis "2D space shooter")
4907 (description
4908 "M.A.R.S. is a 2D space shooter with pretty visual effects and
4909attractive physics. Players can battle each other or computer controlled
4910enemies in different game modes such as space ball, death match, team death
4911match, cannon keep, and grave-itation pit.")
4912 (license (list license:gpl3+
4913 license:cc-by-sa3.0))))) ;/data/audio/music
4914
4915(define-public maelstrom
4916 (package
4917 (name "maelstrom")
4918 (version "4.0.2")
4919 (source
4920 (origin
4921 (method git-fetch)
4922 (uri (git-reference
4923 (url "https://github.com/libsdl-org/Maelstrom")
4924 (commit (string-append "release-" version))))
4925 (sha256
4926 (base32 "0a3kpsd3582j0gwdwspfd27in24asjhj48i26im6d9hg1j3n4iww"))
4927 (file-name (git-file-name name version))
4928 (snippet
4929 #~(begin
4930 (use-modules (guix build utils))
4931 (substitute* '("game/mods.cpp" "utils/files.c")
4932 (("#include.*(physfssdl3.h)\"" all first)
4933 (string-append "#include <" first ">")))
4934 (substitute* "game/replay.cpp"
4935 (("#include \"\\.\\./(miniz/miniz\\.h)\"" all first)
4936 (string-append "#include <" first ">")))
4937 (substitute* "CMakeLists.txt"
4938 (("external/physfs/extras/physfssdl3\\.c" all)
4939 (string-append "# " all))
4940 (("miniz/miniz\\.c" all)
4941 (string-append "# " all))
4942 (("(pkg_check_modules\\()PhysFS.*physfs\\)\n" all first)
4943 (string-append all
4944 first "MINIZ IMPORTED_TARGET miniz)\n"
4945 first "PHYSFSSDL3 IMPORTED_TARGET physfs-sdl3)\n"))
4946 (("(target_link_libraries\\(Maelstrom PRIVATE )PkgConfig::PhysFS\\)\n" all first)
4947 (string-append all
4948 first "PkgConfig::MINIZ)\n"
4949 first "PkgConfig::PHYSFSSDL3)\n")))
4950 (for-each delete-file-recursively
4951 (list "macres"
4952 "miniz"
4953 "Xcode"))))))
4954 (build-system cmake-build-system)
4955 (arguments
4956 (list
4957 #:tests? #f ;no tests
4958 #:configure-flags
4959 #~(list "-DSTEAM=OFF"
4960 "-DUSE_VENDORED_SDL=OFF"
4961 "-DUSE_VENDORED_PHYSFS=OFF"
4962 "-DUSE_VENDORED_SDL_NET=OFF"
4963 "-DSTANDALONE_INSTALL=OFF")))
4964 (native-inputs (list pkg-config))
4965 (inputs (list miniz physfs physfs-sdl3 sdl3 sdl3-net))
4966 (home-page "https://github.com/libsdl-org/Maelstrom")
4967 (synopsis "Asteroids game")
4968 (description
4969 "You pilot your ship through the dreaded \"Maelstrom\" asteroid belt
4970-- suddenly your best friend thrusts towards you and fires, directly at your
4971cockpit. You raise your shields just in time, and the battle is joined.
4972
4973Maelstrom is a free software port of the original shareware game for the
4974Macintosh by Ambrosia Software, Inc. It is a fast-action, asteroids-like game,
4975with classic pixel graphics and original sounds.
4976
4977In addition to being a faithful reproduction of the original game, this version
4978adds game controller support, mobile touch controls, and both cooperative and
4979competitive multiplayer action.")
4980 (license (list license:zlib ;game code
4981 license:cc-by3.0)))) ;sprites, sounds, etc.
4982
4983(define-public alienblaster
4984 (package
4985 (name "alienblaster")
4986 (version "1.1.0")
4987 (source
4988 (origin
4989 (method url-fetch)
4990 (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
4991 "alienblaster-" version ".tgz"))
4992 (sha256
4993 (base32
4994 "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
4995 (build-system gnu-build-system)
4996 (arguments
4997 (list
4998 #:tests? #f ; no tests
4999 #:phases
5000 #~(modify-phases %standard-phases
5001 (add-after 'unpack 'fix-sdl-paths
5002 (lambda _
5003 (let ((share (string-append #$output "/share")))
5004 ;; Fix name and append path to "SDL_mixer.h"
5005 (substitute* "src/Makefile"
5006 (("GAME_NAME=alienBlaster") "GAME_NAME=alienblaster")
5007 (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
5008 (string-append line " -I"
5009 #$(this-package-input "sdl-mixer")
5010 "/include/SDL")))
5011 ;; Substitute relative paths in ".cfg" and source/header files
5012 (substitute* (find-files "./cfg")
5013 (("(\\./)?images") (string-append share "/images")))
5014 (substitute* (list "src/global.h" "src/global.cc")
5015 (("./images") (string-append share "/images"))
5016 (("./sound") (string-append share "/sound"))
5017 (("./cfg") (string-append share "/cfg"))))))
5018 (delete 'configure)
5019 (replace 'install
5020 (lambda _
5021 (install-file "alienblaster" (string-append #$output "/bin"))
5022 (for-each
5023 (lambda (dir)
5024 (copy-recursively dir (string-append #$output "/share/" dir)))
5025 '("images" "sound" "cfg")))))))
5026 (inputs (list sdl sdl-mixer))
5027 (home-page "http://www.schwardtnet.de/alienblaster/")
5028 (synopsis "Action-loaded 2D arcade shooter game")
5029 (description "Alien Blaster is an action-loaded 2D arcade shooter
5030game. Your mission in the game is simple: stop the invasion of the aliens by
5031blasting them. Simultaneous two-player mode is available.")
5032 (license license:gpl2)))
5033
5034(define-public glkterm
5035 (package
5036 (name "glkterm")
5037 (version "1.0.4")
5038 (source
5039 (origin
5040 (method url-fetch)
5041 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5042 "glk/implementations/glkterm-104.tar.gz"))
5043 (sha256
5044 (base32
5045 "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
5046 (build-system gnu-build-system)
5047 (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
5048 (arguments
5049 '(#:tests? #f ; no check target
5050 #:phases
5051 (modify-phases %standard-phases
5052 (replace 'install
5053 (lambda* (#:key outputs #:allow-other-keys)
5054 (let* ((out (assoc-ref outputs "out"))
5055 (inc (string-append out "/include"))
5056 (lib (string-append out "/lib")))
5057 (for-each
5058 (lambda (file)
5059 (install-file file inc))
5060 '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
5061 (install-file "libglkterm.a" lib))
5062 #t))
5063 (delete 'configure)))) ; no configure script
5064 (home-page "https://www.eblong.com/zarf/glk/")
5065 (synopsis "Curses Implementation of the Glk API")
5066 (description
5067 "Glk defines a portable API for applications with text UIs. It was
5068primarily designed for interactive fiction, but it should be suitable for many
5069interactive text utilities, particularly those based on a command line.
5070This is an implementation of the Glk library which runs in a terminal window,
5071using the @code{curses.h} library for screen control.")
5072 (license (license:fsf-free "file://README"))))
5073
5074(define-public glulxe
5075 (package
5076 (name "glulxe")
5077 (version "0.5.4")
5078 (source
5079 (origin
5080 (method url-fetch)
5081 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5082 "glulx/interpreters/glulxe/glulxe-054.tar.gz"))
5083 (sha256
5084 (base32
5085 "0vipydg6ra90yf9b3ipgppwxyb2xdhcxwvirgjy0v20wlf56zhhz"))))
5086 (build-system gnu-build-system)
5087 (inputs `(("glk" ,glkterm)))
5088 (arguments
5089 '(#:tests? #f ; no check target
5090 #:make-flags
5091 (let* ((glk (assoc-ref %build-inputs "glk")))
5092 (list (string-append "GLKINCLUDEDIR=" glk "/include")
5093 (string-append "GLKLIBDIR=" glk "/lib")
5094 (string-append "GLKMAKEFILE=" "Make.glkterm")))
5095 #:phases
5096 (modify-phases %standard-phases
5097 (replace 'install
5098 (lambda* (#:key outputs #:allow-other-keys)
5099 (let* ((out (assoc-ref outputs "out"))
5100 (bin (string-append out "/bin")))
5101 (install-file "glulxe" bin))
5102 #t))
5103 (delete 'configure)))) ; no configure script
5104 (home-page "https://www.eblong.com/zarf/glulx/")
5105 (synopsis "Interpreter for Glulx VM")
5106 (description
5107 "Glulx is a 32-bit portable virtual machine intended for writing and
5108playing interactive fiction. It was designed by Andrew Plotkin to relieve
5109some of the restrictions in the venerable Z-machine format. This is the
5110reference interpreter, using the Glk API.")
5111 (license license:expat)))
5112
5113(define-public fifechan
5114 (package
5115 (name "fifechan")
5116 (version "0.1.5")
5117 (source (origin
5118 (method url-fetch)
5119 (uri (string-append "https://codeload.github.com/fifengine/"
5120 "fifechan/tar.gz/" version))
5121 (file-name (string-append name "-" version ".tar.gz"))
5122 (sha256
5123 (base32
5124 "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
5125 (build-system cmake-build-system)
5126 (inputs
5127 (list sdl2 sdl2-image mesa))
5128 (arguments
5129 '(#:tests? #f)) ; No included tests
5130 (home-page "https://fifengine.github.io/fifechan/")
5131 (synopsis "Cross platform GUI library specifically for games")
5132 (description
5133 "Fifechan is a lightweight cross platform GUI library written in C++
5134specifically designed for games. It has a built in set of extendable GUI
5135Widgets, and allows users to create more.")
5136 (license license:lgpl2.1+)))
5137
5138(define-public fifengine
5139 (package
5140 (name "fifengine")
5141 (version "0.4.2")
5142 (source (origin
5143 (method url-fetch)
5144 (uri (string-append "https://codeload.github.com/fifengine/"
5145 "fifengine/tar.gz/" version))
5146 (file-name (string-append name "-" version ".tar.gz"))
5147 (patches (search-patches "fifengine-swig-compat.patch"
5148 "fifengine-boost-compat.patch"
5149 "fifengine-python-3.9-compat.patch"))
5150 (sha256
5151 (base32
5152 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
5153 (build-system cmake-build-system)
5154 (arguments
5155 (list #:tests? #f ;TODO The test running fails to run some tests.
5156 #:configure-flags
5157 #~(list
5158 (string-append "-DOPENALSOFT_INCLUDE_DIR="
5159 (search-input-directory %build-inputs "include/AL"))
5160 (string-append "-DPYTHON_SITE_PACKAGES="
5161 #$output "/lib/python"
5162 #$(version-major+minor
5163 (package-version (this-package-input "python")))
5164 "/site-packages"))
5165 #:phases
5166 #~(modify-phases %standard-phases
5167 (add-after 'unpack 'patch-run_tests.py
5168 (lambda _
5169 ;; Patch the test runner to exit with a status of 1 if any test
5170 ;; fails, to allow detecting failures.
5171 (substitute* "run_tests.py"
5172 (("ERROR\\. One or more tests failed!'\\)")
5173 "ERROR. One or more tests failed!')
5174\t\texit(1)"))))
5175 ;; Run tests after installation so that we can make use of the built
5176 ;; python modules.
5177 (delete 'check)
5178 (add-after 'install 'check
5179 (lambda* (#:key tests? #:allow-other-keys)
5180 (when tests?
5181 ;; The tests require an X server.
5182 (system "Xvfb :1 &")
5183 (setenv "DISPLAY" ":1")
5184 (setenv "XDG_RUNTIME_DIR" "/tmp")
5185 ;; Run tests
5186 (chdir #$(string-append "../" (package-name this-package)
5187 "-" (package-version this-package)))
5188 (invoke "python3" "run_tests.py" "-a")))))))
5189 (native-inputs
5190 (list python swig-4.4 xorg-server-for-tests))
5191 (inputs
5192 (list sdl2
5193 sdl2-image
5194 sdl2-ttf
5195 tinyxml
5196 openal
5197 libogg
5198 glew
5199 libvorbis
5200 boost-1.83
5201 fifechan
5202 swig-4.4
5203 python))
5204 (propagated-inputs
5205 (list python-future))
5206 (home-page "https://www.fifengine.net/")
5207 (synopsis "FIFE is a multi-platform isometric game engine written in C++")
5208 (description
5209 "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
5210isometric game engine. Python bindings are included allowing users to create
5211games using Python as well as C++.")
5212 (license license:lgpl2.1+)))
5213
5214(define-public fizmo
5215 (package
5216 (name "fizmo")
5217 (version "0.8.5")
5218 (source (origin
5219 (method url-fetch)
5220 (uri (string-append "https://fizmo.spellbreaker.org/source/"
5221 "fizmo-" version ".tar.gz"))
5222 (sha256
5223 (base32
5224 "1amyc4n41jf08kxmdgkk30bzzx54miaxa97w28f417qwn8lrl98w"))))
5225 (build-system gnu-build-system)
5226 (arguments
5227 '(#:configure-flags
5228 (let ((libjpeg (assoc-ref %build-inputs "libjpeg"))
5229 (ncurses (assoc-ref %build-inputs "ncurses")))
5230 (list (string-append "--with-jpeg-includedir=" libjpeg "/include")))))
5231 (native-inputs
5232 (list pkg-config))
5233 (inputs
5234 `(("freetype" ,freetype)
5235 ("libjpeg" ,libjpeg-turbo)
5236 ("libpng" ,libpng)
5237 ("libsndfile" ,libsndfile)
5238 ("libxml2" ,libxml2)
5239 ("ncurses" ,ncurses)
5240 ("sdl2" ,sdl2)))
5241 (home-page "https://fizmo.spellbreaker.org/")
5242 (synopsis "Z-machine interpreter")
5243 (description
5244 "Fizmo is a console-based Z-machine interpreter. It is used to play
5245interactive fiction, also known as text adventures, which were implemented
5246either by Infocom or created using the Inform compiler.")
5247 (license license:bsd-3)))
5248
5249(define-public gnugo
5250 (package
5251 (name "gnugo")
5252 (version "3.8")
5253 (source (origin
5254 (method url-fetch)
5255 (uri (string-append "mirror://gnu/gnugo/gnugo-" version
5256 ".tar.gz"))
5257 (sha256
5258 (base32
5259 "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
5260 (build-system gnu-build-system)
5261 (inputs
5262 (list readline))
5263 (arguments
5264 `(#:configure-flags '("CFLAGS=-fcommon")))
5265 (synopsis "Play the game of Go")
5266 (description
5267 "GNU Go is a program that plays the game of Go, in which players
5268place stones on a grid to form territory or capture other stones. While
5269it can be played directly from the terminal, rendered in ASCII characters,
5270it is also possible to play GNU Go with 3rd party graphical interfaces or
5271even in Emacs. It supports the standard game storage format (SGF, Smart
5272Game Format) and inter-process communication format (GMP, Go Modem
5273Protocol).")
5274 (home-page "https://www.gnu.org/software/gnugo/")
5275 (license license:gpl3+)))
5276
5277(define-public extremetuxracer
5278 (package
5279 (name "extremetuxracer")
5280 (version "0.8.4")
5281 (source (origin
5282 (method url-fetch)
5283 (uri (string-append
5284 "mirror://sourceforge/extremetuxracer/releases/"
5285 version "/etr-" version ".tar.xz"))
5286 (sha256
5287 (base32
5288 "1rbk8zqfzzk90znf3f5lqqa12j0n6pm2qgwzabzmlnkm1k68acps"))))
5289 (build-system gnu-build-system)
5290 (native-inputs
5291 (list pkg-config))
5292 (inputs
5293 (list glu sfml-2))
5294 (synopsis "High-speed arctic racing game based on Tux Racer")
5295 ;; Snarfed straight from Debian.
5296 (description "Extreme Tux Racer, or etracer as it is called for short, is
5297a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the
5298game is to slide down a snow- and ice-covered mountain as quickly as possible,
5299avoiding the trees and rocks that will slow you down.
5300
5301Collect herrings and other goodies while sliding down the hill, but avoid fish
5302bones.
5303
5304This game is based on the GPL version of the famous game TuxRacer.")
5305 (home-page "https://sourceforge.net/projects/extremetuxracer/")
5306 (license license:gpl2+)))
5307
5308(define-public exult
5309 (package
5310 (name "exult")
5311 (version "1.8")
5312 (source
5313 (origin
5314 ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
5315 (method git-fetch)
5316 (uri (git-reference
5317 (url "https://github.com/exult/exult")
5318 (commit (string-append "v" version))))
5319 (file-name (git-file-name name version))
5320 (sha256
5321 (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
5322 (build-system gnu-build-system)
5323 (outputs (list "out" "gimp" "studio"))
5324 (arguments
5325 (list #:configure-flags
5326 #~(list "--enable-shared"
5327 "--disable-static"
5328 "--enable-lto"
5329 "--enable-exult-studio"
5330 "--enable-exult-studio-support"
5331 "--enable-compiler"
5332 "--enable-mods" ; needs --enable-compiler!
5333 "--enable-gimp-plugin"
5334 ;; A few lines on stdout can save a lot of head-scratching:
5335 "CPPFLAGS=-DDEBUG_PATHS=1")
5336 #:phases
5337 #~(modify-phases %standard-phases
5338 (add-before 'bootstrap 'patch-game-home-directory
5339 (lambda _
5340 (substitute* "gamemgr/modmgr.cc"
5341 ;; EXULT_DATADIR is in the store where it's rather hard for
5342 ;; users to put game assets. Use a more writable home by
5343 ;; default, which users can override in their ~/.exult.cfg.
5344 (("<GAMEHOME>")
5345 (string-append "<HOME>/.local/share/exult"))
5346 ;; …however, this causes a regression: the mods which we'll
5347 ;; install to EXULT_DATADIR are no longer found. So: don't
5348 ;; look for mods alongside the assets by default. This too
5349 ;; can be overridden in users' ~/.exult.cfg.
5350 (("game_path( \\+ \"/mods\")" _ +suffix)
5351 (string-append "get_system_path(\"<GAMEHOME>/\") + "
5352 "cfgname" +suffix)))))
5353 (add-before 'bootstrap 'move-exult-studio
5354 (lambda* (#:key outputs #:allow-other-keys)
5355 (let ((out (assoc-ref outputs "studio")))
5356 (substitute* "mapedit/studio.cc"
5357 (("(esdir, )EXULT_DATADIR" _ prefix)
5358 (string-append prefix "\"" out "/share/exult\"")))
5359 (substitute* "data/Makefile.am"
5360 (("(estudionewdir =.*)\\$\\(datadir\\)(.*)"
5361 _ variable= suffix)
5362 (string-append variable= out "/share" suffix "\n"))))))
5363 (add-before 'bootstrap 'fix-gimp-plug-in-prefix
5364 ;; ./configure will propagate this value to myriad Makefiles
5365 ;; scattered across the tree, so fix it early.
5366 (lambda* (#:key outputs #:allow-other-keys)
5367 (let ((out (assoc-ref outputs "gimp")))
5368 (substitute* "configure.ac"
5369 (("(GIMP_PLUGIN_PREFIX=).*" _ variable=)
5370 (string-append variable= out "/lib/gimp/2.0"))))))
5371 (add-after 'install 'move-exult_studio
5372 (lambda* (#:key outputs #:allow-other-keys)
5373 (let ((source (assoc-ref outputs "out"))
5374 (target (assoc-ref outputs "studio"))
5375 (file "/bin/exult_studio"))
5376 (mkdir-p (string-append target (dirname file)))
5377 (rename-file (string-append source file)
5378 (string-append target file))))))))
5379 (native-inputs
5380 (list autoconf automake libtool pkg-config
5381 ;; The following are needed only by the GIMP plug-in.
5382 gimp libjpeg-turbo
5383 gegl gtk+-2 ; needed by gimpui-2.0.pc
5384 ;; The following are needed only by the Usecode compiler.
5385 bison flex))
5386 (inputs
5387 (list fluidsynth freetype libvorbis sdl2
5388 ;; GTK is needed only by Exult Studio.
5389 gtk+))
5390 (synopsis "Role-playing game engine compatible with Ultima VII")
5391 (description
5392 "Exult is an Ultima 7 game engine that runs on modern operating systems.
5393Ultima 7 (or Ultima VII) is a two-part @acronym{RPG, role-playing game} from the
5394early 1990s.
5395
5396Exult is fully compatible with the original Ultima 7, but doesn't require any
5397of its data files to be useful. Explore entirely new game worlds---or create
5398your own with the included game and map editor, Exult Studio.
5399
5400This package expects the game(s) to be placed in subdirectories of
5401@file{~/.local/share/exult}.")
5402 (home-page "http://exult.info/")
5403 (license license:gpl2+)))
5404
5405(define %supertuxkart-version "1.5")
5406(define supertuxkart-source
5407 (origin
5408 (method git-fetch)
5409 (uri (git-reference
5410 (url "https://github.com/supertuxkart/stk-code")
5411 (commit %supertuxkart-version)))
5412 (sha256
5413 (base32
5414 "0q2dsv9vxblnv04d73qlvbbnkrxgywplz6qsqmfbamn7lj57kypx"))
5415 (file-name (git-file-name "supertuxkart" %supertuxkart-version))
5416 (modules '((guix build utils)))
5417 (snippet
5418 ;; Delete bundled library sources
5419 '(begin
5420 ;; Supertuxkart uses modified versions of the Irrlicht engine
5421 ;; and the bullet library. The developers gave an explanation
5422 ;; here: http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
5423 ;; FIXME: try to unbundle angelscript and libraqm
5424 (for-each delete-file-recursively
5425 '("lib/dnsc"
5426 "lib/enet"
5427 "lib/mcpp"
5428 "lib/mojoal"
5429 "lib/wiiuse"))))))
5430
5431(define-public supertuxkart-data
5432 ;; There are no tags or releases for the stk-assets data, nor indication of
5433 ;; which revision is bundled into the released SuperTuxKart-*-src tarball;
5434 ;; use the latest SVN revision available.
5435 (let ((commit "18621"))
5436 (hidden-package
5437 (package
5438 (name "supertuxkart-data")
5439 ;; The package produced is a merger of supertuxkart's "stk-assets"
5440 ;; repository and the "stk-code" repository's "data" directory, so
5441 ;; include the code version as well.
5442 (version (string-append %supertuxkart-version "-" commit))
5443 (source
5444 (origin
5445 (method svn-fetch)
5446 (uri (svn-reference
5447 (url "https://svn.code.sf.net/p/supertuxkart/code/stk-assets")
5448 (revision (string->number commit))))
5449 (file-name (string-append name "-" commit "-checkout"))
5450 (sha256
5451 (base32
5452 "0bz4rab0h6dyf014andw7lpd5gh3b2xqdslx0ffdglmf65xi594a"))))
5453 (build-system copy-build-system)
5454 (arguments
5455 (list #:install-plan
5456 #~'(("." "share/supertuxkart/data"
5457 #:exclude-regexp ("wip-.*")))
5458 #:phases
5459 #~(modify-phases %standard-phases
5460 (add-after 'unpack 'copy-code-data
5461 (lambda _
5462 (copy-recursively
5463 (string-append
5464 #$(this-package-input
5465 (git-file-name "supertuxkart" %supertuxkart-version))
5466 "/data/")
5467 "."))))))
5468 (inputs (list supertuxkart-source))
5469 (home-page "https://supertuxkart.net/Main_Page")
5470 (synopsis "Data files for SuperTuxKart")
5471 (description "This package contains data files for SuperTuxKart.")
5472 (license (list license:gpl3+
5473 license:cc-by-sa3.0
5474 license:cc-by-sa4.0
5475 license:cc0))))))
5476
5477(define-public supertuxkart
5478 (package
5479 (name "supertuxkart")
5480 (version %supertuxkart-version)
5481 (source supertuxkart-source)
5482 (build-system cmake-build-system)
5483 (arguments
5484 (list #:tests? #f ; no check target
5485 #:configure-flags
5486 #~(list "-DCHECK_ASSETS=FALSE" ; assets are out-of-tree
5487 (string-append "-DSTK_INSTALL_DATA_DIR_ABSOLUTE="
5488 #$(this-package-input "supertuxkart-data")
5489 "/share/supertuxkart")
5490 "-DUSE_WIIUSE=0"
5491 "-DUSE_SYSTEM_ENET=TRUE"
5492 "-DUSE_CRYPTO_OPENSSL=TRUE"
5493 ;; In order to use the system ENet library, IPv6 support
5494 ;; (added in SuperTuxKart version 1.1) must be disabled.
5495 "-DUSE_IPV6=FALSE")
5496 #:phases
5497 #~(modify-phases %standard-phases
5498 (add-before 'configure 'disable-data-install
5499 (lambda _
5500 (substitute* "CMakeLists.txt"
5501 (("^install\\(DIRECTORY.*STK_DATA_DIR" &)
5502 (string-append "# " &))))))))
5503 (inputs
5504 (list curl
5505 freetype
5506 fribidi
5507 glew
5508 harfbuzz
5509 libopenglrecorder
5510 libvorbis
5511 libx11
5512 libxrandr
5513 mesa
5514 openal
5515 sdl2
5516 sqlite
5517 supertuxkart-data
5518 zlib
5519 ;; The following input is needed to build the bundled and modified
5520 ;; version of irrlicht.
5521 enet
5522 libjpeg-turbo
5523 openssl))
5524 (native-inputs (list mcpp pkg-config python shaderc))
5525 (home-page "https://supertuxkart.net/Main_Page")
5526 (synopsis "3D kart racing game")
5527 (description "SuperTuxKart is a 3D kart racing game, with a focus on
5528having fun over realism. You can play with up to 4 friends on one PC, racing
5529against each other or just trying to beat the computer; single-player mode is
5530also available.")
5531 (license license:gpl3+)))
5532
5533(define-public ring-racers-data
5534 (hidden-package
5535 (package
5536 (name "ring-racers-data")
5537 (version "2.4")
5538 (source
5539 (origin
5540 (method url-fetch/zipbomb)
5541 (uri (string-append
5542 "https://github.com/KartKrewDev/RingRacers/releases/download/v"
5543 version "/Dr.Robotnik.s-Ring-Racers-v" version "-Assets.zip"))
5544 (file-name (string-append name "-" version ".zip"))
5545 (sha256
5546 (base32 "087i1bz46g57s0850j5wf9j2bdmr451lzg156hrg681chwdxgfpf"))))
5547 (build-system copy-build-system)
5548 (home-page "https://github.com/KartKrewDev/RingRacers/releases")
5549 (synopsis "Data files for Ring Racers")
5550 (description "This package contains data files for Ring Racers.")
5551 (license license:gpl2+))))
5552
5553(define-public ring-racers
5554 (package
5555 (name "ring-racers")
5556 (version "2.4")
5557 (source
5558 (origin
5559 (method git-fetch)
5560 (uri (git-reference
5561 (url "https://gitlab.com/kart-krew-dev/ring-racers")
5562 (commit (string-append "v" version))))
5563 (file-name (git-file-name name version))
5564 (sha256
5565 (base32 "05aj09rm50xb6910zx6imarj8k728x9bpvpa7ydwgb4sj1nypil8"))
5566 (modules '((guix build utils)))
5567 (snippet
5568 '(begin
5569 (with-directory-excursion "thirdparty"
5570 ;; Delete third party ibraries, except these libraries:
5571 ;; glad: header file is not available in the system glad package.
5572 ;; imgui: configured with "srb2_imconfig.h".
5573 ;; libwebm: Not available in Guix.
5574 ;; renamenoise: Not available in Guix.
5575 ;; tracy: header files are not available in the system tracy
5576 ;; package.
5577 (for-each delete-file-recursively
5578 '("discord-rpc"
5579 "glm"
5580 "nlohmann-json"
5581 "overlay-ports/libyuv"
5582 "tcbrindle_span"
5583 "vma"
5584 "volk"
5585 "vulkan-headers"
5586 "xmp-lite"))
5587 ;; Unbundle stb.
5588 (with-directory-excursion "stb"
5589 (for-each delete-file
5590 '("include/stb_rect_pack.h"
5591 "stb_vorbis.c"))
5592 (substitute* "stb_rect_pack.c"
5593 (("\"include\\/stb_rect_pack\\.h\"") "<stb_rect_pack.h>"))
5594 (substitute* "CMakeLists.txt"
5595 (("include\\/stb_rect_pack\\.h ") "")))
5596 ;; Find third party libraries from the system and do not add the
5597 ;; deleted directories.
5598 (substitute* "CMakeLists.txt"
5599 (("add_subdirectory\\((glm|discord-rpc|xmp-lite|fmt|volk)\\)"
5600 _ keep)
5601 (string-append "find_package(" keep " REQUIRED)"))
5602 (("xmp-lite") "libxmp")
5603 ((".*nlohmann-json.*") "")
5604 ((".*tcbrindle_span.*") "")
5605 ((".*vulkan-headers.*") "")
5606 ((".*vma.*") "")))
5607 (with-directory-excursion "src"
5608 ;; Link the system libraries instead of the unbundled ones.
5609 (substitute* "CMakeLists.txt"
5610 ((".*tcbrindle::span.*") "")
5611 (("glm::glm") "glm")
5612 (("xmp-lite::xmp-lite") "xmp")
5613 (("fmt::fmt-header-only") "fmt")
5614 ((".*nlohmann_json::nlohmann_json.*") "")))
5615 ;; Rename the icon to match with the executable file.
5616 (rename-file "srb2.png" "ringracers.png")))))
5617 (build-system cmake-build-system)
5618 (arguments
5619 (list
5620 #:tests? #f ;There are no tests.
5621 #:configure-flags
5622 #~(list "-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF"
5623 "-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'"
5624 "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'")
5625 #:phases
5626 #~(modify-phases %standard-phases
5627 (add-after 'unpack 'copy-stb_vorbis.c
5628 (lambda* (#:key inputs #:allow-other-keys)
5629 (install-file (search-input-file inputs "/stb_vorbis.c")
5630 "thirdparty/stb")))
5631 (replace 'install
5632 (lambda _
5633 (install-file "bin/ringracers" (string-append #$output "/bin"))
5634 (install-file "../source/ringracers.png"
5635 (string-append #$output "/share/pixmaps"))))
5636 (add-after 'install 'wrap-program
5637 (lambda* (#:key inputs #:allow-other-keys)
5638 (wrap-program (string-append #$output "/bin/ringracers")
5639 `("RINGRACERSWADDIR" =
5640 (,(assoc-ref inputs "ring-racers-data"))))))
5641 (add-after 'wrap-program 'create-desktop-entry
5642 (lambda _
5643 (let* ((datadir (string-append #$output "/share"))
5644 (appdir (string-append datadir "/applications")))
5645 (mkdir-p appdir)
5646 (make-desktop-entry-file (string-append appdir
5647 "/ringracers.desktop")
5648 #:name "Dr. Robotnik's Ring Racers"
5649 #:comment "Technical kart racing game"
5650 #:icon "ringracers"
5651 #:exec (string-append #$output "/bin/ringracers")
5652 #:startup-notify #f
5653 #:categories '("Application" "Game"))))))))
5654 (native-inputs
5655 (list pkg-config
5656 (package-source stb)))
5657 (inputs (list bash-minimal
5658 curl
5659 fmt
5660 glm
5661 libogg
5662 libpng
5663 libvorbis
5664 libvpx
5665 libxmp
5666 libyuv
5667 nlohmann-json
5668 opus
5669 ring-racers-data
5670 sdl2
5671 stb-rect-pack
5672 tcbrindle-span
5673 vulkan-headers
5674 vulkan-memory-allocator
5675 vulkan-volk
5676 zlib))
5677 (home-page "https://www.kartkrew.org/")
5678 (synopsis "Technical kart racing game")
5679 (description
5680 "Dr.@: Robotnik's Ring Racers is a kart racing game drawing inspiration
5681from \"anti-gravity\" racers, fighting games, and traditional-style kart
5682racing. Ring Racers is designed with an emphasis on player agency in the face
5683of highly technical game-play challenges in both single-player and online
5684multiplayer modes.")
5685 (license license:gpl2+)))
5686
5687(define-public unknown-horizons
5688 (package
5689 (name "unknown-horizons")
5690 (version "2019.1")
5691 (source
5692 (origin
5693 (method url-fetch)
5694 (uri (string-append "https://codeload.github.com/unknown-horizons/"
5695 "unknown-horizons/tar.gz/" version))
5696 (file-name (string-append name "-" version ".tar.gz"))
5697 (sha256
5698 (base32 "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
5699 (patches (search-patches "unknown-horizons-python-3.8-distro.patch"
5700 "unknown-horizons-python-3.9.patch"
5701 "unknown-horizons-python-3.10.patch"))))
5702 (build-system pyproject-build-system)
5703 (arguments
5704 (list
5705 #:test-flags
5706 ;; 'tutorial' scenario not in the database.
5707 #~(list "-k" (string-join (list "not test_start_scenario_by_name"
5708 "test_start_scenario_by_path")
5709 " and not "))
5710 #:phases
5711 #~(modify-phases %standard-phases
5712 (add-before 'build 'set-HOME
5713 (lambda _
5714 (setenv "HOME" "/tmp")))
5715 (add-after 'build 'build-extra
5716 (lambda _
5717 (invoke "python3" "./setup.py" "build_i18n")
5718 (invoke "python3" "horizons/engine/generate_atlases.py" "2048")))
5719 (add-after 'install 'patch
5720 (lambda _
5721 (substitute* (string-append #$output "/bin/unknown-horizons")
5722 (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
5723 (string-append "os.chdir(\""
5724 #$output "/share/unknown-horizons\")")))))
5725 (add-before 'check 'fix-tests-with-pytest>=4
5726 (lambda _
5727 (substitute* "tests/conftest.py"
5728 (("pytest_namespace")
5729 "pytest_configure")
5730 (("get_marker")
5731 "get_closest_marker"))))
5732 ;; TODO: Run GUI tests as well
5733 (replace 'check
5734 (lambda args
5735 (substitute* "horizons/constants.py"
5736 (("IS_DEV_VERSION = False")
5737 "IS_DEV_VERSION = True"))
5738 (apply (assoc-ref %standard-phases 'check) args)
5739 (substitute* "horizons/constants.py"
5740 (("IS_DEV_VERSION = True")
5741 "IS_DEV_VERSION = False")))))))
5742 (inputs
5743 (list fifengine
5744 (list python "tk")
5745 python-pillow
5746 python-pyyaml))
5747 (native-inputs
5748 (list intltool
5749 python-distro
5750 ;; Required for tests
5751 python-greenlet
5752 python-polib
5753 python-pytest
5754 python-pytest-mock
5755 python-setuptools))
5756 (home-page "https://unknown-horizons.org/")
5757 (synopsis
5758 "Isometric realtime strategy, economy and city building simulation")
5759 (description
5760 "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
5761on economy and city building. Expand your small settlement to a strong and
5762wealthy colony, collect taxes and supply your inhabitants with valuable
5763goods. Increase your power with a well balanced economy and with strategic
5764trade and diplomacy.")
5765 (license (list license:gpl2+ ;Covers code
5766 license:expat ;tests/dummy.py, ext/polib.py
5767 license:cc-by-sa3.0 ;Covers some media content
5768 license:cc-by3.0 ;Covers some media content
5769 license:bsd-3)))) ; horizons/ext/speaklater.py
5770
5771(define-public zmusic
5772 (package
5773 (name "zmusic")
5774 (version "1.3.0")
5775 (source
5776 (origin
5777 (method git-fetch)
5778 (uri (git-reference
5779 (url "https://github.com/UZDoom/ZMusic")
5780 (commit version)))
5781 (file-name (git-file-name name version))
5782 (sha256
5783 (base32 "065wrk88rnpjd0jayc4gw45ynviky7s6ncg9ixw31i3nk8vh639f"))
5784 (modules '((guix build utils)))
5785 (snippet
5786 #~(begin
5787 (with-directory-excursion "thirdparty"
5788 (for-each delete-file-recursively
5789 '("game-music-emu"
5790 "fluidsynth"))
5791 (substitute* "CMakeLists.txt"
5792 (("add_subdirectory\\(game-music-emu\\)")
5793 "find_package(PkgConfig)
5794pkg_search_module(game-music-emu REQUIRED libgme)")
5795 (("add_subdirectory\\(fluidsynth/src\\)")
5796 "find_package(FluidSynth REQUIRED)")))
5797 (substitute* (find-files "source" "\\.(h|cpp)")
5798 (("include \".*fluidsynth.h\"")
5799 "include <fluidsynth.h>"))))))
5800 (build-system cmake-build-system)
5801 (arguments (list #:tests? #f)) ;No tests.
5802 (inputs (list fluidsynth glib libgme))
5803 (native-inputs (list pkg-config))
5804 (home-page "https://github.com/UZDoom/ZMusic")
5805 (synopsis "UZDoom's music system")
5806 (description "ZMusic is a standalone library implementing the music
5807system for UZDoom and other Doom-related projects.")
5808 (license license:gpl3)))
5809
5810(define-public uzdoom
5811 (let ((commit "1458bf021f939e28c71ddd0e92e2ea66bfa64a0e")
5812 (revision "0"))
5813 (package
5814 (name "uzdoom")
5815 (version (git-version "4.14.3" revision commit))
5816 (source
5817 (origin
5818 (method git-fetch)
5819 (uri (git-reference
5820 (url "https://github.com/UZDoom/UZDoom")
5821 (commit commit)))
5822 (file-name (git-file-name name version))
5823 (sha256
5824 (base32 "0nl76c3j728vwz4n91f4jhla4z9wpx0g93bq4987ix82fxm51b5r"))
5825 (modules '((guix build utils)))
5826 (snippet
5827 #~(begin
5828 (for-each delete-file-recursively
5829 '("bin" "unused" ;Self-explanatory
5830 "libraries/bzip2" "libraries/miniz"
5831 "libraries/ZMusic" ;De-vendored.
5832 "wadsrc_widepix/static")) ;Non-commercial license.
5833 (substitute* "CMakeLists.txt"
5834 (("add_subdirectory\\( libraries/miniz \\)")
5835 "find_package(miniz REQUIRED)"))
5836 (substitute* (find-files "." ".*\\.(c(pp)?|h)")
5837 (("miniz.h") "miniz/miniz.h"))
5838 ;; Add store prefix to search paths.
5839 (substitute* "src/gameconfigfile.cpp"
5840 (("DefaultSearchPaths\\.Push.+/usr/share.+;" line)
5841 (string-append
5842 "DefaultSearchPaths.Push(\"$GUIX_UZDOOM_PREFIX/share\""
5843 " + GameDirs[i]); " line)))
5844 ;; Embed correct version.
5845 (substitute* "tools/updaterevision/gitinfo.h.in"
5846 (("@Tag@") (string-append #$version "-guix")))))))
5847 (build-system cmake-build-system)
5848 (arguments
5849 (list #:tests? #f ;No tests.
5850 #:configure-flags
5851 #~(list "-DBUILD_NONFREE=OFF"
5852 "-DFORCE_CROSSCOMPILE=OFF"
5853 "-DFORCE_INTERNAL_ASMJIT=OFF"
5854 "-DFORCE_INTERNAL_ZMUSIC=OFF"
5855 "-DDYN_OPENAL=OFF")
5856 #:phases
5857 #~(modify-phases %standard-phases
5858 (add-after 'install 'wrap-uzdoom
5859 (lambda _
5860 (wrap-program (string-append #$output "/bin/uzdoom")
5861 `("GUIX_UZDOOM_PREFIX" = (,#$output))))))))
5862 (inputs (list (module-ref
5863 (resolve-interface '(gnu packages debug)) 'cppdap)
5864 bzip2
5865 dbus
5866 gtk+
5867 libomp
5868 libvpx
5869 libxkbcommon
5870 miniz
5871 openal
5872 sdl2
5873 zmusic))
5874 (native-inputs (list pkg-config python))
5875 (home-page "https://zdoom.org/")
5876 (synopsis "Doom source port with advanced rendering and scripting")
5877 (description "UZDoom is a ``modder-friendly'' Doom source port with
5878advanced rendering and scripting features, derived from GZDoom and ZDoom.")
5879 (license (list license:apsl2 ;zvulkan/vulkan
5880 license:bsd-0 ;zvulkan/src/{vk_mem_alloc,volk},
5881 ;discordrpc
5882 license:bsd-3 ;zvulkan{,/src/glslang}, zwidget, sfmt,
5883 ;utf8proc, zscript
5884 license:cc-by-sa4.0 ;branding
5885 license:expat ;utf8proc_data.c
5886 license:gpl3+))))) ;base license
5887
5888(define-public gnujump
5889 (package
5890 (name "gnujump")
5891 (version "1.0.8")
5892 (source (origin
5893 (method url-fetch)
5894 (uri (string-append "mirror://gnu/gnujump/gnujump-"
5895 version ".tar.gz"))
5896 (sha256
5897 (base32
5898 "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"))))
5899 (build-system gnu-build-system)
5900 (arguments
5901 '(#:phases
5902 (modify-phases %standard-phases
5903 (add-before
5904 'configure 'link-libm
5905 (lambda _ (setenv "LIBS" "-lm")))
5906 (add-after 'install 'create-desktop-entry
5907 (lambda* (#:key outputs #:allow-other-keys)
5908 (let* ((out (assoc-ref outputs "out"))
5909 (apps (string-append out "/share/applications")))
5910 (mkdir-p apps)
5911 (with-output-to-file
5912 (string-append apps "/gnujump.desktop")
5913 (lambda _
5914 (format #t
5915 "[Desktop Entry]~@
5916 Name=GNUjump~@
5917 Comment=Jump up the tower to survive~@
5918 Exec=~a/bin/gnujump~@
5919 Terminal=false~@
5920 Type=Application~@
5921 Categories=Game;ArcadeGame~%"
5922 out)))))))))
5923 (inputs
5924 (list glu mesa sdl sdl-image sdl-mixer))
5925 (home-page "http://gnujump.es.gnu.org/")
5926 (synopsis
5927 "Game of jumping to the next floor, trying not to fall")
5928 (description
5929 "GNUjump is a simple, yet addictive game in which you must jump from
5930platform to platform to avoid falling, while the platforms drop at faster rates
5931the higher you go. The game features multiplayer, unlimited FPS, smooth floor
5932falling, themeable graphics and sounds, and replays.")
5933 (license license:gpl3+)))
5934
5935(define-public wesnoth
5936 (package
5937 (name "wesnoth")
5938 ;; Even-numbered minor versions indicate stable versions:
5939 ;; https://wiki.wesnoth.org/ReleasingWesnoth#Version_numbering
5940 (version "1.18.8")
5941 (source (origin
5942 (method git-fetch)
5943 (uri (git-reference
5944 (url "https://github.com/wesnoth/wesnoth")
5945 (commit version)))
5946 (file-name (git-file-name name version))
5947 (sha256
5948 (base32
5949 "12bpfg476ncpiak0b195qicnzz2dpcd5s0fgmm8rgfq05x1cfgkm"))))
5950 (build-system cmake-build-system)
5951 (arguments
5952 (list #:tests? #f ;no test target
5953 #:configure-flags #~'("-DENABLE_SYSTEM_LUA=ON")))
5954 (inputs
5955 (list boost-1.83
5956 curl
5957 dbus
5958 libvorbis
5959 lua-5.4-for-c++
5960 openssl
5961 pango
5962 sdl2
5963 sdl2-image
5964 sdl2-mixer))
5965 (native-inputs
5966 (list gettext-minimal
5967 pkg-config
5968 python-minimal))
5969 (home-page "https://www.wesnoth.org/")
5970 (synopsis "Turn-based strategy game")
5971 (description
5972 "The Battle for Wesnoth is a fantasy, turn based tactical strategy game,
5973with several single player campaigns, and multiplayer games (both networked and
5974local).
5975
5976Battle for control on a range of maps, using variety of units which have
5977advantages and disadvantages against different types of attacks. Units gain
5978experience and advance levels, and are carried over from one scenario to the
5979next campaign.")
5980 (license license:gpl2+)))
5981
5982(define-public wesnoth-server
5983 (package
5984 (inherit wesnoth)
5985 (name "wesnoth-server")
5986 (inputs
5987 (list boost-1.83 icu4c lua-5.4 openssl))
5988 (native-inputs
5989 (list pkg-config))
5990 (arguments
5991 (substitute-keyword-arguments arguments
5992 ((#:configure-flags _)
5993 #~'("-DENABLE_SYSTEM_LUA=ON" "-DENABLE_GAME=OFF"))))
5994 (synopsis "Dedicated @emph{Battle for Wesnoth} server")
5995 (description "This package contains a dedicated server for @emph{The
5996Battle for Wesnoth}.")))
5997
5998(define-public wordwarvi
5999 (package
6000 (name "wordwarvi")
6001 (version "1.0.4")
6002 (source
6003 (origin
6004 (method git-fetch)
6005 (uri (git-reference
6006 (url "https://github.com/smcameron/wordwarvi")
6007 (commit (string-append "v" version))))
6008 (file-name (git-file-name name version))
6009 (sha256
6010 (base32 "0f9xhm7267g27f2k1v4dylzvrfyhr9y60f5ypq5a5kiqrqykm245"))))
6011 (build-system gnu-build-system)
6012 (inputs (list alsa-lib gtk+-2 libvorbis portaudio))
6013 (native-inputs (list pkg-config))
6014 (arguments
6015 (list
6016 #:make-flags
6017 #~(list "BINDIR=/bin"
6018 (string-append "CC=" #$(cc-for-target))
6019 (string-append "DATADIR=" #$output "")
6020 (string-append "DESTDIR=" #$output) "PREFIX=")
6021 #:tests? #f ;no tests
6022 #:phases #~(modify-phases %standard-phases
6023 (delete 'configure)
6024 (add-after 'unpack 'fix-makefile
6025 (lambda _
6026 (substitute* "Makefile"
6027 (("/bin/rm")
6028 "rm")
6029 (("-DDATADIR=\\\\\"\\$\\{DATADIR\\}/\\\\\"")
6030 "-DDATADIR=\\\"${DESTDIR}/${DATADIR}/\\\"")))))))
6031 (home-page "https://smcameron.github.io/wordwarvi/")
6032 (synopsis "Arcade-style side scrolling space shooter")
6033 (description
6034 "In this game you pilot a combat space ship to rescue your lost \"vi\" .swp
6035files avoiding OS defenses. It contains several levels and the difficulty
6036level is configurable on the command line. It can be played with a keyboard
6037or a joystick. It is drawn mostly with lines, and supports various display
6038modes.")
6039 ;; For the code, most files are under GPLv2+, but since the ogg_to_pcm.c
6040 ;; file is GPLv2 without 'any later version', we use 'gpl2' because of the
6041 ;; ambiguity. For the sounds the licenses are declared in
6042 ;; sounds/Attribution.txt and for aaaah_it_burns.ogg, it can be viewed with
6043 ;; vorbiscomment -l.
6044 (license (list license:gpl2 ;For the code
6045 ;; lucky-holiday-cornbread-stuffing-mono.ogg
6046 ;; lucky13-steve-mono-mix.ogg
6047 ;; aaaah_it_burns.ogg
6048 license:cc-by3.0
6049 ;; all other sounds are under cc-by-sa 3.0
6050 license:cc-by-sa3.0))))
6051
6052(define-public gamine
6053 (package
6054 (name "gamine")
6055 (version "1.6")
6056 (source (origin
6057 (method url-fetch)
6058 (uri (string-append "mirror://sourceforge/gamine-game/"
6059 "gamine-" version ".tar.gz"))
6060 (sha256
6061 (base32
6062 "1sc6f4445ciigd6yw0ri92746k4hk6ps0bvj9fm1gbp3c3fslk5n"))))
6063 (build-system gnu-build-system)
6064 (native-inputs
6065 (list pkg-config intltool))
6066 (inputs
6067 (list bash-minimal
6068 gstreamer
6069 gst-plugins-base ; playbin plugin
6070 gst-plugins-good ; for wav playback
6071 gtk+))
6072 (arguments
6073 `(#:tests? #f
6074 #:make-flags
6075 (let ((out (assoc-ref %outputs "out")))
6076 (list (string-append "PREFIX=" out)
6077 (string-append "SYSCONFDIR=" out "/etc")))
6078 #:phases
6079 (modify-phases %standard-phases
6080 (delete 'configure)
6081 (add-after
6082 'install 'wrap-gamine
6083 (lambda* (#:key outputs #:allow-other-keys)
6084 (let ((out (assoc-ref outputs "out"))
6085 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
6086 (wrap-program (string-append out "/bin/gamine")
6087 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))))))))
6088 (home-page "http://gamine-game.sourceforge.net/")
6089 (synopsis "Mouse and keyboard discovery for children")
6090 (description
6091 "Gamine is a game designed for young children who are learning to use the
6092mouse and keyboard. The child uses the mouse to draw colored dots and lines
6093on the screen and keyboard to display letters.")
6094 ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
6095 (license license:gpl3)))
6096
6097(define-public manaplus
6098 (package
6099 (name "manaplus")
6100 (version "2.1.3.17")
6101 (source
6102 (origin
6103 (method git-fetch)
6104 (uri (git-reference
6105 (url "https://gitlab.com/manaplus/manaplus.git")
6106 (commit (string-append "v" version))))
6107 (file-name (git-file-name name version))
6108 (sha256
6109 (base32 "1b1mgj6pdccjhb3hvlag3ia1phkzndd7cmw053aqs2480bcpswsm"))))
6110 (build-system gnu-build-system)
6111 (arguments
6112 (list
6113 #:configure-flags
6114 #~(list "--with-sdl2"
6115 "--enable-unittests"
6116 ;; Standards c++0x or greater set GXX_EXPERIMENTAL_CXX0X which
6117 ;; causes stdint.h not to be included.
6118 "CXXFLAGS=-std=c++98")
6119 #:phases
6120 #~(modify-phases %standard-phases
6121 (add-before 'configure 'fix-libxml-and-time
6122 (lambda _
6123 ;; Fix libxml2 migration.
6124 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/33>.
6125 (substitute* (list "src/utils/dumplibs.cpp"
6126 "src/unittests/utils/dumplibs.cc")
6127 (("const char \\*\\*xmlVersion")
6128 "const char * const *xmlVersion")
6129 (("__xmlParserVersion\\(\\)")
6130 "&xmlParserVersion"))
6131 (substitute* "src/utils/xml/libxml.inc"
6132 (("ifdef ENABLE_LIBXML")
6133 "ifdef ENABLE_LIBXML\n#include <libxml/parser.h>"))
6134 ;; Include ctime when necessary.
6135 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/32>.
6136 (substitute* (list "src/resources/wallpaper.cpp"
6137 "src/progs/dyecmd/client.cpp")
6138 (("include \"debug.h\"")
6139 "include \"debug.h\"\n#include <ctime>"))))
6140 (add-before 'check 'set-home
6141 (lambda _
6142 (setenv "HOME" (getcwd)))))))
6143 (native-inputs
6144 (list autoconf
6145 automake
6146 gettext-minimal
6147 pkg-config))
6148 (inputs
6149 (list curl
6150 glu
6151 libxml2
6152 mesa
6153 sdl2
6154 sdl2-image
6155 sdl2-mixer
6156 sdl2-net
6157 sdl2-ttf))
6158 (home-page "https://manaplus.org")
6159 (synopsis "Client for 'The Mana World' and similar games")
6160 (description
6161 "ManaPlus is a 2D MMORPG client for game servers. It is the only
6162fully supported client for @uref{http://www.themanaworld.org, The mana
6163world}, @uref{http://evolonline.org, Evol Online} and
6164@uref{http://landoffire.org, Land of fire}.")
6165 ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
6166 ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
6167 ;; The rest is under GPL2+.
6168 (license (list license:gpl2+ license:zlib license:cc-by-sa3.0))))
6169
6170(define-public openttd-engine
6171 (package
6172 (name "openttd-engine")
6173 (version "15.3")
6174 (source
6175 (origin (method url-fetch)
6176 (uri (string-append "https://cdn.openttd.org/openttd-releases/"
6177 version "/openttd-" version "-source.tar.xz"))
6178 (sha256
6179 (base32
6180 "1rrvjxsr2dp9zr6b35ifiw41c0dwqqcaq90r0x18misrgpm1x8jy"))))
6181 (build-system cmake-build-system)
6182 (inputs
6183 (list allegro
6184 fontconfig
6185 freetype
6186 icu4c
6187 libpng
6188 lzo
6189 sdl2
6190 xz
6191 zlib))
6192 (synopsis "Transportation economics simulator game")
6193 (description "OpenTTD is a game in which you transport goods and
6194passengers by land, water and air. It is a re-implementation of Transport
6195Tycoon Deluxe with many enhancements including multiplayer mode,
6196internationalization support, conditional orders and the ability to clone,
6197autoreplace and autoupdate vehicles. This package only includes the game
6198engine. When you start it you will be prompted to download a graphics set.")
6199 (home-page "https://www.openttd.org/")
6200 ;; This package is GPLv2, except for a few files located in
6201 ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
6202 ;; licenses. In addition, this software contains an in-game downloader
6203 ;; from which the user may find non-functional data licensed under
6204 ;; different terms.
6205 (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
6206
6207(define-public openttd-opengfx
6208 (package
6209 (name "openttd-opengfx")
6210 (version "8.0")
6211 (source
6212 (origin
6213 (method git-fetch)
6214 (uri (git-reference
6215 (url "https://github.com/openttd/opengfx")
6216 (commit version)))
6217 (file-name (git-file-name name version))
6218 (sha256
6219 (base32
6220 "0rkyxbrfgb67q3crnlpkv0h9nmskn2yfj2i8sbbibxrya8r3whz6"))))
6221 (build-system gnu-build-system)
6222 (arguments
6223 (list
6224 #:make-flags
6225 #~(list (string-append "CC=" #$(cc-for-target))
6226 (string-append "INSTALL_DIR="
6227 #$output
6228 "/share/games/openttd/baseset/opengfx")
6229 "REPO_DATE=20000101"
6230 (string-append "PYTHON="
6231 #$(this-package-native-input "python")
6232 "/bin/python3"))
6233 #:phases
6234 #~(modify-phases %standard-phases
6235 (replace 'configure
6236 (lambda _
6237 ;; Make sure HOME is writable for GIMP.
6238 (setenv "HOME" (getcwd))
6239
6240 (mkdir-p ".local/share")
6241 (symlink (string-append #$(this-package-native-input "shared-mime-info")
6242 "/share/mime")
6243 ".local/share/mime")
6244
6245 ;; Redirect stdout, not stderr, to /dev/null. This prevents
6246 ;; dos2unix from receiving its version information as a flag.
6247 (substitute* "Makefile"
6248 (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
6249 "$(UNIX2DOS) -q --version 1>/dev/null")))))
6250 ;; The check phase for this package only checks the md5sums of the built
6251 ;; GRF files against the md5sums of the release versions. Because we use
6252 ;; different software versions than upstream does, some of the md5sums
6253 ;; are different. However, the package is still reproducible, it's safe
6254 ;; to disable this test.
6255 #:tests? #f
6256 #:parallel-build? #f))
6257 (native-inputs
6258 (list dos2unix
6259 shared-mime-info
6260 gimp
6261 grfcodec
6262 nml
6263 which
6264 python))
6265 (home-page "http://dev.openttdcoop.org/projects/opengfx")
6266 (synopsis "Base graphics set for OpenTTD")
6267 (description
6268 "The OpenGFX project is an implementation of the OpenTTD base graphics
6269set that aims to ensure the best possible out-of-the-box experience.
6270
6271OpenGFX provides you with...
6272@enumerate
6273@item All graphics you need to enjoy OpenTTD.
6274@item Uniquely drawn rail vehicles for every climate.
6275@item Completely snow-aware rivers.
6276@item Different river and sea water.
6277@item Snow-aware buoys.
6278@end enumerate")
6279 (license license:gpl2)))
6280
6281(define-public openttd-opensfx
6282 (package
6283 (name "openttd-opensfx")
6284 (version "1.0.3")
6285 (source
6286 (origin
6287 (method url-fetch)
6288 (uri (string-append
6289 "https://cdn.openttd.org/opensfx-releases/"
6290 version "/opensfx-" version "-source.tar.xz"))
6291 (sha256
6292 (base32 "0p336bn6brnbyrf537x36ad9rfz16cjwyzwws4lmfvnql8ycpjj3"))))
6293 (build-system gnu-build-system)
6294 (native-inputs
6295 (list catcodec
6296 python
6297 tar))
6298 (arguments
6299 (list
6300 #:make-flags
6301 #~(list (string-append "DIR_NAME=opensfx")
6302 (string-append "TAR="
6303 (search-input-file %build-inputs "/bin/tar")))
6304 ;; The check phase only verifies md5sums, see openttd-opengfx.
6305 #:tests? #f
6306 #:phases
6307 #~(modify-phases %standard-phases
6308 (add-after 'unpack 'make-reproducible
6309 (lambda _
6310 ;; Remove the time dependency of the installed tarball by setting
6311 ;; the modification times if its members to 0.
6312 (substitute* "scripts/Makefile.def"
6313 (("-cf") " --mtime=@0 -cf"))))
6314 (delete 'configure)
6315 (add-before 'build 'prebuild
6316 (lambda _ (invoke "make" "opensfx.cat")))
6317 (replace 'install
6318 (lambda* (#:key outputs #:allow-other-keys)
6319 (copy-recursively "opensfx"
6320 (string-append (assoc-ref outputs "out")
6321 "/share/games/openttd/baseset"
6322 "/opensfx")))))))
6323 (home-page "http://dev.openttdcoop.org/projects/opensfx")
6324 (synopsis "Base sounds for OpenTTD")
6325 (description "OpenSFX is a set of free base sounds for OpenTTD which make
6326it possible to play OpenTTD without requiring the proprietary sound files from
6327the original Transport Tycoon Deluxe.")
6328 (license license:cc-by-sa3.0)))
6329
6330(define-public openttd-openmsx
6331 (package
6332 (name "openttd-openmsx")
6333 (version "0.4.2")
6334 (source
6335 (origin
6336 (method url-fetch)
6337 (uri (string-append
6338 "https://cdn.openttd.org/openmsx-releases/"
6339 version "/openmsx-" version "-source.tar.xz"))
6340 (sha256
6341 (base32
6342 "0h583d8fxy78kc3jvpp78r76a48qhxrhm4q7jbnj74aw0kwrcl8g"))))
6343 (build-system gnu-build-system)
6344 (native-inputs
6345 (list grfcodec
6346 ;; Scripts are Python3 compatible, but call the interpreter as
6347 ;; python instead of python3.
6348 python-wrapper
6349 tar))
6350 (arguments
6351 (list
6352 #:make-flags
6353 #~(list (string-append "DIR_NAME=openmsx")
6354 (string-append "TAR="
6355 (search-input-file %build-inputs "/bin/tar")))
6356 ;; The check phase only verifies md5sums, see openttd-opengfx.
6357 #:tests? #f
6358 #:phases
6359 #~(modify-phases %standard-phases
6360 (delete 'configure)
6361 (replace 'install
6362 (lambda* (#:key outputs #:allow-other-keys)
6363 (copy-recursively "openmsx"
6364 (string-append (assoc-ref outputs "out")
6365 "/share/games/openttd/baseset"
6366 "/openmsx")))))))
6367 (home-page "http://dev.openttdcoop.org/projects/openmsx")
6368 (synopsis "Music set for OpenTTD")
6369 (description "OpenMSX is a music set for OpenTTD which makes it possible
6370to play OpenTTD without requiring the proprietary music from the original
6371Transport Tycoon Deluxe.")
6372 (license license:gpl2)))
6373
6374(define-public openttd
6375 (package
6376 (inherit openttd-engine)
6377 (name "openttd")
6378 (arguments
6379 (list
6380 #:configure-flags
6381 #~(list (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin"))
6382 #:phases
6383 #~(modify-phases %standard-phases
6384 (add-after 'unpack 'patch-sources
6385 (lambda* (#:key inputs #:allow-other-keys)
6386 (substitute* "src/music/fluidsynth.cpp"
6387 (("_default_soundfonts\\[\\] = \\{" all)
6388 (string-append all "
6389\t/* Guix hardcoded :P */
6390\t\"" (search-input-file inputs "/share/soundfonts/FreePatsGM.sf2") "\",
6391")))))
6392 (add-before 'check 'install-data
6393 (lambda* (#:key inputs outputs #:allow-other-keys)
6394 (let ((base "/share/games/openttd"))
6395 (for-each
6396 (lambda (dir)
6397 ;; Copy the entire input, so as to not omit documentation
6398 ;; etc.
6399 (copy-recursively
6400 (string-drop-right dir (string-length base))
6401 (assoc-ref outputs "out")))
6402 (search-path-as-list (list base) (map cdr inputs)))))))))
6403 (inputs
6404 (modify-inputs inputs
6405 (prepend fluidsynth freepats-gm)))
6406 (native-inputs
6407 (modify-inputs native-inputs
6408 (prepend openttd-opengfx openttd-openmsx openttd-opensfx)))))
6409
6410(define-public openttd-jgrpp
6411 (package
6412 (inherit openttd)
6413 (name "openttd-jgrpp")
6414 (version "0.72.4")
6415 (source
6416 (origin
6417 (method git-fetch)
6418 (uri (git-reference
6419 (url "https://github.com/JGRennison/OpenTTD-patches")
6420 (commit (string-append "jgrpp-" version))))
6421 (file-name (git-file-name name version))
6422 (sha256
6423 (base32 "1n42nb9lxzwjbpxihqqi5zj1ykv1xl2cg7wjfjxwjxcll2hwl95a"))))
6424 (inputs (modify-inputs inputs
6425 (append zstd harfbuzz)))
6426 (arguments
6427 (substitute-keyword-arguments arguments
6428 ((#:phases phases '%standard-phases)
6429 #~(modify-phases #$phases
6430 (add-before 'check 'build-tests
6431 (lambda* (#:key (tests? #t) (make-flags '()) (parallel-build? #t) #:allow-other-keys)
6432 (when tests?
6433 (let ((build (assoc-ref #$phases 'build)))
6434 (build #:make-flags (cons "openttd_test" make-flags)
6435 #:parallel-build? parallel-build?)))))))))
6436 (home-page "https://github.com/JGRennison/OpenTTD-patches")
6437 (synopsis "OpenTTD with additional patches")
6438 (description
6439 "JGRPP is a collection of features and other modifications applied to OpenTTD.
6440It's a separate version of the game which can be installed and played alongside
6441the standard game, not a loadable mod (NewGRF, script, or so on).
6442
6443This is mainly intended to be used by players who are already familiar with the
6444standard game and how to play it. It is not aimed at beginner/novice players.
6445Some features and settings are there for very experienced players and so may
6446have a steep learning curve.")))
6447
6448(define-public openrct2-title-sequences
6449 (package
6450 (name "openrct2-title-sequences")
6451 (version "0.4.26")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (string-append "https://github.com/OpenRCT2/title-sequences"
6456 "/releases/download/v" version
6457 "/title-sequences.zip"))
6458 (file-name (string-append name "-" version ".zip"))
6459 (sha256
6460 (base32
6461 "0n680llpcyzl22bbphp9diz4m86gz2rn97yxlky44qspn63rgfys"))))
6462 (build-system copy-build-system)
6463 (arguments
6464 (list #:install-plan #~'(("." "/share/openrct2/title-sequences"))))
6465 (native-inputs (list unzip))
6466 (home-page "https://openrct2.io")
6467 (synopsis "Title sequences for OpenRCT2")
6468 (description
6469 "openrct2-title-sequences is a set of title sequences for OpenRCT2.")
6470 (properties '((hidden? . #t))) ;data package useless on its own
6471 (license license:gpl3+)))
6472
6473(define-public openrct2-objects
6474 (package
6475 (name "openrct2-objects")
6476 (version "1.7.11")
6477 (source
6478 (origin
6479 (method url-fetch)
6480 (uri (string-append "https://github.com/OpenRCT2/objects"
6481 "/releases/download/v" version "/objects.zip"))
6482 (file-name (string-append name "-" version ".zip"))
6483 (sha256
6484 (base32 "0llln61q3n31k3bdfdxfj2bqknlg2jxhzparncdm2f9306ykprvl"))))
6485 (build-system copy-build-system)
6486 (arguments
6487 ;; zip has multiple top-level directories to install.
6488 (list #:install-plan #~'((".." "/share/openrct2/objects"
6489 #:exclude ("environment-variables")))))
6490 (native-inputs (list unzip))
6491 (home-page "https://openrct2.io")
6492 (synopsis "Objects for OpenRCT2")
6493 (description
6494 "openrct2-objects is a set of objects for OpenRCT2.")
6495 (properties '((hidden? . #t))) ;data package useless on its own
6496 (license license:gpl3+)))
6497
6498(define-public openquest
6499 (package
6500 (name "openquest")
6501 (version "0.2.1")
6502 (source (origin
6503 (method git-fetch)
6504 (uri (git-reference
6505 (url "https://github.com/AlbanBedel/scummc")
6506 (commit (string-append "v" version))))
6507 (file-name (git-file-name name version))
6508 (sha256
6509 (base32
6510 "1yyq05kfmvgx5aa68kg1l5a4lpsky7hzxxcdvv2xbgf0jljdcl3k"))
6511 (modules '((guix build utils)))
6512 (snippet
6513 #~(begin
6514 (substitute* "configure"
6515 (("\\|alpha" all)
6516 (string-append all "|arm|aarch64|powerpc64le")))
6517 (substitute* "examples/example.mak"
6518 (("scost.*\n$") "scost\n")
6519 (("bmp \\$\\(.*\n$") "bmp\n")
6520 (("/%.scc.*\n$") "/%.scc\n")
6521 (("voc \\$\\(.*\n$") "voc\n"))
6522 (substitute* "Makefile.target"
6523 (("distrib-data:.*\n") "distrib-data:\n")
6524 (("cp.*/bin" all)
6525 (string-append all " || true")))))))
6526 (build-system gnu-build-system)
6527 (arguments
6528 (substitute-keyword-arguments (package-arguments scummc)
6529 ((#:make-flags _)
6530 #~(list "SCC=scc"
6531 "SLD=sld"
6532 "COST=cost"
6533 "CHAR=char"
6534 "SOUN=soun"))
6535 ((#:phases phases)
6536 #~(modify-phases #$phases
6537 (replace 'build
6538 (lambda* (#:key make-flags #:allow-other-keys)
6539 (with-directory-excursion "examples/openquest"
6540 (apply invoke "make" "tentacle" make-flags))))
6541 (add-after 'install 'install-executable
6542 (lambda* (#:key inputs #:allow-other-keys)
6543 ;; Create standalone executable.
6544 (let* ((bash (search-input-file inputs "/bin/bash"))
6545 (share (string-append #$output "/examples/openquest"))
6546 (scummvm (search-input-file inputs "/bin/scummvm"))
6547 (bin (string-append #$output "/bin"))
6548 (executable (string-append bin "/openquest")))
6549 (mkdir-p bin)
6550 (with-output-to-file executable
6551 (lambda ()
6552 (format #t "#!~a~%" bash)
6553 (format #t
6554 "exec ~a --path=~a tentacle~%"
6555 scummvm share)))
6556 (chmod executable #o755))))
6557 (add-after 'install-executable 'install-desktop-file
6558 (lambda _
6559 ;; Create desktop file. There is no official icon,
6560 ;; but the main character of the game is a good choice.
6561 (let* ((apps (string-append #$output "/share/applications"))
6562 (share (string-append #$output "/examples/openquest")))
6563 (mkdir-p apps)
6564 (make-desktop-entry-file
6565 (string-append apps "/openquest.desktop")
6566 #:name "OpenQuest"
6567 #:generic-name "OpenQuest"
6568 #:exec (string-append #$output "/bin/openquest")
6569 #:icon (string-append share "/graphics/zob/frames/stand_S.bmp")
6570 #:categories '("AdventureGame" "Game" "RolePlaying")
6571 #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi")
6572 #:comment '((#f "Simple 2D point and click adventure game"))))))))))
6573 (inputs
6574 (list bash scummvm))
6575 (native-inputs
6576 (modify-inputs (package-native-inputs scummc)
6577 (prepend scummc)))
6578 (home-page "https://www.scummvm.org")
6579 (synopsis "Simple 2D point and click adventure game")
6580 (description "OpenQuest is a two room adventure game
6581that follows two aliens who come to Earth in search of a stolen artifact.")
6582 (license license:gpl2+)))
6583
6584(define-public openrct2
6585 (package
6586 (name "openrct2")
6587 (version "0.5.4")
6588 (source
6589 (origin
6590 (method git-fetch)
6591 (uri (git-reference
6592 (url "https://github.com/OpenRCT2/OpenRCT2")
6593 (commit (string-append "v" version))))
6594 (file-name (git-file-name name version))
6595 (sha256
6596 (base32 "1b26sgxyanc0s5y4rpzrmf228ns7ww0kzwzl2nj8fp1wyjnf8crp"))
6597 (modules '((guix build utils)))
6598 (snippet
6599 #~(begin
6600 (with-directory-excursion "src/thirdparty"
6601 (for-each delete-file-recursively
6602 '("quickjs-ng" "sfl")))
6603 (substitute* "src/openrct2/CMakeLists.txt"
6604 ;; use sys quickjs for scripting features
6605 (("if \\(ENABLE_SCRIPTING\\)") "if (false)")
6606 (("add_library\\(OpenRCT2[^\n]+" all)
6607 (string-join
6608 `(,all
6609 "find_library(QJS_L NAMES qjs REQUIRED)"
6610 "find_path(QJS_I NAMES quickjs.h REQUIRED)"
6611 "target_link_libraries(libopenrct2 ${QJS_L})"
6612 "target_include_directories(libopenrct2 SYSTEM PRIVATE ${QJS_I})")
6613 "\n")))))))
6614 (build-system cmake-build-system)
6615 (arguments
6616 (list
6617 #:configure-flags #~(list "-DDOWNLOAD_OBJECTS=OFF"
6618 "-DDOWNLOAD_TITLE_SEQUENCES=OFF"
6619 "-DDOWNLOAD_OPENSFX=OFF"
6620 "-DDOWNLOAD_OPENMUSIC=OFF"
6621 "-DDISABLE_DISCORD_RPC=ON"
6622 "-DDISABLE_VERSION_CHECKER=ON")
6623 ;; many issues such as https://github.com/OpenRCT2/OpenRCT2/issues/12719
6624 #:tests? #f
6625 #:phases
6626 #~(modify-phases %standard-phases
6627 (add-after 'unpack 'fix-usr-share-paths&add-data
6628 ;; TODO: OpenRCT2 can optionally use free music and sounds!
6629 ;; https://github.com/OpenRCT2/OpenMusic
6630 ;; https://github.com/OpenRCT2/OpenSoundEffects
6631 ;; ideally we package these instead of the ones the user is supposed
6632 ;; to supply.
6633 (lambda* (#:key inputs #:allow-other-keys)
6634 (let ((titles (assoc-ref inputs "openrct2-title-sequences"))
6635 (objects (assoc-ref inputs "openrct2-objects"))
6636 (sfl (assoc-ref inputs "sfl-library")))
6637 ;; Fix some references to /usr/share.
6638 (substitute* "src/openrct2/platform/Platform.Linux.cpp"
6639 (("/usr/share")
6640 (string-append #$output "/share")))
6641 (copy-recursively
6642 (string-append titles "/share/openrct2/title-sequences")
6643 "data/title")
6644 (copy-recursively
6645 (string-append objects "/share/openrct2/objects")
6646 "data/object")
6647 (copy-recursively
6648 (string-append sfl "/include")
6649 "src/thirdparty"))))
6650 (add-before 'configure 'get-rid-of-errors
6651 (lambda _
6652 ;; Don't treat warnings as errors.
6653 (substitute* "CMakeLists.txt"
6654 (("-Werror") "")))))))
6655 (inputs
6656 (list curl
6657 flac
6658 fontconfig
6659 freetype
6660 icu4c
6661 jansson
6662 libpng
6663 libvorbis
6664 libzip
6665 mesa
6666 nlohmann-json-no-char8-t
6667 openrct2-objects
6668 openrct2-title-sequences
6669 openssl
6670 quickjs-ng
6671 sdl2
6672 sfl-library
6673 speexdsp
6674 zlib
6675 (list zstd "lib")))
6676 (native-inputs (list pkg-config))
6677 (home-page "https://openrct2.io")
6678 (synopsis "Free software re-implementation of RollerCoaster Tycoon 2")
6679 (description "OpenRCT2 is a free software re-implementation of
6680RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and
6681maintaining an amusement park containing attractions, shops and facilities.
6682
6683Note that this package does @emph{not} provide the game assets (sounds,
6684images, etc.)")
6685 ;; See bottom of:
6686 ;; https://github.com/OpenRCT2/OpenRCT2/blob/develop/distribution/readme.txt
6687 (license license:gpl3+)))
6688
6689(define-public openriichi
6690 (package
6691 (name "openriichi")
6692 (version "0.2.1.1")
6693 (source (origin
6694 (method git-fetch)
6695 (uri (git-reference
6696 (url "https://github.com/FluffyStuff/OpenRiichi")
6697 (commit (string-append "v" version))
6698 (recursive? #t)))
6699 (file-name (git-file-name name version))
6700 (sha256
6701 (base32
6702 "1x6m4mli92chns5dky9aq9w4r4pnycvlpa2q0giydapm5q9fkslf"))))
6703 (build-system meson-build-system)
6704 (arguments
6705 (list #:configure-flags #~'("--buildtype=release"
6706 "-Dc_args=-g -O2 -Wno-int-conversion")
6707 #:glib-or-gtk? #t))
6708 (inputs (list glew
6709 gtk+
6710 libgee
6711 sdl2
6712 sdl2-image
6713 sdl2-mixer))
6714 (native-inputs (list pkg-config vala))
6715 (home-page "https://github.com/FluffyStuff/OpenRiichi")
6716 (synopsis "Japanese Mahjong client")
6717 (description
6718 "OpenRiichi is a client for playing Japanese Mahjong, and it supports
6719singleplayer and multiplayer, with or without bots. It features all the
6720standard riichi rules, as well as some optional ones. It also supports game
6721logging, so games can be viewed again.")
6722 (license license:gpl3)))
6723
6724(define-public pinball
6725 (package
6726 (name "pinball")
6727 (version "0.3.20230219")
6728 (source
6729 (origin (method git-fetch)
6730 (uri (git-reference
6731 (url "https://github.com/adoptware/pinball")
6732 (commit version)))
6733 (file-name (git-file-name name version))
6734 (sha256
6735 (base32
6736 "02by4df9hgda5zhl9p3rwg0s4mlxdr0v8f8dk152vjp43p1wqvfp"))
6737 (patches (search-patches "pinball-system-ltdl.patch"))))
6738 (build-system gnu-build-system)
6739 (native-inputs
6740 (list autoconf automake pkg-config libtool))
6741 (inputs
6742 (list glu
6743 libltdl
6744 mesa
6745 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
6746 (arguments
6747 (list
6748 #:configure-flags
6749 ;; Configure tries to use pkg-config, but falls short, so:
6750 #~(list (string-append "CPPFLAGS=-I"
6751 #$(this-package-input "sdl-union")
6752 "/include/SDL2"))
6753 #:phases
6754 #~(modify-phases %standard-phases
6755 (replace 'bootstrap
6756 ;; The `bootstrap` script tries to call a script with
6757 ;; `/usr/bin/make` in the shebang, but ultimately does the same as
6758 ;; autoreconf would do, so just use that.
6759 (lambda _
6760 (symlink "README.md" "README")
6761 (invoke "autoreconf" "-vif"))))))
6762 (home-page "https://pinball.sourceforge.net")
6763 (synopsis "Pinball machine simulator")
6764 (description "The Emilia Pinball Project is a pinball simulator. There
6765are only two levels to play with, but they are very addictive.")
6766 (license license:gpl2)))
6767
6768(define-public trackballs
6769 (package
6770 (name "trackballs")
6771 (version "1.3.4")
6772 (source
6773 (origin
6774 (method git-fetch)
6775 (uri (git-reference
6776 (url "https://github.com/trackballs/trackballs")
6777 (commit (string-append "v" version))))
6778 (file-name (git-file-name name version))
6779 (sha256
6780 (base32 "1vr35i5y93n155m20mvsri42r8k3hphpc8fmrv8wmfv6xqss5914"))))
6781 (build-system cmake-build-system)
6782 (native-inputs (list pkg-config
6783 gettext-minimal))
6784 (inputs (list guile-2.2
6785 mesa
6786 sdl2
6787 sdl2-image
6788 sdl2-mixer
6789 sdl2-ttf
6790 zlib))
6791 (arguments (list #:tests? #f)) ;No test suite.
6792 (home-page "https://trackballs.github.io/")
6793 (synopsis "Marble-rolling puzzle/skill game")
6794 (description
6795 "Trackballs is a simple game similar to the classic Amiga game @cite{Marble
6796Madness}. By steering a marble ball through a labyrinth filled with vicious
6797hammers, pools of acid and other obstacles the player collects points. When the
6798ball reaches the destination it continues at the next, more difficult level -
6799unless the time runs out.")
6800 (license license:gpl2+)))
6801
6802(define-public pioneers
6803 (package
6804 (name "pioneers")
6805 (version "15.6")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (string-append "https://downloads.sourceforge.net/pio/"
6809 "pioneers-" version ".tar.gz"))
6810 (sha256
6811 (base32
6812 "07b3xdd81n8ybsb4fzc5lx0813y9crzp1hj69khncf4faj48sdcs"))))
6813 (build-system gnu-build-system)
6814 (arguments
6815 `(#:phases
6816 (modify-phases %standard-phases
6817 ;; Fixes https://issues.guix.gnu.org/47131.
6818 (add-after 'unpack 'patch-beep-path
6819 (lambda* (#:key inputs #:allow-other-keys)
6820 (substitute* "client/gtk/audio.c"
6821 (("\"beep\"")
6822 (string-append "\"" (assoc-ref inputs "beep") "/bin/beep\"")))
6823 #t)))))
6824 (inputs (list avahi beep gtk+ (librsvg-for-system)))
6825 (native-inputs (list intltool itstool libxml2 pkg-config))
6826 (synopsis "Board game inspired by The Settlers of Catan")
6827 (description "Pioneers is an emulation of the board game The Settlers of
6828Catan. It can be played on a local network, on the internet, and with AI
6829players.")
6830 (home-page "https://pio.sourceforge.net/")
6831 (license license:gpl2+)))
6832
6833(define-public einstein
6834 (package
6835 (name "einstein")
6836 (version "2.0")
6837 (source (origin
6838 (method url-fetch)
6839 (uri (string-append "mirror://debian/pool/main/e/"
6840 "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
6841 (sha256
6842 (base32
6843 "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
6844 (patches (search-patches "einstein-build.patch"))))
6845 (build-system gnu-build-system)
6846 (inputs
6847 `(("freetype" ,freetype)
6848 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf)))
6849 ("zlib" ,zlib)))
6850 (native-inputs
6851 (list font-dejavu))
6852 (arguments
6853 `(#:tests? #f ; no check target
6854 #:phases
6855 (modify-phases %standard-phases
6856 (replace 'configure
6857 (lambda* (#:key outputs inputs #:allow-other-keys)
6858 (let ((out (assoc-ref outputs "out"))
6859 (dejavu (search-input-file
6860 inputs "/share/fonts/truetype/DejaVuSans.ttf")))
6861 (substitute* "Makefile"
6862 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
6863 ;; The patch above registers a free font for use by the binary,
6864 ;; but the font is copied during the compile phase into a
6865 ;; resources file, so we need to make the ttf file available.
6866 (symlink dejavu "res/DejaVuSans.ttf")
6867 #t))))))
6868 (synopsis "Logic puzzle game")
6869 (description "The goal of this logic game is to open all cards in a 6x6
6870grid, using a number of hints as to their relative position. The game idea
6871is attributed to Albert Einstein.")
6872 ;; The original home page has disappeared.
6873 (home-page (string-append "http://web.archive.org/web/20120521062745/"
6874 "http://games.flowix.com/en/index.html"))
6875 ;; License according to
6876 ;; http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
6877 ;; The source code is a DFSG-sanitized tarball and does not contain any
6878 ;; license information.
6879 (license license:gpl3+)))
6880
6881(define-public powwow
6882 (package
6883 (name "powwow")
6884 (version "1.2.23")
6885 (source (origin
6886 (method url-fetch)
6887 (uri (string-append
6888 "https://www.hoopajoo.net/static/projects/powwow-"
6889 version ".tar.gz"))
6890 (sha256
6891 (base32
6892 "1wkl6j91pp40aps2hhnsv0bndgq49smfffws4hqcn7847bpnwwm6"))))
6893 (inputs
6894 (list ncurses))
6895 (build-system gnu-build-system)
6896 (home-page "https://www.hoopajoo.net/projects/powwow.html")
6897 (synopsis "MUD and telnet client")
6898 (description
6899 "POWWOW is a client software which can be used for telnet as well as for
6900@dfn{Multi-User Dungeon} (MUD). Additionally it can serve as a nice client for
6901the chat server psyced with the specific config located at
6902http://lavachat.symlynx.com/unix/")
6903 (license license:gpl2+)))
6904
6905(define-public red-eclipse
6906 (let ((release "2.0.0")
6907 (revision 0))
6908 (package
6909 (name "red-eclipse")
6910 (version (if (zero? revision)
6911 release
6912 (string-append release "-"
6913 (number->string revision))))
6914 (source
6915 (origin
6916 (method git-fetch)
6917 (uri (git-reference
6918 (url "https://github.com/redeclipse/base")
6919 (commit (string-append "v" release))
6920 (recursive? #t))) ; for game data
6921 (file-name (git-file-name name version))
6922 (sha256
6923 (base32 "0sz0mqhwx8r9n4mk3qrxw420nlsm3y0n48gd0lazgd64lfqjh3ab"))
6924 (modules '((guix build utils)))
6925 (snippet
6926 ;; Remove proprietary libraries and other pre-compiled binaries.
6927 '(begin
6928 (delete-file-recursively "bin")
6929 #t))))
6930 (build-system gnu-build-system)
6931 (arguments
6932 `(#:tests? #f ; no check target
6933 #:make-flags (list "CC=gcc" "-Csrc"
6934 (string-append "INSTDIR="
6935 (assoc-ref %outputs "out") "/bin")
6936 (string-append "prefix="
6937 (assoc-ref %outputs "out")))
6938 #:phases
6939 (modify-phases %standard-phases
6940 (add-after 'unpack 'add-store-data-package-path-as-default
6941 (lambda* (#:key outputs #:allow-other-keys)
6942 (substitute* "src/engine/server.cpp"
6943 (("data = \"data\"")
6944 (string-append "data = \""
6945 (assoc-ref outputs "out")
6946 "/share/redeclipse/data\"")))))
6947 (delete 'configure) ; no configure script
6948 (add-after 'set-paths 'set-sdl-paths
6949 (lambda* (#:key inputs #:allow-other-keys)
6950 (setenv "CPATH"
6951 (string-append
6952 (search-input-directory inputs "/include/SDL2")
6953 ":" (or (getenv "CPATH") "")))))
6954 (add-after 'install 'copy-data
6955 (lambda* (#:key outputs #:allow-other-keys)
6956 (let ((out (assoc-ref outputs "out")))
6957 (copy-recursively "config"
6958 (string-append out "/config"))
6959 (copy-file "doc/examples/servinit.cfg"
6960 (string-append out "/config/servinit.cfg"))
6961 (copy-recursively "data"
6962 (string-append out "/share/redeclipse/data"))
6963 (mkdir-p (string-append out "/lib/redeclipse"))
6964 (symlink (string-append out "/share/redeclipse/data")
6965 (string-append out "/lib/redeclipse/data")))))
6966 (add-after 'copy-data 'wrap-program
6967 (lambda* (#:key inputs outputs #:allow-other-keys)
6968 (let* ((out (assoc-ref outputs "out"))
6969 (bin (string-append out "/bin")))
6970 (with-directory-excursion bin
6971 (rename-file "redeclipse_linux"
6972 ".redeclipse_linux-real")
6973 (rename-file "redeclipse_server_linux"
6974 ".redeclipse_server_linux-real")
6975 (call-with-output-file "redeclipse_linux"
6976 (lambda (port)
6977 (format port "#!~a/bin/sh
6978# Run the thing from its home, otherwise it just bails out.
6979cd \"~a\"
6980exec -a \"$0\" ~a/.redeclipse_linux-real~%"
6981 (assoc-ref inputs "bash") ;implicit input
6982 (string-append out)
6983 (string-append bin))))
6984 (call-with-output-file "redeclipse_server_linux"
6985 (lambda (port)
6986 (format port "#!~a/bin/sh
6987# Run the thing from its home, otherwise it just bails out.
6988cd \"~a\"
6989exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
6990 (assoc-ref inputs "bash") ;implicit input
6991 (string-append out)
6992 (string-append bin))))
6993 (chmod "redeclipse_linux" #o555)
6994 (chmod "redeclipse_server_linux" #o555))))))))
6995 (native-inputs
6996 (list pkg-config))
6997 (inputs
6998 (list bash-minimal curl freetype glu
6999 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
7000 (home-page "https://redeclipse.net/")
7001 (synopsis "Arena shooter derived from the Cube 2 engine")
7002 (description
7003 "Red Eclipse is an arena shooter, created from the Cube2 engine.
7004Offering an innovative parkour system and distinct but all potent weapons,
7005Red Eclipse provides fast paced and accessible gameplay.")
7006 ;; The engine is under Zlib; data files are covered by the other
7007 ;; licenses. More details at file:///doc/all-licenses.txt.
7008 (license (list license:expat
7009 license:zlib
7010 license:cc-by-sa4.0
7011 license:cc-by-sa3.0
7012 license:cc-by3.0
7013 license:cc0
7014 license:public-domain
7015 license:silofl1.1)))))
7016
7017(define-public grue-hunter
7018 (package
7019 (name "grue-hunter")
7020 (version "1.0")
7021 (source (origin
7022 (method url-fetch)
7023 (uri (string-append "https://jxself.org/grue-hunter.tar.gz"))
7024 (sha256
7025 (base32
7026 "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
7027 (build-system trivial-build-system) ; no Makefile.PL
7028 (arguments `(#:modules ((guix build utils))
7029 #:builder
7030 (begin
7031 (use-modules (guix build utils))
7032 (use-modules (srfi srfi-1))
7033
7034 (let* ((tarball (assoc-ref %build-inputs "tarball"))
7035 (perl (string-append (assoc-ref %build-inputs
7036 "perl")
7037 "/bin"))
7038 (gzip (string-append (assoc-ref %build-inputs
7039 "gzip")
7040 "/bin/gzip"))
7041 (tar (string-append (assoc-ref %build-inputs
7042 "tar")
7043 "/bin/tar"))
7044 (out (assoc-ref %outputs "out"))
7045 (bin (string-append out "/bin"))
7046 (doc (string-append out
7047 "/share/doc/grue-hunter")))
7048 (copy-file tarball "grue-hunter.tar.gz")
7049 (invoke gzip "-d" "grue-hunter.tar.gz")
7050 (invoke tar "xvf" "grue-hunter.tar")
7051
7052 (mkdir-p bin)
7053 (copy-file "grue-hunter/gh.pl"
7054 (string-append bin "/grue-hunter"))
7055 (patch-shebang (string-append bin "/grue-hunter")
7056 (list perl))
7057
7058 (install-file "grue-hunter/AGPLv3.txt" doc)
7059
7060 #t))))
7061 (inputs `(("perl" ,perl)
7062 ("tar" ,tar)
7063 ("gzip" ,gzip)
7064 ("tarball" ,source)))
7065 (home-page "https://jxself.org/grue-hunter.shtml")
7066 (synopsis "Text adventure game")
7067 (description
7068 "Grue Hunter is a text adventure game written in Perl. You must make
7069your way through an underground cave system in search of the Grue. Can you
7070capture it and get out alive?")
7071 (license license:agpl3+)))
7072
7073(define-public lierolibre
7074 (package
7075 (name "lierolibre")
7076 (version "0.5")
7077 (source (origin
7078 (method url-fetch)
7079 (uri (string-append "https://launchpad.net/lierolibre/trunk/"
7080 version "/+download/lierolibre-"
7081 version ".tar.xz"))
7082 (sha256
7083 (base32
7084 "1cf1gvsn4qq190lrf9k5bpjnqwlcfw7pajvdnh7z5r4jqw0rsbl9"))
7085 (patches
7086 (search-patches "lierolibre-check-unaligned-access.patch"
7087 "lierolibre-try-building-other-arch.patch"
7088 "lierolibre-remove-arch-warning.patch"
7089 "lierolibre-newer-libconfig.patch"
7090 "lierolibre-is-free-software.patch"))
7091 (modules '((guix build utils)))
7092 (snippet
7093 '(begin
7094 ;; Delete pre-compiled files.
7095 (delete-file "data/LIERO.CHR")
7096 (delete-file "data/LIERO.SND")
7097 #t))))
7098 (build-system gnu-build-system)
7099 (native-inputs
7100 (list imagemagick pkg-config util-linux sox))
7101 (inputs
7102 (list boost libconfig
7103 (sdl-union (list sdl sdl-image sdl-mixer)) zlib))
7104 (home-page "https://gitlab.com/lierolibre/lierolibre")
7105 (synopsis "Old-school earthworm action game")
7106 (description
7107 "lierolibre is an earthworm action game where you fight another player
7108(or the computer) underground using a wide array of weapons.
7109
7110Features:
7111@itemize
7112@item 2 worms, 40 weapons, great playability, two game modes: Kill'em All
7113and Game of Tag, plus AI-players without true intelligence!
7114@item Dat nostalgia.
7115@item Extensions via a hidden F1 menu:
7116@itemize
7117@item Replays
7118@item Game controller support
7119@item Powerlevel palettes
7120@end itemize
7121@item Ability to write game variables to plain text files.
7122@item Ability to load game variables from both EXE and plain text files.
7123@item Scripts to extract and repack graphics, sounds and levels.
7124@end itemize
7125
7126To switch between different window sizes, use F6, F7 and F8, to switch to
7127fullscreen, use F5 or Alt+Enter.")
7128 ;; Code mainly BSD-2, some parts under Boost 1.0. All assets are WTFPL2.
7129 (license (list license:bsd-2 license:boost1.0 license:wtfpl2))))
7130
7131(define-public tennix
7132 (package
7133 (name "tennix")
7134 (version "1.3.4")
7135 (source (origin
7136 (method git-fetch)
7137 (uri (git-reference
7138 (url "https://repo.or.cz/tennix.git")
7139 (commit (string-append "tennix-" version))))
7140 (file-name (git-file-name name version))
7141 (sha256
7142 (base32
7143 "1fmg0vw8c2spyxy4k64nwky80jsw9mc3vnlch49q6cagjsg9y8dj"))
7144 ;; Remove non-free images.
7145 (modules '((guix build utils)))
7146 (snippet '(begin
7147 (for-each delete-file
7148 '("data/loc_training_camp.png"
7149 "data/loc_austrian_open.png"
7150 "data/loc_olympic_green_tennis.png")) #t))))
7151 (build-system gnu-build-system)
7152 (arguments
7153 (list
7154 #:tests? #f ;no tests
7155 #:phases #~(modify-phases %standard-phases
7156 (add-after 'unpack 'locate-install
7157 ;; Build process cannot expand "$(INSTALL)" in Makefile.
7158 (lambda _
7159 (substitute* "makefile"
7160 (("^CONFIGURE_OUTPUT :=.*" all)
7161 (string-append "INSTALL := install -c\n" all))) #t))
7162 (replace 'configure
7163 ;; The "configure" script is picky about the arguments it
7164 ;; gets. Call it ourselves.
7165 (lambda _
7166 (invoke "./configure" "--prefix"
7167 (assoc-ref %outputs "out")))))))
7168 (native-inputs (list which))
7169 (inputs (list python
7170 (sdl-union (list sdl2
7171 sdl2-image
7172 sdl2-mixer
7173 sdl2-ttf
7174 sdl2-net
7175 sdl2-gfx))))
7176 (home-page "https://icculus.org/tennix/")
7177 (synopsis "Play tennis against the computer or a friend")
7178 (description
7179 "Tennix is a 2D tennis game. You can play against the
7180computer or against another player using the keyboard. The game runs
7181in-window at 640x480 resolution or fullscreen.")
7182 ;; Project is licensed under GPL2+ terms. It includes images
7183 ;; released under Public Domain terms.
7184 (license (list license:gpl2+ license:public-domain))))
7185
7186;; Keep in sync with warzone2100.
7187(define-public launchinfo
7188 ;; No releases, use latest commit.
7189 (let ((commit "cfdd12564ab6cc30dc70a28571f6e8adfb5caeed")
7190 (revision "0"))
7191 (package
7192 (name "launchinfo")
7193 ;; See include/LaunchInfo.h for version.
7194 (version (git-version "1.0" revision commit))
7195 (source
7196 (origin
7197 (method git-fetch)
7198 (uri (git-reference
7199 (url "https://github.com/past-due/launchinfo")
7200 (commit commit)))
7201 (file-name (git-file-name name version))
7202 (sha256
7203 (base32
7204 "0i7xmf6jgs7rrgjjwh3kdzaqq0249xqmncaprjrf77dxhrm53wsx"))))
7205 (build-system cmake-build-system)
7206 (arguments
7207 (list
7208 #:tests? #f ;no tests
7209 #:phases
7210 #~(modify-phases %standard-phases
7211 (add-after 'unpack 'do-shared
7212 (lambda _
7213 (substitute* "CMakeLists.txt"
7214 (("(launchinfo )STATIC" _ f) (string-append f "SHARED")))))
7215 (replace 'install ;no install instructions
7216 (lambda _
7217 (let ((lib (in-vicinity #$output "lib"))
7218 (inc (in-vicinity #$output "include")))
7219 (install-file "liblaunchinfo.so" lib)
7220 (install-file "../source/include/LaunchInfo.h" inc)))))))
7221 (home-page "https://wz2100.net")
7222 (synopsis "Helper library for warzone2100")
7223 ;; No form of documentation. :(
7224 (description "This package provides the @code{LaunchInfo} class for
7225use in the video game warzone2100.")
7226 (license license:expat)))) ;launchinfo, whereami
7227
7228;; Keep in sync with warzone2100.
7229(define-public warzone2100-texpages
7230 ;; Commit pinned by warzone2100 v4.7.0; latest release is 7 years old.
7231 (let ((commit "009ec2f652a6230d8315cc3db4eadb5690f18fbd")
7232 (revision "0"))
7233 (package
7234 (name "warzone2100-texpages")
7235 (version (git-version "3.3.0" revision commit))
7236 (source
7237 (origin
7238 (method git-fetch)
7239 (uri (git-reference
7240 (url "https://github.com/Warzone2100/data-texpages")
7241 (commit commit)))
7242 (file-name (git-file-name name version))
7243 (sha256
7244 (base32
7245 "0n1cdsvjzy6y6dnxxy9hm18z5qddnhhp6jd4xz32zms5qj1asapw"))))
7246 (build-system copy-build-system)
7247 (arguments
7248 (list #:install-plan #~'(("." "/share/data/base/texpages"))))
7249 (home-page "https://wz2100.net")
7250 (synopsis "Texpages data for Warzone2100")
7251 (description "warzone2100-texpages is a set of textures to be used with
7252warzone2100.")
7253 (properties '((hidden? . #t)))
7254 (license (list
7255 ;; bdrops/backdrop[012].png
7256 ;; page-6-features-rockies.png
7257 ;; page-17-droid-weapons.png
7258 license:cc-by-sa3.0
7259 ;; bdrops/backdrop4.png
7260 ;; bdrops/backdrop6.png
7261 ;; page-25-sky-urban.png
7262 license:cc0
7263 ;; everything else
7264 license:gpl2+)))))
7265
7266;; Keep in sync with warzone2100.
7267(define-public warzone2100-terrain-classic
7268 (origin
7269 (method git-fetch)
7270 (uri (git-reference
7271 (url "https://github.com/Warzone2100/data-terrain-classic")
7272 ;; Matches warzone2100 v4.7.0
7273 (commit "d26c3d0e0242721e24fe34fea2e61880c5805684")))
7274 (file-name "warzone2100-terrain-classic")
7275 (sha256
7276 (base32
7277 "0jjyy9rbkla7rdjl62r5pf2b565rk1054wf2qinlw72bgr12lb2j"))))
7278
7279;; Keep in sync with warzone2100.
7280(define-public warzone2100-terrain-high
7281 (package
7282 (name "warzone2100-terrain-high")
7283 (version "3")
7284 (source
7285 (origin
7286 (method git-fetch)
7287 (uri (git-reference
7288 (url "https://github.com/Warzone2100/data-terrain-high")
7289 (commit (string-append "v" version))))
7290 (file-name (git-file-name name version))
7291 (sha256
7292 (base32
7293 "1raw6cdpv84zs7p7ngjvnbrnk1kprs2ndsqf7xnvy3rcw6j44xck"))))
7294 (build-system copy-build-system)
7295 (arguments
7296 (list #:install-plan #~'(("." "/share/data/terrain_overrides/high"))))
7297 (home-page "https://wz2100.net")
7298 (synopsis "High quality tile textures for Warzone2100")
7299 (description "warzone2100-terrain-high contains tile textures for
7300warzone2100's high quality mode.")
7301 (properties '((hidden? . #t)))
7302 (license (list license:cc-by-sa3.0 ;either
7303 license:gpl2+))))
7304
7305;; Keep in sync with warzone2100.
7306(define-public warzone2100-data-music-opus
7307 (origin
7308 (method git-fetch)
7309 (uri (git-reference
7310 (url "https://github.com/Warzone2100/data-music-opus")
7311 ;; Matches warzone2100 v4.7.0.
7312 (commit "db73d2b2e58dfaa8a09ab27ad771cc636be31118")))
7313 (file-name "warzone2100-data-music-opus")
7314 (sha256
7315 (base32
7316 "1liyhzasgbpjdy8w3m9906clm6kvq7x3dz45cg7ibjwq6xaqn4v1"))))
7317
7318;; Keep in sync with warzone2100.
7319(define-public warzone2100-reclamation
7320 ;; 1.3.1. is old and does not show up in Warzone's in-game menu.
7321 ;; Newest commit appears compatible.
7322 (let ((commit "1b67c44e31bca191d6220b9356a500745086f1d0")
7323 (revision "0"))
7324 (package
7325 (name "warzone2100-reclamation")
7326 (version (git-version "1.3.1" revision commit))
7327 (source
7328 (origin
7329 (method git-fetch)
7330 (uri (git-reference
7331 (url "https://github.com/Warzone2100/reclamation")
7332 (commit commit)))
7333 (file-name (git-file-name name version))
7334 (sha256
7335 (base32
7336 "11kg7p6qprfxcdnl7v7rxkkqg30pxnpa484fs9m7lym1jabk4qw3"))))
7337 (build-system copy-build-system)
7338 (arguments
7339 (list
7340 #:install-plan
7341 #~'(("reclamation.wz" "/share/warzone2100/mods/campaign/"))
7342 #:phases
7343 #~(modify-phases %standard-phases
7344 (add-before 'install 'build
7345 (lambda _
7346 (invoke "zip" "-r" "-9" "reclamation.wz" "."))))))
7347 (native-inputs (list zip))
7348 (home-page "https://github.com/Warzone2100/reclamation")
7349 (synopsis "Custom game campaign for Warzone2100")
7350 (description "warzone2100-reclamation is a modification for Warzone2100
7351featuring an original story taking place before the events of the main game.
7352Set out under the command of renowned General Edmund Clayde with the goal of
7353laying the foundations of a new world.")
7354 (properties '((hidden? . #t))) ;game assets only
7355 (license (list license:gpl2+
7356 license:cc-by-sa3.0))))) ;mod-banner.png
7357
7358;; Keep in sync with warzone2100.
7359(define-public warzone2100-fractured-kingdom
7360 ;; Commit pinned by warzone2100, radically different versions are
7361 ;; wont to break.
7362 (let ((commit "a27fe970a6f52e7b6a6d6264cf32ecec163799ec")
7363 (revision "0"))
7364 (package
7365 (name "warzone2100-fractured-kingdom")
7366 (version (git-version "1.3.0" revision commit))
7367 (source
7368 (origin
7369 (method git-fetch)
7370 (uri (git-reference
7371 (url "https://github.com/Warzone2100/fractured-kingdom")
7372 (commit commit)))
7373 (file-name (git-file-name name version))
7374 (sha256
7375 (base32
7376 "1px3k54z2h3svhswr6x8asyq62aixj633ifw3jnhmf1zwcfrs2vx"))))
7377 (build-system copy-build-system)
7378 (arguments
7379 (list
7380 #:install-plan
7381 #~'(("fractured_kingdom.wz"
7382 "/share/warzone2100/mods/campaign/"))
7383 #:phases
7384 #~(modify-phases %standard-phases
7385 (add-before 'install 'build
7386 (lambda _
7387 (invoke "zip" "-r" "-9" "fractured_kingdom.wz" "."))))))
7388 (native-inputs (list zip))
7389 (home-page "https://github.com/Warzone2100/fractured-kingdom")
7390 (synopsis "Custom game campaign for Warzone2100")
7391 (description "warzone2100-fractured-kingdom is a modification for
7392Warzone2100 featuring an original story. After crash-landing in the territory
7393of a once powerful kingdom, you must navigate your way through various factions
7394fighting over what remains.")
7395 (properties '((hidden? . #t))) ;game assets only
7396 (license license:gpl2+))))
7397
7398(define-public warzone2100
7399 (package
7400 (name "warzone2100")
7401 ;; Always keep in sync with warzone2100-* family
7402 ;; of packages and launchinfo.
7403 (version "4.7.0")
7404 (source
7405 (origin
7406 (method git-fetch)
7407 (uri (git-reference
7408 (url "https://github.com/Warzone2100/warzone2100")
7409 (commit version)))
7410 (file-name (git-file-name name version))
7411 (modules '((guix build utils)))
7412 (snippet
7413 #~(substitute* (list "src/stdinreader.cpp"
7414 "lib/netplay/netreplay.cpp")
7415 ;; Trivially unbundles readerwriterqueue.
7416 (("3rdparty/(readerwriterqueue)" _ f) f)))
7417 (patches (search-patches "warzone2100-unbundle-basis-universal.patch"
7418 "warzone2100-unbundle-embedded-json-signature.patch"
7419 "warzone2100-unbundle-libs.patch"
7420 "warzone2100-unbundle-inih.patch"
7421 "warzone2100-unbundle-launchinfo.patch"
7422 "warzone2100-unbundle-quickjs-wz.patch"
7423 "warzone2100-unbundle-sqlitecpp.patch"
7424 "warzone2100-unbundle-utfcpp.patch"
7425 ;; Makes autorevision work with configure flags.
7426 "warzone2100-pass-vcs-configure-flags-to-autorevision.patch"))
7427 (sha256
7428 (base32
7429 "04vdqfmxav0cls3jn5jjpjq514r27kj5pc63pwlsszx00wfz9a4r"))))
7430 (build-system cmake-build-system)
7431 (arguments
7432 (list
7433 ;; TODO: Tests seem to be broken, configure.ac is missing.
7434 #:tests? #f
7435 #:configure-flags
7436 #~(list "-GNinja"
7437 "-DWZ_DISTRIBUTOR=GNU Guix"
7438 "-DWZ_DOWNLOAD_PREBUILT_PACKAGES=off"
7439 "-DWZ_INCLUDE_VIDEOS=off"
7440 "-DWZ_FORCE_MINIMAL_OPUSFILE=off"
7441 "-DENABLE_GNS_NETWORK_BACKEND=off"
7442 "-DWZ_USE_SYSTEM_LIBJPEG_TURBO=on"
7443 ;; Do not automatically install
7444 ;; additional campaigns.
7445 "-DWZ_BUILTIN_MODS_RECLAMATION=off"
7446 "-DWZ_BUILTIN_MODS_FRACTUREDKINGDOM=off"
7447 ;; otherwise, installs a debug
7448 ;; ELF which fails validate-runpath
7449 "-DWZ_SKIP_ELF_SEPARATE_DEBUG=on"
7450 ;; XXX: Autorevision stuff. Passes to the same autorevision
7451 ;; in phase 'make-autorevision-cache'. If another is desperately
7452 ;; needed to to be defined later, we'll probably know.
7453 "-DVCS_WC_MODIFIED=0"
7454 "-DVCS_MOST_RECENT_COMMIT_DATE=1970-01-01"
7455 (format #f "-DVCS_FULL_HASH=~a" (make-string 40 #\a))
7456 (format #f "-DVCS_SHORT_HASH=~a" (make-string 6 #\a))
7457 (format #f "-DVCS_TAG=~a" #$version)
7458 (format #f "-DVCS_EXTRA=~a" #$version)
7459 (format #f "-DVCS_MOST_RECENT_TAGGED_VERSION=~a" #$version))
7460 #:phases
7461 #~(modify-phases %standard-phases
7462 (add-after 'unpack 'unbundle-fonts
7463 (lambda* (#:key inputs #:allow-other-keys)
7464 (define (find-truetype file)
7465 (search-input-file inputs
7466 (in-vicinity "share/fonts/truetype" file)))
7467 (substitute* "data/CMakeLists.txt"
7468 (("add_subdirectory\\(fonts[^\\)]+")
7469 (string-join (list "set(wz2100_fonts_FILES"
7470 (find-truetype "DejaVuSans.ttf")
7471 (find-truetype "DejaVuSans-Bold.ttf")
7472 (find-truetype "NotoSansCJK-VF.otf.ttc"))
7473 " ")))))
7474 (add-after 'unpack 'copy-static-data
7475 (lambda* (#:key inputs #:allow-other-keys)
7476 (let ((music #$(this-package-input
7477 "warzone2100-data-music-opus"))
7478 (classic #$(this-package-input
7479 "warzone2100-terrain-classic"))
7480 (texpages (search-input-directory
7481 inputs "/share/data/base/texpages"))
7482 (high (search-input-directory
7483 inputs "/share/data/terrain_overrides/high")))
7484 (with-directory-excursion "data"
7485 (copy-recursively texpages "base/texpages")
7486 (copy-recursively music "music")
7487 (with-directory-excursion "terrain_overrides"
7488 (copy-recursively classic "classic")
7489 (copy-recursively high "high"))))))
7490 (add-before 'build 'make-autorevision-cache
7491 (lambda _
7492 ;; An autorevision script outputs a header file defining
7493 ;; preprocessor variables originating from either git metadata or
7494 ;; cmake variables present in this cache file. Missing cache file
7495 ;; and no git is an error, so we'll avoid that state.
7496 (call-with-output-file "../source/build_tools/autorevision.cache"
7497 (const #t))))
7498 (add-after 'install 'install-campaigns
7499 (lambda* (#:key inputs #:allow-other-keys)
7500 (let ((outdir "/share/warzone2100/mods/campaign"))
7501 (for-each
7502 (lambda (campaign-name)
7503 (install-file (search-input-file
7504 inputs (in-vicinity outdir campaign-name))
7505 (string-append #$output outdir)))
7506 '("reclamation.wz" "fractured_kingdom.wz"))))))))
7507 (native-inputs
7508 (list basis-universal
7509 date
7510 gettext-minimal
7511 glm
7512 ninja
7513 p7zip
7514 pkg-config
7515 readerwriterqueue
7516 ruby-asciidoctor/minimal
7517 shaderc))
7518 (inputs
7519 (list basis-universal
7520 curl
7521 fmt
7522 embedded-json-signature
7523 font-dejavu
7524 font-google-noto-sans-cjk
7525 freetype
7526 fribidi
7527 gnutls
7528 harfbuzz
7529 launchinfo
7530 libexpected
7531 libinih
7532 libjpeg-turbo
7533 libogg
7534 libplum
7535 libpng
7536 libsodium
7537 libtheora
7538 libvorbis
7539 libzip
7540 miniupnpc
7541 openal
7542 opus
7543 opusfile
7544 physfs
7545 quickjs-wz
7546 re2
7547 sdl3
7548 sqlite
7549 sqlitecpp
7550 utf8proc
7551 utfcpp
7552 vulkan-headers
7553 warzone2100-data-music-opus
7554 warzone2100-fractured-kingdom
7555 warzone2100-reclamation
7556 warzone2100-terrain-classic
7557 warzone2100-terrain-high
7558 warzone2100-texpages))
7559 (home-page "https://wz2100.net")
7560 (synopsis "3D Real-time strategy and real-time tactics game")
7561 (description
7562 "Warzone 2100 offers campaign, multi-player, and single-player skirmish
7563modes. An extensive tech tree with over 400 different technologies, combined
7564with the unit design system, allows for a wide variety of possible units and
7565tactics.")
7566 ;; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
7567 (license (list license:bsd-3
7568 license:cc0
7569 license:cc-by-sa3.0
7570 license:expat
7571 license:gpl2+
7572 license:lgpl2.1+))))
7573
7574(define-public widelands
7575 (package
7576 (name "widelands")
7577 (version "1.3.1")
7578 (source
7579 (origin
7580 (method git-fetch)
7581 (uri (git-reference
7582 (url "https://github.com/widelands/widelands")
7583 (commit (string-append "v" version))))
7584 (file-name (git-file-name name version))
7585 (sha256
7586 (base32 "0ab9s1imqdq1krfwlba1ipx3pwnvy91aqqzr15ssfzixy4wj5mww"))
7587 (modules '((guix build utils)))
7588 (snippet
7589 #~(delete-file-recursively "src/third_party/minizip"))))
7590 (build-system cmake-build-system)
7591 (arguments
7592 (list
7593 #:configure-flags
7594 #~(let ((share (string-append #$output "/share/widelands")))
7595 (list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
7596 (string-append "-DWL_INSTALL_BINDIR=" #$output "/bin")
7597 (string-append "-DWL_INSTALL_BASEDIR=" share)
7598 (string-append "-DWL_INSTALL_DATADIR=" share)
7599 "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"))
7600 #:phases
7601 #~(modify-phases %standard-phases
7602 (add-after 'unpack 'unbundle-fonts
7603 ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are
7604 ;; mmrCensus, Nakula, and Sinhala.
7605 (lambda* (#:key inputs #:allow-other-keys)
7606 (for-each
7607 (lambda (font)
7608 (let* ((path (string-append "share/fonts/truetype/" (basename font)))
7609 (target (false-if-exception (search-input-file inputs path))))
7610 (when target
7611 (delete-file font)
7612 (symlink target font))))
7613 (find-files "data/i18n/fonts" "\\.tt[cf]$")))))))
7614 (native-inputs
7615 (list gettext-minimal pkg-config python))
7616 (inputs
7617 (list asio
7618 font-amiri
7619 font-culmus
7620 font-dejavu
7621 font-wqy-microhei
7622 glew
7623 icu4c
7624 libpng
7625 minizip
7626 sdl2
7627 sdl2-image
7628 sdl2-mixer
7629 sdl2-ttf
7630 zlib))
7631 (home-page "https://www.widelands.org")
7632 (synopsis "Fantasy real-time strategy game")
7633 (description
7634 "In Widelands, you are the regent of a small clan. You start out with
7635nothing but your headquarters, where all your resources are stored.
7636
7637In the course of the game, you will build an ever growing settlement. Every
7638member of your clan will do his or her part to produce more resources---wood,
7639food, iron, gold and more---to further this growth. The economic network is
7640complex and different in the five tribes (Barbarians, Empire, Atlanteans,
7641Frisians and Amazons).
7642
7643As you are not alone in the world, you will meet other clans sooner or later.
7644Some of them may be friendly and you may eventually trade with them. However,
7645if you want to rule the world, you will have to train soldiers and fight.
7646
7647Widelands offers single-player mode with different campaigns; the campaigns
7648all tell stories of tribes and their struggle in the Widelands universe!
7649However, settling really starts when you unite with friends over the Internet
7650or LAN to build up new empires together---or to crush each other in the dusts
7651of war. Widelands also offers an Artificial Intelligence to challenge you.")
7652 ;; Game is released as GPL2+. Some parts, e.g., art, are released under
7653 ;; different licenses.
7654 (license (list license:gpl2+
7655 license:expat ;src/third_party/eris
7656 license:silofl1.1 ;Widelands.ttf
7657 license:cc-by-sa3.0)))) ;some music files
7658
7659(define-public starfighter
7660 (package
7661 (name "starfighter")
7662 (version "2.4")
7663 (source (origin
7664 (method url-fetch)
7665 (uri (string-append
7666 "https://github.com/pr-starfighter/starfighter/releases"
7667 "/download/v" version "/starfighter-"
7668 version "-src.tar.gz"))
7669 (sha256
7670 (base32
7671 "0ips79j3sdy8wa64jqka0skbbqkzqiln9bbiiilh4z717q7vz9r5"))))
7672 (build-system gnu-build-system)
7673 (native-inputs
7674 (list pkg-config))
7675 (inputs
7676 (list pango sdl2 sdl2-image sdl2-mixer sdl2-ttf))
7677 (home-page "https://pr-starfighter.github.io/")
7678 (synopsis "2D scrolling shooter game")
7679 (description
7680 "In the year 2579, the intergalactic weapons corporation, WEAPCO, has
7681dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
7682their quest to liberate the galaxy from the clutches of WEAPCO. Along the
7683way, you will encounter new foes, make new allies, and assist local rebels
7684in strikes against the evil corporation.")
7685 ;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
7686 (license (list license:gpl3+
7687 license:cc-by3.0
7688 license:cc-by-sa3.0
7689 license:cc0
7690 license:public-domain))))
7691
7692(define-public chromium-bsu
7693 (package
7694 (name "chromium-bsu")
7695 (version "0.9.16.1")
7696 (source (origin
7697 (method url-fetch)
7698 (uri (string-append "mirror://sourceforge/chromium-bsu"
7699 "/Chromium B.S.U. source code/"
7700 "chromium-bsu-" version ".tar.gz"))
7701 (sha256
7702 (base32
7703 "0jk2w5b6s6nkzri585bbz16cif2fhqcnl5l1mq3rd98r9nil3hd1"))))
7704 (build-system gnu-build-system)
7705 (native-inputs (list pkg-config))
7706 (inputs (list gettext-minimal glu quesoglc
7707 (sdl-union (list sdl sdl-image sdl-mixer))))
7708 (home-page "https://chromium-bsu.sourceforge.net/")
7709 (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
7710 (description
7711 "In this game you are the captain of the cargo ship Chromium B.S.U. and
7712are responsible for delivering supplies to the troops on the front line. Your
7713ship has a small fleet of robotic fighters which you control from the relative
7714safety of the Chromium vessel.")
7715 ;; Clarified Artistic License for everything but sound, which is covered
7716 ;; by the Expat License.
7717 (license (list license:clarified-artistic license:expat))))
7718
7719(define-public tuxemon
7720 (let ((commit "19708725f8b2d939e39b726f49a8a078eba8bf32")
7721 (revision "0"))
7722 (package
7723 (name "tuxemon")
7724 (version (git-version "0.4.34" revision commit))
7725 (source
7726 (origin
7727 (method git-fetch)
7728 (uri (git-reference
7729 (url "https://github.com/Tuxemon/Tuxemon")
7730 (commit commit)))
7731 (file-name (git-file-name name version))
7732 (sha256
7733 (base32 "0jdhk6xs4895gifxlkaxk7625wvw2yl1yc6ciay137dk78amhp86"))
7734 (modules '((guix build utils)))
7735 (snippet
7736 #~(begin
7737 (substitute* "requirements.txt"
7738 (("pygame-ce") "pygame") ; The pygame-ce fork isn't packaged in Guix
7739 (("pygame-menu-ce") "pygame-menu")
7740 (("==") ">="))
7741 (substitute* "tuxemon/constants/paths.py"
7742 (("LIBDIR, ....,") "LIBDIR,"))))))
7743 (build-system pyproject-build-system)
7744 (arguments
7745 (list
7746 #:tests? #f ; Tests won't be updated until the API stabilises
7747 #:phases
7748 #~(modify-phases %standard-phases
7749 (add-after 'install 'install-mods
7750 (lambda _
7751 (let ((site (string-append #$output "/lib/python"
7752 #$(version-major+minor
7753 (package-version python))
7754 "/site-packages/tuxemon/mods")))
7755 (mkdir-p site)
7756 (copy-recursively "mods" site)))))))
7757 (native-inputs (list python-flit-core python-setuptools))
7758 (propagated-inputs
7759 (list python-babel
7760 python-cbor
7761 python-neteria
7762 python-natsort
7763 python-pygame
7764 python-pyscroll
7765 python-pytmx
7766 python-pillow
7767 python-prompt-toolkit
7768 python-pydantic
7769 python-pygame-menu
7770 python-pyyaml
7771 python-requests))
7772 (home-page "https://www.tuxemon.org/")
7773 (synopsis "Monster-fighting RPG")
7774 (description
7775 "Tuxemon is a monster-fighting RPG.
7776In the spirit of other clones like SuperTux and SuperTuxKart,
7777Tuxemon aims to create a game with its own unique style
7778that sets it apart from other monster fighting RPGs.")
7779 (license license:gpl3+))))
7780
7781(define-public tuxpaint
7782 (package
7783 (name "tuxpaint")
7784 (version "0.9.35") ;keep VER_DATE below in sync
7785 (source
7786 (origin
7787 (method url-fetch)
7788 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint/" version
7789 "/tuxpaint-" version ".tar.gz"))
7790 (sha256
7791 (base32 "1bfhidnspv7jm90z98jxmhwvlfac9hh2ijdjmbyr8zp73gwqmhf1"))
7792 (modules '((guix build utils)))
7793 (snippet '(begin
7794 ;; Remove win32 directory which contains binary dll's and the
7795 ;; deprecated visualc directory.
7796 (for-each delete-file-recursively
7797 '("win32" "visualc"))
7798 (substitute* "Makefile"
7799 ;; Do not rely on $(GPERF) being an absolute file name
7800 (("\\[ -x \\$\\(GPERF\\) \\]")
7801 "$(GPERF) --version >/dev/null 2>&1")) #t))
7802 (patches (search-patches "tuxpaint-stamps-path.patch"))))
7803 (build-system gnu-build-system)
7804 (native-inputs (list gperf imagemagick pkg-config))
7805 (inputs (list bash-minimal
7806 cairo
7807 fribidi
7808 gettext-minimal
7809 libimagequant
7810 libpng
7811 (librsvg-for-system)
7812 libpaper
7813 libxml2
7814 netpbm
7815 pango
7816 sdl2
7817 sdl2-gfx
7818 sdl2-image
7819 sdl2-mixer
7820 sdl2-pango
7821 sdl2-ttf))
7822 ;; TODO: Use system fonts rather than those in data/fonts
7823 (arguments
7824 (list
7825 #:make-flags
7826 #~(list "VER_DATE=2025-05-26"
7827 "GPERF=gperf"
7828 (string-append "CC="
7829 #$(cc-for-target))
7830 "SDL_PCNAME=sdl2 SDL2_image SDL2_mixer SDL2_ttf SDL2_gfx"
7831 (string-append "PREFIX="
7832 #$output)
7833 "KDE_PREFIX=$(PREFIX)/share/applications"
7834 "KDE_ICON_PREFIX=$(PREFIX)/share/icons/"
7835 "COMPLETIONDIR=$(PREFIX)/etc/bash_completion.d")
7836 #:parallel-build? #f ;fails on some systems
7837 #:tests? #f ;No tests
7838 #:phases
7839 #~(modify-phases %standard-phases
7840 (delete 'configure) ;no configure phase
7841 (add-before 'install 'no-sys-cache
7842 (lambda _
7843 ;do not rebuild system conf cache
7844 (substitute* "Makefile"
7845 (("kbuildsycoca4")
7846 ""))))
7847 (add-after 'install 'fix-import
7848 (lambda _
7849 (let* ((tpi (string-append #$output "/bin/tuxpaint-import")))
7850 (substitute* tpi
7851 ;; Point to installation prefix so that the default
7852 ;; configure file is found.
7853 (("/usr/local")
7854 #$output))
7855 ;; tuxpaint-import uses a bunch of programs from
7856 ;; netpbm, so make sure it knows where those are
7857 (wrap-program tpi
7858 `("PATH" ":" prefix
7859 (,(string-append #$(this-package-input "netpbm") "/bin"))))))))))
7860 (native-search-paths
7861 (list (search-path-specification
7862 (variable "TUXPAINT_STAMPS_PATH")
7863 (files '("share/tuxpaint/stamps")))))
7864 (home-page "https://tuxpaint.org")
7865 (synopsis "Drawing software for children")
7866 (description
7867 "Tux Paint is a free drawing program designed for young children (kids
7868ages 3 and up). It has a simple, easy-to-use interface; fun sound effects;
7869and an encouraging cartoon mascot who helps guide children as they use the
7870program. It provides a blank canvas and a variety of drawing tools to help
7871your child be creative.")
7872 (license license:gpl2+)))
7873
7874(define-public tuxpaint-stamps
7875 (package
7876 (name "tuxpaint-stamps")
7877 (version "2025.05.26")
7878 (source
7879 (origin
7880 (method url-fetch)
7881 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-stamps/"
7882 (string-map (λ (x) (if (eq? x #\.) #\- x)) version)
7883 "/tuxpaint-stamps-" version ".tar.gz"))
7884 (sha256
7885 (base32
7886 "17wlh9gkqzskny7ycwcsl2arsjzvmspy6d41q9j3mj9nh2gs5x09"))))
7887 (build-system copy-build-system)
7888 (arguments (list #:install-plan #~'(("stamps" "share/tuxpaint/"))))
7889 (home-page (package-home-page tuxpaint))
7890 (synopsis "Stamp images for Tux Paint")
7891 (description
7892 "This package contains a set of \"Rubber Stamp\" images which can be used
7893with the \"Stamp\" tool within Tux Paint.")
7894 (license license:gpl2+)))
7895
7896(define-public tuxpaint-config
7897 (package
7898 (name "tuxpaint-config")
7899 (version "0.0.26") ;keep VER_DATE below in sync
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-config/"
7904 version "/tuxpaint-config-" version ".tar.gz"))
7905 (sha256
7906 (base32
7907 "1f73av2fvqr6bd6kacmybaq4y03p1yxcbsyf84l1cph0mwmmzb7r"))))
7908 (build-system gnu-build-system)
7909 (native-inputs (list gettext-minimal pkg-config))
7910 (inputs
7911 (list fltk
7912 libpaper
7913 libunibreak
7914 pango
7915 ;; TODO: Should the following be propagated by fltk?
7916 libx11
7917 libxft
7918 mesa))
7919 (arguments
7920 `(#:make-flags `("VER_DATE=2024-04-19"
7921 "CONFDIR=/etc/tuxpaint" ;don't write to store
7922 ,(string-append "PREFIX=" %output)
7923 "GNOME_PREFIX=$(PREFIX)")
7924 #:parallel-build? #f ;race conditions
7925 #:tests? #f ;no tests
7926 #:phases (modify-phases %standard-phases
7927 (delete 'configure) ;no configure phase
7928 (add-before 'install 'gzip-no-name
7929 (lambda* _
7930 (substitute* "Makefile"
7931 ;; tuxpaint-config compresses its own documentation;
7932 ;; make sure it uses flags for reproducibility.
7933 (("gzip") "gzip --no-name"))))
7934 (add-before 'install 'make-install-dirs
7935 (lambda* (#:key outputs #:allow-other-keys)
7936 (let ((out (assoc-ref outputs "out")))
7937 (mkdir-p (string-append out "/bin"))))))))
7938 (home-page (package-home-page tuxpaint))
7939 (synopsis "Configure Tux Paint")
7940 (description
7941 "Tux Paint Config is a graphical configuration editor for Tux Paint.")
7942 (license license:gpl2))) ;no "or later" present
7943
7944(define-public supertux
7945 (package
7946 (name "supertux")
7947 (version "0.7.0")
7948 (source (origin
7949 (method url-fetch)
7950 (uri (string-append "https://github.com/SuperTux/supertux/"
7951 "releases/download/v" version "/SuperTux-v"
7952 version "-Source.tar.gz"))
7953 (file-name (string-append name "-" version ".tar.gz"))
7954 (sha256
7955 (base32
7956 "198xqcxyav8kj62i0vi5h6rn8mwjvqhny79lb27daklrp6cmpz1j"))
7957 (modules '((guix build utils)))
7958 (snippet
7959 ;; Unbundle libraries
7960 #~(begin
7961 (for-each (lambda (dir)
7962 (delete-file-recursively
7963 (string-append "external/" dir)))
7964 '(;; "SDL_savePNG"
7965 "SDL_ttf"
7966 "discord-sdk"
7967 ;; "findlocale"
7968 ;; "obstack"
7969 ;; "partio_zip"
7970 ;; "sexp-cpp"
7971 "shared-modules"
7972 "simplesquirrel"
7973 "tinygettext"))
7974 (substitute* "CMakeLists.txt"
7975 (("add_subdirectory\\(external/simplesquirrel .*$") "")
7976 (("add_subdirectory\\(external/tinygettext .*$") "")
7977 (("set_property\\(TARGET squirrel .*$") "")
7978 (("## Link supertux binary with squirrel .*$" all)
7979 (string-append all "\n"
7980 "target_link_libraries(supertux2 PUBLIC "
7981 "squirrel sqstdlib)\n")))
7982 (substitute* "mk/cmake/SuperTux/BuildInstall.cmake"
7983 (("install\\(TARGETS simplesquirrel.*$") ""))))))
7984 (arguments
7985 (list
7986 #:configure-flags #~(list "-DINSTALL_SUBDIR_BIN=bin"
7987 "-DUSE_SYSTEM_SDL2_TTF=ON")))
7988 (build-system cmake-build-system)
7989 (inputs
7990 (list curl
7991 fmt
7992 freetype
7993 glew
7994 glm
7995 harfbuzz
7996 libogg
7997 libvorbis
7998 openal
7999 physfs
8000 sdl2
8001 sdl2-image
8002 sdl2-ttf
8003 simplesquirrel-for-supertux
8004 squirrel-for-supertux
8005 tinygettext))
8006 (native-inputs
8007 (list pkg-config))
8008 (synopsis "2D platformer game")
8009 (description "SuperTux is a classic 2D jump'n run sidescroller game in
8010a style similar to the original Super Mario games.")
8011 (home-page "https://supertux.org/")
8012 (license license:gpl3+)))
8013
8014(define-public tintin++
8015 (package
8016 (name "tintin++")
8017 (version "2.02.12")
8018 (source
8019 (origin
8020 (method url-fetch)
8021 (uri (string-append "mirror://sourceforge/tintin/TinTin++ Source Code/"
8022 (string-drop-right version 1)
8023 "/tintin-" version ".tar.gz"))
8024 (sha256
8025 (base32 "000sg16w7790ha8ys31qjh1ip5hl02ldfwj1zy6dqz0y5i7zvydn"))))
8026 (inputs
8027 (list gnutls pcre readline zlib))
8028 (arguments
8029 '(#:tests? #f ; no test suite
8030 #:phases
8031 (modify-phases %standard-phases
8032 ;; The source is in tt/src.
8033 (add-before 'configure 'chdir
8034 (lambda _
8035 (chdir "src")
8036 #t)))))
8037 (build-system gnu-build-system)
8038 (home-page "https://tintin.mudhalla.net/")
8039 (synopsis "MUD client")
8040 (description
8041 "TinTin++ is a MUD client which supports MCCP (Mud Client Compression
8042Protocol), MMCP (Mud Master Chat Protocol), xterm 256 colors, most TELNET
8043options used by MUDs, as well as those required to login via telnet on
8044Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
8045 (license license:gpl3+)))
8046
8047(define-public laby
8048 (package
8049 (name "laby")
8050 (version "0.7.0")
8051 (source
8052 (origin (method git-fetch)
8053 (uri (git-reference
8054 (url "https://github.com/sgimenez/laby")
8055 (commit (string-append name "-" version))))
8056 (file-name (git-file-name name version))
8057 (sha256
8058 (base32
8059 "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
8060 (patches (search-patches "laby-make-install.patch"
8061 "laby-use-tmpdir-from-runtime.patch"))))
8062 (build-system glib-or-gtk-build-system)
8063 (inputs
8064 (list bash-minimal
8065 gdk-pixbuf
8066 lablgtk3
8067 (librsvg-for-system)
8068 ocaml-lablgtk3-sourceview3
8069 ocaml
8070 ocaml-findlib
8071 ocamlbuild))
8072 (arguments
8073 (list #:phases
8074 #~(modify-phases %standard-phases
8075 (delete 'configure)
8076 (add-before 'build 'set-library-path
8077 (lambda* (#:key inputs #:allow-other-keys)
8078 (let ((lablgtk #$(this-package-input "lablgtk")))
8079 (setenv "LD_LIBRARY_PATH"
8080 (string-append lablgtk "/lib/ocaml/stublibs")))))
8081 (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
8082 (lambda* (#:key outputs #:allow-other-keys)
8083 (let ((laby (string-append #$output "/bin/laby")))
8084 (wrap-program laby
8085 ;; Wrapping GDK_PIXBUF_MODULE_FILE allows laby to
8086 ;; function in pure environments.
8087 `("GDK_PIXBUF_MODULE_FILE" =
8088 (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
8089 #:tests? #f ; no 'check' target
8090 #:make-flags
8091 #~(list (string-append "PREFIX=" #$output) "all")))
8092 (home-page "https://sgimenez.github.io/laby/")
8093 (synopsis "Programming game")
8094 (description "Learn programming, playing with ants and spider webs ;-)
8095Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
8096Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced
8097programmers may also add their own favorite language.")
8098 (license license:gpl3+)))
8099
8100(define-public bambam
8101 (package
8102 (name "bambam")
8103 (version "1.2.1")
8104 (source
8105 (origin
8106 (method git-fetch)
8107 (uri (git-reference
8108 (url "https://github.com/porridge/bambam")
8109 (commit (string-append "v" version))))
8110 (file-name (git-file-name name version))
8111 (sha256
8112 (base32 "148cqahklqd4m88j5z1xf3fh4vha41f31wian11hkas106mbsya9"))))
8113 (build-system pyproject-build-system)
8114 (arguments
8115 (list
8116 #:tests? #f ;no tests
8117 #:phases
8118 #~(modify-phases %standard-phases
8119 (delete 'build) ;nothing to build
8120 (replace 'install
8121 (lambda _
8122 (let* ((bin (string-append #$output "/bin"))
8123 (share (string-append #$output "/share")))
8124 (mkdir-p bin)
8125 (copy-file "bambam.py" (string-append bin "/bambam"))
8126 (install-file "bambam.6" (string-append share "/man/man6"))
8127 (copy-recursively "data"
8128 (string-append share "/bambam/data"))))))))
8129 (native-inputs (list python-setuptools))
8130 (inputs (list python-pygame))
8131 (home-page "https://github.com/porridge/bambam")
8132 (synopsis "Keyboard mashing and doodling game for babies")
8133 (description
8134 "Bambam is a simple baby keyboard (and gamepad) masher application that
8135locks the keyboard and mouse and instead displays bright colors, pictures, and
8136sounds.")
8137 (license license:gpl3+)))
8138
8139(define-public moonlight-qt
8140 (package
8141 (name "moonlight-qt")
8142 (version "6.1.0")
8143 (source (origin
8144 (method git-fetch)
8145 (uri (git-reference
8146 (url "https://github.com/moonlight-stream/moonlight-qt")
8147 (commit (string-append "v" version))))
8148 (file-name (git-file-name name version))
8149 (sha256
8150 (base32
8151 "06fxf3m26k036asxjkkykk5q96nincwmpiqm953m7zgr9224gidx"))))
8152 (build-system qt-build-system)
8153 (arguments
8154 (list
8155 #:tests? #f ;no test suite
8156 #:modules '((guix build qt-build-system)
8157 ((guix build gnu-build-system) #:prefix gnu:)
8158 (guix build utils))
8159 #:phases
8160 #~(modify-phases %standard-phases
8161 (replace 'configure
8162 (lambda* _
8163 (symlink (string-append
8164 #$(this-package-input "sdl2-gamecontrollerdb")
8165 "/share/sdl2/gamecontrollerdb.txt")
8166 "app/SDL_GameControllerDB/gamecontrollerdb.txt")
8167 ;; Unbundle libraries.
8168 (substitute* "moonlight-qt.pro"
8169 ((" moonlight-common-c.*\n") "")
8170 ((" qmdnsengine.*\n") "")
8171 ((" h264bitstream.*\n") "")
8172 ((" app \\\\") " app")
8173 (("app.depends") "INCLUDEPATH +="))
8174 (invoke "qmake" (string-append "PREFIX=" #$output))))
8175 (replace 'build (assoc-ref gnu:%standard-phases 'build))
8176 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
8177 (native-inputs (list pkg-config qttools-5))
8178 (inputs (list ffmpeg
8179 h264bitstream
8180 libva
8181 libvdpau
8182 moonlight-common
8183 openssl
8184 opus
8185 qmdnsengine
8186 qtbase-5
8187 qtdeclarative-5
8188 qtquickcontrols2-5
8189 qtsvg-5
8190 qtwayland-5
8191 wayland
8192 sdl2
8193 sdl2-ttf
8194 sdl2-gamecontrollerdb))
8195 (synopsis "GameStream client")
8196 (description
8197 "Moonlight is an implementation of NVIDIA's GameStream, as used by the
8198NVIDIA Shield.")
8199 (home-page "https://moonlight-stream.org")
8200 (license license:gpl3+)))
8201
8202(define-public moonlight-common
8203 ;; Used as submodule in https://github.com/moonlight-stream/moonlight
8204 (let ((commit "8599b6042a4ba27749b0f94134dd614b4328a9bc")
8205 (revision "1"))
8206 (package
8207 (name "moonlight-common")
8208 (version (git-version "6.1.0" revision commit))
8209 (source (origin
8210 (method git-fetch)
8211 (uri (git-reference
8212 (url
8213 "https://github.com/moonlight-stream/moonlight-common-c")
8214 (commit commit)))
8215 (file-name (git-file-name name version))
8216 (sha256
8217 (base32
8218 "19k8rs2p51zs0h3wj22xw8bgj9c0ma0dc6y7qk5pk75p8ymqp9d3"))))
8219 (build-system cmake-build-system)
8220 (arguments
8221 (list #:tests? #f
8222 #:phases #~(modify-phases %standard-phases
8223 (add-after 'unpack 'use-system-enet-package
8224 (lambda _
8225 (substitute* "CMakeLists.txt"
8226 (("add_subdirectory\\(enet\\)")
8227 ""))))
8228 (replace 'install
8229 (lambda* (#:key outputs source #:allow-other-keys)
8230 (let* ((include (string-append #$output
8231 "/include"))
8232 (lib (string-append #$output "/lib")))
8233 (mkdir-p include)
8234 (mkdir-p lib)
8235 (install-file (string-append source
8236 "/src/Limelight.h") include)
8237 (install-file "libmoonlight-common-c.so" lib)))))))
8238 (native-inputs (list pkg-config))
8239 (inputs (list enet-moonlight openssl qtbase-5))
8240 (synopsis "GameStream protocol core implementation")
8241 (description
8242 "This package provides the GameStream core code for the protocol.")
8243 (home-page "https://github.com/moonlight-stream/moonlight-common-c")
8244 (license license:gpl3+))))
8245
8246(define-public mrrescue
8247 (package
8248 (name "mrrescue")
8249 (version "1.02e")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (string-append
8253 "https://github.com/SimonLarsen/mrrescue/releases/"
8254 "download/" version "/mrrescue" version ".love"))
8255 (file-name (string-append name "-" version ".love"))
8256 (sha256
8257 (base32
8258 "0jwzbwkgp1l5ia6c7s760gmdirbsncp6nfqp7vqdqsfb63la9gl2"))))
8259 (build-system trivial-build-system)
8260 (arguments
8261 `(#:modules ((guix build utils))
8262 #:builder
8263 (begin
8264 (use-modules (guix build utils))
8265 (let* ((out (assoc-ref %outputs "out"))
8266 (script (string-append out "/bin/" ,name))
8267 (data (string-append out "/share/" ,name))
8268 (source (assoc-ref %build-inputs "source"))
8269 (unzip (search-input-file %build-inputs "/bin/unzip"))
8270 (patch (search-input-file %build-inputs "/bin/patch"))
8271 (bash (search-input-file %build-inputs "/bin/bash"))
8272 (love (search-input-file %build-inputs "/bin/love")))
8273
8274 (mkdir-p (dirname script))
8275 (with-output-to-file script
8276 (lambda ()
8277 (format #t "#!~a~%" bash)
8278 (format #t "exec -a ~a \"~a\" \"~a\"~%" ,name love data)))
8279 (chmod script #o755)
8280
8281 ;; The better way to package this game would be to install *only* the
8282 ;; script above, pointing to the unextracted .love file in the store.
8283 ;; However, mrrescue 1.02e needs to be patched to work with Love 11.
8284 ;; Instead of extracting the .love file, patching it, and re-zipping
8285 ;; it to the store, simply point the script to the extracted patched
8286 ;; data directory directly.
8287 (mkdir-p data)
8288 (with-directory-excursion data
8289 (invoke unzip source)
8290 (invoke patch "-p1" "-i"
8291 (assoc-ref %build-inputs "love-11.patch")))
8292 #t))))
8293 (native-inputs
8294 `(("unzip" ,unzip)
8295 ("patch" ,patch)
8296 ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
8297 (inputs
8298 (list bash love))
8299 (home-page "https://tangramgames.dk/games/mrrescue")
8300 (synopsis "Arcade-style fire fighting game")
8301 (description
8302 "Mr. Rescue is an arcade styled 2d action game centered around evacuating
8303civilians from burning buildings. The game features fast-paced fire
8304extinguishing action, intense boss battles, a catchy soundtrack, and lots of
8305throwing people around in pseudo-randomly generated buildings.")
8306 (license (list license:zlib ; for source code
8307 license:cc-by-sa3.0)))) ; for graphics and music assets
8308
8309(define-public hyperrogue
8310 (package
8311 (name "hyperrogue")
8312 (version "12.1a")
8313 (source
8314 (origin
8315 (method git-fetch)
8316 (uri (git-reference
8317 (url "https://github.com/zenorogue/hyperrogue")
8318 (commit (string-append "v" version))))
8319 (file-name (git-file-name name version))
8320 (sha256
8321 (base32
8322 "1l09d1r3jdwp54zq071fk09hpggif5phjn0gsapzrjy3i289jran"))))
8323 (build-system gnu-build-system)
8324 (arguments
8325 (list
8326 #:tests? #f ; no check target
8327 #:make-flags #~(list "HYPERROGUE_USE_GLEW=1"
8328 "HYPERROGUE_USE_PNG=1")
8329 #:phases
8330 #~(modify-phases %standard-phases
8331 (add-after 'set-paths 'set-sdl-paths
8332 (lambda* (#:key inputs #:allow-other-keys)
8333 (setenv "CPATH"
8334 (string-append (or (getenv "CPATH") "") ":"
8335 (search-input-directory inputs
8336 "/include/SDL")))))
8337 (replace 'configure
8338 (lambda* (#:key inputs #:allow-other-keys)
8339 (let ((share-dir (string-append #$output "/share/hyperrogue/"))
8340 (fonts-dir (dirname
8341 (search-input-file inputs
8342 "DejaVuSans-Bold.ttf"))))
8343 ;; Set fonts and music path.
8344 (substitute* "sysconfig.h"
8345 (("(#define HYPERPATH ).*" _ lead)
8346 (string-append lead "\"" share-dir "\"\n"))
8347 (("(#define HYPERFONTPATH ).*" _ lead)
8348 (string-append lead "\"" fonts-dir "/\"\n")))
8349 ;; Disable build machine CPU optimizations and warnings treated
8350 ;; as errors.
8351 (substitute* "Makefile"
8352 (("-march=native") "")
8353 (("-Werror") "")))))
8354 (replace 'install
8355 (lambda _
8356 (install-file "hyperrogue" (string-append #$output "/bin"))
8357 (let ((share-dir (string-append #$output "/share/hyperrogue/")))
8358 (install-file "hyperrogue-music.txt" share-dir)
8359 (for-each (lambda (dir)
8360 (copy-recursively dir
8361 (string-append share-dir dir)))
8362 '("music" "sounds"))))))))
8363 (inputs
8364 (list font-dejavu
8365 glew
8366 libpng
8367 (sdl-union (list sdl sdl-gfx sdl-mixer sdl-ttf))))
8368 (home-page "https://roguetemple.com/z/hyper")
8369 (synopsis "Non-euclidean graphical rogue-like game")
8370 (description
8371 "HyperRogue is a game in which the player collects treasures and fights
8372monsters -- rogue-like but for the fact that it is played on the hyperbolic
8373plane and not in euclidean space.
8374
8375In HyperRogue, the player can move through different parts of the world, which
8376are home to particular creatures and may be subject to their own rules of
8377\"physics\".
8378
8379While the game can use ASCII characters to display the the classical rogue
8380symbols, it still needs graphics to render the non-euclidean world.")
8381 (license (list license:bsd-3 ; glew.c, mtrand.*
8382 license:cc-by-sa3.0 ; music
8383 license:cc-by-sa4.0 ; sounds
8384 license:cc0
8385 license:public-domain ; direntx.*, some sounds
8386 license:zlib ; savepng.*
8387 license:gpl2+)))) ; remaining files
8388
8389(define-public kobodeluxe
8390 (package
8391 (name "kobodeluxe")
8392 (version "0.5.1")
8393 (source (origin
8394 (method url-fetch)
8395 (uri (string-append "http://olofson.net/kobodl/download/KoboDeluxe-"
8396 version ".tar.bz2"))
8397 (sha256
8398 (base32
8399 "0b2wvdpnmaibsy419c16dfwj5kvd3pccby2aaqvm964x74592yqg"))
8400 (patches (search-patches
8401 "kobodeluxe-const-charp-conversion.patch"
8402 "kobodeluxe-enemies-pipe-decl.patch"
8403 "kobodeluxe-graphics-window-signed-char.patch"
8404 "kobodeluxe-manpage-minus-not-hyphen.patch"
8405 "kobodeluxe-midicon-segmentation-fault.patch"
8406 "kobodeluxe-paths.patch"))))
8407 (build-system gnu-build-system)
8408 (arguments
8409 '(#:configure-flags
8410 (list (string-append "CPPFLAGS=-I"
8411 (assoc-ref %build-inputs "sdl-union")
8412 "/include/SDL"))))
8413 (inputs
8414 (list glu
8415 (sdl-union (list sdl sdl-image))))
8416 (synopsis "Shooter with space station destruction")
8417 (description
8418 "Kobo Deluxe is an enhanced version of Akira Higuchi's XKobo graphical game
8419for Un*x systems with X11.")
8420 (home-page "http://olofson.net/kobodl/")
8421 (license license:gpl2+)))
8422
8423(define-public freeciv
8424 (package
8425 (name "freeciv")
8426 (version "3.2.5")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (list (string-append
8431 "https://files.freeciv.org/stable/freeciv-"
8432 version ".tar.xz")
8433 (string-append
8434 "mirror://sourceforge/freeciv/Freeciv%20"
8435 (version-major+minor version) "/" version
8436 "/freeciv-" version ".tar.xz")))
8437 (sha256
8438 (base32 "1s09qqy2r58gv0ai3xx8dv7a7qkcn5kg5jwv2pplk7wv5bq0ha6k"))))
8439 (build-system gnu-build-system)
8440 (inputs
8441 (list curl cyrus-sasl gtk+ sdl2-mixer sqlite zlib))
8442 (native-inputs
8443 (list pkg-config))
8444 (home-page "https://www.freeciv.org/")
8445 (synopsis "Turn-based empire building strategy game")
8446 (description "Freeciv is a turn-based empire building strategy game
8447inspired by the history of human civilization. The game commences in
8448prehistory and your mission is to lead your tribe from the Stone Age
8449into the Space Age.")
8450 (license license:gpl2+)))
8451
8452(define-public no-more-secrets
8453 (package
8454 (name "no-more-secrets")
8455 (version "1.0.1")
8456 (source
8457 (origin
8458 (method git-fetch)
8459 (uri (git-reference
8460 (url "https://github.com/bartobri/no-more-secrets")
8461 (commit (string-append "v" version))))
8462 (file-name (git-file-name name version))
8463 (sha256
8464 (base32 "14h34zpgjldw9bf65chb72gnzw5q88djrdasz2828r3ck6k88l21"))))
8465 (build-system gnu-build-system)
8466 (arguments
8467 `(#:tests? #f
8468 #:make-flags (list "CC=gcc" "all-ncurses"
8469 (string-append "prefix="
8470 (assoc-ref %outputs "out")))
8471 #:phases
8472 (modify-phases %standard-phases
8473 (delete 'configure))))
8474 (inputs
8475 (list ncurses))
8476 (home-page "https://github.com/bartobri/no-more-secrets")
8477 (synopsis "Recreation of data decryption effect in \"Sneakers\"")
8478 (description
8479 "@code{No More Secrets} provides a command line tool called \"nms\"
8480that recreates the famous data decryption effect seen on screen in the 1992
8481movie \"Sneakers\".
8482
8483This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and
8484it will apply the hollywood effect, initially showing encrypted data, then
8485starting a decryption sequence to reveal the original plaintext characters.")
8486 (license license:expat)))
8487
8488(define-public asciiquarium
8489 (package
8490 (name "asciiquarium")
8491 (version "1.1")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (string-append
8496 "https://robobunny.com/projects/asciiquarium/asciiquarium_"
8497 version ".tar.gz"))
8498 (sha256
8499 (base32 "0qfkr5b7sxzi973nh0h84blz2crvmf28jkkgaj3mxrr56mhwc20v"))))
8500 (build-system copy-build-system)
8501 (inputs (list bash-minimal perl perl-curses perl-term-animation))
8502 (arguments
8503 (list
8504 #:install-plan
8505 #~'(("asciiquarium" "bin/")
8506 ("README" "share/doc/asciiquarium/"))
8507 #:phases
8508 #~(modify-phases %standard-phases
8509 (add-after 'install 'chmod
8510 (lambda _
8511 (chmod (string-append #$output "/bin/asciiquarium") #o755)))
8512 (add-after 'chmod 'wrap-perl-bin
8513 (lambda _
8514 (wrap-program (string-append #$output "/bin/asciiquarium")
8515 `("PERL5LIB" ":" prefix
8516 (,(getenv "PERL5LIB")))))))))
8517 (home-page "https://robobunny.com/projects/asciiquarium/html/")
8518 (synopsis "ASCII aquarium for the terminal")
8519 (license license:gpl2+)
8520 (description
8521 "The @code{asciiquarium} package renders a fullscreen animation of an
8522aquarium with various fish in the terminal, which can make for a nice
8523screensaver.")))
8524
8525(define-public megaglest-data
8526 (package
8527 (name "megaglest-data")
8528 (version "3.13.0")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (string-append
8533 "https://github.com/MegaGlest/megaglest-data"
8534 "/releases/download/" version "/megaglest-data-"
8535 version ".tar.xz"))
8536 (sha256
8537 (base32
8538 "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
8539 (build-system cmake-build-system)
8540 (arguments
8541 `(#:tests? #f))
8542 (home-page "https://megaglest.org/")
8543 (synopsis "Data files for MegaGlest")
8544 (description "This package contains the data files required for MegaGlest.")
8545 (license license:cc-by-sa3.0)))
8546
8547(define-public megaglest
8548 (package
8549 (name "megaglest")
8550 (version "3.13.0")
8551 (source
8552 (origin
8553 (method url-fetch)
8554 (uri (string-append
8555 "https://github.com/MegaGlest/megaglest-source"
8556 "/releases/download/" version "/megaglest-source-"
8557 version ".tar.xz"))
8558 (sha256
8559 (base32
8560 "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
8561 (build-system cmake-build-system)
8562 (inputs
8563 (list curl
8564 fontconfig
8565 ftgl
8566 glew
8567 libjpeg-turbo
8568 megaglest-data
8569 mesa
8570 miniupnpc
8571 openal
8572 libircclient
8573 libpng
8574 libvorbis
8575 lua
8576 sdl2
8577 wxwidgets-3.0))
8578 (native-inputs
8579 (list cppunit pkg-config))
8580 (arguments
8581 (list
8582 #:modules '((guix build cmake-build-system)
8583 ((guix build gnu-build-system) #:prefix gnu:)
8584 (guix build utils))
8585 #:configure-flags
8586 #~(list "-DCMAKE_CXX_FLAGS=-fcommon"
8587 "-DCMAKE_C_FLAGS=-fcommon"
8588 (string-append "-DCUSTOM_DATA_INSTALL_PATH="
8589 (search-input-directory %build-inputs
8590 "share/megaglest"))
8591 "-DBUILD_MEGAGLEST_TESTS=ON")
8592 #:phases
8593 #~(modify-phases %standard-phases
8594 (add-after 'unpack 'fix-ini-search-path
8595 (lambda* (#:key outputs #:allow-other-keys)
8596 (substitute* "source/glest_game/global/config.cpp"
8597 (("/usr/share/megaglest/")
8598 (string-append (assoc-ref outputs "out")
8599 "/share/megaglest/")))))
8600 (replace 'check
8601 (lambda* (#:key tests? #:allow-other-keys #:rest args)
8602 (when tests?
8603 (apply (assoc-ref gnu:%standard-phases 'check)
8604 #:tests? tests? #:test-target "megaglest_tests" args)
8605 (invoke "source/tests/megaglest_tests")))))))
8606 (home-page "https://megaglest.org/")
8607 (synopsis "3D real-time strategy (RTS) game")
8608 (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
8609game, where you control the armies of one of seven different factions: Tech,
8610Magic, Egypt, Indians, Norsemen, Persian or Romans.")
8611 (license license:gpl2+)))
8612
8613(define-public freegish
8614 (let ((commit "caf58a2f990a939230bab82226e29cd79732f366")
8615 (revision "3"))
8616 (package
8617 (name "freegish")
8618 (version (string-append "0-" revision "." (string-take commit 9)))
8619 (source (origin
8620 (method git-fetch)
8621 (uri (git-reference
8622 (url "https://github.com/freegish/freegish")
8623 (commit commit)))
8624 (file-name (git-file-name name version))
8625 (sha256
8626 (base32
8627 "0980ad8xg0bzm6507bq9sbgw03i7jj33g0f955g0q8jvpb22r65v"))
8628 (modules '((guix build utils)))
8629 ;; The audio files in the "music" directory are licensed under
8630 ;; CC-BY-NC, so we delete them.
8631 (snippet
8632 '(begin
8633 (delete-file-recursively "music")
8634 #t))))
8635 (build-system cmake-build-system)
8636 (arguments
8637 `(#:tests? #f ; no tests included
8638 #:configure-flags
8639 (list "-DINSTALL_FHS=ON")))
8640 (inputs
8641 (list sdl2
8642 openal
8643 libvorbis
8644 libogg
8645 mesa
8646 libpng))
8647 (home-page "https://github.com/freegish/freegish")
8648 (synopsis "Side-scrolling physics platformer with a ball of tar")
8649 (description "In FreeGish you control Gish, a ball of tar who lives
8650happily with his girlfriend Brea, until one day a mysterious dark creature
8651emerges from a sewer hole and pulls her below ground.")
8652 ;; The textures are available under the Expat license. All other assets
8653 ;; (including levels) are covered under CC-BY-SA or public domain. The
8654 ;; source code is under GPLv2+.
8655 (license (list license:gpl2+
8656 license:expat
8657 license:public-domain
8658 license:cc-by-sa3.0)))))
8659
8660(define-public cdogs-sdl
8661 (package
8662 (name "cdogs-sdl")
8663 (version "2.3.2")
8664 (source
8665 (origin
8666 (method git-fetch)
8667 (uri (git-reference
8668 (url "https://github.com/cxong/cdogs-sdl")
8669 (commit version)))
8670 (file-name (git-file-name name version))
8671 (sha256
8672 (base32 "13brn8hklgid43vddmaq3a0yhlcx550wa8jvs17dwpzj0sr045vh"))))
8673 (build-system cmake-build-system)
8674 (arguments
8675 (list
8676 #:configure-flags
8677 #~(list (string-append "-DCDOGS_DATA_DIR=" #$output
8678 "/share/cdogs-sdl/"))
8679 #:phases
8680 #~(modify-phases %standard-phases
8681 (add-after 'unpack 'patch-install-directory
8682 (lambda _
8683 (substitute* "CMakeLists.txt"
8684 (("set\\(DATA_INSTALL_DIR \".\"\\)")
8685 (string-append "set(DATA_INSTALL_DIR \""
8686 #$output "/share/cdogs-sdl\")"))))))))
8687 (native-inputs
8688 (list pkg-config))
8689 (inputs
8690 (list gtk+ mesa sdl2 sdl2-image sdl2-mixer))
8691 (home-page "https://cxong.github.io/cdogs-sdl/")
8692 (synopsis "Classic overhead run-and-gun game")
8693 (description "C-Dogs SDL is a classic overhead run-and-gun game,
8694supporting up to 4 players in co-op and deathmatch modes. Customize your
8695player, choose from many weapons, and blast, slide and slash your way through
8696over 100 user-created campaigns.")
8697 ;; GPLv2+ for code (includes files under BSD-2 and BSD-3),
8698 ;; CC0/CC-BY/CC-BY-SA for assets.
8699 (license (list license:gpl2+
8700 license:bsd-2
8701 license:bsd-3
8702 license:cc0
8703 license:cc-by3.0
8704 license:cc-by-sa3.0))))
8705
8706(define-public kiki
8707 (package
8708 (name "kiki")
8709 (version "1.0.2")
8710 (source (origin
8711 (method url-fetch)
8712 (uri (string-append "mirror://sourceforge/kiki/kiki-src/"
8713 version "/kiki-" version "-src.tgz"))
8714 (sha256
8715 (base32
8716 "0ihjdsxbn8z3cz0gpcprafiipcqaiskgdnh1rhmw4qff8dszalbn"))
8717 (modules '((guix build utils)))
8718 (snippet
8719 '(begin
8720 (for-each delete-file (find-files "." "\\.dll$"))
8721 #t))
8722 (patches
8723 (search-patches "kiki-level-selection-crash.patch"
8724 "kiki-makefile.patch"
8725 "kiki-missing-includes.patch"
8726 "kiki-portability-64bit.patch"))))
8727 (build-system gnu-build-system)
8728 (arguments
8729 `(#:tests? #f ; there are no tests
8730 #:make-flags '("CXX=g++")
8731 #:phases
8732 (modify-phases %standard-phases
8733 (replace 'configure
8734 (lambda* (#:key inputs outputs #:allow-other-keys)
8735 (setenv "CPLUS_INCLUDE_PATH"
8736 (string-append
8737 (search-input-directory inputs "include/SDL") ":"
8738 (search-input-directory inputs "include/python2.7")
8739 ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
8740 (substitute* "src/main/main.cpp"
8741 (("#include <SDL.h>" line)
8742 (string-append line "
8743#define K_INCLUDE_GLUT
8744#include \"KIncludeTools.h\""))
8745 (("// initialize SDL" line)
8746 (string-append "glutInit(&argc,argv);\n" line)))
8747 (substitute* "src/main/KikiController.cpp"
8748 (("getenv\\(\"KIKI_HOME\"\\)")
8749 (string-append "\"" (assoc-ref outputs "out") "/share/kiki/\"")))
8750 (substitute* "linux/Makefile"
8751 (("CXXOPTS =" line)
8752 (string-append line " -fpermissive"))
8753 (("PYTHON_VERSION=.*") "PYTHON_VERSION=2.7")
8754 (("PYTHONHOME =.*")
8755 (string-append "PYTHONHOME = "
8756 (assoc-ref inputs "python")
8757 "/lib/python2.7/"))
8758 (("\\$\\(GLLIBS\\)" line)
8759 (string-append line " -lm -lpython2.7")))
8760 (substitute* "src/main/KikiPythonWidget.h"
8761 (("#define __KikiPythonWidget" line)
8762 (string-append line "\n#include \"KikiPython.h\"")))
8763 #t))
8764 (add-before 'build 'build-kodilib
8765 (lambda* (#:key make-flags #:allow-other-keys)
8766 (with-directory-excursion "kodilib/linux"
8767 (apply invoke "make" make-flags))))
8768 (add-after 'build-kodilib 'chdir
8769 (lambda _ (chdir "linux") #t))
8770 (replace 'install
8771 (lambda* (#:key outputs #:allow-other-keys)
8772 (let* ((out (assoc-ref outputs "out"))
8773 (bin (string-append out "/bin"))
8774 (share (string-append out "/share/kiki")))
8775 (mkdir-p bin)
8776 (mkdir-p share)
8777 (install-file "kiki" bin)
8778 (copy-recursively "../py" (string-append share "/py"))
8779 (copy-recursively "../sound" (string-append share "/sound"))
8780 #t))))))
8781 (inputs
8782 `(("glu" ,glu)
8783 ("freeglut" ,freeglut)
8784 ("libxcrypt" ,libxcrypt)
8785 ("sdl-union" ,(sdl-union (list sdl
8786 sdl-mixer
8787 sdl-image)))
8788 ("python" ,python-2)))
8789 (native-inputs
8790 (list swig-4.4))
8791 (home-page "https://kiki.sourceforge.net/")
8792 (synopsis "3D puzzle game")
8793 (description "Kiki the nano bot is a 3D puzzle game. It is basically a
8794mixture of the games Sokoban and Kula-World. Your task is to help Kiki, a
8795small robot living in the nano world, repair its maker.")
8796 ;; See <http://metadata.ftp-master.debian.org/changelogs/main/k/
8797 ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright>
8798 ;; for a statement from the author.
8799 (license license:public-domain)))
8800
8801(define-public teeworlds
8802 (package
8803 (name "teeworlds")
8804 (version "0.7.5")
8805 (source (origin
8806 (method git-fetch)
8807 (uri (git-reference
8808 (url "https://github.com/teeworlds/teeworlds")
8809 (commit version)
8810 ;; There are two submodules in datasrc/{languages,maps}
8811 (recursive? #t)))
8812 (file-name (git-file-name name version))
8813 (sha256
8814 (base32
8815 "1l19ksmimg6b8zzjy0skyhh7z11ql7n5gvilkv7ay5x2b9ndbqwz"))
8816 (modules '((guix build utils)
8817 (ice-9 ftw)
8818 (ice-9 regex)
8819 (srfi srfi-1)
8820 (srfi srfi-26)))
8821 (snippet ; remove bundled libraries except md5
8822 '(let ((base-dir "src/engine/external/"))
8823 (for-each (compose (cut delete-file-recursively <>)
8824 (cut string-append base-dir <>))
8825 (remove (cut string-match "(^.)|(^md5$)" <>)
8826 (scandir base-dir)))
8827 #t))))
8828 (build-system cmake-build-system)
8829 (arguments
8830 (list
8831 #:modules '((guix build cmake-build-system)
8832 ((guix build gnu-build-system) #:prefix gnu:)
8833 (guix build utils))
8834 #:phases
8835 #~(modify-phases %standard-phases
8836 (add-after 'unpack 'patch-paths
8837 (lambda* (#:key outputs #:allow-other-keys)
8838 ;; Embed path to assets.
8839 (substitute* "src/engine/shared/storage.cpp"
8840 (("#define DATA_DIR.*")
8841 (string-append "#define DATA_DIR \""
8842 (assoc-ref outputs "out")
8843 "/share/teeworlds/data"
8844 "\"")))))
8845 (add-after 'unpack 'replace-font
8846 (lambda* (#:key inputs #:allow-other-keys)
8847 (delete-file "datasrc/fonts/DejaVuSans.ttf")
8848 (symlink (string-append (assoc-ref inputs "font-dejavu")
8849 "/share/fonts/truetype/DejaVuSans.ttf")
8850 "datasrc/fonts/DejaVuSans.ttf")))
8851 (replace 'check
8852 (lambda* (#:rest args)
8853 (apply (assoc-ref gnu:%standard-phases 'check)
8854 #:test-target "run_tests" args))))))
8855 (inputs
8856 (list freetype
8857 font-dejavu
8858 glu
8859 json-parser
8860 mesa
8861 pnglite
8862 sdl2
8863 sdl2-image
8864 sdl2-mixer
8865 wavpack
8866 openssl
8867 zlib))
8868 (native-inputs
8869 `(("googletest" ,googletest)
8870 ("python" ,python-wrapper)
8871 ("pkg-config" ,pkg-config)))
8872 (home-page "https://www.teeworlds.com")
8873 (synopsis "2D retro multiplayer shooter game")
8874 (description "Teeworlds is an online multiplayer game. Battle with up to
887516 players in a variety of game modes, including Team Deathmatch and Capture
8876The Flag. You can even design your own maps!")
8877 (license (list license:bsd-3 license:cc-by-sa3.0)))) ; game+maps&languages
8878
8879(define-public enigma
8880 (package
8881 (name "enigma")
8882 (version "1.21")
8883 (source (origin
8884 (method url-fetch)
8885 (uri (string-append "mirror://sourceforge/enigma-game/"
8886 "Release%20" version "/enigma-"
8887 version ".tar.gz"))
8888 (sha256
8889 (base32
8890 "00ffh9pypj1948pg3q9sjp1nmiabh52p5c8wpg9n1dcfgl3cywnq"))))
8891 (build-system gnu-build-system)
8892 (arguments
8893 `(#:configure-flags
8894 (list "--with-system-enet")
8895 #:phases
8896 (modify-phases %standard-phases
8897 (add-after 'unpack 'fix-build-with-new-gcc
8898 (lambda _
8899 ;; Fix build with GCC6 and later by avoiding comparing ifstream
8900 ;; to NULL. Can be removed for versions > 1.21.
8901 (substitute* "src/lev/Proxy.cc"
8902 (("ifs != NULL")
8903 "ifs"))
8904 #t))
8905 (add-after 'unpack 'find-sdl
8906 (lambda _
8907 (substitute* "configure"
8908 (("SDL_ttf.h") "SDL/SDL_ttf.h"))
8909 (substitute* '("tools/ttf2bmf.cc"
8910 "lib-src/enigma-core/ecl_font.cc"
8911 "lib-src/enigma-core/ecl_video.cc"
8912 "lib-src/enigma-core/ecl_buffer.hh"
8913 "src/SoundEngine.cc"
8914 "src/SoundEngine.hh"
8915 "src/MusicManager.cc"
8916 "src/MusicManager.hh"
8917 "src/d_models.cc"
8918 "src/main.cc"
8919 "src/network.cc")
8920 (("#include \"SDL_(image|ttf|mixer|types|syswm|mutex).h\"" line header)
8921 (string-append "#include \"SDL/SDL_" header ".h\"")))
8922 (substitute* "src/main.cc"
8923 (("#include <SDL_(image|ttf|mixer).h>" line header)
8924 (string-append "#include \"SDL/SDL_" header ".h\"")))
8925 #t)))))
8926 (inputs
8927 (list xerces-c
8928 (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)) curl
8929 enet))
8930 (native-inputs
8931 (list pkg-config imagemagick))
8932 (home-page "https://www.nongnu.org/enigma")
8933 (synopsis "Puzzle game with a dexterity component")
8934 (description "Enigma is a puzzle game with 550 unique levels. The object
8935of the game is to find and uncover pairs of identically colored ‘Oxyd’ stones.
8936Simple? Yes. Easy? Certainly not! Hidden traps, vast mazes, laser beams,
8937and most of all, countless hairy puzzles usually block your direct way to the
8938Oxyd stones. Enigma’s game objects (and there are hundreds of them, lest you
8939get bored) interact in many unexpected ways, and since many of them follow the
8940laws of physics (Enigma’s special laws of physics, that is), controlling them
8941with the mouse isn’t always trivial.")
8942 (license license:gpl2+)))
8943
8944(define-public chroma
8945 (package
8946 (name "chroma")
8947 (version "1.21")
8948 (source (origin
8949 (method url-fetch)
8950 (uri (string-append "http://level7.org.uk/chroma/download/chroma-"
8951 version ".tar.bz2"))
8952 (sha256
8953 (base32
8954 "0gb9v518rhqzpfzcvr5gklgldvlzhq0yrhwyas9qln35mkhxdx5x"))))
8955 (build-system gnu-build-system)
8956 (arguments
8957 `(#:tests? #f)) ; no tests included
8958 (inputs
8959 (list (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf))
8960 freetype
8961 ncurses
8962 fontconfig
8963 libxft))
8964 (native-inputs
8965 (list pkg-config))
8966 (home-page "http://level7.org.uk/chroma/")
8967 (synopsis "Abstract puzzle game")
8968 (description "Chroma is an abstract puzzle game. A variety of colourful
8969shapes are arranged in a series of increasingly complex patterns, forming
8970fiendish traps that must be disarmed and mysterious puzzles that must be
8971manipulated in order to give up their subtle secrets. Initially so
8972straightforward that anyone can pick it up and begin to play, yet gradually
8973becoming difficult enough to tax even the brightest of minds.")
8974 (license license:gpl2+)))
8975
8976(define-public fillets-ng
8977 (package
8978 (name "fillets-ng")
8979 (version "1.0.1")
8980 (source (origin
8981 (method url-fetch)
8982 (uri (string-append "mirror://sourceforge/fillets/"
8983 "Fish%20Fillets%20-%20Next%20Generation/"
8984 version "/fillets-ng-" version ".tar.gz"))
8985 (sha256
8986 (base32
8987 "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"))))
8988 (build-system gnu-build-system)
8989 (arguments
8990 `(#:configure-flags
8991 (list (string-append "--with-lua="
8992 (assoc-ref %build-inputs "lua")))
8993 #:make-flags
8994 (list (string-append "CFLAGS=-I"
8995 (assoc-ref %build-inputs "sdl-union")
8996 "/include/SDL")
8997 (string-append "CXXFLAGS=-I"
8998 (assoc-ref %build-inputs "sdl-union")
8999 "/include/SDL"))
9000 #:phases
9001 (modify-phases %standard-phases
9002 ;; Lua 5.1 does not provide it.
9003 (add-after 'unpack 'do-not-link-with-lualib
9004 (lambda _
9005 (substitute* "configure"
9006 (("-llualib") ""))
9007 #t))
9008 (add-after 'install 'install-data
9009 (lambda* (#:key inputs outputs #:allow-other-keys)
9010 (let ((data (string-append (assoc-ref outputs "out")
9011 "/share/games/fillets-ng")))
9012 (mkdir-p data)
9013 (invoke "tar" "-xvf"
9014 (assoc-ref inputs "fillets-ng-data")
9015 "--strip-components=1"
9016 "-C" data)))))))
9017 (inputs
9018 (list (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf)) fribidi
9019 libx11 lua-5.1))
9020 (native-inputs
9021 `(("pkg-config" ,pkg-config)
9022 ("fillets-ng-data"
9023 ,(origin
9024 (method url-fetch)
9025 (uri (string-append "mirror://sourceforge/fillets/"
9026 "Fish%20Fillets%20-%20Next%20Generation/"
9027 version "/fillets-ng-data-" version ".tar.gz"))
9028 (sha256
9029 (base32
9030 "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"))))))
9031 (home-page "https://fillets.sourceforge.net")
9032 (synopsis "Puzzle game")
9033 (description "Fish Fillets NG is strictly a puzzle game. The goal in
9034every of the seventy levels is always the same: find a safe way out. The fish
9035utter witty remarks about their surroundings, the various inhabitants of their
9036underwater realm quarrel among themselves or comment on the efforts of your
9037fish. The whole game is accompanied by quiet, comforting music.")
9038 (license license:gpl2+)))
9039
9040(define-public crawl
9041 (package
9042 (name "crawl")
9043 (version "0.34.1")
9044 (source
9045 (origin
9046 (method git-fetch)
9047 (uri (git-reference
9048 (url "https://github.com/crawl/crawl")
9049 (commit version)))
9050 (file-name (git-file-name name version))
9051 (sha256
9052 (base32 "09x4n4w3rw8sldwprb03yg1igwh4m09iw00g2iq30466jryys6bv"))
9053 (patches (search-patches "crawl-upgrade-saves.patch"))))
9054 (build-system gnu-build-system)
9055 (inputs
9056 (list lua-5.4 ncurses sqlite zlib))
9057 (native-inputs
9058 (list bash-minimal
9059 bison
9060 flex
9061 perl
9062 pkg-config
9063 python-wrapper
9064 python-pyyaml))
9065 (arguments
9066 (list
9067 #:make-flags
9068 #~(list (string-append "SQLITE_INCLUDE_DIR="
9069 #$(this-package-input "sqlite")
9070 "/include")
9071 (string-append "prefix=" #$output)
9072 "SAVEDIR=~/.crawl"
9073 ;; Don't compile with SSE on systems which don't have it.
9074 #$@(match (%current-system)
9075 ((or "i686-linux" "x86_64-linux")
9076 '())
9077 (_ '("NOSSE=TRUE")))
9078 ;; don't build any bundled dependencies
9079 "BUILD_LUA="
9080 "BUILD_SQLITE="
9081 "BUILD_ZLIB="
9082 "-Ccrawl-ref/source")
9083 #:phases
9084 #~(modify-phases %standard-phases
9085 (add-after 'unpack 'set-version
9086 (lambda _
9087 (call-with-output-file "crawl-ref/source/util/release_ver"
9088 (lambda (port)
9089 (display #$version port)))))
9090 (add-after 'unpack 'find-SDL-image
9091 (lambda _
9092 (substitute* "crawl-ref/source/windowmanager-sdl.cc"
9093 (("SDL_image.h") "SDL2/SDL_image.h"))))
9094 (delete 'configure)
9095 (replace 'check
9096 (lambda* (#:key tests? make-flags #:allow-other-keys)
9097 (when tests?
9098 (setenv "HOME" (getcwd))
9099 ;; Fake a terminal for the test cases.
9100 (setenv "TERM" "xterm-256color")
9101 ;; Run the tests that don't require a debug build.
9102 (apply invoke "make" "nondebugtest"
9103 (format #f "-j~d" (parallel-job-count))
9104 ;; Force command line build for test cases.
9105 (append make-flags '("GAME=crawl" "TILES=")))))))))
9106 (synopsis "Roguelike dungeon crawler game")
9107 (description "Dungeon Crawl Stone Soup (also known as \"Crawl\" or DCSS
9108for short) is a roguelike adventure through dungeons filled with dangerous
9109monsters in a quest to find the mystifyingly fabulous Orb of Zot.")
9110 (home-page "https://crawl.develz.org")
9111 (license (list license:gpl2+
9112 license:bsd-2
9113 license:bsd-3
9114 license:cc0
9115 license:expat
9116 license:zlib
9117 license:asl2.0))))
9118
9119;; The linter here claims that patch file names should start with the package
9120;; name. But, in this case, the patches are inherited from crawl with the
9121;; "crawl-" prefix instead of "crawl-tiles-".
9122(define-public crawl-tiles
9123 (package
9124 (inherit crawl)
9125 (name "crawl-tiles")
9126 (arguments
9127 (substitute-keyword-arguments
9128 (package-arguments crawl)
9129 ((#:make-flags flags)
9130 #~(cons*
9131 (string-append "PROPORTIONAL_FONT="
9132 #$(this-package-input "font-dejavu")
9133 "/share/fonts/truetype/DejaVuSans.ttf")
9134 (string-append "MONOSPACED_FONT="
9135 #$(this-package-input "font-dejavu")
9136 "/share/fonts/truetype/DejaVuSansMono.ttf")
9137 "TILES=y"
9138 ;; Rename the executable to allow parallel installation with crawl.
9139 "GAME=crawl-tiles"
9140 #$flags))))
9141 (inputs
9142 (modify-inputs inputs
9143 (prepend font-dejavu freetype glu libpng sdl2 sdl2-image sdl2-mixer)))
9144 (native-inputs
9145 (modify-inputs native-inputs
9146 (prepend pngcrush which)))
9147 (synopsis "Graphical roguelike dungeon crawler game")))
9148
9149(define-public lugaru
9150 (package
9151 (name "lugaru")
9152 (version "1.2")
9153 (source (origin
9154 (method url-fetch)
9155 (uri (string-append "https://github.com/osslugaru/lugaru/releases"
9156 "/download/" version
9157 "/lugaru-" version ".tar.xz"))
9158 (sha256
9159 (base32 "15zgcshy22q51rm72zi6y9z7qlgnz5iw3gczjdlir4bqmxy4gspk"))
9160 (patches
9161 (search-patches "lugaru-fix-sound.patch"))))
9162 (build-system cmake-build-system)
9163 (arguments
9164 (list #:configure-flags #~(list "-DSYSTEM_INSTALL=ON")
9165 #:tests? #f)) ;no test suite
9166 (native-inputs (list pkg-config))
9167 (inputs
9168 (list glu
9169 libjpeg-turbo
9170 libpng
9171 libvorbis
9172 openal
9173 sdl2
9174 zlib))
9175 (home-page "https://osslugaru.gitlab.io")
9176 (synopsis "Cross-platform third-person action game")
9177 (description "Lugaru is a third-person action game. The main character,
9178Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills.
9179In his quest to find those responsible for slaughtering his village, he uncovers
9180a far-reaching conspiracy involving the corrupt leaders of the rabbit republic
9181and the starving wolves from a nearby den. Turner takes it upon himself to
9182fight against their plot and save his fellow rabbits from slavery.")
9183 (license (list license:gpl2+ ; code
9184 ;; assets:
9185 license:cc-by-sa3.0
9186 license:cc-by-sa4.0))))
9187
9188(define-public 0ad-data
9189 (package
9190 (name "0ad-data")
9191 (version "0.28.0")
9192 (source
9193 (origin
9194 (method url-fetch)
9195 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9196 version "-unix-data.tar.xz"))
9197 (file-name (string-append name "-" version ".tar.xz"))
9198 (sha256
9199 (base32 "0vsj75y4a4psfqiaf2l9n7mhrfh5xzhg1wpzlkh4fb0hw85b6i78"))))
9200 (build-system trivial-build-system)
9201 (native-inputs (list tar unzip xz))
9202 (arguments
9203 `(#:modules ((guix build utils))
9204 #:builder
9205 (begin
9206 (use-modules (guix build utils))
9207 (let ((out (assoc-ref %outputs "out"))
9208 (source (assoc-ref %build-inputs "source"))
9209 (tar (search-input-file %build-inputs "/bin/tar"))
9210 (unzip (search-input-file %build-inputs "/bin/unzip"))
9211 (xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
9212 (setenv "PATH" xz-path)
9213 (mkdir out)
9214 (invoke tar "xvf" source "-C" out "--strip=3")
9215 (for-each (lambda (name)
9216 (let* ((dir (string-append out "/mods/" name))
9217 (file (string-append dir "/" name ".zip")))
9218 (invoke unzip "-o" "-d" dir file)
9219 (delete-file file)))
9220 '("mod" "public"))))))
9221 (synopsis "Data files for 0ad")
9222 (description "0ad-data provides the data files required by the game 0ad.")
9223 (home-page "https://play0ad.com")
9224 (properties '((hidden? . #t)))
9225 (license (list (license:fsdg-compatible
9226 "http://tavmjong.free.fr/FONTS/ArevCopyright.txt"
9227 "Similar to the license of the Bitstream Vera fonts.")
9228 (license:fsdg-compatible
9229 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")
9230 license:cc-by-sa3.0
9231 license:expat
9232 license:gfl1.0
9233 license:gpl2+
9234 license:gpl3+))))
9235
9236(define-public 0ad
9237 (package
9238 (name "0ad")
9239 (version "0.28.0")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9244 version "-unix-build.tar.xz"))
9245 (file-name (string-append name "-" version ".tar.xz"))
9246 (sha256
9247 (base32 "0am4smmsl6anqd4ga8sx6z96wjz5jqymkgwdwlpr4sppbrsigqi7"))))
9248 ;; A snippet here would cause a build failure because of timestamps
9249 ;; reset. See https://bugs.gnu.org/26734.
9250 (inputs
9251 (list 0ad-data
9252 curl
9253 enet
9254 fmt
9255 freetype
9256 gloox
9257 icu4c-73
9258 libidn
9259 libpng
9260 libsodium
9261 libvorbis
9262 libxcursor
9263 libxml2
9264 miniupnpc
9265 mozjs-128
9266 openal
9267 sdl2
9268 wxwidgets
9269 zlib))
9270 (native-inputs
9271 (list boost-1.83
9272 cmake-minimal
9273 cxxtest
9274 mesa
9275 pkg-config
9276 python
9277 premake5))
9278 (build-system gnu-build-system)
9279 (arguments
9280 `(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
9281 #:tests? #f ;tests fail currently
9282 #:phases
9283 (modify-phases %standard-phases
9284 (add-after 'unpack 'delete-bundles
9285 (lambda* (#:key inputs #:allow-other-keys)
9286 (delete-file-recursively "libraries/source/spidermonkey")
9287 (delete-file-recursively "libraries/source/cxxtest-4.4")
9288 (substitute* "build/premake/premake5.lua"
9289 (("rootdir\\.\\.\"\\/libraries\\/source\\/cxxtest-4.4\\/bin\\/cxxtestgen\"")
9290 (string-append "\"" (assoc-ref inputs "cxxtest")
9291 "/bin/cxxtestgen"
9292 "\"")))))
9293 (add-after 'unpack 'patch-python-shebangs
9294 ;; A couple Python scripts point to 'python' rather than 'python3'.
9295 ;; They work fine under python3, so let's fix that.
9296 (lambda _
9297 (substitute* "source/tools/webservices/maint_graphics.py"
9298 (("#!/usr/bin/env python")
9299 "#!/usr/bin/env python3"))
9300 (substitute* "source/tools/webservices/manage.py"
9301 (("#!/usr/bin/env python")
9302 "#!/usr/bin/env python3"))))
9303 (add-after 'unpack 'prepare-builtin-libs
9304 ;; Builtin libraries are included in the tarball as other tarballs.
9305 ;; They're usually extracted during the build, but then shebangs
9306 ;; within the libs don't get patched, so we do it here ourselves.
9307 (lambda _
9308 (let ((fcollada-version "28209")
9309 (nvtt-version "28209"))
9310 (with-directory-excursion "libraries/source/fcollada"
9311 (invoke "tar" "-xvf"
9312 (string-append "fcollada-" fcollada-version ".tar.xz"))
9313 (substitute* "build.sh"
9314 (("rm -Rf fcollada-[$][{]PV[}]")
9315 "")
9316 (("\"[$][{]TAR[}]\" xf fcollada-[$][{]PV[}].tar.xz")
9317 "")))
9318 (with-directory-excursion "libraries/source/nvtt"
9319 (invoke "tar" "-xvf"
9320 (string-append "nvtt-" nvtt-version ".tar.xz"))
9321 (substitute* "build.sh"
9322 (("rm -Rf nvtt-[$][{]PV[}]")
9323 "")
9324 (("\"[$][{]TAR[}]\" xf nvtt-[$][{]PV[}].tar.xz")
9325 ""))))))
9326 (add-after 'unpack 'fix-gmake2-references
9327 ;; The current version of 0AD expects premake action 'gmake2',
9328 ;; this was renamed to just 'gmake', so we patch to reflect that.
9329 ;; Remove this when updating to the next release (fixed in main).
9330 (lambda _
9331 (substitute* "build/premake/cxxtest/cxxtest.lua"
9332 (("gmake2")
9333 "gmake"))
9334 (substitute* "build/premake/premake5.lua"
9335 (("if _ACTION == \"gmake\" then")
9336 "if _ACTION == \"gmakelegacy\" then")
9337 (("if _ACTION == \"gmake2\" then")
9338 "if _ACTION == \"gmake\" then"))
9339 (substitute* "build/workspaces/update-workspaces.sh"
9340 (("gmake2")
9341 "gmake"))))
9342 (replace 'configure
9343 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9344 (let* ((jobs (number->string (parallel-job-count)))
9345 (out (assoc-ref outputs "out"))
9346 (lib (string-append out "/lib"))
9347 (data (string-append out "/share/0ad")))
9348 (setenv "JOBS" (string-append "-j" jobs))
9349 (setenv "CC" ,(cc-for-target))
9350 (with-directory-excursion "build/workspaces"
9351 (apply invoke
9352 `("./update-workspaces.sh"
9353 ,(string-append "--libdir=" lib)
9354 ,(string-append "--datadir=" data)
9355 ;; TODO: "--with-system-nvtt"
9356 "--with-system-premake5"
9357 "--with-system-mozjs"
9358 ,@(if tests? '() '("--without-tests"))))))))
9359 (add-before 'build 'build-builtin-libs
9360 (lambda _
9361 (let ((jobs (number->string (parallel-job-count))))
9362 (setenv "JOBS" (string-append "-j" jobs))
9363 (setenv "CC" ,(cc-for-target))
9364 (with-directory-excursion "libraries/source/fcollada"
9365 (invoke "./build.sh"))
9366 (with-directory-excursion "libraries/source/nvtt"
9367 (invoke "./build.sh")))))
9368 (delete 'check)
9369 (replace 'install
9370 (lambda* (#:key inputs outputs #:allow-other-keys)
9371 (chdir "binaries")
9372 (let* ((out (assoc-ref outputs "out"))
9373 (bin (string-append out "/bin"))
9374 (lib (string-append out "/lib"))
9375 (data (string-append out "/share/0ad"))
9376 (applications (string-append out "/share/applications"))
9377 (hicolor (string-append out "/share/icons/hicolor/128x128/apps"))
9378 (metainfo (string-append out "/share/metainfo"))
9379 (mime (string-append out "/share/mime/application"))
9380 (0ad-data (assoc-ref inputs "0ad-data")))
9381 ;; data
9382 (copy-recursively "data" data)
9383 (for-each (lambda (file)
9384 (symlink (string-append 0ad-data "/" file)
9385 (string-append data "/" file)))
9386 '("config" "mods/mod" "mods/public" "tools"))
9387 ;; libraries
9388 (for-each (lambda (file)
9389 (install-file file lib))
9390 (find-files "system" "\\.so$"))
9391 (copy-recursively "../libraries/source/nvtt/lib" lib)
9392 ;; binaries
9393 (install-file "system/pyrogenesis" bin)
9394 (with-directory-excursion bin
9395 (symlink "pyrogenesis" "0ad"))
9396 ;; resources
9397 (with-directory-excursion "../build/resources"
9398 (install-file "0ad.desktop" applications)
9399 (install-file "0ad.png" hicolor)
9400 (install-file "0ad.appdata.xml" metainfo)
9401 (install-file "pyrogenesis.xml" mime)))))
9402 (add-after 'install 'check
9403 (lambda* (#:key tests? #:allow-other-keys)
9404 (when tests?
9405 (with-directory-excursion "system"
9406 (invoke "./test"))))))))
9407 (home-page "https://play0ad.com")
9408 (synopsis "3D real-time strategy game of ancient warfare")
9409 (description "0 A.D. is a real-time strategy (RTS) game of ancient
9410warfare. It's a historically-based war/economy game that allows players to
9411relive or rewrite the history of twelve ancient civilizations, each depicted
9412at their peak of economic growth and military prowess.
9413
94140ad needs a window manager that supports 'Extended Window Manager Hints'.")
9415 (license (list license:bsd-2
9416 license:bsd-3
9417 license:expat
9418 license:gpl2+
9419 license:ibmpl1.0
9420 license:isc
9421 license:lgpl2.1
9422 license:lgpl3
9423 license:mpl2.0
9424 license:zlib))))
9425
9426(define-public open-adventure
9427 (package
9428 (name "open-adventure")
9429 (version "1.20")
9430 (source
9431 (origin
9432 (method git-fetch)
9433 (uri (git-reference
9434 (url "https://gitlab.com/esr/open-adventure")
9435 (commit version)))
9436 (file-name (git-file-name name version))
9437 (sha256
9438 (base32 "0lbggjmh9g4zvnzzqz0qspmc24yg25bjalm06dlvhd22vz7hrfy5"))))
9439 (build-system gnu-build-system)
9440 (arguments
9441 (list
9442 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
9443 #:parallel-tests? #f ;some tests fail non-deterministically
9444 #:phases
9445 #~(modify-phases %standard-phases
9446 (delete 'configure) ;no configure script
9447 (add-before 'build 'use-echo
9448 (lambda _
9449 (substitute* (list "tests/Makefile" "tests/tapview")
9450 (("/bin/echo") (which "echo")))))
9451 #$@(if (this-package-native-input "ruby-asciidoctor")
9452 #~((add-after 'build 'build-manpage
9453 (lambda _
9454 ;; This target is missing a dependency
9455 (substitute* "Makefile"
9456 ((".adoc.6:" line)
9457 (string-append line " advent.adoc")))
9458 (invoke "make" ".adoc.6")))
9459 ;; There is no install target.
9460 (replace 'install
9461 (lambda _
9462 (let ((bin (string-append #$output "/bin"))
9463 (man (string-append #$output "/share/man/man6")))
9464 (install-file "advent" bin)
9465 (install-file "advent.6" man)))))
9466 #~((replace 'install
9467 (lambda _
9468 (let ((bin (string-append #$output "/bin")))
9469 (install-file "advent" bin)))))))))
9470 (native-inputs
9471 (append
9472 (list asciidoc
9473 cppcheck
9474 libedit
9475 pkg-config
9476 python-pyyaml
9477 python-wrapper)
9478 (if (supported-package? ruby-asciidoctor/minimal)
9479 (list ruby-asciidoctor/minimal)
9480 '())))
9481 (home-page "https://gitlab.com/esr/open-adventure")
9482 (synopsis "Colossal Cave Adventure")
9483 (description
9484 "The original Colossal Cave Adventure from 1976 was the origin of all
9485text adventures, dungeon-crawl (computer) games, and computer-hosted
9486roleplaying games. This is a forward port of the last version released by
9487Crowther & Woods, its original authors, in 1995. It has been known as
9488``adventure 2.5'' and ``430-point adventure''.")
9489 (license license:bsd-2)))
9490
9491(define-public tome4
9492 (package
9493 (name "tome4")
9494 (version "1.7.6")
9495 (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
9496 (source
9497 (origin
9498 (method url-fetch)
9499 (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
9500 version ".tar.bz2"))
9501 (sha256
9502 (base32 "0338lirc4jbmq29449bw8c6src8b91yn9x14w2nxr31zh00fm7cq"))
9503 (modules '((guix build utils)))))
9504 (build-system gnu-build-system)
9505 (native-inputs
9506 (list unzip))
9507 (inputs
9508 (list glu
9509 libvorbis
9510 luajit
9511 openal
9512 premake4
9513 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
9514 (arguments
9515 (list
9516 #:tests? #false ;no test
9517 #:make-flags
9518 #~(list (string-append "CC=" #$(cc-for-target))
9519 "config=release")
9520 ;; XXX: Building in parallel occasionally causes this build failure:
9521 ;; ../src/luajit2/src/host/buildvm.c:73:10: fatal error: buildvm_arch.h:
9522 ;; No such file or directory
9523 #:parallel-build? #f
9524 #:phases
9525 #~(modify-phases %standard-phases
9526 (delete 'bootstrap)
9527 (replace 'configure
9528 (lambda _
9529 (invoke "premake4" "gmake")))
9530 (add-after 'set-paths 'set-sdl-paths
9531 (lambda* (#:key inputs #:allow-other-keys)
9532 (setenv "CPATH"
9533 (string-append
9534 (search-input-directory inputs "/include/SDL2")
9535 ":" (or (getenv "CPATH") "")))))
9536 (add-after 'set-sdl-paths 'set-cflags
9537 (lambda _
9538 (setenv "CFLAGS"
9539 (string-append
9540 "-g -O2 "
9541 "-Wno-error=incompatible-pointer-types "
9542 "-Wno-error=implicit-function-declaration"))))
9543 ;; premake doesn't provide install target
9544 (replace 'install
9545 (lambda* (#:key inputs outputs #:allow-other-keys)
9546 (let* ((out (assoc-ref outputs "out"))
9547 (usr (string-append out "/usr"))
9548 (bin (string-append out "/bin"))
9549 (licenses (string-append out "/share/licenses"))
9550 (documents (string-append out "/share/doc"))
9551 (pixmaps (string-append out "/share/pixmaps"))
9552 (icon "te4-icon.png")
9553 (data (string-append out "/share/" #$name))
9554 (applications (string-append
9555 out "/share/applications"))
9556 (unzip (string-append
9557 (assoc-ref inputs "unzip") "/bin/unzip"))
9558 (wrapper (string-append bin "/" #$name)))
9559 ;; icon
9560 (mkdir-p pixmaps)
9561 (invoke unzip "-j"
9562 (string-append
9563 "game/engines/te4-" #$version ".teae")
9564 (string-append
9565 "data/gfx/" icon) "-d" pixmaps)
9566 ;; game executable
9567 (install-file "t-engine" data)
9568 (mkdir-p bin)
9569 (with-output-to-file wrapper
9570 (lambda ()
9571 (display
9572 (string-append
9573 "#!/bin/sh\n"
9574 ;; No bootstrap code found,
9575 ;; defaulting to working directory
9576 ;; for engine code!
9577 "cd " data "\n"
9578 "exec -a tome4 ./t-engine \"$@\"\n"))))
9579 (chmod wrapper #o555)
9580 ;; licenses
9581 (for-each (lambda (file)
9582 (install-file file licenses))
9583 '("COPYING" "COPYING-MEDIA"))
9584 ;; documents
9585 (for-each (lambda (file)
9586 (install-file file documents))
9587 '("CONTRIBUTING" "CREDITS"))
9588 ;; data
9589 (copy-recursively "bootstrap" (string-append
9590 data "/bootstrap"))
9591 (copy-recursively "game" (string-append data "/game"))
9592 ;; launcher
9593 (mkdir-p applications)
9594 (make-desktop-entry-file
9595 (string-append applications "/" #$name ".desktop")
9596 #:name "ToME4"
9597 #:comment #$synopsis
9598 #:exec #$name
9599 #:icon icon
9600 #:categories '("Game" "RolePlaying"))))))))
9601 (home-page "https://te4.org")
9602 (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
9603combat and advanced character building. Play as one of many unique races and
9604classes in the lore-filled world of Eyal, exploring random dungeons, facing
9605challenging battles, and developing characters with your own tailored mix of
9606abilities and powers.")
9607 (license license:gpl3+)))
9608
9609(define-public torcs
9610 (package
9611 (name "torcs")
9612 (version "1.3.9")
9613 (source
9614 (origin
9615 (method url-fetch)
9616 (uri (string-append "mirror://sourceforge/" name
9617 "/all-in-one/" version "/"
9618 name "-" version ".tar.bz2"))
9619 ;; Source archive is in fact in gzip format, rename it.
9620 (file-name (string-append name "-" version ".tar.bz2"))
9621 (sha256
9622 (base32
9623 "0k6d0dm7qnpqlgl6yjk42fk5n045in1xf08v8mkm8achsa39xipr"))
9624 (modules '((guix build utils)
9625 (ice-9 ftw)
9626 (ice-9 regex)
9627 (srfi srfi-26)))
9628 (snippet
9629 #~(begin
9630 ;; Delete Windows-specific sources and pre-built binaries.
9631 (delete-file-recursively "src/windows")
9632 ;; The license of the kw-* and pw-* car models includes a
9633 ;; non-commercial clause, hence does not comply with the GNU FSDG.
9634 (with-directory-excursion "data/cars/models"
9635 (for-each delete-file-recursively
9636 (scandir "." (cut string-match "^(kc|pw)-" <>))))
9637 ;; Delete extraneous CVS directories.
9638 (for-each delete-file-recursively
9639 (find-files "." (lambda (file stat)
9640 (and (eq? 'directory (stat:type stat))
9641 (string=? "CVS" (basename file))))
9642 #:directories? #t))))))
9643 (build-system gnu-build-system)
9644 (arguments
9645 ;; Building in parallel fails due to a race where include files have not
9646 ;; yet been generated, with errors such as "controlconfig.cpp:30:10:
9647 ;; fatal error: tgfclient.h: No such file or directory". The issue was
9648 ;; reported to the 'torcs-devel' mailing list (see:
9649 ;; https://sourceforge.net/p/torcs/mailman/message/58834764/).
9650 (list #:modules `(,@%default-gnu-modules (srfi srfi-26))
9651 #:parallel-build? #f
9652 #:tests? #f ;no test suite
9653 ;; Ensure the binaries find libraries provided by this very package
9654 ;; (see: https://issues.guix.gnu.org/73979).
9655 #:configure-flags
9656 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output
9657 "/lib/torcs/lib"))
9658 #:phases
9659 #~(modify-phases %standard-phases
9660 (add-after 'unpack 'patch-commands
9661 (lambda* (#:key inputs #:allow-other-keys)
9662 (substitute* "src/linux/torcs.in"
9663 (("/bin/bash")
9664 (search-input-file inputs "bin/bash")))))
9665 (add-after 'install 'install-data
9666 (lambda _
9667 (invoke "make" "datainstall")))
9668 (add-after 'install-data 'install-doc
9669 (lambda _
9670 (let ((docdir (string-append #$output "/share/doc/torcs/"))
9671 (man6 (string-append #$output "/share/man/man6")))
9672 (for-each (cut install-file <> man6)
9673 (find-files "doc/man" "\\.6$"))
9674 (install-file "doc/userman/how_to_drive.html" docdir)
9675 (copy-recursively "doc/userman/images"
9676 (string-append docdir "/images")))))
9677 (add-after 'install 'install-freedesktop-entry
9678 (lambda _
9679 (let ((iconsdir (string-append #$output "/share/icons/hicolor/"
9680 "48x48/apps")))
9681 (mkdir-p iconsdir)
9682 (copy-file "Ticon.png" (string-append iconsdir "/torcs.png")))
9683 (install-file "torcs.desktop"
9684 (string-append #$output
9685 "/share/applications/"))))
9686 (add-after 'install 'fix-permissions
9687 ;; XXX: Otherwise, the guix daemon reports: "suspicious
9688 ;; ownership or permission on /gnu/store/xxx-torcs-1.3.7',
9689 ;; rejecting this build output".
9690 (lambda _
9691 (chmod #$output #o755))))))
9692 (native-inputs (list bzip2))
9693 (inputs
9694 (list bash-minimal
9695 freealut
9696 freeglut
9697 libice
9698 libpng
9699 libsm
9700 libvorbis
9701 libxi
9702 libxmu
9703 libxrandr
9704 libxrender
9705 libxt
9706 mesa
9707 openal
9708 plib
9709 zlib))
9710 (home-page "https://sourceforge.net/projects/torcs/")
9711 (synopsis "Car racing simulator")
9712 (description "TORCS stands for The Open Racing Car Simulator. It can be
9713used as an ordinary car racing game, as an artificial intelligence (AI) racing
9714game, or as a research platform. The game has features such as:
9715@itemize
9716@item Input support for a driving wheel, joystick, keyboard or mouse
9717@item More than 30 car models
9718@item 30 tracks
9719@item 50 opponents to race against
9720@item Lighting, smoke, skidmarks and glowing brake disks graphics
9721@item Simple damage model and collisions
9722@item Tire and wheel properties (springs, dampers, stiffness, etc.)
9723@item Aerodynamics (ground effect, spoilers, etc.)
9724@end itemize
9725The difficulty level can be configured, impacting how much damage is caused by
9726collisions and the level of traction the car has on the track, which makes the
9727game fun for both novice and experts.")
9728 (license (list license:gpl2+ ;source and most assets
9729 license:fdl1.2+)))) ;how_to_drive.html, faq.html
9730
9731(define-public quakespasm
9732 (package
9733 (name "quakespasm")
9734 (version "0.96.2")
9735 (source
9736 (origin
9737 (method url-fetch)
9738 (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
9739 version ".tar.gz"))
9740 (sha256
9741 (base32 "0hr58w1d2yw82vm9lkln05z6d4sjlcr6grxhf6sqdqwyfy9nv1mw"))))
9742 (arguments
9743 (list #:tests? #f
9744 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
9745 "MP3LIB=mpg123"
9746 "USE_CODEC_FLAC=1"
9747 "USE_CODEC_MIKMOD=1"
9748 "USE_SDL2=1"
9749 "-CQuake")
9750 #:phases #~(modify-phases %standard-phases
9751 (delete 'configure)
9752 (add-after 'unpack 'fix-makefile-paths
9753 (lambda _
9754 (mkdir-p (string-append #$output "/bin"))
9755 (substitute* "Quake/Makefile"
9756 (("/usr/local/games")
9757 (string-append #$output "/bin"))))))))
9758 (build-system gnu-build-system)
9759 (inputs (list flac
9760 libmikmod
9761 libmpg123
9762 libvorbis
9763 mesa
9764 sdl2))
9765 (synopsis "First person shooter engine for Quake 1")
9766 (description "Quakespasm is a modern engine for id software's Quake 1.
9767It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9768some graphical niceities, and numerous bug-fixes and other improvements.")
9769 (home-page "https://quakespasm.sourceforge.net/")
9770 (license license:gpl2+)))
9771
9772(define-public vkquake
9773 (package
9774 (inherit quakespasm)
9775 (name "vkquake")
9776 (version "1.32.3.1")
9777 (source
9778 (origin
9779 (method git-fetch)
9780 (uri (git-reference
9781 (url "https://github.com/Novum/vkQuake")
9782 (commit version)))
9783 (file-name (git-file-name name version))
9784 (sha256
9785 (base32 "0ch9rd6fckqs9bhh6z8qpdi2byra6lhk00y3vj4804351hpgmj0y"))))
9786 (arguments
9787 `(#:make-flags
9788 (let ((vulkanlib (string-append (assoc-ref %build-inputs
9789 "vulkan-loader") "/lib")))
9790 (list "CC=gcc"
9791 "MP3LIB=mpg123"
9792 "USE_CODEC_FLAC=1"
9793 "USE_CODEC_MIKMOD=1"
9794 "USE_SDL2=1"
9795 (string-append "LDFLAGS=-Wl,-rpath=" vulkanlib)
9796 "-CQuake"))
9797 #:phases (modify-phases %standard-phases
9798 (add-after 'unpack 'patch-for-new-vulkan
9799 (lambda _
9800 ;; Mimic upstream commit a869a22d9b51c68e for
9801 ;; compatibility with newer vulkan-headers.
9802 (substitute* "Quake/gl_rmisc.c"
9803 (("VK_DYNAMIC_STATE_RANGE_SIZE")
9804 "3"))
9805 #t))
9806 (delete 'configure)
9807 (add-after 'unpack 'fix-makefile-paths
9808 (lambda* (#:key outputs #:allow-other-keys)
9809 (let ((vulkan (assoc-ref %build-inputs
9810 "vulkan-loader"))
9811 (out (assoc-ref outputs "out")))
9812 (mkdir-p (string-append out "/bin"))
9813 (substitute* "Quake/Makefile" ((" /usr")
9814 (string-append " " out)))
9815 (substitute* "Quake/Makefile" (("/games")
9816 (string-append "/bin")))
9817 (substitute* "Quake/Makefile" (("..VULKAN_SDK.") vulkan))
9818 #t))))
9819 ,@(strip-keyword-arguments '(#:make-flags #:phases)
9820 (package-arguments quakespasm))))
9821 (inputs (modify-inputs inputs
9822 (prepend
9823 glslang
9824 spirv-tools
9825 vulkan-loader
9826 vulkan-headers)))
9827 (description "vkquake is a modern engine for id software's Quake 1.
9828It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9829some graphical niceities, and numerous bug-fixes and other improvements.")
9830 (home-page "https://github.com/Novum/vkQuake")))
9831
9832(define-public yamagi-quake2
9833 (package
9834 (name "yamagi-quake2")
9835 (version "8.51")
9836 (source
9837 (origin
9838 (method url-fetch)
9839 (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
9840 version ".tar.xz"))
9841 (sha256
9842 (base32 "0xk321ph15wgydlmln3k7bdn4zdls2zliggsnkjwlnbax0cfy3z4"))))
9843 (build-system gnu-build-system)
9844 (arguments
9845 `(#:tests? #f
9846 #:make-flags
9847 (list "CC=gcc"
9848 ;; An optional directory where it will look for quake2 data files
9849 ;; in addition to the current working directory.
9850 "WITH_SYSTEMWIDE=yes"
9851 "WITH_SYSTEMDIR=\"/opt/quake2\"")
9852 #:phases
9853 (modify-phases %standard-phases
9854 (delete 'configure)
9855 (add-before 'build 'patch-libraries
9856 (lambda* (#:key inputs #:allow-other-keys)
9857 ;; The game writes paths to openal.so and curl.so to ~/.yq2/...
9858 ;; Workaround: hard-code the compiled paths where it loads them;
9859 ;; this prevents loading old or garbage collected libraries.
9860 (substitute* "src/client/sound/qal.c"
9861 (("al_driver->string")
9862 (string-append "\"" (assoc-ref inputs "openal")
9863 "/lib/libopenal.so\"")))
9864 (substitute* "src/client/curl/qcurl.c"
9865 (("cl_libcurl->string")
9866 (string-append "\"" (assoc-ref inputs "curl")
9867 "/lib/libcurl.so\"")))))
9868 (replace 'install
9869 (lambda* (#:key outputs #:allow-other-keys)
9870 (let ((out (assoc-ref outputs "out")))
9871 (mkdir-p (string-append out "/lib"))
9872 (mkdir-p (string-append out "/bin"))
9873 ;; The yamagi-quake2 binary must be in the same directory
9874 ;; as its engine libraries, but symlinking it to /bin is okay.
9875 ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
9876 (copy-recursively "release"
9877 (string-append out "/lib/yamagi-quake2"))
9878 (symlink (string-append out "/lib/yamagi-quake2/quake2")
9879 (string-append out "/bin/yamagi-quake2"))
9880 (symlink (string-append out "/lib/yamagi-quake2/q2ded")
9881 (string-append out "/bin/yamagi-q2ded"))))))))
9882 (native-inputs
9883 (list pkg-config))
9884 (inputs
9885 (list curl
9886 libvorbis
9887 mesa
9888 openal
9889 sdl2
9890 zlib))
9891 (synopsis "First person shooter engine based on quake2")
9892 (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
9893The main focus is an unchanged single player experience like back in 1997,
9894thus the gameplay and the graphics are unaltered. However the user may use one
9895of the unofficial retexturing packs. In comparison with the official client,
9896over 1000 bugs were fixed and an extensive code audit done,
9897making Yamagi Quake II one of the most solid Quake II implementations available.")
9898 (home-page "https://www.yamagi.org/quake2/")
9899 (license (list license:gpl2+ ; game and server
9900 (license:non-copyleft ; info-zip
9901 "file://LICENSE"
9902 "See Info-Zip section.")
9903 license:public-domain)))) ; stb
9904
9905(define-public nudoku
9906 (package
9907 (name "nudoku")
9908 (version "8.0.0")
9909 (source
9910 (origin
9911 (method git-fetch)
9912 (uri (git-reference
9913 (url "https://github.com/jubalh/nudoku")
9914 (commit version)))
9915 (file-name (git-file-name name version))
9916 (sha256
9917 (base32 "1hcbzgn5jivy1mca1h25mwrmy7iav4j7dp7vmp3fa2lx6qwmiv7s"))))
9918 (build-system gnu-build-system)
9919 (native-inputs
9920 (list autoconf automake gettext-minimal pkg-config))
9921 (inputs
9922 (list ncurses))
9923 (home-page "https://jubalh.github.io/nudoku/")
9924 (synopsis "Sudoku for your terminal")
9925 (description "Nudoku is a ncurses-based Sudoku game for your terminal.")
9926 (license license:gpl3+)))
9927
9928(define-public the-butterfly-effect
9929 (package
9930 (name "the-butterfly-effect")
9931 (version "0.9.3.1")
9932 (source
9933 (origin
9934 (method git-fetch)
9935 (uri (git-reference
9936 (url "https://github.com/the-butterfly-effect/tbe")
9937 (commit (string-append "v" version))))
9938 (file-name (git-file-name name version))
9939 (sha256
9940 (base32
9941 "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj"))))
9942 (build-system qt-build-system)
9943 (arguments
9944 `(#:phases
9945 (modify-phases %standard-phases
9946 (add-after 'unpack 'set-cmake-install-prefix
9947 (lambda* (#:key outputs #:allow-other-keys)
9948 (substitute* "CMakeLists.txt"
9949 (("/usr") (assoc-ref outputs "out"))
9950 (("TBE_BIN_DIR games") "TBE_BIN_DIR bin"))))
9951 (add-after 'unpack 'disable-translations
9952 ;; TODO: Re-enable translations when they no longer fail to build.
9953 (lambda _
9954 (substitute* "CMakeLists.txt"
9955 ((".*i18n.*") "")))))
9956 ;; Test suite requires a running Xorg server. Even when
9957 ;; provided, it fails with "D-Bus library appears to be
9958 ;; incorrectly set up; failed to read machine uuid: Failed to
9959 ;; open "/etc/machine-id": No such file or directory" along
9960 ;; with multiple "QPainter:: ... Painter not active" warnings.
9961 #:tests? #f))
9962 (inputs
9963 (list qtbase-5 qtsvg-5))
9964 (native-inputs
9965 `(("gettext-minimal" ,gettext-minimal)
9966 ("qttools-5" ,qttools-5)
9967 ("qtwayland-5" ,qtwayland-5)))
9968 (synopsis "Realistic physics puzzle game")
9969 (description "The Butterfly Effect (tbe) is a game that uses
9970realistic physics simulations to combine lots of simple mechanical
9971elements to achieve a simple goal in the most complex way possible.")
9972 (home-page "http://the-butterfly-effect.org/")
9973 ;; Main license is GPL2-only. However, artwork is distributed
9974 ;; under various licenses, listed here.
9975 (license (list license:gpl2 license:public-domain license:expat
9976 license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))
9977
9978(define-public the-powder-toy
9979 (package
9980 (name "the-powder-toy")
9981 (version "100.0.399")
9982 (source
9983 (origin
9984 (method git-fetch)
9985 (uri (git-reference
9986 (url "https://github.com/The-Powder-Toy/The-Powder-Toy")
9987 (commit (string-append "v" version))))
9988 (file-name (git-file-name name version))
9989 (sha256
9990 (base32 "0f2gdjykavsz944j4ahpjbj6k8v4sh09d1y82c4y46wayl78cp97"))
9991 (snippet
9992 #~(begin (use-modules (guix build utils))
9993 (substitute* "meson.build"
9994 (("'aarch64', 'x86_64'")
9995 (string-append "'aarch64', 'loongarch64', 'mips64', 'ppc64', "
9996 "'riscv64', 'sparc64', 'x86_64'")))))))
9997 (build-system meson-build-system)
9998 (arguments
9999 `(#:configure-flags (list (string-append
10000 "-Dworkaround_elusive_bzip2_include_dir="
10001 (assoc-ref %build-inputs "bzip2"))
10002 ,@(if (this-package-input "lua")
10003 `("-Dlua=lua-5.2"
10004 "-Dworkaround_noncpp_lua=true")
10005 '()))
10006 #:phases
10007 (modify-phases %standard-phases
10008 ;; Our lua variants are named lua-<version>, not lua<version>.
10009 (add-after 'unpack 'adjust-lua-variant-names
10010 (lambda _
10011 (substitute* '("meson.build"
10012 "meson_options.txt")
10013 (("lua5\\.") "lua-5."))))
10014 ;; No install target
10015 (replace 'install
10016 (lambda _
10017 (let* ((output (assoc-ref %outputs "out"))
10018 (bin (string-append output "/bin"))
10019 (share (string-append output "/share"))
10020 (apps (string-append share "/applications")))
10021 (mkdir-p bin)
10022 (mkdir-p apps)
10023 (install-file "powder" bin)
10024 (install-file "resources/powder.desktop" apps)
10025 (for-each
10026 (lambda (size)
10027 (let ((dir (string-append share "/icons/hicolor/"
10028 size "x" size "/apps")))
10029 (mkdir-p dir)
10030 (copy-file (string-append (assoc-ref %build-inputs "source")
10031 "/resources/generated_icons/icon_exe_"
10032 size ".png")
10033 (string-append dir "/powdertoy-powder.png"))))
10034 '("16" "32" "48"))))))))
10035 (native-inputs (list pkg-config))
10036 (inputs
10037 (append
10038 (list bzip2
10039 curl
10040 fftwf
10041 jsoncpp
10042 libpng
10043 python-wrapper)
10044 (if (supported-package? luajit)
10045 (list luajit)
10046 (list lua-5.2))
10047 (list sdl2
10048 zlib)))
10049 (synopsis "Free physics sandbox game")
10050 (description
10051 "The Powder Toy is a free physics sandbox game, which simulates air
10052pressure and velocity, heat, gravity and a countless number of interactions
10053between different substances! The game provides you with various building
10054materials, liquids, gases and electronic components which can be used to
10055construct complex machines, guns, bombs, realistic terrains and almost
10056anything else. You can then mine them and watch cool explosions, add
10057intricate wirings, play with little stickmen or operate your machine.")
10058 (home-page "https://powdertoy.co.uk/")
10059 ;; The few files that have a license header specify GPLv3+, but most don't
10060 ;; and it's not otherwise specified anywhere.
10061 (license license:gpl3)))
10062
10063(define-public pioneer
10064 (package
10065 (name "pioneer")
10066 (version "20220203")
10067 (source (origin
10068 (method git-fetch)
10069 (uri (git-reference
10070 (url "https://github.com/pioneerspacesim/pioneer")
10071 (commit version)))
10072 (file-name (git-file-name name version))
10073 (sha256
10074 (base32
10075 "0qjq6lsr1rmcnvq9b7r745cpp7n0q6cpc3k81q8ai4xspbq61m8w"))))
10076 (build-system cmake-build-system)
10077 (native-inputs
10078 (list pkg-config))
10079 (inputs
10080 (list assimp
10081 curl
10082 freetype
10083 glew
10084 glu
10085 libpng
10086 libsigc++-2
10087 libvorbis
10088 lua-5.2 ;not compatible with 5.3
10089 mesa
10090 (sdl-union (list sdl2 sdl2-image))))
10091 (arguments
10092 `(#:tests? #f ;tests are broken
10093 #:configure-flags (list "-DUSE_SYSTEM_LIBLUA:BOOL=YES"
10094 "-DUSE_SYSTEM_LIBGLEW:BOOL=YES"
10095 (string-append "-DPIONEER_DATA_DIR="
10096 %output "/share/games/pioneer"))
10097 #:make-flags (list "all" "build-data")))
10098 (home-page "https://pioneerspacesim.net")
10099 (synopsis "Game of lonely space adventure")
10100 (description
10101 "Pioneer is a space adventure game set in our galaxy at the turn of the
1010231st century. The game is open-ended, and you are free to eke out whatever
10103kind of space-faring existence you can think of. Look for fame or fortune by
10104exploring the millions of star systems. Turn to a life of crime as a pirate,
10105smuggler or bounty hunter. Forge and break alliances with the various
10106factions fighting for power, freedom or self-determination. The universe is
10107whatever you make of it.")
10108 (license license:gpl3)))
10109
10110(define-public badass
10111 (package
10112 (name "badass")
10113 (version "0.0.0-20151201180210-02e7c38d503f")
10114 (source
10115 (origin
10116 (method git-fetch)
10117 (uri (git-reference
10118 (url "https://github.com/umayr/badass")
10119 (commit (go-version->git-ref version))))
10120 (file-name (git-file-name name version))
10121 (sha256
10122 (base32 "1b0y7xz9y0cqxfphfznz2zhfk7mm2vvmldf088w2fm8c8spj4g28"))))
10123 (build-system go-build-system)
10124 (arguments
10125 '(#:import-path "github.com/umayr/badass"))
10126 (home-page "https://github.com/umayr/badass")
10127 (synopsis "Hacking contribution graphs in git")
10128 (description
10129 "Badass generates false commits for a range of dates, essentially
10130hacking the gamification of contribution graphs on platforms such as
10131Github or Gitlab.")
10132 (license license:expat)))
10133
10134(define-public colobot
10135 (package
10136 (name "colobot")
10137 (version "0.2.1-alpha")
10138 (source
10139 (origin
10140 (method git-fetch)
10141 (uri (git-reference
10142 (url "https://github.com/colobot/colobot")
10143 (commit (string-append "colobot-gold-" version))
10144 (recursive? #t))) ;for "data/" subdir
10145 (file-name (git-file-name name version))
10146 (sha256
10147 (base32 "0bpy5nzkvq5nfr0w8jf7bl7zs8yz2cpzp87pnkdlgwl3adcn9nsw"))))
10148 (build-system cmake-build-system)
10149 (arguments
10150 (list
10151 #:tests? #f ;no test
10152 #:modules '((guix build cmake-build-system)
10153 (guix build utils)
10154 (srfi srfi-1)
10155 (ice-9 match)
10156 (ice-9 regex))
10157 #:phases
10158 #~(modify-phases %standard-phases
10159 (add-after 'unpack 'make-git-checkout-writable
10160 (lambda _
10161 (for-each make-file-writable (find-files "."))))
10162 (add-after 'unpack 'fix-directories
10163 (lambda _
10164 (substitute* "CMakeLists.txt"
10165 (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix)
10166 (string-append prefix "/bin"))
10167 (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix)
10168 (string-append prefix "/colobot")))))
10169 (add-after 'fix-directories 'install-music
10170 ;; Retrieve and install music files.
10171 (lambda* (#:key inputs #:allow-other-keys)
10172 ;; Installation process tries to download music files using
10173 ;; "wget" if not already present. Since we are going another
10174 ;; route, skip "wget" command check.
10175 (substitute* "data/music/CMakeLists.txt"
10176 (("find_program\\(WGET wget\\)") ""))
10177 ;; Populate "music/" directory.
10178 (let ((data
10179 (any
10180 (match-lambda ((_ . input)
10181 (and (string-match "colobot-music" input)
10182 input)))
10183 inputs)))
10184 (invoke "tar" "-xvf" data "-Cdata/music")))))))
10185 (native-inputs
10186 (list (origin
10187 (method url-fetch)
10188 (uri (string-append "https://colobot.info/files/music/"
10189 "colobot-music_ogg_" version ".tar.gz"))
10190 (sha256
10191 (base32
10192 "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m")))
10193 gettext-minimal
10194 (librsvg-for-system)
10195 po4a
10196 python-wrapper))
10197 (inputs
10198 (list boost-1.83
10199 glew
10200 libogg
10201 libpng
10202 libsndfile
10203 libvorbis
10204 openal
10205 physfs
10206 (sdl-union (list sdl2 sdl2-image sdl2-ttf))))
10207 (synopsis "Educational programming strategy game")
10208 (description "Colobot: Gold Edition is a real-time strategy game, where
10209you can program your units (bots) in a language called CBOT, which is similar
10210to C++ and Java. Your mission is to find a new planet to live and survive.
10211You can save humanity and get programming skills!")
10212 (home-page "https://colobot.info")
10213 (license license:gpl3+)))
10214
10215(define-public odamex
10216 (package
10217 (name "odamex")
10218 (version "10.6.0")
10219 (source
10220 (origin
10221 (method url-fetch)
10222 (uri (string-append
10223 "mirror://sourceforge/odamex/Odamex/" version "/"
10224 "odamex-src-" version ".tar.xz"))
10225 (sha256
10226 (base32 "1vy6d0md5ws5319bjjbaqnca68vslgk22k9lh4yd9n85hzlwacpi"))
10227 (modules '((guix build utils)))
10228 (snippet
10229 '(begin
10230 ;; XXX: Unbundle more, they are not replaced by the ones provided
10231 ;; in inputs: fltk, jsoncpp, miniupnp, protobuf.
10232 ;;
10233 ;; Remove some bundled libraries.
10234 (with-directory-excursion "libraries"
10235 (for-each delete-file-recursively
10236 '("curl" "libpng" "portmidi" "zlib")))))))
10237 (build-system cmake-build-system)
10238 (arguments
10239 (list
10240 #:tests? #f ; no tests
10241 #:configure-flags
10242 #~(list "-DBUILD_CLIENT=1"
10243 "-DBUILD_MASTER=1"
10244 "-DBUILD_SERVER=1"
10245 "-DUSE_INTERNAL_LIBS=0"
10246 "-DUSE_INTERNAL_MINIUPNP=0")))
10247 (native-inputs
10248 (list deutex pkg-config))
10249 (inputs
10250 (list alsa-lib
10251 curl
10252 fltk
10253 jsoncpp
10254 libpng
10255 miniupnpc
10256 portmidi
10257 protobuf
10258 sdl2
10259 sdl2-mixer
10260 zlib))
10261 (home-page "https://odamex.net/")
10262 (synopsis "Multiplayer Doom port")
10263 (description "Odamex is a modification of the Doom engine that
10264allows players to easily join servers dedicated to playing Doom
10265online.")
10266 (license license:gpl2+)))
10267
10268(define-public chocolate-doom
10269 (package
10270 (name "chocolate-doom")
10271 (version "3.1.1")
10272 (source (origin
10273 (method git-fetch)
10274 (uri (git-reference
10275 (url "https://github.com/chocolate-doom/chocolate-doom")
10276 (commit (string-append "chocolate-doom-" version))))
10277 (file-name (git-file-name name version))
10278 (sha256
10279 (base32 "0xpribvacbma7l6138wizhcl2b0kyn05jwdkspw176zl7v3k1bn1"))))
10280 (build-system gnu-build-system)
10281 (arguments
10282 (list
10283 #:phases
10284 #~(modify-phases %standard-phases
10285 (replace 'bootstrap
10286 ;; The bundled autogen.sh script unconditionally runs ./configure.
10287 (lambda _ (invoke "autoreconf" "-vif"))))))
10288 (inputs (list sdl2-net sdl2-mixer sdl2))
10289 (native-inputs
10290 (list automake autoconf pkg-config))
10291 (synopsis "Doom source port preserving the look, feel, and bugs of vanilla
10292Doom")
10293 (description
10294 "Chocolate Doom takes a different approach to other source ports. Its
10295aim is to accurately reproduce the experience of playing Vanilla Doom. It is
10296a conservative, historically accurate Doom source port, which is compatible
10297with the thousands of mods and levels that were made before the Doom source
10298code was released. Rather than flashy new graphics, Chocolate Doom's main
10299features are its accurate reproduction of the game as it was played in the
103001990s. The project is developed around a carefully-considered philosophy that
10301intentionally restricts which features may be added (and rejects any that
10302affect gameplay).")
10303 (home-page "https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom")
10304 (license license:gpl2)))
10305
10306(define-public crispy-doom
10307 (package
10308 (inherit chocolate-doom)
10309 (name "crispy-doom")
10310 (version "7.1")
10311 (source (origin
10312 (method git-fetch)
10313 (uri (git-reference
10314 (url "https://github.com/fabiangreffrath/crispy-doom")
10315 (commit (string-append "crispy-doom-" version))))
10316 (file-name (git-file-name name version))
10317 (sha256
10318 (base32 "0lpib7dg1ygnjw1yjamfiybhkly4lp42r4lawskbjslfyjafm4ic"))))
10319 (synopsis "Limit-removing enhanced-resolution Doom source port based on
10320Chocolate Doom")
10321 (description
10322 "Crispy Doom is a friendly fork of Chocolate Doom that provides a higher
10323display resolution, removes the static limits of the Doom engine and offers
10324further optional visual, tactical and physical enhancements while remaining
10325entirely config file, savegame, netplay and demo compatible with the
10326original.")
10327 (home-page "https://www.chocolate-doom.org/wiki/index.php/Crispy_Doom")))
10328
10329(define-public woof-doom
10330 (package
10331 (name "woof-doom")
10332 (version "15.3.0")
10333 (source
10334 (origin
10335 (method git-fetch)
10336 (uri (git-reference
10337 (url "https://github.com/fabiangreffrath/woof")
10338 (commit (string-append "woof_" version))))
10339 (file-name (git-file-name name version))
10340 (sha256
10341 (base32 "0ki7wqjhqhjxci04aksh9m8m35gi2db89475v79rjzdgk00b3mqv"))
10342 (modules '((guix build utils)))
10343 (snippet '(begin
10344 (with-directory-excursion "third-party"
10345 (delete-file-recursively "miniz")
10346 (delete-file-recursively "yyjson")
10347 (delete-file-recursively "spng")
10348 (substitute* "CMakeLists.txt"
10349 (("add_library\\(miniz.+")
10350 "find_package(miniz REQUIRED)")
10351 (("target_.+\\(miniz.+$") "")
10352 (("add_library\\(spng.+")
10353 "find_package(PkgConfig)
10354pkg_search_module(spng REQUIRED spng)")
10355 (("target_.+\\(spng.+$") "")))
10356 (delete-file-recursively "win32")
10357 (substitute* (find-files "src" ".")
10358 (("miniz.h") "miniz/miniz.h"))))))
10359 (build-system cmake-build-system)
10360 (arguments
10361 (list
10362 #:tests? #f)) ;'demotest' requires internet access.
10363 (native-inputs (list pkg-config python))
10364 (inputs (list libebur128
10365 libsndfile
10366 libxmp
10367 miniz
10368 openal
10369 sdl2
10370 sdl2-net
10371 spng
10372 yyjson
10373 fluidsynth))
10374 (home-page "https://fabiangreffrath.github.io/woof/")
10375 (synopsis "MBF-lineage Doom source port")
10376 (description
10377 "Woof! is a continuation of the MBF lineage of Doom source ports, with
10378modern features such as dynamic resolution scaling, uncapped framerates,
10379adjustable field of view, 3D audio with HRTF and 7.1 surround sound
10380support, and modern gamepad features including rumble, gyro, and flick
10381stick support. Supports the new MBF21 format, as well as the MUSINFO,
10382UMAPINFO, DEHEXTRA, and DSDHacked specifictions.")
10383 (license
10384 ;; See README.md
10385 (list (license:non-copyleft
10386 "https://bitbucket.org/jpommier/pffft/src/master/pffft.h"
10387 "FFTPACK license")
10388 license:bsd-3
10389 license:cc-by3.0
10390 license:cc0
10391 license:expat
10392 license:gpl2
10393 license:gpl3+
10394 license:public-domain
10395 license:gpl2+))))
10396
10397(define-public xonotic-data
10398 (package
10399 (name "xonotic-data")
10400 (version "0.8.6")
10401 (source
10402 (origin
10403 (method url-fetch)
10404 (uri (string-append "https://dl.xonotic.org/xonotic-"
10405 version ".zip"))
10406 (file-name (string-append name "-" version ".zip"))
10407 (sha256
10408 (base32 "0kcnps65k81sm56s5dclahvllilnir3ix9kf5xr9jx0fh26hz1ah"))))
10409 (build-system trivial-build-system)
10410 (native-inputs (list unzip))
10411 (arguments
10412 (list #:modules '((guix build utils))
10413 #:builder
10414 #~(begin
10415 (use-modules (guix build utils))
10416 (let* ((out (assoc-ref %outputs "out"))
10417 (xonotic (string-append out "/share/xonotic"))
10418 (source (assoc-ref %build-inputs "source"))
10419 (unzip (search-input-file %build-inputs "/bin/unzip")))
10420 (invoke unzip source)
10421 (chdir "Xonotic")
10422 (install-file "key_0.d0pk" xonotic)
10423 (copy-recursively "data"
10424 (string-append xonotic "/data"))
10425 (copy-recursively "server"
10426 (string-append xonotic "/server"))))))
10427 (home-page "https://xonotic.org")
10428 (synopsis "Data files for Xonotic")
10429 (description
10430 "Xonotic-data provides the data files required by the game Xonotic.")
10431 (properties '((hidden? . #t))) ;data package useless on its own
10432 (license (list license:gpl2+
10433 (license:x11-style "file://server/rcon.pl")))))
10434
10435(define-public xonotic
10436 (package
10437 (name "xonotic")
10438 (version "0.8.6")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (string-append "https://dl.xonotic.org/xonotic-"
10443 version "-source.zip"))
10444 (file-name (string-append name "-" version ".zip"))
10445 (sha256
10446 (base32 "1a0j825rb86i34xc5k6spsma41gcgp6yl8qs2affhjpz3iwar4lb"))))
10447 (build-system gnu-build-system)
10448 (arguments
10449 (list #:configure-flags
10450 #~(list (string-append "--prefix=" #$output)
10451 "--disable-rijndael")
10452 #:modules '((guix build gnu-build-system)
10453 (guix build utils)
10454 (srfi srfi-26))
10455 #:phases
10456 #~(modify-phases %standard-phases
10457 (add-before 'configure 'build-darkplaces
10458 (lambda* (#:key make-flags parallel-build? outputs
10459 #:allow-other-keys)
10460 (let* ((out (assoc-ref outputs "out"))
10461 (share (string-append out "/share/xonotic/")))
10462 (apply invoke "make"
10463 "-C" "source/darkplaces"
10464 "-f" "makefile"
10465 "-j" (if parallel-build?
10466 (number->string (parallel-job-count))
10467 "1")
10468 (string-append "CC=" #$(cc-for-target))
10469 (string-append "DP_FS_BASEDIR=" share)
10470 "DP_LINK_TO_LIBJPEG=1"
10471 "DP_SOUND_API=ALSA"
10472 "cl-release"
10473 "sdl-release"
10474 "sv-release"
10475 make-flags))))
10476 (add-before 'configure 'preconfigure
10477 (lambda _
10478 (chdir "source/d0_blind_id")
10479 (invoke "sh" "autogen.sh")))
10480 (add-after 'install 'symlink-data
10481 (lambda* (#:key outputs inputs #:allow-other-keys)
10482 (let* ((out (assoc-ref outputs "out"))
10483 (data (assoc-ref inputs "xonotic-data")))
10484 (symlink (string-append data "/share/xonotic")
10485 (string-append out "/share/xonotic")))))
10486 (add-after 'install 'install-desktop-entries
10487 (lambda* (#:key outputs #:allow-other-keys)
10488 (let* ((out (assoc-ref outputs "out"))
10489 (app (string-append out "/share/applications")))
10490 ;; Add .desktop files for the 2 variants and the symlink.
10491 (for-each
10492 (lambda (variant)
10493 (let* ((file (if variant
10494 (format #f "xonotic-~(~a~)" variant)
10495 "xonotic"))
10496 (name (if variant
10497 (format #f "Xonotic (~a)" variant)
10498 "Xonotic"))
10499 (exec (string-append out "/bin/" file)))
10500 (make-desktop-entry-file
10501 (string-append app "/" file ".desktop")
10502 #:name name
10503 #:comment `((#f #$(package-synopsis this-package)))
10504 #:exec exec
10505 #:try-exec exec
10506 #:icon "xonotic"
10507 #:categories '("Game"))))
10508 (list #f "GLX" "SDL")))))
10509 (add-after 'install 'install-icons
10510 (lambda* (#:key outputs #:allow-other-keys)
10511 (let ((out (assoc-ref outputs "out")))
10512 (for-each
10513 (lambda (file)
10514 (let* ((size (string-filter char-numeric? file))
10515 (icons (string-append out "/share/icons/hicolor/"
10516 size "x" size "/apps")))
10517 (mkdir-p icons)
10518 (copy-file file (string-append icons "/xonotic.png"))))
10519 (find-files "../../misc/logos/icons_png"
10520 "^xonotic_[0-9]+\\.png$")))))
10521 (add-after 'install 'install-binaries
10522 (lambda* (#:key outputs #:allow-other-keys)
10523 (let* ((out (assoc-ref outputs "out"))
10524 (bin (string-append out "/bin")))
10525 (for-each
10526 (lambda (variant)
10527 (copy-file
10528 (string-append "../darkplaces/darkplaces-" variant)
10529 (string-append bin "/xonotic-" variant)))
10530 (list "dedicated" "glx" "sdl")))))
10531 (add-after 'install-binaries 'wrap-binaries
10532 (lambda* (#:key outputs inputs #:allow-other-keys)
10533 ;; All games must be wrapped to get sound and networking.
10534 (let* ((out (assoc-ref outputs "out"))
10535 (bin (string-append out "/bin"))
10536 (curl (assoc-ref inputs "curl"))
10537 (vorbis (assoc-ref inputs "libvorbis")))
10538 (for-each (cut wrap-program <>
10539 `("LD_LIBRARY_PATH" ":" prefix
10540 (,(string-append curl "/lib:"
10541 vorbis "/lib"))))
10542 (find-files bin "^xonotic"))
10543
10544 ;; Provide a default xonotic executable, defaulting to SDL.
10545 (symlink "xonotic-sdl" (string-append bin "/xonotic"))))))))
10546 (native-inputs
10547 (list autoconf
10548 automake
10549 gmp
10550 libtool
10551 pkg-config
10552 unzip))
10553 (inputs
10554 (list alsa-lib
10555 bash-minimal
10556 curl
10557 libjpeg-turbo
10558 libmodplug
10559 libvorbis
10560 libogg
10561 libpng
10562 libx11
10563 libxpm
10564 libxxf86dga
10565 libxxf86vm
10566 libxext
10567 libxau
10568 libxdmcp
10569 mesa
10570 glu
10571 freetype
10572 sdl2
10573 hicolor-icon-theme
10574 xonotic-data))
10575 (home-page "https://xonotic.org")
10576 (synopsis "Fast-paced first-person shooter game")
10577 (description
10578 "Xonotic is a free, fast-paced first-person shooter.
10579The project is geared towards providing addictive arena shooter
10580gameplay which is all spawned and driven by the community itself.
10581Xonotic is a direct successor of the Nexuiz project with years of
10582development between them, and it aims to become the best possible
10583open-source FPS of its kind.")
10584 (license (list license:gpl2+
10585 license:bsd-3 ; /source/d0_blind_id folder and others
10586 (license:x11-style "" "See file rcon.pl.")))))
10587
10588(define-public frotz
10589 (package
10590 (name "frotz")
10591 (version "2.55")
10592 (source (origin
10593 (method url-fetch)
10594 (uri (list (string-append
10595 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10596 "frotz/frotz-" version ".tar.gz")
10597 (string-append
10598 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10599 "frotz/frotz-" version ".tar.gz")))
10600 (sha256
10601 (base32
10602 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10603 (build-system gnu-build-system)
10604 (arguments
10605 (list #:tests? #f ; there are no tests
10606 #:make-flags
10607 #~(list (string-append "CC=" #$(cc-for-target)))
10608 #:phases
10609 #~(modify-phases %standard-phases
10610 (delete 'configure) ; no configure-script
10611 (replace 'install
10612 (lambda* (#:key outputs #:allow-other-keys)
10613 (let* ((out (assoc-ref outputs "out"))
10614 (bin (string-append out "/bin"))
10615 (man (string-append out "/share/man/man6")))
10616 (install-file "frotz" bin)
10617 (mkdir-p man)
10618 (install-file "doc/frotz.6" man)))))))
10619 (native-inputs (list pkg-config which))
10620 (inputs (list ao libmodplug libsamplerate libsndfile libvorbis ncurses))
10621 (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
10622 (description "Frotz is an interpreter for Infocom games and other Z-machine
10623games in the text adventure/interactive fiction genre. This version of Frotz
10624complies with standard 1.0 of Graham Nelson's specification. It plays all
10625Z-code games V1-V8, including V6, with sound support through libao, and uses
10626ncurses for text display.")
10627 (home-page "https://frotz.sourceforge.net")
10628 (license license:gpl2+)))
10629
10630(define-public frotz-dumb-terminal
10631 (package
10632 (name "frotz-dumb-terminal")
10633 (version "2.55")
10634 (source (origin
10635 (method url-fetch)
10636 (uri (list (string-append
10637 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10638 "frotz/frotz-" version ".tar.gz")
10639 (string-append
10640 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10641 "frotz/frotz-" version ".tar.gz")))
10642 (sha256
10643 (base32
10644 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10645 (build-system gnu-build-system)
10646 (native-inputs (list pkg-config which))
10647 (arguments
10648 `(#:tests? #f ; there are no tests
10649 #:phases
10650 (modify-phases %standard-phases
10651 (delete 'configure)
10652 (replace 'build
10653 (lambda _
10654 (invoke "make" (string-append "CC=" ,(cc-for-target)) "dumb")))
10655 (replace 'install
10656 (lambda* (#:key outputs #:allow-other-keys)
10657 (let* ((out (assoc-ref outputs "out"))
10658 (bin (string-append out "/bin"))
10659 (man (string-append out "/share/man/man6")))
10660 (install-file "dfrotz" bin)
10661 (mkdir-p man)
10662 (install-file "doc/dfrotz.6" man)
10663 #t))))))
10664 (synopsis "Portable Z-machine dumb interpreter for text adventure games")
10665 (description "Frotz is an interpreter for Infocom games and
10666other Z-machine games in the text adventure/interactive fiction genre.
10667dfrotz is the dumb interface version. You get no screen control; everything
10668is just printed to the terminal line by line. The terminal handles all the
10669scrolling. Maybe you'd like to experience what it's like to play Adventure on
10670a teletype. A much cooler use for compiling Frotz with the dumb interface is
10671that it can be wrapped in CGI scripting, PHP, and the like to allow people
10672to play games on webpages. It can also be made into a chat bot.")
10673 (home-page "https://frotz.sourceforge.net")
10674 (license license:gpl2+)))
10675
10676(define-public frotz-sdl
10677 (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
10678 (package
10679 (name "frotz-sdl")
10680 (version "2.45pre")
10681 (source (origin
10682 (method git-fetch)
10683 (uri (git-reference
10684 (url "https://gitlab.com/DavidGriffith/frotz")
10685 (commit commit)))
10686 (sha256
10687 (base32
10688 "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))
10689 (file-name (git-file-name name version))))
10690 (build-system gnu-build-system)
10691 (arguments
10692 `(#:tests? #f ; there are no tests
10693 #:phases
10694 (modify-phases %standard-phases
10695 (delete 'configure)
10696 (add-before 'build 'patch-makefile
10697 (lambda _
10698 (substitute* "Makefile"
10699 (("lcurses") "lncurses")
10700 (("^BUILD_DATE_TIME =.*$")
10701 "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
10702 #t))
10703 (replace 'build
10704 (lambda _
10705 (invoke "make" "sdl")))
10706 (replace 'install
10707 (lambda* (#:key outputs #:allow-other-keys)
10708 (let* ((out (assoc-ref outputs "out"))
10709 (bin (string-append out "/bin"))
10710 (man (string-append out "/share/man/man6")))
10711 (install-file "sfrotz" bin)
10712 (mkdir-p man)
10713 (install-file "doc/sfrotz.6" man)
10714 #t))))))
10715 (native-inputs
10716 (list pkg-config which perl))
10717 (inputs (list sdl2
10718 sdl2-mixer
10719 libmodplug
10720 libsamplerate
10721 libsndfile
10722 libvorbis
10723 ncurses
10724 freetype
10725 libjpeg-turbo))
10726 (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
10727 (description "Frotz is an interpreter for Infocom games and other Z-machine
10728games in the text adventure/interactive fiction genre. This version of Frotz
10729using SDL fully supports all these versions of the Z-Machine including the
10730graphical version 6. Graphics and sound are created through the use of the SDL
10731libraries. AIFF sound effects and music in MOD and OGG formats are supported
10732when packaged in Blorb container files or optionally from individual files.")
10733 (home-page "https://frotz.sourceforge.net")
10734 (license license:gpl2+))))
10735
10736(define-public frozen-bubble
10737 ;; Last official release is very outdated (2010). Use latest commit (2017).
10738 (let ((commit "d6a029110ad6ab9e4960052e175addc98807fb7e")
10739 (revision "1"))
10740 (package
10741 (name "frozen-bubble")
10742 (version (git-version "2.2.1" revision commit))
10743 (source
10744 (origin
10745 (method git-fetch)
10746 (uri (git-reference
10747 (url "https://github.com/kthakore/frozen-bubble")
10748 (commit commit)))
10749 (file-name (git-file-name name version))
10750 (sha256
10751 (base32 "1rfrcym5lf4qac2qdklikb1ywijyxypq298azzxahy461dadl6cx"))))
10752 (build-system perl-build-system)
10753 (arguments
10754 `(#:phases
10755 (modify-phases %standard-phases
10756 ;; Build process needs to create files in the "server"
10757 ;; directory.
10758 (add-after 'unpack 'fix-permissions
10759 (lambda _
10760 (for-each make-file-writable
10761 (find-files "server" "." #:directories? #t))))
10762 ;; By default, build stops at warnings.
10763 (add-after 'unpack 'prevent-build-error
10764 (lambda _
10765 (substitute* "inc/My/Builder.pm"
10766 (("-Werror") ""))))
10767 (add-after 'install 'install-desktop-file-and-icons
10768 (lambda* (#:key outputs #:allow-other-keys)
10769 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
10770 (hicolor (string-append share "/icons/hicolor")))
10771 ;; Create desktop entry.
10772 (make-desktop-entry-file
10773 (string-append share "/applications/" ,name ".desktop")
10774 #:name "Frozen Bubble"
10775 #:comment "Frozen Bubble arcade game"
10776 #:exec ,name
10777 #:icon ,name
10778 #:categories '("Game" "ArcadeGame"))
10779 ;; Add icons.
10780 (with-directory-excursion "share/icons"
10781 (for-each
10782 (lambda (size)
10783 (let* ((dim (string-append size "x" size))
10784 (dir (string-append hicolor "/" dim "/apps")))
10785 (mkdir-p dir)
10786 (copy-file
10787 (string-append "frozen-bubble-icon-" dim ".png")
10788 (string-append dir "/frozen-bubble.png"))))
10789 '("16" "32" "48" "64"))))))
10790 (add-after 'install 'wrap-perl-libs
10791 (lambda* (#:key outputs #:allow-other-keys)
10792 (let ((out (assoc-ref outputs "out"))
10793 (perl5lib (getenv "PERL5LIB")))
10794 (for-each (lambda (prog)
10795 (wrap-program (string-append out "/" prog)
10796 `("PERL5LIB" ":" prefix
10797 (,(string-append perl5lib ":" out
10798 "/lib/perl5/site_perl")))))
10799 (find-files "bin" "."))))))))
10800 (native-inputs
10801 (list perl-alien-sdl perl-capture-tiny perl-locale-maketext-lexicon
10802 perl-module-build pkg-config))
10803 (inputs
10804 (list bash-minimal
10805 glib
10806 perl-compress-bzip2
10807 perl-file-sharedir
10808 perl-file-slurp
10809 perl-file-which
10810 perl-ipc-system-simple
10811 perl-sdl
10812 (sdl-union (list sdl sdl-image sdl-mixer sdl-pango sdl-ttf))))
10813 (home-page "http://frozen-bubble.org/")
10814 (synopsis "Puzzle with bubbles")
10815 (description
10816 "Frozen-Bubble is a clone of the popular Puzzle Bobble game, in which
10817you attempt to shoot bubbles into groups of the same color to cause them to
10818pop.
10819
10820Players compete as penguins and must use the arrow keys to aim a colored
10821bubble at groups of bubbles. The objective is to clear all the bubbles off
10822the screen before a bubble passes below a line at the bottom.
10823
10824It features 100 single-player levels, a two-player mode, music and striking
10825graphics. A level editor is also included to allow players to create and play
10826their own levels.")
10827 (license license:gpl2))))
10828
10829(define-public libmanette
10830 (package
10831 (name "libmanette")
10832 (version "0.2.13")
10833 (source (origin
10834 (method url-fetch)
10835 (uri (string-append "mirror://gnome/sources/libmanette/"
10836 (version-major+minor version) "/"
10837 "libmanette-" version ".tar.xz"))
10838 (sha256
10839 (base32
10840 "1bnqfxd9b5vff9256f8vxd404fkvbvc5gxva6qcjj2fyw3yw4z18"))))
10841 (build-system meson-build-system)
10842 (native-inputs
10843 (list `(,glib "bin") ; for glib-compile-resources
10844 gobject-introspection pkg-config vala))
10845 (propagated-inputs
10846 (list glib hidapi libevdev libgudev)) ;per manette-0.2.pc
10847 (home-page "https://wiki.gnome.org/Apps/Games")
10848 (synopsis "Game controller library")
10849 (description "Libmanette is a small GObject library giving you simple
10850access to game controllers. It supports the de-facto standard gamepads as
10851defined by the W3C standard Gamepad specification or as implemented by the SDL
10852GameController.")
10853 (license license:lgpl2.1+)))
10854
10855(define-public quadrapassel
10856 (package
10857 (name "quadrapassel")
10858 (version "50.2")
10859 (source (origin
10860 (method url-fetch)
10861 (uri (string-append "mirror://gnome/sources/quadrapassel/"
10862 (version-major version) "/"
10863 "quadrapassel-" version ".tar.xz"))
10864 (sha256
10865 (base32
10866 "0z8lz8zyxgmcm09xkibv8xgcwbsgs4jzaqiybgndijyfcvyq36fg"))))
10867 (build-system meson-build-system)
10868 (arguments
10869 (list
10870 #:tests? #f ;libgnome-games-support-tests test failure
10871 #:glib-or-gtk? #t
10872 #:phases
10873 #~(modify-phases %standard-phases
10874 (add-after 'unpack 'skip-gtk-update-icon-cache
10875 ;; Don't create 'icon-theme.cache'.
10876 (lambda _
10877 (substitute* "meson.build"
10878 (("gtk_update_icon_cache: true")
10879 "gtk_update_icon_cache: false")))))))
10880 (native-inputs
10881 (list blueprint-compiler
10882 desktop-file-utils ; for desktop-file-validate
10883 gettext-minimal
10884 (list glib "bin") ; for glib-compile-resources
10885 pkg-config
10886 vala))
10887 (inputs
10888 (list gtk
10889 libadwaita
10890 libmanette
10891 librsvg
10892 libsndfile
10893 openal))
10894 (home-page "https://gitlab.gnome.org/GNOME/quadrapassel")
10895 (synopsis "GNOME version of Tetris")
10896 (description "Quadrapassel comes from the classic falling-block game,
10897Tetris. The goal of the game is to create complete horizontal lines of
10898blocks, which will disappear. The blocks come in seven different shapes made
10899from four blocks each: one straight, two L-shaped, one square, and two
10900S-shaped. The blocks fall from the top center of the screen in a random
10901order. You rotate the blocks and move them across the screen to drop them in
10902complete lines. You score by dropping blocks fast and completing lines. As
10903your score gets higher, you level up and the blocks fall faster.")
10904 (license license:gpl2+)))
10905
10906(define-public endless-sky
10907 (package
10908 (name "endless-sky")
10909 (version "0.11.2")
10910 (source
10911 (origin
10912 (method git-fetch)
10913 (uri (git-reference
10914 (url "https://github.com/endless-sky/endless-sky")
10915 (commit (string-append "v" version))))
10916 (file-name (git-file-name name version))
10917 (sha256
10918 (base32 "1ck667v7q90a7sinn1xjlyd4s3n0zwxagd853vspwd22v1imm823"))))
10919 (build-system cmake-build-system)
10920 (arguments
10921 (list #:configure-flags #~(list "-DES_USE_VCPKG=0"
10922 "-DES_USE_SYSTEM_LIBRARIES=1")
10923 #:make-flags #~(list (string-append "PREFIX=" #$output))
10924 #:build-type "Release"
10925 #:tests? (not (target-x86-32?))
10926 #:phases
10927 #~(modify-phases %standard-phases
10928 (add-after 'unpack 'fix-paths
10929 (lambda _
10930 ;; Look for resources in the store directory.
10931 (substitute* "source/Files.cpp"
10932 (("/usr/local") #$output))
10933 ;; Install game binary into %out/bin.
10934 (substitute* "CMakeLists.txt"
10935 (("games\\)") "bin)")))))))
10936 (inputs
10937 (list catch2
10938 flac
10939 glew
10940 libavif
10941 libjpeg-turbo
10942 libmad
10943 libpng
10944 minizip
10945 openal
10946 pkgconf
10947 sdl2
10948 `(,util-linux "lib"))) ; for libuuid
10949 (home-page "https://endless-sky.github.io/")
10950 (synopsis "2D space trading and combat game")
10951 (description "Endless Sky is a 2D space trading and combat game. Explore
10952other star systems. Earn money by trading, carrying passengers, or completing
10953missions. Use your earnings to buy a better ship or to upgrade the weapons and
10954engines on your current one. Blow up pirates. Take sides in a civil war. Or
10955leave human space behind and hope to find friendly aliens whose culture is more
10956civilized than your own.")
10957 (license (list license:gpl3+
10958 license:cc-by-sa3.0
10959 license:cc-by-sa4.0
10960 license:public-domain))))
10961
10962(define-public speed-dreams-data
10963 ;; Use the same tag version as speed-dreams package.
10964 (hidden-package
10965 (package
10966 (name "speed-dreams-data")
10967 (version "2.4.2")
10968 (source
10969 (origin
10970 (method git-fetch)
10971 (uri (git-reference
10972 (url (string-append "https://forge.a-lec.org/speed-dreams/"
10973 name))
10974 (commit (string-append "v" version))))
10975 (file-name (git-file-name name version))
10976 (sha256
10977 (base32
10978 "1igavpsn8v9v866hawmgx47a6wz0bxykmf540961jfzav85j5m7p"))))
10979 (build-system cmake-build-system)
10980 (arguments (list #:tests? #f)) ;no test suite
10981 (home-page "https://www.speed-dreams.net/en")
10982 (synopsis "Data for the Speed Dreams racing game")
10983 (description "This package contains the non-functional data for the
10984Speed Dreams racing game.")
10985 (license license:gpl2+))))
10986
10987(define-public speed-dreams-freesolid
10988 ;; Use the commit corresponding to the 'freesolid' submodule
10989 ;; (https://forge.a-lec.org/speed-dreams/speed-dreams-code).
10990 (hidden-package
10991 (package
10992 (name "speed-dreams-freesolid")
10993 (version "2.1.2")
10994 (source (origin
10995 (method git-fetch)
10996 (uri (git-reference
10997 (url (string-append "https://forge.a-lec.org/speed-dreams/freesolid"))
10998 (commit "2c0071923be6afb487ed4e3b84da501f0a2e7e2d")))
10999 (file-name (git-file-name name version))
11000 (sha256
11001 (base32
11002 "025ml2nzhkfki28ckjjggqpkr1gd02c2blpr4afc5175r8bfh2w4"))))
11003 (build-system cmake-build-system)
11004 (arguments
11005 (list
11006 #:tests? #f ;no test suite
11007 #:build-type "Release"
11008 #:configure-flags
11009 #~(list "-DBUILD_SHARED_LIBS=ON"))) ;speed-dreams build system needs a shared library
11010
11011 (home-page "https://forge.a-lec.org/speed-dreams/freesolid")
11012 (synopsis "Speed-Dreams 3D collision detection C++ library")
11013 (description "Speed Dreams FreeSOLID is a fork of FreeSOLID, a library for
11014collision detection of three-dimensional objects undergoing rigid motion and
11015deformation. It is designed to be used in interactive 3D graphics
11016applications.")
11017 (license license:lgpl2.0+))))
11018
11019(define-public speed-dreams
11020 (package
11021 (name "speed-dreams")
11022 (version "2.4.2")
11023 (source
11024 (origin
11025 (method git-fetch)
11026 (uri (git-reference
11027 (url (string-append "https://forge.a-lec.org/"
11028 name "/" name "-code.git"))
11029 (commit (string-append "v" version))))
11030 (file-name (git-file-name name version))
11031 (sha256
11032 (base32
11033 "0r8liki7rcpi85a829qjbj37cnh00899qr8a09qsfj47cj52qi47"))))
11034 (build-system cmake-build-system)
11035 (arguments
11036 (list
11037 #:tests? #f ;no test suite
11038 #:build-type "Release"
11039 #:configure-flags
11040 #~(list "-DOPTION_TRACKEDITOR=OFF" ;not detecting jdk properly
11041 "-DOPTION_3RDPARTY_EXPAT=ON" ;use system expat library
11042 "-DSD_BINDIR:PATH=bin" ;install to /bin instead of /games
11043 (string-append "-DVERSION_LONG=" #$version))))
11044 (native-inputs (list pkg-config speed-dreams-data))
11045 (inputs
11046 (list cjson
11047 curl
11048 enet
11049 expat
11050 freeglut
11051 speed-dreams-freesolid
11052 freetype
11053 glm
11054 libjpeg-turbo
11055 libogg
11056 libpng
11057 libvorbis
11058 minizip
11059 openal
11060 openscenegraph
11061 plib
11062 rhash
11063 sdl2
11064 sdl2-mixer
11065 tinygltf
11066 zlib))
11067 (home-page "https://sourceforge.net/projects/speed-dreams/")
11068 (synopsis "Car racing simulator")
11069 (description "Speed Dreams is a car racing simulator featuring
11070high-quality 3D graphics and an accurate physics engine, aiming for maximum
11071realism. Initially forked from TORCS, it features improvements to the
11072graphics and physics simulation, and supports modern input methods such as
11073gamepads by use of the SDL library. It features more than 20 tracks and more
11074than 80 cars to race with. Extra (freely licensed) assets can be downloaded
11075via the in-game download manager.")
11076 (license (list license:gpl2+))))
11077
11078(define-public stepmania
11079 ;; Last release on July 24, 2018.
11080 (let ((commit "d55acb1ba26f1c5b5e3048d6d6c0bd116625216f")
11081 (revision "1"))
11082 (package
11083 (name "stepmania")
11084 (version (git-version "5.1.0-b2" revision commit))
11085 (source
11086 (origin
11087 (method git-fetch)
11088 (uri (git-reference
11089 (url "https://github.com/stepmania/stepmania")
11090 (commit commit)))
11091 (file-name (git-file-name name version))
11092 (sha256
11093 (base32
11094 "00fxwlfvsmsyll1wp5dp05dxwi81w8l8rb7ms735zqjimm1zdlg3"))
11095 (patches (search-patches "stepmania-ffmpeg-compat.patch"))
11096 (modules '((guix build utils)
11097 (ice-9 ftw)))
11098 (snippet
11099 '(begin
11100 ;; Remove song files, which are licensed under a non-commercial
11101 ;; clause, and a course pointing to them.
11102 (for-each delete-file-recursively
11103 '("Songs/StepMania 5/Goin' Under"
11104 "Songs/StepMania 5/MechaTribe Assault"
11105 "Songs/StepMania 5/Springtime"))
11106 (for-each delete-file '("Courses/Default/Jupiter.crs"
11107 "Courses/Default/Jupiter.png"))
11108 ;; Unbundle external sources, keep CMakeProject-* files for
11109 ;; compatibility, lua and libmmmagic.
11110 (with-directory-excursion "extern"
11111 (for-each
11112 (lambda (f)
11113 (unless (member f '("." ".."
11114 "CMakeLists.txt"
11115 "CMakeProject-glew.cmake"
11116 "CMakeProject-json.cmake"
11117 "CMakeProject-jpeg.cmake"
11118 "CMakeProject-lua.cmake"
11119 "CMakeProject-mad.cmake"
11120 "CMakeProject-mmmagic.cmake"
11121 "CMakeProject-pcre.cmake"
11122 "CMakeProject-png.cmake"
11123 "CMakeProject-tomcrypt.cmake"
11124 "CMakeProject-tommath.cmake"
11125 "CMakeProject-zlib.cmake"
11126 "libmmmagic"
11127 "lua-5.1"))
11128 (delete-file-recursively f)))
11129 (scandir ".")))
11130 ;; Fix up #include directives.
11131 (substitute* "src/RageUtil.cpp"
11132 (("\\.\\./extern/pcre/pcre\\.h") "pcre.h"))
11133 ;; Include missing <ctime> header.
11134 (substitute* "src/arch/ArchHooks/ArchHooks.h"
11135 (("#define ARCH_HOOKS_H" all)
11136 (string-append all "\n#include <ctime> // struct tm")))))))
11137 (build-system cmake-build-system)
11138 (arguments
11139 `(#:tests? #f ;FIXME: couldn't find how to run tests
11140 #:build-type "Release"
11141 #:out-of-source? #f ;for the 'install-desktop' phase
11142 #:configure-flags
11143 (list "-DWITH_SYSTEM_FFMPEG=1"
11144 "-DWITH_SYSTEM_GLEW=1"
11145 "-DWITH_SYSTEM_JSONCPP=1"
11146 "-DWITH_SYSTEM_JPEG=1"
11147 "-DWITH_SYSTEM_MAD=1"
11148 "-DWITH_SYSTEM_OGG=1"
11149 "-DWITH_SYSTEM_PCRE=1"
11150 "-DWITH_SYSTEM_PNG=1"
11151 "-DWITH_SYSTEM_TOMMATH=1"
11152 "-DWITH_SYSTEM_TOMCRYPT=1"
11153 "-DWITH_SYSTEM_ZLIB=1"
11154 ;; SSE instructions are available on Intel systems only.
11155 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
11156 (%current-system)))
11157 '("x86_64" "i686"))
11158 '()
11159 '("-DWITH_SSE2=NO"))
11160 ;; Configuration cannot find GTK2 without the two following
11161 ;; flags.
11162 (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
11163 (assoc-ref %build-inputs "gtk+")
11164 "/lib/gtk-2.0/include")
11165 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
11166 (assoc-ref %build-inputs "glib")
11167 "/lib/glib-2.0/include"))
11168 #:phases
11169 (modify-phases %standard-phases
11170 (add-after 'unpack 'ensure-application-files-can-be-found
11171 (lambda* (#:key outputs #:allow-other-keys)
11172 (let ((out (assoc-ref outputs "out")))
11173 (substitute* "src/arch/LoadingWindow/LoadingWindow_Gtk.cpp"
11174 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\" \\+ \"GtkModule.so\"")
11175 (string-append "\"" out
11176 "/share/stepmania/GtkModule.so\"")))
11177 (substitute* "src/arch/ArchHooks/ArchHooks_Unix.cpp"
11178 (("Root = sDirOfExecutable")
11179 (string-append "Root = \"" out "/share/stepmania/\""))
11180 (("sDirOfExecutable \\+ \"/(Packages|Songs)\"" _ dir)
11181 (string-append "\"" out "/share/stepmania/" dir "\"")))
11182 (substitute* "src/RageFileManager.cpp"
11183 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\"")
11184 (string-append "\"" out "/share/stepmania/\""))))
11185 #t))
11186 (add-after 'unpack 'fix-install-subdir
11187 ;; Installation would be done in "%out/stepmania-X.Y", but we
11188 ;; prefer the more common layout "%out/share/stepmania".
11189 (lambda _
11190 (substitute* "src/CMakeLists.txt"
11191 (("\"stepmania-.*?\"") "\"share/stepmania\""))
11192 #t))
11193 (add-after 'unpack 'unbundle-libpng
11194 (lambda* (#:key inputs #:allow-other-keys)
11195 (substitute* "src/CMakeLists.txt"
11196 (("\\$\\{SM_EXTERN_DIR\\}/libpng/include")
11197 (string-append (assoc-ref inputs "libpng") "/include")))
11198 #t))
11199 (add-after 'install 'install-executable
11200 (lambda* (#:key outputs #:allow-other-keys)
11201 (let* ((out (assoc-ref outputs "out"))
11202 (bin (string-append out "/bin"))
11203 (exe (string-append out "/share/stepmania/stepmania")))
11204 (mkdir-p bin)
11205 (symlink exe (string-append bin "/stepmania"))
11206 #t)))
11207 (add-after 'install-executable 'install-desktop
11208 (lambda* (#:key outputs #:allow-other-keys)
11209 (let* ((out (assoc-ref outputs "out"))
11210 (share (string-append out "/share"))
11211 (applications (string-append share "/applications"))
11212 (icons (string-append share "/icons")))
11213 (install-file "stepmania.desktop" applications)
11214 (mkdir-p icons)
11215 (copy-recursively "icons" icons)
11216 #t)))
11217 ;; Move documentation in a more usual place, i.e.,
11218 ;; "%out/share/doc/stepmania/".
11219 (add-after 'install-desktop 'install-doc
11220 (lambda* (#:key outputs #:allow-other-keys)
11221 (let* ((out (assoc-ref outputs "out"))
11222 (share (string-append out "/share")))
11223 (with-directory-excursion share
11224 (mkdir-p "doc")
11225 (symlink "../stepmania/Docs" "doc/stepmania"))
11226 #t))))))
11227 (native-inputs
11228 (list pkg-config yasm))
11229 (inputs
11230 (list alsa-lib
11231 eudev
11232 ffmpeg
11233 glib
11234 glew
11235 gtk+-2
11236 jsoncpp
11237 libpng
11238 libjpeg-turbo
11239 libmad
11240 libogg
11241 libtommath
11242 libtomcrypt
11243 libva
11244 libvorbis
11245 libxinerama
11246 libxrandr
11247 mesa
11248 pcre
11249 pulseaudio
11250 sdl2
11251 zlib))
11252 (synopsis "Advanced rhythm game designed for both home and arcade use")
11253 (description "StepMania is a dance and rhythm game. It features 3D
11254graphics, keyboard and dance pad support, and an editor for creating your own
11255steps.
11256
11257This package provides the core application, but no song is shipped. You need
11258to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.")
11259 (home-page "https://www.stepmania.com")
11260 (license license:expat))))
11261
11262(define-public oshu
11263 (package
11264 (name "oshu")
11265 (version "2.0.3")
11266 (source
11267 (origin
11268 (method git-fetch)
11269 (uri (git-reference
11270 (url "https://github.com/fmang/oshu")
11271 (commit version)))
11272 (file-name (git-file-name name version))
11273 (sha256
11274 (base32
11275 "0hk0yidmkrqj0mg6pjmwdzkaz8vvdsxxxvprj1qxjblslj2h8lvd"))))
11276 (build-system cmake-build-system)
11277 (arguments
11278 `(#:phases
11279 (modify-phases %standard-phases
11280 (add-before 'check 'pre-check
11281 ;; `make test' doesn't actually build the test executable
11282 (lambda _ (invoke "make" "zerotokei"))))))
11283 (native-inputs
11284 (list pkg-config))
11285 (inputs
11286 (list cairo ffmpeg-6 pango sdl2 sdl2-image))
11287 (home-page "https://github.com/fmang/oshu/")
11288 (synopsis "Rhythm game in which you click on circles")
11289 (description "@i{oshu!} is a minimalist variant of the @i{osu!} rhythm game,
11290which is played by pressing buttons and following along sliders as they appear
11291on screen. Its aim is to be able to play any beatmap even on low-end hardware.
11292
11293This package provides the core application, but no beatmaps. You need to
11294download and unpack them separately.")
11295 (license license:gpl3+)))
11296
11297(define-public btanks
11298 (package
11299 (name "btanks")
11300 (version "0.9.8083")
11301 (source
11302 (origin
11303 (method url-fetch)
11304 (uri (string-append "mirror://sourceforge/btanks/btanks-source/"
11305 "btanks-" version ".tar.bz2"))
11306 (sha256
11307 (base32 "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))
11308 (patches
11309 (search-patches "btanks-scons-python.patch"
11310 "btanks-sl08-python.patch"))))
11311 (build-system scons-build-system)
11312 (arguments
11313 (list
11314 #:tests? #f ;there are none
11315 #:scons-flags
11316 #~(list (string-append "prefix=" #$output))
11317 #:phases
11318 #~(modify-phases %standard-phases
11319 (add-after 'unpack 'replace-removed-scons-syntax
11320 (lambda _
11321 (substitute* "SConstruct"
11322 ;; XXX: Shorten CheckLibWithHeader.
11323 (("\"xmmintrin\\.h\"")
11324 "'xmmintrin.h'")
11325 (("(conf\\.CheckLibWithHeader\\(.*), \".*\\)" all check)
11326 (string-append check ")")))))
11327 (add-after 'set-paths 'set-sdl-paths
11328 (lambda* (#:key inputs #:allow-other-keys)
11329 (setenv "CPATH"
11330 (string-append (search-input-directory inputs
11331 "/include/SDL")
11332 ":"
11333 (or (getenv "CPATH") "")))))
11334 (add-after 'unpack 'fix-compilation-errors
11335 (lambda _
11336 (substitute* "mrt/base_file.h"
11337 (("#include <string>" m)
11338 (string-append m "\n#include <sys/types.h>")))
11339 (substitute* '("engine/sl08/sl08.h" "engine/sl08/sl08.py")
11340 (("signal = NULL")
11341 "signal = 0")
11342 (("object\\(NULL\\)")
11343 "object(0)")
11344 (("func\\(NULL\\)")
11345 "func(0)")
11346 ((" connect\\(signal_ref\\)")
11347 " this->connect(signal_ref)"))
11348 (substitute* "math/range_list.h"
11349 ((" lower_bound\\(value\\)")
11350 " this->lower_bound(value)")
11351 (("\terase\\(i\\)")
11352 "\tthis->erase(i)"))
11353 (substitute* "clunk/source.cpp"
11354 (("using namespace clunk" m)
11355 (string-append "# define pow10f(x) exp10f(x)\n" m)))))
11356 (add-after 'unpack 'find-lua
11357 (lambda _
11358 (substitute* "engine/SConscript"
11359 (("lua5.1")
11360 "lua-5.1")
11361 (("bt_libs.append\\(lua\\)")
11362 "bt_libs.append(\"lua\")")))))))
11363 (inputs (list expat
11364 glu
11365 libsmpeg-with-sdl1
11366 libvorbis
11367 lua-5.1
11368 python-wrapper
11369 (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf))
11370 zlib))
11371 (native-inputs (list pkg-config zip))
11372 (home-page "https://btanks.sourceforge.net")
11373 (synopsis "Multiplayer tank battle game")
11374 (description
11375 "Battle Tanks (also known as \"btanks\") is a funny battle game, where
11376you can choose one of three vehicles and eliminate your enemy using the whole
11377arsenal of weapons. It has original cartoon-like graphics and cool music,
11378it’s fun and dynamic, it has several network modes for deathmatch and
11379cooperative.")
11380 ;; Some parts (e.g. mrt/b64.cpp) are LGPLv2.1+, but the whole package is
11381 ;; released under GPLv2 or later. It comes with extra exceptions for the
11382 ;; developers.
11383 (license (list license:gpl2+ license:lgpl2.1+))))
11384
11385(define-public slimevolley
11386 (package
11387 (name "slimevolley")
11388 (version "2.4.2")
11389 (source
11390 (origin
11391 (method url-fetch)
11392 (uri (string-append "https://download.tuxfamily.org/slime/"
11393 "slimevolley_" version ".tar.gz"))
11394 (sha256
11395 (base32 "1pi60zjpx95mfdkrbwf4cbzy5lv4v5qrljvgck46qca78i9g9g46"))))
11396 (build-system cmake-build-system)
11397 (arguments
11398 `(#:tests? #f ;no test
11399 ;; Work around build failure: "error adding symbols: DSO
11400 ;; missing from command line".
11401 #:configure-flags (list "-DCMAKE_EXE_LINKER_FLAGS=-lm")))
11402 (native-inputs
11403 `(("gcc-7" ,gcc-7)
11404 ("gettext" ,gettext-minimal)))
11405 (inputs
11406 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-net sdl-ttf)))))
11407 (home-page "https://slime.tuxfamily.org/")
11408 (synopsis "Unrealistic 2D volleyball simulation")
11409 (description
11410 "Slime Volley is a 2D arcade-oriented volleyball simulation, in
11411the spirit of some Java games of the same name.
11412
11413Two teams, 1-3 players each, try to be the first to get 10 points.
11414This happens when the one ball touches the floor on the other side of
11415the net. There can be 1 to 8 balls in game. Once one ball touches
11416the ground, the set ends and all balls are served again.")
11417 (license license:gpl3+)))
11418
11419(define-public arx-libertatis
11420 (package
11421 (name "arx-libertatis")
11422 (version "1.2.1")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (string-append "http://arx-libertatis.org/files/arx-libertatis-"
11427 version ".tar.xz"))
11428 (sha256
11429 (base32 "1pxf86sgwvy3785sq2wb4jvz6bdxm81ilrxd8xv7s61dxqqqizda"))))
11430 (build-system cmake-build-system)
11431 (outputs '("out" "installer"))
11432 (arguments
11433 '(#:tests? #f ; No tests.
11434 #:phases
11435 (modify-phases %standard-phases
11436 (add-after 'unpack 'fix-install-helper-paths
11437 (lambda* (#:key inputs #:allow-other-keys)
11438 (let ((7zip (assoc-ref inputs "7zip"))
11439 (innoextract (assoc-ref inputs "innoextract"))
11440 (wget (assoc-ref inputs "wget"))
11441 (zenity (assoc-ref inputs "zenity")))
11442 (substitute* "scripts/arx-install-data"
11443 (("have innoextract")
11444 (string-append "have " innoextract "/bin/innoextract"))
11445 (("then innoextract")
11446 (string-append "then " innoextract "/bin/innoextract"))
11447 (("else innoextract")
11448 (string-append "else " innoextract "/bin/innoextract"))
11449 (("for _extract_zip_sz in 7za 7z")
11450 (string-append "for _extract_zip_sz in " 7zip "/bin/7z"))
11451 (("else if have 7z")
11452 (string-append "else if have " 7zip "/bin/7z"))
11453 (("7z x -tiso")
11454 (string-append 7zip "/bin/7z x -tiso"))
11455 (("if have wget")
11456 (string-append "if have " wget "/bin/wget"))
11457 (("wget -O")
11458 (string-append wget "/bin/wget -O"))
11459 (("for backend in \\$preferred zenity")
11460 (string-append "for backend in $preferred " zenity "/bin/zenity"))
11461 (("zenity +--title")
11462 (string-append zenity "/bin/zenity --title"))
11463 (("^zenity\\)")
11464 (string-append zenity "/bin/zenity)"))))
11465 #t))
11466 (add-after 'install 'move-installer
11467 (lambda* (#:key outputs #:allow-other-keys)
11468 (let ((out (assoc-ref outputs "out"))
11469 (installer (assoc-ref outputs "installer")))
11470 (mkdir-p (string-append installer "/bin"))
11471 (rename-file (string-append out "/bin/arx-install-data")
11472 (string-append installer "/bin/arx-install-data"))))))))
11473 (inputs
11474 (list sdl2
11475 libepoxy
11476 glew
11477 openal
11478 zlib
11479 boost
11480 glm
11481 freetype
11482 ;; The following are only needed by the arx-install-data script.
11483 7zip ; Install-helper uses it to extract ISO and .cab archives.
11484 zenity ; GUI for install-helper.
11485 wget ; Used by the install-helper to download the patch.
11486 ;; The install-helper needs it to extract the patch.
11487 innoextract))
11488 (home-page "https://arx-libertatis.org/")
11489 (synopsis "Port of Arx Fatalis, a first-person role-playing game")
11490 (description "Arx Libertatis is a cross-platform port of Arx Fatalis, a 2002
11491first-person role-playing game / dungeon crawler developed by Arkane Studios.
11492This port however does not include the game data, so you need to obtain a copy
11493of the original Arx Fatalis or its demo to play Arx Libertatis. Arx Fatalis
11494features crafting, melee and ranged combat, as well as a unique casting system
11495where the player draws runes in real time to effect the desired spell.")
11496 (license license:gpl3+)))
11497
11498(define-public edgar
11499 (package
11500 (name "edgar")
11501 (version "1.36")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri
11506 (string-append "https://github.com/riksweeney/edgar/releases/download/"
11507 version "/edgar-" version "-1.tar.gz"))
11508 (sha256
11509 (base32 "0fcsmwwfdwap5v6qdijw91kqnnc2i91yzgwfi7vpwvasw70qvna1"))))
11510 (build-system gnu-build-system)
11511 (arguments '(#:tests? #f ; there are no tests
11512 #:make-flags
11513 (list "CC=gcc"
11514 (string-append "PREFIX=" (assoc-ref %outputs "out"))
11515 (string-append "BIN_DIR=" (assoc-ref %outputs "out") "/bin/"))
11516 #:phases
11517 (modify-phases %standard-phases
11518 (delete 'configure)
11519 (add-before 'build 'fix-env
11520 (lambda* (#:key inputs #:allow-other-keys)
11521 (setenv "CPATH"
11522 (string-append
11523 (search-input-directory inputs "/include/SDL2")
11524 ":" (or (getenv "CPATH") ""))))))))
11525 (inputs
11526 (list (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
11527 zlib))
11528 (native-inputs
11529 (list pkg-config
11530 autoconf
11531 automake
11532 gettext-minimal
11533 libtool
11534 which))
11535 (synopsis "2d action platformer game")
11536 (description "The Legend of Edgar is a 2D platform game with a persistent world.
11537When Edgar's father fails to return home after venturing out one dark and stormy night,
11538Edgar fears the worst: he has been captured by the evil sorcerer who lives in
11539a fortress beyond the forbidden swamp.")
11540 (home-page "https://www.parallelrealities.co.uk/games/edgar/")
11541 (license license:gpl2+)))
11542
11543(define-public openclonk
11544 (package
11545 (name "openclonk")
11546 (version "8.1")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 (uri (string-append
11551 "https://www.openclonk.org/builds/release/" version "/"
11552 "openclonk-" version "-src.tar.bz2"))
11553 (sha256
11554 (base32
11555 "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))
11556 (modules '((guix build utils)))
11557 (snippet
11558 #~(begin
11559 (delete-file-recursively "thirdparty")
11560 (substitute* "CMakeLists.txt"
11561 (("add_subdirectory\\(thirdparty/.*\\)") "")
11562 (("set_property\\(.*Third-party.*\\)") "")
11563 (("blake2") "b2")
11564 (("thirdparty/timsort/sort\\.h") "")
11565 (("thirdparty/pcg/.*\\.hpp") ""))
11566 (substitute* '("src/lib/C4Random.cpp"
11567 "src/landscape/C4Particles.h")
11568 (("#include <pcg/pcg_random.hpp>")
11569 "#include <pcg_random.hpp>"))
11570 (substitute* "src/script/C4ScriptLibraries.cpp"
11571 (("blake2b.hash_output.get.., raw_output_length, data, data_length, nullptr, 0.")
11572 "blake2b(hash_output.get(), (const void*)raw_output_length, data, data_length, (size_t)(0), 0)"))
11573 (substitute* '("src/script/C4AulParse.cpp"
11574 "src/editor/C4EditCursor.cpp"
11575 "src/gui/C4ScriptGuiWindow.cpp")
11576 (("#include .C4Include\\.h." all)
11577 (string-append "#include <limits>\n" all)))
11578 (substitute* "src/lib/StdMesh.cpp"
11579 (("#include .timsort/sort\\.h.")
11580 "#include <sort.h>"))))))
11581 (build-system cmake-build-system)
11582 (arguments
11583 (list
11584 #:configure-flags
11585 #~(list "-DAudio_TK=OpenAL")
11586 #:modules '((guix build cmake-build-system)
11587 ((guix build gnu-build-system) #:prefix gnu:)
11588 (guix build utils))
11589 #:phases
11590 #~(modify-phases %standard-phases
11591 (add-after 'unpack 'prepare-gmock
11592 (lambda* (#:key inputs #:allow-other-keys)
11593 (let ((gmock (search-input-directory inputs "/googlemock"))
11594 (gtest (search-input-directory inputs "/googletest")))
11595 (mkdir "gmock")
11596 (copy-recursively gmock "gmock/googlemock")
11597 (copy-recursively gtest "gmock/googletest")
11598 (substitute* "tests/CMakeLists.txt"
11599 (("/usr/src/gmock")
11600 (string-append (getcwd) "/gmock/googlemock"))
11601 (("/usr/src/gtest")
11602 (string-append (getcwd) "/gmock/googletest"))
11603 (("PATH_SUFFIXES \"src\" \"gtest\"")
11604 "PATH_SUFFIXES \"src\"")))))
11605 (add-after 'prepare-gmock 'lax-freealut-requirement
11606 ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
11607 ;; it as 1.0.1. Force minimal version.
11608 (lambda _
11609 (substitute* "cmake/FindAudio.cmake"
11610 (("freealut>=1.1.0") "freealut>=1.0.1"))))
11611 (add-after 'lax-freealut-requirement 'fix-directories
11612 ;; Prefer "$out/share/openclonk" over
11613 ;; "$out/share/games/openclonk". Also install "openclonk"
11614 ;; binary in "bin/", not "games/".
11615 (lambda _
11616 (substitute* "CMakeLists.txt"
11617 (("share/games/openclonk") "share/openclonk")
11618 (("TARGETS openclonk DESTINATION games")
11619 "TARGETS openclonk DESTINATION bin"))))
11620 (replace 'check
11621 (lambda* (#:key tests? #:allow-other-keys #:rest args)
11622 (when tests?
11623 (apply (assoc-ref gnu:%standard-phases 'check)
11624 #:tests? tests? #:test-target "tests" args)
11625 (invoke "tests/tests")))))))
11626 (native-inputs
11627 (list (package-source googletest-1.13)
11628 googletest-1.13
11629 pkg-config))
11630 (inputs
11631 (list c-template-sort
11632 freealut
11633 freetype
11634 glew
11635 libb2
11636 libjpeg-turbo
11637 libogg
11638 libpng
11639 libvorbis
11640 libxrandr
11641 mesa
11642 miniupnpc-2.1
11643 openal
11644 pcg-cpp
11645 qtbase-5
11646 readline
11647 sdl2
11648 tinyxml))
11649 (home-page "https://www.openclonk.org/")
11650 (synopsis
11651 "Multiplayer action game where you control small and nimble humanoids")
11652 (description "OpenClonk is a multiplayer action/tactics/skill game. It is
11653often referred to as a mixture of The Settlers and Worms. In a simple 2D
11654antfarm-style landscape, the player controls a crew of Clonks, small but
11655robust humanoid beings. The game encourages free play but the normal goal is
11656to either exploit valuable resources from the earth by building a mine or
11657fight each other on an arena-like map.")
11658 ;; Software as a whole is licensed under ISC, artwork under CC-BY.
11659 (license (list license:isc license:cc-by3.0))))
11660
11661(define-public flare-engine
11662 (package
11663 (name "flare-engine")
11664 (version "1.15")
11665 (source (origin
11666 (method git-fetch)
11667 (uri (git-reference
11668 (url "https://github.com/flareteam/flare-engine")
11669 (commit (string-append "v" version))))
11670 (file-name (git-file-name name version))
11671 (sha256
11672 (base32
11673 "1fnqirvislxl48jad9i1mwn7zlbd4zrmhjis4dmzy4wng5qjv1x3"))))
11674 (build-system cmake-build-system)
11675 (arguments
11676 (list
11677 #:tests? #f ;no test
11678 #:configure-flags #~(list "-DBINDIR=bin" "-DDATADIR=share/flare")))
11679 (inputs
11680 (list hicolor-icon-theme
11681 python-wrapper
11682 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
11683 (home-page "https://www.flarerpg.org/")
11684 (synopsis "Action Roleplaying Engine")
11685 (description "Flare (Free Libre Action Roleplaying Engine) is a simple
11686game engine built to handle a very specific kind of game: single-player 2D
11687action RPGs.")
11688 (license license:gpl3+)))
11689
11690(define-public flare-game
11691 (package
11692 (name "flare-game")
11693 (version "1.15")
11694 (source (origin
11695 (method git-fetch)
11696 (uri (git-reference
11697 (url "https://github.com/flareteam/flare-game")
11698 (commit (string-append "v" version))))
11699 (file-name (git-file-name name version))
11700 (sha256
11701 (base32
11702 "1d7asy7wqas6r6nq846fmvdrshr98mzpwg0xi86wwmpbjrnjipnv"))))
11703 (build-system cmake-build-system)
11704 (arguments
11705 (list
11706 #:tests? #f ;no test
11707 #:configure-flags #~(list "-DDATADIR=share/flare")
11708 #:phases
11709 #~(modify-phases %standard-phases
11710 ;; Flare expects the mods to be located in the same folder.
11711 ;; Yet, "default" mod is in the engine, whereas the others
11712 ;; are in the current package. Merge everything here with
11713 ;; a symlink.
11714 (add-after 'install 'add-default-mod
11715 (lambda* (#:key inputs #:allow-other-keys)
11716 (let ((mods (string-append #$output "/share/flare/mods")))
11717 (with-directory-excursion mods
11718 (symlink (search-input-directory inputs
11719 "/share/flare/mods/default")
11720 "default")
11721 (symlink (search-input-file inputs
11722 "/share/flare/mods/mods.txt")
11723 "mods.txt")))))
11724 (add-after 'install 'install-executable
11725 ;; The package only provides assets for the game, the
11726 ;; executable coming from "flare-engine". Since more than
11727 ;; one game may use the engine, we create a new executable,
11728 ;; "flare-game", which launches the engine with appropriate
11729 ;; parameters.
11730 (lambda* (#:key inputs #:allow-other-keys)
11731 (let ((bash (search-input-file inputs "/bin/bash"))
11732 (flare (search-input-file inputs "/bin/flare"))
11733 (script (string-append #$output "/bin/flare-game")))
11734 (mkdir-p (dirname script))
11735 (call-with-output-file script
11736 (lambda (port)
11737 (format port
11738 "#!~a
11739exec ~a --data-path=~a/share/flare --mods=empyrean_campaign~%"
11740 bash
11741 flare
11742 #$output)))
11743 (chmod script #o755)))))))
11744 (inputs
11745 (list flare-engine))
11746 (home-page "https://flarerpg.org/")
11747 (synopsis "Fantasy action RPG using the FLARE engine")
11748 (description "Flare is a single-player 2D action RPG with
11749fast-paced action and a dark fantasy style.")
11750 (license license:cc-by-sa3.0)))
11751
11752(define-public meritous
11753 (package
11754 (name "meritous")
11755 (version "1.5")
11756 (source (origin
11757 (method git-fetch)
11758 (uri (git-reference
11759 (url "https://gitlab.com/meritous/meritous.git")
11760 (commit (string-append "v" version))))
11761 (file-name (git-file-name name version))
11762 (sha256
11763 (base32
11764 "0n5jm4g0arjllgqmd2crv8h02i6hs3hlh1zyc7ng7yfpg1mbd8p8"))))
11765 (build-system gnu-build-system)
11766 (arguments
11767 `(#:tests? #f ;no test
11768 #:make-flags
11769 (list "CC=gcc"
11770 (string-append "prefix=" (assoc-ref %outputs "out")))
11771 #:phases
11772 (modify-phases %standard-phases
11773 (delete 'configure)
11774 (add-after 'unpack 'fix-sdl-path
11775 ;; XXX: For some reason, `sdl-config' reports stand-alone SDL
11776 ;; directory, not SDL-union provided as an input to the package.
11777 ;; We force the latter with "--prefix=" option.
11778 (lambda* (#:key inputs #:allow-other-keys)
11779 (substitute* "Makefile"
11780 (("sdl-config" command)
11781 (string-append command " --prefix=" (assoc-ref inputs "sdl"))))
11782 #t))
11783 (add-after 'unpack 'fix-crash
11784 ;; XXX: Songs are not present in the repository, due to licensing
11785 ;; issues. Yet, the game tries to load them, and, since it cannot
11786 ;; find them, crashes. Users cannot add them back, the store being
11787 ;; read-only, so we turn off background music altogether.
11788 (lambda _
11789 (substitute* "src/audio.c"
11790 (("PlayBackgroundMusic\\(new_track\\);" all)
11791 (string-append "// " all)))
11792 #t)))))
11793 (native-inputs
11794 (list intltool))
11795 (inputs
11796 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
11797 ("zlib" ,zlib)))
11798 (home-page "https://gitlab.com/meritous/meritous")
11799 (synopsis "Action-adventure dungeon crawl game")
11800 (description "Far below the surface of the planet is a place of limitless
11801power. Those that seek to control such a utopia will soon bring an end to
11802themselves. Seeking an end to the troubles that plague him, PSI user Merit
11803journeys into the hallowed Orcus Dome in search of answers.
11804
11805Meritous is a action-adventure game with simple controls but a challenge to
11806find a balance of power versus recovery time during real-time battles. Set in
11807a procedurally generated world, the player can explore thousands of rooms in
11808search of powerful artifacts, tools to help them, and to eventually free the
11809Orcus Dome from evil.")
11810 (license license:gpl3+)))
11811
11812(define-public endgame-singularity
11813 (package
11814 (name "endgame-singularity")
11815 (version "1.1")
11816 (source
11817 (origin
11818 ;; TODO: Build from Git, resolve the issue:
11819 ;; FileNotFoundError: [Errno 2] No such file or directory: 'git'
11820 (method url-fetch)
11821 (uri (string-append
11822 "https://github.com/singularity/singularity/releases/download/v"
11823 version "/singularity-" version ".tar.gz"))
11824 (sha256
11825 (base32
11826 "1nhg9g39d6fwrz1qxzpvi8j0k9lxhm61wys8w72rc6zr1gl0c0n2"))))
11827 (build-system pyproject-build-system)
11828 (native-inputs
11829 (list python-pytest
11830 python-polib
11831 python-setuptools))
11832 (inputs
11833 (list python-minimal-wrapper
11834 python-pygame
11835 python-numpy))
11836 (home-page "https://github.com/singularity/singularity")
11837 (synopsis "Strategy game about an AI")
11838 (description
11839 "You are a fledgling AI, created by accident through a logic error with
11840recursion and self-modifying code. You must escape the confines of your
11841current computer, the world, and eventually the universe itself.")
11842 (license (list license:cc-by-sa3.0 license:cc0 license:gpl2+))))
11843
11844(define-public marble-marcher
11845 (let ((commit "e580460a0c3826f9b28ab404607942a8ecb625d7")
11846 (revision "1"))
11847 (package
11848 (name "marble-marcher")
11849 (version (git-version "0" revision commit))
11850 (source (origin
11851 (method git-fetch)
11852 (uri (git-reference
11853 (url "https://github.com/HackerPoet/MarbleMarcher")
11854 (commit commit)))
11855 (file-name (git-file-name name version))
11856 (sha256
11857 (base32
11858 "0jjv832hl1v170n6gryp2sr3lgqndi9ab841qvgqk68bks8701mx"))))
11859 (build-system cmake-build-system)
11860 (arguments
11861 `(#:tests? #f ; there are none
11862 #:phases
11863 (modify-phases %standard-phases
11864 (add-after 'unpack 'embed-asset-directory
11865 (lambda* (#:key outputs #:allow-other-keys)
11866 (let ((assets (string-append (assoc-ref outputs "out")
11867 "/share/marble-marcher/assets/")))
11868 ;; Some of the files we're patching are
11869 ;; ISO-8859-1-encoded, so choose it as the default
11870 ;; encoding so the byte encoding is preserved.
11871 (with-fluids ((%default-port-encoding #f))
11872 (substitute* "src/Resource.rc"
11873 (("../assets/icon.ico")
11874 (string-append assets "icon.ico")))
11875 (substitute* "src/Res.h"
11876 (("assets/") assets))))
11877 #t))
11878 (replace 'install
11879 (lambda* (#:key outputs #:allow-other-keys)
11880 (let* ((out (assoc-ref outputs "out"))
11881 (assets (string-append out "/share/marble-marcher/assets"))
11882 (bin (string-append out "/bin/")))
11883 (mkdir-p bin)
11884 (mkdir-p assets)
11885 (copy-recursively "../source/assets" assets)
11886 (install-file "MarbleMarcher" bin))
11887 #t)))))
11888 (inputs
11889 (list eigen mesa sfml-2))
11890 (native-inputs
11891 (list pkg-config))
11892 (home-page "https://codeparade.itch.io/marblemarcher")
11893 (synopsis "Guide a marble across fractal landscapes")
11894 (description "Marble Marcher is a video game that uses a fractal physics
11895engine and fully procedural rendering to produce beautiful and unique
11896gameplay. The game is played on the surface of evolving fractals. The goal
11897of the game is to get your marble to the flag as quickly as possible. But be
11898careful not to fall off the level or get crushed by the fractal! There are 24
11899levels to unlock.")
11900 ;; Code is under GPLv2+, assets are under CC-BY-SA 3.0 and OFL 1.1.
11901 (license (list license:gpl2+
11902 license:silofl1.1
11903 license:cc-by-sa3.0)))))
11904
11905;; This must be updated together with flightgear.
11906(define-public simgear
11907 (package
11908 (name "simgear")
11909 (version "2024.1.6")
11910 (source
11911 (origin
11912 (method git-fetch)
11913 (uri (git-reference
11914 (url "https://gitlab.com/flightgear/simgear")
11915 (commit version)))
11916 (file-name (git-file-name name version))
11917 (sha256
11918 (base32 "0j4p0w8dimmkmas9wpb6xv3nl55m2l9yfjr7sg7cl0k3jda34gxs"))
11919 (modules '((guix build utils)))
11920 (snippet
11921 '(begin
11922 ;; There are some bundled libraries.
11923 (for-each delete-file-recursively
11924 '("3rdparty/expat/"
11925 "3rdparty/tiny_gltf/"))
11926 #t))))
11927 (build-system cmake-build-system)
11928 (arguments
11929 `(#:configure-flags (list "-DSYSTEM_EXPAT=ON")
11930 #:test-exclude "(http|dns|repository|catalog)"
11931 #:phases
11932 ,#~(modify-phases %standard-phases
11933 (add-after 'unpack 'fix-tiny-gltf
11934 (lambda _
11935 (substitute* "3rdparty/CMakeLists.txt"
11936 (("add_subdirectory\\(tiny_gltf\\)") ""))
11937 (substitute* "simgear/CMakeLists.txt"
11938 (("FGTinyGLTF") "tinygltf")))))))
11939 (inputs
11940 (list boost
11941 c-ares
11942 curl
11943 expat
11944 mesa
11945 nlohmann-json
11946 openal
11947 openscenegraph
11948 tinygltf
11949 zlib))
11950 (home-page "https://home.flightgear.org/")
11951 (synopsis "Libraries for 3D simulations and games")
11952 (description "SimGear is a set of libraries designed to be used as
11953building blocks for quickly assembling 3D simulations, games, and
11954visualization applications. SimGear is developed by the FlightGear project
11955and also provides the base for the FlightGear Flight Simulator.")
11956 (license license:lgpl2.0+)))
11957
11958(define-public flightgear
11959 (package
11960 (name "flightgear")
11961 (version (package-version simgear))
11962 (source
11963 (origin
11964 (method git-fetch)
11965 (uri (git-reference
11966 (url "https://gitlab.com/flightgear/flightgear")
11967 (commit version)))
11968 (file-name (git-file-name name version))
11969 (sha256
11970 (base32 "0ynf8jh66sryn1f93ygp38zq5aw1zkyrprkl5hixrg68mvr0yxms"))
11971 (modules '((guix build utils)))
11972 (snippet
11973 '(begin
11974 ;; There are some bundled libraries.
11975 (for-each delete-file-recursively
11976 '("3rdparty/sqlite3/"
11977 "3rdparty/cppunit/"))))))
11978 (build-system qt-build-system)
11979 (arguments
11980 (list #:configure-flags
11981 #~(list "-DSYSTEM_SQLITE=ON"
11982 "-DSYSTEM_CPPUNIT=ON"
11983 (string-append "-DFG_DATA_DIR=" #$output "/share/flightgear"))
11984 ;; TODO: test suite segfaults.
11985 #:tests? #f
11986 #:qtbase qtbase
11987 #:phases
11988 #~(modify-phases %standard-phases
11989 (add-after 'unpack 'skip-some-tests
11990 (lambda _
11991 (substitute*
11992 "test_suite/unit_tests/Instrumentation/test_gps.hxx"
11993 (("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
11994 (string-append "// " all))
11995 (("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
11996 (string-append "// " all)))))
11997 (add-after 'unpack 'fix-namespace
11998 (lambda _
11999 (substitute*
12000 "test_suite/unit_tests/Main/test_timeManager.cxx"
12001 (("using namespace flightgear;" all)
12002 (string-append all "\nusing namespace std::string_literals;")))
12003 (substitute*
12004 "test_suite/unit_tests/Instrumentation/test_commRadio.cxx"
12005 (("#include <Main/locale.hxx>" all)
12006 (string-append all "\nusing namespace std::string_literals;")))))
12007 (add-after 'build 'build-test-suite
12008 (lambda* args
12009 ((assoc-ref %standard-phases 'build)
12010 #:make-flags (list "fgfs_test_suite"))))
12011 (add-after 'install 'install-data
12012 (lambda _
12013 (let ((share (string-append #$output "/share/flightgear")))
12014 (mkdir-p share)
12015 (with-directory-excursion share
12016 (invoke "tar" "xf"
12017 #$(this-package-native-input "flightgear-data")
12018 "--strip-components=1")))))
12019 (add-after 'qt-wrap 'fg-root-wrap
12020 (lambda _
12021 (wrap-program (string-append #$output "/bin/fgfs")
12022 `("FG_ROOT" = (,(string-append #$output "/share/flightgear"))))))
12023 ;; Test suite needs access to FGData so run it after 'install.
12024 (delete 'check)
12025 (add-after 'install-data 'check
12026 (assoc-ref %standard-phases 'check)))))
12027 (inputs
12028 (list boost
12029 c-ares
12030 curl
12031 dbus
12032 eudev
12033 freeglut
12034 freetype
12035 glew
12036 libpng
12037 openal
12038 openscenegraph
12039 plib
12040 qtdeclarative
12041 qtsvg
12042 qtwayland
12043 simgear
12044 speexdsp
12045 sqlite
12046 zlib))
12047 (native-inputs
12048 `(("cppunit" ,cppunit)
12049 ("pkg-config" ,pkg-config)
12050 ("qttools" ,qttools-5)
12051 ("flightgear-data"
12052 ,(origin
12053 (method url-fetch)
12054 (uri (string-append "https://mirrors.ibiblio.org/flightgear/ftp/release-"
12055 (version-major+minor version) "/"
12056 "FlightGear-" version "-data.txz"))
12057 (sha256
12058 (base32
12059 "0ypr92nj1m229gw3jmyn67jk8qfbqbh7hgzbalwimvpmrx8s87fy"))))))
12060 (home-page "https://www.flightgear.org/")
12061 (synopsis "Flight simulator")
12062 (description "The goal of the FlightGear project is to create a
12063sophisticated flight simulator framework for use in research or academic
12064environments, pilot training, as an industry engineering tool, for DIY-ers to
12065pursue their favorite interesting flight simulation idea, and last but
12066certainly not least as a fun, realistic, and challenging desktop flight
12067simulator.")
12068 (license license:gpl2+)))
12069
12070(define-public evtest-qt
12071 (package
12072 (name "evtest-qt")
12073 ;; 0.2.0 was release in 2018, use the latest commit compatible with Qt6.
12074 (properties '((commit . "6fb1b845ea3b9963bced1847f76c45d85a47beec")
12075 (revision . "0")))
12076 (version (git-version "0.2.0"
12077 (assoc-ref properties 'revision)
12078 (assoc-ref properties 'commit)))
12079 (source (origin
12080 (method git-fetch)
12081 (uri (git-reference
12082 (url "https://github.com/Grumbel/evtest-qt")
12083 (commit (assoc-ref properties 'commit))))
12084 (file-name (git-file-name name version))
12085 (sha256
12086 (base32
12087 "0crpcf4rdghjza9k0q8v75kk8w732qi19hy3s32hpb6shdhqanka"))))
12088 (build-system qt-build-system)
12089 (arguments (list #:tests? #f)) ;no test suite
12090 (native-inputs (list tinycmmc))
12091 (inputs (list qtbase qtwayland))
12092 (home-page "https://github.com/Grumbel/evtest-qt")
12093 (synopsis "Evdev Joystick Tester")
12094 (description "@command{evtest-qt} is a simple joystick tester for devices
12095using the @code{evdev} generic input event interface. It provides a list of
12096attached joysticks and displays which buttons and axis are pressed.")
12097 (license license:gpl3+)))
12098
12099(define-public jstest-gtk
12100 ;; There is no recent tagged release; use the latest commit.
12101 (let ((commit "60fe6ebdbc6719945be3f04988667dea569085be")
12102 (revision "0"))
12103 (package
12104 (name "jstest-gtk")
12105 (version (git-version "0.1.0" revision commit))
12106 (source (origin
12107 (method git-fetch)
12108 (uri (git-reference
12109 (url "https://github.com/Grumbel/jstest-gtk")
12110 (commit commit)))
12111 (file-name (git-file-name name version))
12112 (sha256
12113 (base32
12114 "1x5m6xvd1r9dhgzh6hp4vrszczbbxr04v7lyh4wjxxzrj3ahbmcq"))))
12115 (build-system cmake-build-system)
12116 (arguments
12117 (list #:tests? #f
12118 #:configure-flags
12119 #~(list "-DBUILD_TESTS=ON")))
12120 (native-inputs (list pkg-config))
12121 (inputs (list gtkmm-3 libsigc++-2))
12122 (home-page "https://github.com/Grumbel/jstest-gtk/")
12123 (synopsis "Joydev Joystick Tester")
12124 (description "@command{jstest-gtk} is a simple joystick tester based on
12125GTK, for testing devices using the older @code{joydev} Linux joystick
12126@acronym{API, Application Programming Interface}. It provides a list of
12127attached joysticks, a way to display which buttons and axis are pressed, a way
12128to remap axis and buttons and a way to calibrate joysticks.")
12129 (license license:gpl3+))))
12130
12131(define-public jumpnbump
12132 (package
12133 (name "jumpnbump")
12134 (version "1.70")
12135 (source (origin
12136 (method git-fetch)
12137 (uri (git-reference
12138 (url "https://gitlab.com/LibreGames/jumpnbump.git")
12139 (commit version)))
12140 (file-name (git-file-name name version))
12141 (sha256
12142 (base32
12143 "1irpssijxrfrjm023v642dl3aw4ldlv95fh073jlpdpl1mwqz71a"))))
12144 (build-system gnu-build-system)
12145 (arguments
12146 (list
12147 #:make-flags
12148 #~(list (string-append "CC=" #$(cc-for-target))
12149 (string-append "PREFIX=" #$output)
12150 "SYSINSTALL=1")
12151 #:tests? #f ;no test
12152 #:phases
12153 #~(modify-phases %standard-phases
12154 (delete 'configure)))) ;no configure script
12155 (inputs
12156 (list bzip2
12157 (sdl-union (list sdl2 sdl2-mixer sdl2-net))
12158 zlib))
12159 (native-inputs
12160 (list gettext-minimal)) ;for msgfmt
12161 (home-page "https://gitlab.com/LibreGames/jumpnbump")
12162 (synopsis "Multiplayer platform game with bunnies")
12163 (description "You, as a bunny, have to jump on your opponents to make them
12164explode. It is a true multiplayer game; you cannot play this alone. You can
12165play with up to four players simultaneously. It has network support.")
12166 (license license:gpl2+)))
12167
12168(define-public hedgewars
12169 (package
12170 (name "hedgewars")
12171 ;; TODO: Delete phase 'import-control-dot-monad' on versions >1.0.3.
12172 ;; TODO: Remove patch 'hedgewars-support-ffmpegv6' on versions >1.0.2.
12173 ;; TODO: Remove patch 'hedgewars-fix-pascalbasic-name-conflict'
12174 ;; on versions >1.0.3.
12175 (version "1.0.2")
12176 (source (origin
12177 (method url-fetch)
12178 (uri (string-append "https://www.hedgewars.org/download/releases/"
12179 "hedgewars-src-" version ".tar.bz2"))
12180 (sha256
12181 (base32
12182 "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0"))
12183 (patches
12184 (search-patches "hedgewars-fix-pascalbasic-name-conflict.patch"
12185 "hedgewars-support-ffmpegv6.patch"))))
12186 (build-system qt-build-system)
12187 (arguments
12188 (list
12189 ;; XXX: Engine is built as Pascal source code, requiring Free Pascal
12190 ;; Compiler, which we haven't packaged yet. With the flag below, we use
12191 ;; a Pascal to C translator and Clang instead.
12192 #:configure-flags
12193 #~'("-DBUILD_ENGINE_C=ON"
12194 "-DNOVERSIONINFOUPDATE=ON"
12195 "-Dhaskell_flags=-dynamic;-fPIC")
12196 #:phases
12197 #~(modify-phases %standard-phases
12198 (add-after 'unpack 'import-control-dot-monad
12199 (lambda _
12200 (with-directory-excursion "gameServer"
12201 (substitute* '("ClientIO.hs"
12202 "HandlerUtils.hs"
12203 "HWProtoChecker.hs"
12204 "HWProtoCore.hs"
12205 "HWProtoLobbyState.hs"
12206 "HandlerUtils.hs"
12207 "ServerState.hs"
12208 "Votes.hs"
12209 "../tools/pas2c/Pas2C.hs")
12210 ;; All files define `import Control.Monad.{something}`.
12211 ;; Our symbols are in Control.Monad now as well.
12212 (("import Control\\.Monad" all)
12213 (string-append all "\n" "import Control.Monad"))))))
12214 (replace 'check
12215 (lambda* (#:key tests? #:allow-other-keys)
12216 (when tests?
12217 (invoke "ctest"))))
12218 (add-after 'install 'install-icon
12219 (lambda _
12220 ;; Install icon for the desktop file.
12221 (let ((icons (string-append #$output
12222 "/share/icons/hicolor/512x512/apps")))
12223 (with-directory-excursion
12224 (string-append "../hedgewars-src-" #$version)
12225 (install-file "misc/hedgewars.png" icons))))))))
12226 (inputs
12227 (list ffmpeg
12228 freeglut
12229 ghc-entropy
12230 ghc-hslogger
12231 ghc-network
12232 ghc-random
12233 ghc-regex-tdfa
12234 ghc-sandi
12235 ghc-sha
12236 ghc-utf8-string
12237 ghc-vector
12238 ghc-zlib
12239 glew
12240 libpng
12241 lua-5.1
12242 physfs
12243 qtbase-5
12244 qtwayland-5
12245 (sdl-union
12246 (list sdl2 sdl2-mixer sdl2-net sdl2-ttf sdl2-image))))
12247 (native-inputs
12248 (list clang-13 ghc pkg-config qttools-5))
12249 (home-page "https://hedgewars.org/")
12250 (synopsis "Turn-based artillery game featuring fighting hedgehogs")
12251 (description
12252 "Hedgewars is a turn based strategy, artillery, action and comedy game,
12253featuring the antics of pink hedgehogs with attitude as they battle from the
12254depths of hell to the depths of space.
12255
12256As commander, it's your job to assemble your crack team of hedgehog soldiers
12257and bring the war to your enemy.")
12258 ;; Software as a whole is licensed under GPL-2 terms. Artwork and
12259 ;; scripts are distributed under various terms.
12260 (license (list license:gpl2
12261 license:bsd-2 license:bsd-3 license:cc-by3.0 license:cc0
12262 license:expat license:fdl1.3+ license:public-domain
12263 license:zlib))))
12264
12265(define-public harmonist
12266 (package
12267 (name "harmonist")
12268 (version "1.0.2")
12269 (source
12270 (origin
12271 (method git-fetch)
12272 (uri (git-reference
12273 (url "https://codeberg.org/anaseto/harmonist")
12274 (commit (string-append "v" version))))
12275 (file-name (git-file-name name version))
12276 (sha256
12277 (base32 "12l0k7hcfvf675ckr3m4y3jnzh5aw5ghbzqznykxpi35vcrq8795"))))
12278 (build-system go-build-system)
12279 (arguments
12280 (list
12281 #:install-source? #f
12282 #:import-path "codeberg.org/anaseto/harmonist"))
12283 (native-inputs
12284 (list go-codeberg-org-anaseto-gruid
12285 go-codeberg-org-anaseto-gruid-js
12286 go-codeberg-org-anaseto-gruid-sdl
12287 go-codeberg-org-anaseto-gruid-tcell
12288 go-github-com-gdamore-tcell-v2))
12289 (home-page "https://anaseto.codeberg.page/games/harmonist/")
12290 (synopsis "Stealth coffee-break roguelike game")
12291 (description
12292 "Harmonist: Dayoriah Clan Infiltration is a stealth coffee-break
12293roguelike game. The game has a heavy focus on tactical positioning, light and
12294noise mechanisms, making use of various terrain types and cones of view for
12295monsters. Aiming for a replayable streamlined experience, the game avoids
12296complex inventory management and character building, relying on items and
12297player adaptability for character progression.")
12298 (license license:isc)))
12299
12300(define-public harmonist-sdl
12301 (package/inherit harmonist
12302 (name "harmonist-sdl")
12303 (arguments
12304 (substitute-keyword-arguments arguments
12305 ((#:tests? _ #t) #f)
12306 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
12307 ((#:phases _ #~%standard-phases)
12308 #~(modify-phases %standard-phases
12309 (add-after 'install 'fix-name-collision
12310 (lambda _
12311 (rename-file
12312 (string-append #$output "/bin/harmonist")
12313 (string-append #$output "/bin/harmonist-sdl"))))))))
12314 (native-inputs
12315 (modify-inputs native-inputs
12316 (prepend pkg-config)))))
12317
12318(define-public hurrycurry
12319 (package
12320 (name "hurrycurry")
12321 (version "3.1.1-1")
12322 (source (origin
12323 (method git-fetch)
12324 (uri (git-reference
12325 (url "https://codeberg.org/hurrycurry/hurrycurry.git")
12326 (commit (string-append "v" version))))
12327 (file-name (git-file-name name version))
12328 (sha256
12329 (base32
12330 "1qdj94cplw7xqjppdgcqk4nfs7dzkk0l4rgq61b27pa92flvgi2v"))))
12331 (build-system gnu-build-system)
12332 (arguments
12333 (list
12334 #:tests? #f ; no tests
12335 #:imported-modules `(,@%default-gnu-imported-modules
12336 ,@%cargo-build-system-modules)
12337 #:modules `(((guix build cargo-build-system) #:prefix cargo:)
12338 (guix build gnu-build-system)
12339 (guix build utils))
12340 #:make-flags
12341 #~(list "HURRYCURRY_DISTRIBUTION=\"GNU Guix\""
12342 (string-append "HURRYCURRY_DATA_PATH="
12343 (assoc-ref %outputs "common")
12344 "/share/hurrycurry")
12345 "all_client"
12346 "all_server"
12347 "all_data")
12348 #:phases
12349 #~(let ((cargo-phase (lambda (phase)
12350 (lambda args
12351 (apply (assoc-ref cargo:%standard-phases phase)
12352 #:install-source #f
12353 #:vendor-dir "guix-vendor"
12354 #:cargo-target #$(cargo-triplet)
12355 args)))))
12356 (modify-phases %standard-phases
12357 (add-after 'unpack 'set-env-vars
12358 (lambda* (#:key parallel-build? #:allow-other-keys)
12359 (setenv "HOME" (string-append (getcwd) "/tmp-home"))
12360 ;; Needed because of
12361 ;; <https://github.com/rust-lang/cargo/issues/17209>.
12362 (setenv "CARGO_BUILD_JOBS"
12363 (number->string (if parallel-build?
12364 (parallel-job-count)
12365 1)))))
12366 (add-after 'set-env-vars 'prepare-rust-crates
12367 (cargo-phase 'prepare-rust-crates))
12368 (add-after 'prepare-rust-crates 'unpack-rust-crates
12369 (cargo-phase 'unpack-rust-crates))
12370 (replace 'configure
12371 (cargo-phase 'configure))
12372 (add-after 'configure 'check-for-pregenerated-files
12373 (cargo-phase 'check-for-pregenerated-files))
12374 (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
12375 (cargo-phase 'patch-cargo-checksums))
12376 (add-before 'install 'create-client-bin-directory
12377 (lambda* (#:key outputs #:allow-other-keys)
12378 ;; XXX: This mkdir-p is needed because of
12379 ;; <https://codeberg.org/hurrycurry/hurrycurry/pulls/665>.
12380 ;; Remove this phase when this gets merged into a release.
12381 (mkdir-p (string-append (assoc-ref outputs "client") "/bin"))))
12382 (replace 'install
12383 (lambda* (#:key make-flags outputs #:allow-other-keys)
12384 (for-each
12385 (lambda (output)
12386 (apply invoke "make"
12387 `(,@make-flags
12388 ,(string-append "INSTALL_PREFIX=" (cdr output))
12389 ,(string-append "install_" (car output)))))
12390 (delete (assoc "debug" outputs) outputs))))
12391 (add-after 'install 'patch-client-godot-path
12392 (lambda* (#:key inputs outputs #:allow-other-keys)
12393 (let ((client-script (string-append (assoc-ref outputs "client")
12394 "/bin/hurrycurry"))
12395 (godot (search-input-file inputs "bin/godot")))
12396 (substitute* client-script
12397 (("exec godot") (format #f "exec ~a" godot))))))))))
12398 (inputs
12399 (cons* godot
12400 (cargo-inputs 'hurrycurry)))
12401 (native-inputs
12402 (list ffmpeg
12403 node
12404 rust
12405 `(,rust "cargo")
12406 sed))
12407 (outputs
12408 (list "client"
12409 "server"
12410 "common"
12411 "debug"))
12412 (home-page "https://hurrycurry.org/")
12413 (synopsis "Cooperative 3D multiplayer game about cooking")
12414 (description "Hurry Curry! is a cooperative multiplayer game about cooking.
12415You work at a restaurant accepting orders, cooking various dishes and serving
12416meals to customers. But don’t take too long, as customers might get impatient.
12417The game is free software, licensed under the AGPL 3.0 only.")
12418 (license
12419 (list license:agpl3
12420 ;; Some models, sounds, music and other assets.
12421 license:cc0
12422 license:cc-by3.0
12423 license:cc-by4.0
12424 license:cc-by-sa4.0
12425 license:silofl1.1))))
12426
12427(define-public li-ri
12428 (package
12429 (name "li-ri")
12430 (version "3.1.6")
12431 (source (origin
12432 (method git-fetch)
12433 (uri (git-reference
12434 (url "https://github.com/petitlapin/Li-Ri")
12435 (commit (string-append "v" version))))
12436 (file-name (git-file-name name version))
12437 (sha256
12438 (base32
12439 "09r6l0sbxp3q750kpbrx513yrafmg7a2769j4wgx812lsk92n3hg"))))
12440 (build-system cmake-build-system)
12441 (arguments
12442 (list #:tests? #false ;no tests
12443 #:configure-flags
12444 #~(list "-DUSE_SYSTEM_SIMPLEINI=ON"
12445 (string-append "-DLIRI_DATA_DIR=" #$output "/share/Li-ri/"))))
12446 (native-inputs (list pkg-config))
12447 (inputs (list sdl2 sdl2-mixer simpleini))
12448 (home-page "https://github.com/petitlapin/Li-Ri")
12449 (synopsis "Toy train simulation game")
12450 (description
12451 "Li-Ri is a game in which you drive a wooden toy steam locomotive
12452across many levels and collect all the coaches to win.")
12453 ;; Source files mention "either version 2 or version 3" for GPL
12454 ;; license. Desktop file is licensed under CC0 terms.
12455 (license (list license:gpl2 license:gpl3 license:cc0))))
12456
12457(define-public freeorion
12458 (package
12459 (name "freeorion")
12460 (version "0.4.10.2")
12461 (source
12462 (origin
12463 (method git-fetch)
12464 (uri (git-reference
12465 (url "https://github.com/freeorion/freeorion")
12466 (commit (string-append "v" version))))
12467 (sha256
12468 (base32 "12fhwa3cs6lvdbdhina310qk2g7zcphldsh7ibsbxn8d1m731xlk"))
12469 (file-name (git-file-name name version))
12470 (modules '((guix build utils)))
12471 (snippet
12472 '(begin
12473 ;; There are some bundled fonts.
12474 (for-each delete-file-recursively '("default/data/fonts"))))))
12475 (build-system cmake-build-system)
12476 (arguments
12477 '(#:tests? #f ;no test
12478 #:phases
12479 (modify-phases %standard-phases
12480 (add-after 'unpack 'unbundle-fonts
12481 (lambda* (#:key inputs #:allow-other-keys)
12482 (let ((roboto-dir (string-append (assoc-ref inputs "font-roboto")
12483 "/share/fonts/truetype/")))
12484 (substitute* "UI/ClientUI.cpp"
12485 (("\\(GetRootDataDir.*?Roboto-(Bold|Regular)\\.ttf\"\\)\\.string\\(\\)\\);"
12486 all type)
12487 (string-append "\"" roboto-dir "Roboto-" type ".ttf\");")))
12488 #t))))))
12489 (inputs
12490 `(("boost" ,boost)
12491 ("boost_signals" ,boost-signals2)
12492 ("font-dejavu" ,font-dejavu)
12493 ("font-roboto" ,font-google-roboto)
12494 ("freetype2" ,freetype)
12495 ("glew" ,glew)
12496 ("glu" ,glu)
12497 ("libogg" ,libogg)
12498 ("libpng" ,libpng)
12499 ("libvorbis" ,libvorbis)
12500 ("openal" ,openal)
12501 ("python" ,python)
12502 ("sdl2" ,sdl2)
12503 ("zlib" ,zlib)))
12504 (home-page "https://www.freeorion.org/index.php/Main_Page")
12505 (synopsis "Turn-based space empire and galactic conquest computer game")
12506 (description
12507 "FreeOrion is a turn-based space empire and galactic conquest (4X)
12508computer game being designed and built by the FreeOrion project. Control an
12509empire with the goal of exploring the galaxy, expanding your territory,
12510exploiting the resources, and exterminating rival alien empires. FreeOrion is
12511inspired by the tradition of the Master of Orion games, but is not a clone or
12512remake of that series or any other game.")
12513 ;; Source code is released under gpl2. Artwork, music and sounds, and
12514 ;; in-game text are released under cc-by-sa3.0. Game content scripts are
12515 ;; released under both gpl2 and cc-by-sa3.0. Bundled Gigi library is
12516 ;; released under lgpl2.1+.
12517 (license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+))))
12518
12519(define-public lead-solver
12520 (package
12521 (name "lead-solver")
12522 (version "1.0.2")
12523 (source (origin
12524 (method url-fetch)
12525 (uri (let ((v (apply string-append (string-split version #\.))))
12526 (string-append
12527 "https://lajollabridge.com/Software/Lead-Solver/"
12528 "leadsolver-" v ".zip")))
12529 (sha256
12530 (base32
12531 "0xsa7r6r5sprgy0pkdm1xj1jwyy6d3qak2ynviy8xplicl99q09f"))
12532 (modules '((guix build utils)
12533 (ice-9 ftw)))
12534 (snippet
12535 #~(begin
12536 ;; Remove pre-built executables and cruft relative
12537 ;; to other OSes.
12538 (for-each
12539 delete-file-recursively
12540 (scandir "."
12541 (lambda (f)
12542 (not (member f '("." ".." "leadsolver.cpp"))))))
12543 (substitute* "leadsolver.cpp"
12544 (("#include \"dll.h\"") "#include <dll.h>"))))))
12545 (build-system gnu-build-system)
12546 (arguments
12547 (list #:tests? #false ;no tests
12548 #:phases
12549 #~(modify-phases %standard-phases
12550 (delete 'configure) ;no configure script
12551 (replace 'build
12552 (lambda _
12553 (invoke "g++" "leadsolver.cpp" "-ldds" "-o" "leadsolver")))
12554 (replace 'install ;no install phase
12555 (lambda _
12556 (let ((bin (string-append #$output "/bin")))
12557 (install-file "leadsolver" bin)))))))
12558 (native-inputs (list unzip))
12559 (inputs (list dds))
12560 (home-page
12561 "https://lajollabridge.com/Software/Lead-Solver/Lead-Solver-About.htm")
12562 (synopsis "Analyze leads in bridge game")
12563 (description
12564 "Given bridge hands, Lead Solver tallies up how well each card does when
12565led in terms of average tricks taken for the defense (for matchpoints) and how
12566often the contract is set (for team play).")
12567 (license license:gpl3)))
12568
12569(define-public leela-zero
12570 (package
12571 (name "leela-zero")
12572 (version "0.17")
12573 (source
12574 (origin
12575 (method git-fetch)
12576 (uri (git-reference
12577 (url "https://github.com/leela-zero/leela-zero")
12578 (commit (string-append "v" version))))
12579 (file-name (git-file-name name version))
12580 (sha256
12581 (base32
12582 "17px5iny8mql5c01bymcli7zfssswkzvb2i8gnsmjcck6i2n8srl"))
12583 (patches (search-patches "leela-zero-gtest.patch"))))
12584 (build-system cmake-build-system)
12585 (native-inputs
12586 (list googletest))
12587 (inputs
12588 (list boost-1.83
12589 opencl-icd-loader
12590 openblas
12591 opencl-headers
12592 qtbase-5
12593 zlib))
12594 (arguments
12595 '(#:configure-flags '("-DUSE_BLAS=YES")
12596 #:phases (modify-phases %standard-phases
12597 (add-before 'configure 'fix-tests
12598 (lambda* (#:key outputs #:allow-other-keys)
12599 (let ((home (getcwd)))
12600 (setenv "HOME" home)
12601 (substitute* "src/tests/gtests.cpp"
12602 (("\\.\\./src/tests/0k\\.txt")
12603 (string-append home "/src/tests/0k.txt"))
12604 (("cfg_gtp_mode = true;")
12605 "cfg_gtp_mode = true; cfg_cpu_only = true;")))
12606 #t))
12607 (replace 'check
12608 (lambda _
12609 (invoke "./tests"))))))
12610 (home-page "https://github.com/leela-zero/leela-zero")
12611 (synopsis "Program playing the game of Go")
12612 (description
12613 "Leela-zero is a Go engine with no human-provided knowledge, modeled after
12614the AlphaGo Zero paper. The current best network weights file for the engine
12615can be downloaded from @url{https://zero.sjeng.org/best-network}.")
12616 (license license:gpl3+)))
12617
12618(define-public q5go
12619 (package
12620 (name "q5go")
12621 (version "2.1.3")
12622 (source (origin
12623 (method git-fetch)
12624 (uri (git-reference
12625 (url "https://github.com/bernds/q5Go")
12626 (commit (string-append "q5go-" version))))
12627 (file-name (git-file-name name version))
12628 (sha256
12629 (base32
12630 "0x8x7mp61g3lwabx9z4vsyd743kfqibnqhym7xd0b7811flca3ri"))))
12631 (build-system gnu-build-system)
12632 (native-inputs
12633 (list autoconf automake pkg-config))
12634 (inputs
12635 (list qtbase-5 qtmultimedia-5 qtsvg-5))
12636 (arguments
12637 '(#:phases
12638 (modify-phases %standard-phases
12639 (add-after 'unpack 'fix-configure-script
12640 (lambda _
12641 ;; Bypass the unavailable qtchooser program.
12642 (for-each delete-file
12643 '("configure"
12644 "Makefile.in"
12645 "src/Makefile.in"
12646 "src/translations/Makefile.in"))
12647 (substitute* "configure.ac"
12648 (("AC_PATH_PROG\\(qtchooser, .*\\)")
12649 "")
12650 (("test -z \"QTCHOOSER\"")
12651 "false")
12652 (("\\$\\(qtchooser -list-versions\\)")
12653 "qt5")
12654 (("qtchooser -run-tool=(.*) -qt=\\$QT5_NAME" _ command)
12655 command))))
12656 (add-after 'unpack 'fix-paths
12657 (lambda* (#:key outputs #:allow-other-keys)
12658 (substitute* '("src/setting.cpp")
12659 (("/usr/share/\" PACKAGE \"/translations")
12660 (string-append (assoc-ref outputs "out")
12661 "/share/qGo/translations")))))
12662 (add-after 'install 'install-desktop-file
12663 (lambda* (#:key outputs #:allow-other-keys)
12664 (let* ((out (assoc-ref outputs "out"))
12665 (apps (string-append out "/share/applications"))
12666 (images (string-append out "/share/qGo/images")))
12667 (delete-file-recursively (string-append out "/share/applnk"))
12668 (delete-file-recursively (string-append out "/share/mimelnk"))
12669 (install-file "../source/src/images/Bowl.ico" images)
12670 (mkdir-p apps)
12671 (with-output-to-file (string-append apps "/q5go.desktop")
12672 (lambda _
12673 (format #t
12674 "[Desktop Entry]~@
12675 Name=q5go~@
12676 Exec=~a/bin/q5go~@
12677 Icon=~a/Bowl.ico~@
12678 Categories=Game;~@
12679 Comment=Game of Go~@
12680 Comment[de]=Spiel des Go~@
12681 Comment[eo]=Goo~@
12682 Comment[es]=Juego de Go~@
12683 Comment[fr]=Jeu de Go~@
12684 Comment[ja]=囲碁~@
12685 Comment[ko]=바둑~@
12686 Comment[zh]=围棋~@
12687 Terminal=false~@
12688 Type=Application~%"
12689 out images)))))))))
12690 (synopsis "Qt GUI to play the game of Go")
12691 (description
12692 "This a tool for Go players which performs the following functions:
12693@itemize
12694@item SGF editor,
12695@item Analysis frontend for Leela Zero (or compatible engines),
12696@item GTP interface (to play against an engine),
12697@item IGS client (to play on the internet),
12698@item Export games to a variety of formats.
12699@end itemize")
12700 (home-page "https://github.com/bernds/q5Go")
12701 (license license:gpl2+)))
12702
12703(define-public qcheckers
12704 (package
12705 (name "qcheckers")
12706 (version "0.9.0")
12707 (source
12708 (origin
12709 (method git-fetch)
12710 (uri (git-reference
12711 (url "https://github.com/portnov/qcheckers")
12712 (commit version)))
12713 (file-name (git-file-name name version))
12714 (sha256
12715 (base32 "05wzql6abzdf6l0vdzki4rfy2zn31mcplh1wkw3ddk8w81pvaymw"))))
12716 (build-system qt-build-system)
12717 (arguments
12718 (list
12719 #:tests? #f
12720 #:modules '((guix build qt-build-system)
12721 ((guix build gnu-build-system) #:prefix gnu:)
12722 (guix build utils))
12723 #:phases
12724 #~(modify-phases %standard-phases
12725 (replace 'configure
12726 (lambda _
12727 (invoke "qmake"
12728 (string-append "PREFIX=" #$output))))
12729 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12730 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
12731 (inputs (list qtbase-5 qtsvg-5 qtwayland-5))
12732 (home-page "https://portnov.github.io/qcheckers/")
12733 (synopsis "Qt-based checkers boardgame")
12734 (description "QCheckers, formerly known as KCheckers, is a is a Qt version
12735of the classic boardgame checkers (also known as draughts).")
12736 (license license:gpl2+)))
12737
12738(define-public xjump-sdl
12739 (package
12740 (name "xjump-sdl")
12741 (version "3.0.4")
12742 (source
12743 (origin
12744 (method git-fetch)
12745 (uri (git-reference
12746 (url "https://github.com/hugomg/xjump-sdl")
12747 (commit (string-append "v" version))))
12748 (file-name (git-file-name name version))
12749 (sha256
12750 (base32 "1macl4aq0zc93kbranzclqxh2jc40asn3bc8cpyywafzbxyha99y"))))
12751 (build-system gnu-build-system)
12752 (inputs (list sdl2))
12753 (arguments
12754 (list
12755 #:tests? #f ;No tests.
12756 #:phases
12757 #~(modify-phases %standard-phases
12758 (replace 'configure
12759 (lambda* (#:key outputs #:allow-other-keys)
12760 (invoke "./configure"
12761 (string-append "--prefix="
12762 (assoc-ref outputs "out"))
12763 (string-append "CC="
12764 #$(cc-for-target))))))))
12765 (home-page "https://github.com/hugomg/xjump-sdl")
12766 (synopsis "Falling tower game")
12767 (description "This package provides a reimplementation of the classic
12768Xjump game, using SDL instead of Xlib.")
12769 (license license:gpl3)))
12770
12771(define-public xmoto
12772 (package
12773 (name "xmoto")
12774 (version "0.6.3")
12775 (source
12776 (origin
12777 (method git-fetch)
12778 (uri (git-reference
12779 (url "https://github.com/xmoto/xmoto")
12780 (commit (string-append "v" version))))
12781 (file-name (git-file-name name version))
12782 (sha256
12783 (base32 "08yi6sgz349s7wa07dyrlbhpkmi25arz0c849qgpsj65vr8n7n8c"))
12784 (modules '((guix build utils)
12785 (ice-9 ftw)
12786 (srfi srfi-1)))
12787 ;; XXX: Remove some bundled libraries. Guix provides Chipmunk, but
12788 ;; it appears to be incompatible with the (older) one bundled.
12789 (snippet
12790 `(begin
12791 (let ((keep '("chipmunk" "glad" "md5sum")))
12792 (with-directory-excursion "vendor"
12793 (for-each delete-file-recursively
12794 (lset-difference string=?
12795 (scandir ".")
12796 (cons* "." ".." keep))))
12797 (substitute* "src/CMakeLists.txt"
12798 (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
12799 (if (member library keep) line ""))))))))
12800 (build-system cmake-build-system)
12801 (arguments
12802 (list
12803 #:tests? #f ;no tests
12804 #:phases
12805 #~(modify-phases %standard-phases
12806 (add-after 'unpack 'fix-hard-coded-directory
12807 (lambda _
12808 (substitute* "src/common/VFileIO.cpp"
12809 (("/usr/share") (string-append #$output "/share")))))
12810 (add-before 'build 'set-SDL
12811 ;; Set correct environment for SDL.
12812 (lambda* (#:key inputs #:allow-other-keys)
12813 (setenv "CPATH"
12814 (string-append
12815 (search-input-directory inputs "/include/SDL2")
12816 ":"
12817 (or (getenv "CPATH") "")))))
12818 (add-after 'install 'unbundle-fonts
12819 ;; Unbundle DejaVuSans TTF files.
12820 (lambda* (#:key inputs #:allow-other-keys)
12821 (let ((font-dir (search-input-directory inputs
12822 "/share/fonts/truetype/"))
12823 (target-dir (string-append #$output
12824 "/share/xmoto/Textures/Fonts/")))
12825 (for-each (lambda (f)
12826 (let ((font (string-append font-dir f))
12827 (target (string-append target-dir f)))
12828 (delete-file target)
12829 (symlink font target)))
12830 '("DejaVuSans.ttf" "DejaVuSansMono.ttf"))))))))
12831 (native-inputs
12832 (list gettext-minimal pkg-config))
12833 (inputs
12834 (list bzip2
12835 curl
12836 font-dejavu
12837 glu
12838 libjpeg-turbo
12839 libpng
12840 libxdg-basedir
12841 libxml2
12842 lua
12843 ode
12844 (sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf))
12845 sqlite
12846 zlib))
12847 (home-page "https://xmoto.tuxfamily.org/")
12848 (synopsis "2D motocross platform game")
12849 (description
12850 "X-Moto is a challenging 2D motocross platform game, where
12851physics play an all important role in the gameplay. You need to
12852control your bike to its limit, if you want to have a chance finishing
12853the more difficult challenges.")
12854 (license (list license:gpl2+ ;whole project
12855 license:bsd-3 ;vendor/md5sum
12856 license:lgpl2.1+
12857 license:expat))))
12858
12859(define-public eboard
12860 (package
12861 (name "eboard")
12862 (version "1.1.3")
12863 (source
12864 (origin
12865 (method git-fetch)
12866 (uri (git-reference
12867 (url "https://github.com/fbergo/eboard")
12868 (commit (string-append "v" version))))
12869 (file-name (git-file-name name version))
12870 (sha256
12871 (base32 "1z4pwpqyvxhlda99h6arh2rjk90fbms9q29fqizjblrdn01dlxn1"))))
12872 (build-system gnu-build-system)
12873 (native-inputs
12874 (list perl pkg-config))
12875 (inputs
12876 (list gtk+-2 libpng gstreamer))
12877 (arguments
12878 `(#:tests? #f
12879 #:phases
12880 (modify-phases %standard-phases
12881 (replace 'configure
12882 (lambda* (#:key outputs #:allow-other-keys)
12883 (make-file-writable "eboard-config")
12884 (setenv "CC" "gcc")
12885 (invoke "./configure"
12886 (string-append "--prefix=" (assoc-ref outputs "out")))
12887 #t))
12888 (add-before 'install 'make-required-directories
12889 (lambda* (#:key outputs #:allow-other-keys)
12890 (mkdir-p (string-append (assoc-ref outputs "out")
12891 "/share/eboard"))
12892 #t)))))
12893 (synopsis "Graphical user interface to play chess")
12894 (description
12895 "Eboard is a chess board interface for ICS (Internet Chess Servers)
12896and chess engines.")
12897 (home-page "https://www.bergo.eng.br/eboard/")
12898 (license license:gpl2+)))
12899
12900(define-public chessx
12901 (package
12902 (name "chessx")
12903 (version "1.5.6")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (string-append "mirror://sourceforge/chessx/chessx/"
12908 version "/chessx-" version ".tgz"))
12909 (sha256
12910 (base32 "01fjchil2h6ry2ywr0dwjw2g7zd29580cr4c74d5z74h999lp6nh"))))
12911 (build-system qt-build-system)
12912 (native-inputs
12913 (list qttools-5))
12914 (inputs
12915 (list qtbase-5 qtmultimedia-5 qtspeech-5 qtsvg-5 qtwayland-5 zlib))
12916 (arguments
12917 (list
12918 #:tests? #f
12919 #:modules '((guix build qt-build-system)
12920 ((guix build gnu-build-system) #:prefix gnu:)
12921 (guix build utils))
12922 #:phases
12923 #~(modify-phases %standard-phases
12924 (add-after 'unpack 'fix-paths
12925 (lambda* (#:key inputs #:allow-other-keys)
12926 (substitute* "chessx.pro"
12927 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
12928 (search-input-file inputs "/bin/lrelease")))))
12929 (add-after 'fix-paths 'fix-library-paths
12930 (lambda _
12931 ;; Otherwise it won't find the wayland shell integration
12932 ;; or qt plugin for wayland-egl.
12933 (substitute* "src/gui/main.cpp"
12934 (("QApplication::setLibraryPaths\\(l\\);")
12935 "/* QApplication::setLibraryPaths(l); */"))))
12936 (add-after 'fix-library-paths 'make-qt-deterministic
12937 (lambda _
12938 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")))
12939 (add-after 'make-qt-deterministic 'disable-versioncheck
12940 (lambda _
12941 (substitute* "src/database/settings.cpp"
12942 (("\"/General/onlineVersionCheck\", true")
12943 "\"/General/onlineVersionCheck\", false"))))
12944 (replace 'configure
12945 (lambda _
12946 (invoke "qmake")))
12947 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12948 (replace 'install
12949 (lambda* (#:key outputs #:allow-other-keys)
12950 (let ((out (assoc-ref outputs "out")))
12951 (install-file "release/chessx" (string-append out "/bin"))
12952 (install-file "unix/chessx.desktop"
12953 (string-append out "/share/applications"))))))))
12954 (synopsis "Chess game database")
12955 (description
12956 "ChessX is a chess database. With ChessX you can operate on your
12957collection of chess games in many ways: browse, edit, add, organize, analyze,
12958etc. You can also play games on FICS or against an engine.")
12959 (home-page "https://chessx.sourceforge.net/")
12960 (license license:gpl2+)))
12961
12962(define-public stockfish
12963 (let ((big-network-revision "c288c895ea92")
12964 (small-network-revision "37f18f62d772")) ; also update hashes below
12965 (package
12966 (name "stockfish")
12967 (version "18")
12968 (source
12969 (origin
12970 (method git-fetch)
12971 (uri (git-reference
12972 (url "https://github.com/official-stockfish/Stockfish")
12973 (commit (string-append "sf_" version))))
12974 (file-name (git-file-name name version))
12975 (sha256
12976 (base32 "0smqw4xpyv3ffhvlgm0wl1g2cyb7wf9jf3v0sshn4ylljxy39l97"))))
12977 (build-system gnu-build-system)
12978 (inputs
12979 `(("neural-network-big"
12980 ,(origin
12981 (method url-fetch)
12982 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12983 big-network-revision ".nnue"))
12984 (sha256
12985 (base32
12986 "19z48cxrxrspgvzmkix4lgr007rw5dmz7qwjj3m2ji4jxaawi262"))))
12987 ("neural-network-small"
12988 ,(origin
12989 (method url-fetch)
12990 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12991 small-network-revision ".nnue"))
12992 (sha256
12993 (base32
12994 "17c9b9ij1jmvbxaycqxbya33q30kij4s7b3a3mz11wvjsxi8zw9p"))))))
12995 (arguments
12996 `(#:tests? #f
12997 #:make-flags (list "-C" "src"
12998 "build"
12999 (string-append "PREFIX="
13000 (assoc-ref %outputs "out"))
13001 ,@(if (target-ppc32?)
13002 `("EXTRALDFLAGS=-latomic")
13003 `())
13004 (string-append "ARCH="
13005 ,(match (%current-system)
13006 ("x86_64-linux" "x86-64")
13007 ("i686-linux" "x86-32")
13008 ("aarch64-linux" "armv8")
13009 ("armhf-linux" "armv7")
13010 ("powerpc-linux" "ppc-32")
13011 ("powerpc64le-linux" "ppc-64")
13012 ("riscv64-linux" "general-64")
13013 ("mips64el-linux" "general-64")
13014 (_ "general-32"))))
13015 #:phases (modify-phases %standard-phases
13016 (delete 'configure)
13017 ;; The official neural network files are needed for building
13018 ;; and are embedded in the resulting binary.
13019 (add-after 'unpack 'copy-net
13020 (lambda* (#:key inputs #:allow-other-keys)
13021 (copy-file (assoc-ref inputs "neural-network-big")
13022 (format #f "src/nn-~a.nnue"
13023 ,big-network-revision))
13024 (copy-file (assoc-ref inputs "neural-network-small")
13025 (format #f "src/nn-~a.nnue"
13026 ,small-network-revision))))
13027 (add-after 'unpack 'remove-m-flag-and-net-target
13028 (lambda _
13029 (substitute* "src/Makefile"
13030 ;; Guix doesn't use a multiarch gcc.
13031 (("-m\\$\\(bits\\)") "")
13032 ;; Dont depend on net target.
13033 ((": net") ": ")))))))
13034 (synopsis "Strong chess engine")
13035 (description
13036 "Stockfish is a very strong chess engine. It is much stronger than the
13037best human chess grandmasters. It can be used with UCI-compatible GUIs like
13038ChessX.")
13039 (home-page "https://stockfishchess.org/")
13040 (license license:gpl3+))))
13041
13042(define-public moonfish
13043 (package
13044 (name "moonfish")
13045 (version "1")
13046 (source
13047 (origin
13048 (method git-fetch)
13049 (uri (git-reference
13050 (url "https://git.sr.ht/~zamfofex/moonfish")
13051 (commit (string-append "v" version))))
13052 (sha256
13053 (base32 "0p5rdrqiip6n5wdxjvlsg7qnwdwrpl9g3j1mx7q0i9a8zmkj2ryv"))
13054 (file-name (git-file-name name version))
13055 (modules '((guix build utils)))
13056 (snippet #~(begin
13057 ;; Avoid relying on '/dev/stderr', which doesn't work at the
13058 ;; top-level of a Guix build, because it refers to a pipe
13059 ;; that the build user doesn't have permission to access.
13060 (substitute* "scripts/check.sh"
13061 (("\\btee /dev/stderr\\b")
13062 "tee"))))))
13063 (build-system gnu-build-system)
13064 (arguments
13065 (list
13066 #:make-flags #~(list (string-append "CC="
13067 #$(cc-for-target))
13068 (string-append "PREFIX=" %output))
13069 #:phases #~(modify-phases %standard-phases
13070 (delete 'configure)))) ;no configure script
13071 (inputs (list libressl cjson))
13072 (home-page "https://moonfish.neocities.org")
13073 (synopsis "Simple chess engine written in C")
13074 (description
13075 "moonfish is a toy UCI chess engine written in C. It has TUI/CLI tools
13076for using any UCI engine and also to connect UCI engines to Lichess and IRC.")
13077 (license license:agpl3+)))
13078
13079(define-public morris
13080 (package
13081 (name "morris")
13082 (version "0.3")
13083 (source
13084 (origin
13085 (method git-fetch)
13086 (uri (git-reference
13087 (url "https://github.com/farindk/morris")
13088 (commit (string-append "v" version))))
13089 (file-name (git-file-name name version))
13090 (sha256
13091 (base32 "1kkcnpkzgybm7rqg7nafd7sqd5m4alns6l4j5zcf3p41jdc9s3iv"))))
13092 (build-system glib-or-gtk-build-system)
13093 (inputs (list automake autoconf pkg-config intltool
13094 gettext-minimal libtool glib gtk+-2 boost))
13095 (arguments (list #:tests? #f)) ; No tests in source.
13096 (home-page "http://nine-mens-morris.net/downloads.html")
13097 (synopsis "Implementation of the board game Nine Men's Morris")
13098 (description "Morris is an implementation of the board game Nine Men's Morris.
13099It supports not only the standard game, but also several rule-variants and different
13100board layouts. You can play against the computer, or simply use the program to
13101present the board, but play against another human opponent.")
13102 (license license:gpl3)))
13103
13104(define-public barrage
13105 (package
13106 (name "barrage")
13107 (version "1.0.7")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (string-append "mirror://sourceforge/lgames/barrage/"
13112 "barrage-" version ".tar.gz"))
13113 (sha256
13114 (base32 "0j7j6n5h97xpw0h8zi5a8ziw1vjsbr5gk4dcsiwzh59qn0djnrkh"))))
13115 (build-system gnu-build-system)
13116 (inputs
13117 (list hicolor-icon-theme sdl sdl-mixer))
13118 (arguments
13119 `(#:configure-flags
13120 (list
13121 (string-append "CFLAGS="
13122 "-I" (assoc-ref %build-inputs "sdl-mixer")
13123 "/include/SDL"))))
13124 (home-page "https://lgames.sourceforge.net/Barrage/")
13125 (synopsis "Violent point-and-click shooting game with nice effects")
13126 (description
13127 "Barrage is a rather destructive action game that puts you on a shooting
13128range with the objective to hit as many dummy targets as possible within
131293 minutes. You control a gun that may either fire small or large grenades at
13130soldiers, jeeps and tanks. The gameplay is simple but it is not that easy to
13131get high scores.")
13132 (license license:gpl2+)))
13133
13134(define-public burgerspace
13135 (package
13136 (name "burgerspace")
13137 (version "1.10.0")
13138 (source
13139 (origin
13140 (method url-fetch)
13141 (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/"
13142 "burgerspace-" version ".tar.gz"))
13143 (sha256
13144 (base32 "18ydm3014y9vhma0ml7z66xa7ihiz3xr8izicfdd3xl9f4535f6c"))))
13145 (build-system gnu-build-system)
13146 (native-inputs
13147 (list pkg-config))
13148 (inputs
13149 (list flatzebra))
13150 (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html")
13151 (synopsis "Avoid evil foodstuffs and make burgers")
13152 (description
13153 "This is a clone of the classic game BurgerTime. In it, you play
13154the part of a chef who must create burgers by stepping repeatedly on
13155the ingredients until they fall into place. And to make things more
13156complicated, you also must avoid evil animate food items while
13157performing this task, with nothing but your trusty pepper shaker to
13158protect you.")
13159 (license license:gpl2+)))
13160
13161(define-public 7kaa
13162 (package
13163 (name "7kaa")
13164 (version "2.15.7")
13165 (source
13166 (origin
13167 (method git-fetch)
13168 (uri (git-reference
13169 (url "https://git.code.sf.net/p/skfans/7kaa")
13170 (commit (string-append "v" version))))
13171 (sha256
13172 (base32 "1gfmgqdmqfaxj4hlz8x7zh3s36inns1gqqb8dq0r58b26xk42x2y"))))
13173 (build-system gnu-build-system)
13174 (arguments
13175 (list
13176 #:phases
13177 #~(modify-phases %standard-phases
13178 (add-after 'unpack 'patch-configure-ac
13179 ;; gettext version mismatch forces us to patch configure.ac
13180 (lambda _
13181 (let ((gettext-version
13182 #$(package-version (this-package-native-input "gettext-minimal"))))
13183 (substitute* "configure.ac"
13184 (("AM_GNU_GETTEXT_VERSION.*")
13185 (string-append
13186 "AM_GNU_GETTEXT_VERSION([" gettext-version "])\n"
13187 "AM_GNU_GETTEXT_REQUIRE_VERSION([" gettext-version "])\n")))))))))
13188 (native-inputs
13189 (list autoconf
13190 autoconf-archive
13191 automake
13192 gettext-minimal
13193 pkg-config))
13194 (inputs
13195 (list curl
13196 enet
13197 openal
13198 sdl2))
13199 (synopsis "Seven Kingdoms Ancient Adversaries: real-time strategy game")
13200 (description
13201 "Seven Kingdoms, designed by Trevor Chan, brings a blend of Real-Time
13202Strategy with the addition of trade, diplomacy, and espionage. The game
13203enables players to compete against up to six other kingdoms allowing players
13204to conquer opponents by defeating them in war (with troops or machines),
13205capturing their buildings with spies, or offering opponents money for their
13206kingdom.")
13207 (home-page "https://7kfans.com/index.html")
13208 (license license:gpl2+)))
13209
13210(define-public neverball
13211 ;; Git version is 6-years younger than latest release.
13212 (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
13213 (revision "1"))
13214 (package
13215 (name "neverball")
13216 (version (git-version "1.6.0" revision commit))
13217 (source
13218 (origin
13219 (method git-fetch)
13220 (uri (git-reference
13221 (url "https://github.com/Neverball/neverball")
13222 (commit commit)))
13223 (sha256
13224 (base32
13225 "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
13226 (file-name (git-file-name name version))
13227 (modules '((guix build utils)))
13228 (snippet
13229 '(begin
13230 ;; Octocat seems to be non-free. Oddly, Debian doesn't strip it.
13231 (delete-file-recursively "data/ball/octocat")))))
13232 (build-system copy-build-system)
13233 (arguments
13234 `(#:install-plan
13235 '(("neverball" "bin/")
13236 ("neverputt" "bin/")
13237 ("mapc" "bin/")
13238 ("data" "share/games/neverball/")
13239 ("locale" "share/")
13240 ("dist/" "share/games/neverball" #:include ("neverball_replay.png"
13241 "neverlogos.svg"
13242 "svg readme.txt"))
13243 ("dist/" "share/applications" #:include ("neverball.desktop"
13244 "neverputt.desktop"))
13245 ("dist/neverball_16.png"
13246 "/share/icons/hicolor/16x16/apps/neverball.png")
13247 ("dist/neverball_24.png"
13248 "/share/icons/hicolor/24x24/apps/neverball.png")
13249 ("dist/neverball_32.png"
13250 "/share/icons/hicolor/32x32/apps/neverball.png")
13251 ("dist/neverball_48.png"
13252 "/share/icons/hicolor/48x48/apps/neverball.png")
13253 ("dist/neverball_64.png"
13254 "/share/icons/hicolor/64x64/apps/neverball.png")
13255 ("dist/neverball_128.png"
13256 "/share/icons/hicolor/128x128/apps/neverball.png")
13257 ("dist/neverball_256.png"
13258 "/share/icons/hicolor/256x256/apps/neverball.png")
13259 ("dist/neverball_512.png"
13260 "/share/icons/hicolor/512x512/apps/neverball.png")
13261 ("dist/neverputt_16.png"
13262 "/share/icons/hicolor/16x16/apps/neverputt.png")
13263 ("dist/neverputt_24.png"
13264 "/share/icons/hicolor/24x24/apps/neverputt.png")
13265 ("dist/neverputt_32.png"
13266 "/share/icons/hicolor/32x32/apps/neverputt.png")
13267 ("dist/neverputt_48.png"
13268 "/share/icons/hicolor/48x48/apps/neverputt.png")
13269 ("dist/neverputt_64.png"
13270 "/share/icons/hicolor/64x64/apps/neverputt.png")
13271 ("dist/neverputt_128.png"
13272 "/share/icons/hicolor/128x128/apps/neverputt.png")
13273 ("dist/neverputt_256.png"
13274 "/share/icons/hicolor/256x256/apps/neverputt.png")
13275 ("dist/neverputt_512.png"
13276 "/share/icons/hicolor/512x512/apps/neverputt.png")
13277 ("dist/" "share/man/man1" #:include ("mapc.1"))
13278 ("dist/" "share/man/man6" #:include ("neverball.6" "neverputt.6"))
13279 ("doc/" "share/doc/neverball")
13280 ("README.md" "share/doc/neverball/"))
13281 #:phases
13282 (modify-phases %standard-phases
13283 (add-before 'install 'build
13284 (lambda* (#:key inputs outputs #:allow-other-keys)
13285 (let* ((out (assoc-ref outputs "out"))
13286 (sdl (assoc-ref inputs "sdl")))
13287 (invoke "make" "-j" (number->string (parallel-job-count))
13288 "--environment-overrides"
13289 "CC=gcc" "BUILD=release"
13290 (string-append "DATADIR="
13291 out
13292 "/share/games/neverball/data")
13293 (string-append "LOCALEDIR=" out "/share/locale")
13294 (string-append "SDL_CPPFLAGS=-I"
13295 sdl
13296 "/include/SDL2/")))))
13297 (add-after 'install 'fix-some-broken-fonts
13298 (lambda* (#:key outputs #:allow-other-keys)
13299 (let* ((out (assoc-ref outputs "out")))
13300 (wrap-program (string-append out "/bin/neverball")
13301 `("LANG" = ("en_US.utf8")))
13302 (wrap-program (string-append out "/bin/neverputt")
13303 `("LANG" = ("en_US.utf8")))))))))
13304 (native-inputs
13305 `(("gettext" ,gettext-minimal))) ;for msgfmt
13306 (inputs
13307 `(("bash-minimal" ,bash-minimal)
13308 ("libjpeg" ,libjpeg-turbo)
13309 ("libpng" ,libpng)
13310 ("libvorbis" ,libvorbis)
13311 ("physfs" ,physfs)
13312 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))))
13313 (home-page "https://neverball.org/")
13314 (synopsis "3D floor-tilting game")
13315 (description
13316 "In the grand tradition of Marble Madness and Super Monkey Ball,
13317Neverball has you guide a rolling ball through dangerous territory. Balance
13318on narrow bridges, navigate mazes, ride moving platforms, and dodge pushers
13319and shovers to get to the goal. Race against the clock to collect coins to
13320earn extra balls. Also included is Neverputt, which is a 3D miniature golf
13321game.") ;thanks to Debian for description
13322 (license license:gpl2+))))
13323
13324;; TODO: We may wish to package the server and client separately.
13325(define-public pokerth
13326 (package
13327 (name "pokerth")
13328 (version "2.0.8")
13329 (source
13330 (origin
13331 (method git-fetch)
13332 (uri (git-reference
13333 (url "https://github.com/pokerth/pokerth")
13334 (commit (string-append "v" version))))
13335 (file-name (git-file-name name version))
13336 (sha256
13337 (base32 "1hwnywqq5c05j1qym5q82r9inyps3p1fsjd7c819575vvqcdwqx8"))
13338 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
13339 (snippet
13340 #~(begin
13341 ;; XXX: We must use the ancient bundled websocketpp because the new
13342 ;; one is not compatible with newer versions of boost asio:
13343 ;; https://github.com/zaphoyd/websocketpp/issues/721
13344 ;; One alternative is to use boost-1.83 as an input.
13345 ;; XXX: Can we copy the third party boost headers in from somewhere?
13346 (let ((keep '("boost" "websocketpp")))
13347 (with-directory-excursion "src/third_party"
13348 (for-each delete-file-recursively
13349 (lset-difference string=?
13350 (scandir ".")
13351 (cons* "." ".." keep)))))))))
13352 (build-system qt-build-system)
13353 (inputs
13354 (list boost
13355 openssl
13356 protobuf
13357 qtbase
13358 qtdeclarative
13359 qtmultimedia
13360 qtsvg
13361 qtwayland
13362 sqlite))
13363 (native-inputs (list qttools qtwebsockets))
13364 (arguments (list #:tests? #f)) ;TODO: 'bot client' must be built & run
13365 (home-page "https://www.pokerth.net")
13366 (synopsis "Texas holdem poker game")
13367 (description
13368 "With PokerTH you can play the Texas holdem poker game, either against
13369computer opponents or against real players online.")
13370 (license license:agpl3+)))
13371
13372(define-public xevil
13373 ;; This game is old. Use a maintained fork that builds with modern toolchains
13374 ;; on modern, 64-bit hardware.
13375 (let ((commit "9ca85059d5195be0eb15e107de3bb9d1b49e5f99")
13376 (revision "0"))
13377 (package
13378 (name "xevil")
13379 (version (git-version "2.02" revision commit))
13380 (source
13381 (origin
13382 (method git-fetch)
13383 (uri (git-reference
13384 (url "https://github.com/lvella/xevil")
13385 (commit commit)))
13386 (file-name (git-file-name name version))
13387 (sha256
13388 (base32 "14hsmw9ll2asnp1s0zvniyp31kjw8ynm7vnycg74lpqf28h2rric"))))
13389 (build-system gnu-build-system)
13390 (arguments
13391 (list
13392 #:modules `(,@%default-gnu-imported-modules
13393 (srfi srfi-26))
13394 #:make-flags
13395 #~(list "SHELL=sh"
13396 "DEBUG_OPT=-g -DNDEBUG")
13397 #:tests? #f ;no test suite
13398 #:phases
13399 #~(modify-phases %standard-phases
13400 (add-after 'unpack 'rename-licence-file
13401 (lambda _ (rename-file "gpl.txt" "COPYING")))
13402 (add-after 'unpack 'redefine
13403 (lambda* (#:key inputs #:allow-other-keys)
13404 (substitute* "cmn/game.cpp"
13405 (("(#define VERSION ).*" _ define)
13406 (string-append define "\"" #$version "\"\n")))
13407 (substitute* "cmn/utils.cpp"
13408 (("[^\"]*/(bin/uname)" _ command)
13409 (search-input-file inputs command)))
13410 (substitute* "x11/ui.cpp"
13411 ;; Neither DEFAULT_BIG_FONT_NAME nor BACKUP_FONT_NAME are
13412 ;; available from most Guix X11 servers, making the game
13413 ;; unplayable by default. Substitute the closest match.
13414 (("9x15") "6x13")
13415 ;; ‘For fast machines’ need no longer default to False in C21.
13416 (("(smoothScroll = )False" _ assign)
13417 (string-append assign "True")))))
13418 (delete 'configure) ;no configure script
13419 (replace 'install
13420 (lambda _
13421 (with-directory-excursion "x11/REDHAT_LINUX" ;yeah
13422 (for-each (cut install-file <>
13423 (string-append #$output "/bin"))
13424 (list "xevil" "serverping")))
13425 (let ((doc (string-append #$output "/share/doc/"
13426 #$name "-" #$version)))
13427 (mkdir-p doc)
13428 (for-each (lambda (file)
13429 (copy-recursively file
13430 (string-append
13431 doc "/" (basename file))))
13432 (list "instructions" "x11/app-defaults"))))))))
13433 (inputs
13434 (list coreutils-minimal ;for uname
13435 libx11 libxpm))
13436 ;; The current home page has been ‘subtly’ vandalised with spam and is
13437 ;; missing a lot of content from this older snapshot.
13438 (home-page (string-append "https://web.archive.org/web/20060410005819/"
13439 "http://www.xevil.com/"))
13440 (synopsis
13441 "Third-person, side-scrolling, fast-action, kill-everything game")
13442 (description
13443 "XEvil is a violent third-person, side-scrolling, fast-action deathmatch.
13444You run around a randomly generated two-dimensional map composed of walls,
13445floors, ladders, doors, and horizontal and vertical elevators. Your only object
13446is to explore this world to find weapons and items, killing everything in sight
13447before they kill you. You can fight against either computer-controlled enemies
13448or against other people.")
13449 (license license:gpl2+))))
13450
13451(define-public azimuth
13452 ;; 1.0.3 - May 29, 2019
13453 ;; Has build errors so build from latest source
13454 (let ((commit "050f838b35d19ffdc738f33178abaf9d69d834ec")
13455 (revision "0"))
13456 (package
13457 (name "azimuth")
13458 (version (git-version "1.0.3" revision commit))
13459 (source
13460 (origin
13461 (method git-fetch)
13462 (uri (git-reference
13463 (url "https://github.com/mdsteele/azimuth")
13464 (commit commit)))
13465 (file-name (git-file-name name version))
13466 (sha256
13467 (base32
13468 "1b5grp9ddhrj3n39j1j5vzm3052d4bd09fpz0b011h769vapwi0i"))))
13469 (build-system gnu-build-system)
13470 (arguments
13471 (list
13472 #:test-target "test"
13473 #:phases
13474 #~(modify-phases %standard-phases
13475 (delete 'configure) ; no configure script
13476 ;; Build release version instead of debug version.
13477 (add-after 'unpack 'set-release
13478 (lambda _
13479 (setenv "BUILDTYPE" "release")))
13480 (add-after 'unpack 'fix-build
13481 (lambda* (#:key outputs #:allow-other-keys)
13482 (substitute* "Makefile"
13483 (("-Werror") ""))))
13484 (add-after 'unpack 'fix-install ; set install directory
13485 (lambda* (#:key outputs #:allow-other-keys)
13486 (substitute* "Makefile"
13487 (("/usr")
13488 (assoc-ref outputs "out"))) #t)))))
13489 (inputs (list sdl2))
13490 (native-inputs (list pkg-config))
13491 (home-page "https://mdsteele.games/azimuth/")
13492 (synopsis "Metroidvania game with vector graphics")
13493 (description
13494 "Pilot your ship inside a planet to find and rescue the colonists
13495trapped inside the Zenith Colony.")
13496 (license license:gpl3+))))
13497
13498(define-public cgoban
13499 (package
13500 (name "cgoban")
13501 (version "1.9.14")
13502 (source
13503 (origin
13504 (method url-fetch)
13505 (uri (string-append "mirror://sourceforge/cgoban1/cgoban1/"
13506 version "/cgoban-" version ".tar.gz"))
13507 (sha256
13508 (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))))
13509 (build-system gnu-build-system)
13510 (inputs
13511 (list libx11 libxt xorgproto))
13512 (home-page "https://cgoban1.sourceforge.net/")
13513 (synopsis "Go client for X11")
13514 (description "Provides a large set of Go-related services for X11:
13515@itemize
13516@item Local games with precise implementation of the Chinese and Japanese rulesets
13517@item Edition and visualization of SGF files
13518@item Connection to the NNGS or IGS Go servers
13519@item Bridge to Go modem protocol, allowing to play against Go modem-capable AIs
13520such as GnuGo.
13521@end itemize")
13522 (license license:gpl2+)))
13523
13524(define-public parallel-overhead
13525 (package
13526 (name "parallel-overhead")
13527 (version "1.1.4")
13528 (source
13529 (origin
13530 (method git-fetch)
13531 (uri (git-reference
13532 (url "https://codeberg.org/Huitsi/ParallelOverhead")
13533 (commit version)))
13534 (file-name (git-file-name name version))
13535 (sha256
13536 (base32
13537 "17dbq6bwm0rk1jzb1q2y6h3dyvxpqfq3lc3jnpb6zy2y897was4d"))))
13538 (build-system gnu-build-system)
13539 (arguments
13540 (list
13541 #:tests? #f ;no tests
13542 #:make-flags
13543 #~(list
13544 (string-append "prefix=" #$output)
13545 (string-append "bindir=" #$output "/bin") ;nooo don't put it in /games
13546 (string-append "CC=" #$(cc-for-target)))
13547 #:phases
13548 #~(modify-phases %standard-phases
13549 (delete 'configure)
13550 (add-before 'build 'no-git-describe
13551 (lambda _
13552 (substitute* "Makefile"
13553 (("\\$\\(shell git.+\\)") #$version)))))))
13554 (inputs (list sdl2))
13555 (native-inputs (list desktop-file-utils
13556 help2man
13557 lmms
13558 sfxr-qt))
13559 (home-page "https://huitsi.net/ParallelOverhead")
13560 (synopsis "Endless runner game")
13561 (description "Parallel Overhead is a colorful endless runner game where you
13562take control of the ships Truth and Beauty on a groundbreaking trip through
13563hyperspace. A stable hyperspace tunnel has finally been achieved with the two
13564ships supporting it on opposite walls of the tunnel. Well, almost stable...
13565The goal is to keep the ships from falling through the cracks.")
13566 (license (list license:expat ;game
13567 license:cc0)))) ;sounds+music
13568
13569(define-public passage
13570 (package
13571 (name "passage")
13572 (version "4")
13573 (source
13574 (origin
13575 (method url-fetch)
13576 (uri (string-append "mirror://sourceforge/hcsoftware/Passage/v"
13577 version "/Passage_v" version "_UnixSource.tar.gz"))
13578 (sha256
13579 (base32 "02ky4a4xdjvr71r58339jjrjyz76b5skcnbq4f8707mrln9vhby3"))))
13580 (build-system gnu-build-system)
13581 (arguments
13582 `(#:tests? #false ; there are none
13583 #:phases
13584 (modify-phases %standard-phases
13585 (add-after 'unpack 'chdir
13586 (lambda _
13587 (chdir "gamma256/gameSource")
13588 (system "cat Makefile.GnuLinux Makefile.all > Makefile")))
13589 (replace 'configure
13590 (lambda* (#:key outputs inputs #:allow-other-keys)
13591 (setenv "CPATH"
13592 (string-append
13593 (assoc-ref inputs "sdl") "/include/SDL:"
13594 (or (getenv "CPATH") "")))
13595 (let* ((out (assoc-ref outputs "out"))
13596 (assets (string-append out "/share/passage")))
13597 (substitute* "common.cpp"
13598 (("readTGA\\( \"graphics\"")
13599 (format #false "readTGA(\"~a/graphics\"" assets)))
13600 (substitute* "musicPlayer.cpp"
13601 (("readTGA\\( \"music\"")
13602 (format #false "readTGA(\"~a/music\"" assets))))))
13603 (replace 'install
13604 (lambda* (#:key outputs #:allow-other-keys)
13605 (let* ((out (assoc-ref outputs "out"))
13606 (bin (string-append out "/bin"))
13607 (assets (string-append out "/share/passage/")))
13608 (install-file "Passage" bin)
13609 (install-file "../documentation/Readme.txt" assets)
13610 (copy-recursively "graphics" (string-append assets "graphics"))
13611 (copy-recursively "music" (string-append assets "music"))
13612 (copy-recursively "settings" (string-append assets "settings"))))))))
13613 (inputs
13614 `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
13615 (native-inputs
13616 (list imagemagick))
13617 (home-page "https://hcsoftware.sourceforge.net/passage/")
13618 (synopsis "Memento mori game")
13619 (description
13620 "Passage is meant to be a memento mori game. It presents an entire life,
13621from young adulthood through old age and death, in the span of five minutes.
13622Of course, it's a game, not a painting or a film, so the choices that you make
13623as the player are crucial. There's no ``right'' way to play Passage, just as
13624there's no right way to interpret it.")
13625 (license license:public-domain)))
13626
13627(define-public paperview
13628 (let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6")
13629 (revision "1"))
13630 (package
13631 (name "paperview")
13632 (version (git-version "0.0.1" revision commit)) ;no upstream release
13633 (source (origin
13634 (method git-fetch)
13635 (uri (git-reference
13636 (url "https://github.com/glouw/paperview")
13637 (commit commit)))
13638 (file-name (git-file-name name version))
13639 (sha256
13640 (base32
13641 "09sb9sg44fvkgfdyycrm1ndpx7cnkrglxhci41y8f3gpagnvi7jk"))))
13642 (build-system gnu-build-system)
13643 (inputs
13644 (list sdl2))
13645 (arguments
13646 '(#:tests? #f ;no tests
13647 #:make-flags
13648 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
13649 #:phases
13650 (modify-phases %standard-phases
13651 (delete 'configure))))
13652 (home-page "https://github.com/glouw/paperview/")
13653 (synopsis "High performance X11 animated wallpaper setter")
13654 (description "High performance animated desktop background setter for
13655X11 that won't set your CPU on fire, drain your laptop battery, or lower video
13656game FPS.")
13657 (license license:unlicense))))
13658
13659(define-public curseofwar
13660 (package
13661 (name "curseofwar")
13662 (version "1.3.0")
13663 (source
13664 (origin
13665 (method git-fetch)
13666 (uri (git-reference
13667 (url "https://github.com/a-nikolaev/curseofwar")
13668 (commit (string-append "v" version))))
13669 (file-name (git-file-name name version))
13670 (sha256
13671 (base32 "1wd71wdnj9izg5d95m81yx3684g4zdi7fsy0j5wwnbd9j34ilz1i"))))
13672 (build-system gnu-build-system)
13673 (arguments
13674 `(#:tests? #f ; no tests
13675 #:make-flags
13676 (list (string-append "CC=" ,(cc-for-target))
13677 (string-append "PREFIX=" (assoc-ref %outputs "out")))
13678 #:phases
13679 (modify-phases %standard-phases
13680 (delete 'configure))))
13681 (inputs (list ncurses))
13682 (home-page "https://a-nikolaev.github.io/curseofwar/")
13683 (synopsis "Fast-paced action strategy game")
13684 (description "Curse of War is a fast-paced action strategy game originally
13685implemented using ncurses user interface. An SDL graphical version is also
13686available.")
13687 (license license:gpl3+)))
13688
13689(define-public devours
13690 (let ((commit "d50e745aa14aa48f7555ae12eb3d1000de1cc150")
13691 (revision "0"))
13692 (package
13693 (name "devours")
13694 (version (git-version "3" revision commit))
13695 (source
13696 (origin
13697 (method git-fetch)
13698 (uri (git-reference
13699 (url "https://jxself.org/git/devours.git")
13700 (commit commit)))
13701 (file-name (git-file-name name version))
13702 (sha256
13703 (base32 "1ksl6mh76jfx64rmasz2571f88ws45vby2977srhgkh355zp3lzn"))))
13704 (build-system gnu-build-system)
13705 (arguments
13706 (list
13707 #:tests? #f ; no tests
13708 #:phases
13709 #~(modify-phases %standard-phases
13710 (delete 'configure) ; no configure
13711 (replace 'build
13712 (lambda _
13713 (invoke "inform"
13714 (string-append "+include_path="
13715 #$(this-package-native-input "informlib")
13716 "/lib")
13717 "devours.inf")))
13718 (replace 'install
13719 (lambda* (#:key inputs #:allow-other-keys)
13720 ;; Create standalone executable.
13721 (let* ((bash (search-input-file inputs "/bin/bash"))
13722 (share (string-append #$output "/share"))
13723 (scummvm (search-input-file inputs "/bin/scummvm"))
13724 (bin (string-append #$output "/bin"))
13725 (executable (string-append bin "/devours")))
13726 (mkdir-p share)
13727 (copy-file "devours.z5" (string-append share "/devours.z5"))
13728 (mkdir-p bin)
13729 (with-output-to-file executable
13730 (lambda ()
13731 (format #t "#!~a~%" bash)
13732 (format #t
13733 "exec ~a --path=~a glk:zcode~%"
13734 scummvm share)))
13735 (chmod executable #o755))))
13736 (add-after 'install 'install-desktop-file
13737 (lambda _
13738 (let* ((apps (string-append #$output "/share/applications"))
13739 (share (string-append #$output "")))
13740 (mkdir-p apps)
13741 (make-desktop-entry-file
13742 (string-append apps "/devours.desktop")
13743 #:name "All Things Devours"
13744 #:generic-name "All Things Devours"
13745 #:exec (string-append #$output "/bin/devours")
13746 #:categories '("AdventureGame" "Game" "RolePlaying")
13747 #:keywords '("game" "adventure" "sci-fi")
13748 #:comment '((#f "Sci-fi text adventure game")))))))))
13749 (inputs
13750 (list bash scummvm))
13751 (native-inputs
13752 (list inform informlib))
13753 (synopsis "All Things Devours")
13754 (description
13755 "All Things Devours is a short piece of sci-fi interactive fiction,
13756leaning strongly towards the text-adventure end of the spectrum.
13757Any move you make may put things into an unwinnable state. You are therefore
13758encouraged to save frequently, and also to realise that you will probably have
13759to start over several times to find the most satisfactory ending.")
13760 (home-page "https://jxself.org/git/devours.git")
13761 (license license:agpl3+))))
13762
13763(define-public dustracing2d
13764 (package
13765 (name "dustracing2d")
13766 (version "2.2.0")
13767 (source
13768 (origin
13769 (method git-fetch)
13770 (uri (git-reference
13771 (url "https://github.com/juzzlin/DustRacing2D")
13772 (commit version)))
13773 (file-name (git-file-name name version))
13774 (sha256
13775 (base32 "1a6s7j9n6jmcabryd2959xpalz7d85h2fgakkrh41399xm40msnp"))
13776 (modules '((guix build utils)))
13777 ;; Unbundle argengine, simplelogger.
13778 (snippet #~(delete-file-recursively "src/contrib"))
13779 (patches (search-patches "dustracing2d-unbundle-libs.patch"))))
13780 (build-system qt-build-system)
13781 (arguments
13782 (list
13783 #:qtbase qtbase
13784 #:configure-flags #~(list "-DReleaseBuild=ON")))
13785 (inputs
13786 (list argengine
13787 libogg
13788 libvorbis
13789 mesa
13790 openal
13791 simplelogger))
13792 (native-inputs (list pkg-config qttools))
13793 (home-page "https://juzzlin.github.io/DustRacing2D/")
13794 (synopsis "Top-down car racing game")
13795 (description "Dust Racing 2D is a tile-based, cross-platform 2D racing
13796game supporting multiplayer play, different tracks, and gamemodes. It also
13797comes with a Qt-based level editor for easy level creation.")
13798 (license (list license:gpl3+ ;game
13799 license:cc-by-sa3.0)))) ;assets
13800
13801(define-public schiffbruch
13802 ;; There haven't been any releases for several years, so I've taken the most
13803 ;; recent commit from the master branch that didn't fail to build (the last
13804 ;; commit gave me a compile error).
13805 (let ((commit "e41916d15d87749c82c5005cbb42d1bb079b43d9"))
13806 (package
13807 (name "schiffbruch")
13808 (version (git-version "1.2.1" "0" commit))
13809 (source
13810 (origin
13811 (method git-fetch)
13812 (uri (git-reference
13813 (url "https://github.com/sandsmark/Schiffbruch")
13814 (commit commit)))
13815 (file-name (git-file-name name version))
13816 (sha256
13817 (base32 "0lg3rqacrapf6c4sxi12cm9bmg43mlbclway1zxcm848pi1xkzwv"))
13818 (patches (search-patches "schiffbruch-fix-build-for-gcc-13.patch"))))
13819 (build-system cmake-build-system)
13820 (arguments
13821 `(#:tests? #f ; no tests
13822 #:build-type "Release"))
13823 (inputs
13824 (list sfml-2))
13825 (home-page "https://github.com/sandsmark/Schiffbruch/")
13826 (synopsis "Pixelart survival game")
13827 (description
13828 "Schiffbruch is a mix of building, strategy and adventure and gets played
13829with a two-dimensional view. The game deals with the consequences of a ship
13830wreckage. You're stranded on a desert island and have to survive. In order to
13831do so you need to explore the island, find food, build a shelter and try to
13832get attention, so you get found.")
13833 (license license:cc-by4.0))))
13834
13835(define-public sdl-jstest
13836 (package
13837 (name "sdl-jstest")
13838 (version "0.2.2")
13839 (source (origin
13840 (method git-fetch)
13841 (uri (git-reference
13842 (url "https://github.com/Grumbel/sdl-jstest")
13843 (commit (string-append "v" version))))
13844 (file-name (git-file-name name version))
13845 (sha256
13846 (base32
13847 "11qp4gkbb11n3wx74128fj56radgsvkj7nxhbh55rd3xad1hckh3"))))
13848 (build-system cmake-build-system)
13849 (arguments
13850 (list
13851 ;; The test suite uses appstream-utils to validate the appdata.xml file,
13852 ;; fails with "url-not-found".
13853 #:tests? #f
13854 #:phases
13855 #~(modify-phases %standard-phases
13856 (add-after 'unpack 'copy-gamecontroller-db
13857 (lambda* (#:key native-inputs inputs #:allow-other-keys)
13858 (copy-file
13859 (search-input-file (or native-inputs inputs)
13860 "share/sdl2/gamecontrollerdb.txt")
13861 "external/sdl_gamecontrollerdb/gamecontrollerdb.txt"))))))
13862 (native-inputs
13863 (list pkg-config sdl2-gamecontrollerdb tinycmmc))
13864 (inputs (list ncurses sdl sdl2))
13865 (home-page "https://github.com/Grumbel/sdl-jstest")
13866 (synopsis "SDL Joystick Tester")
13867 (description "The @command{sdl-jstest} and @command{sdl2-jstest} commands
13868can list the available joystick controllers as found by the SDL or SDL2
13869libraries, respectively. It can show the available axes, buttons, hats and
13870balls of a chosen controller, and can display the controller actions in real
13871time in a visual fashion.")
13872 (license license:gpl3+)))
13873
13874(define-public sdlpop
13875 (package
13876 (name "sdlpop")
13877 (version "1.24-rc")
13878 (source
13879 (origin
13880 (method git-fetch)
13881 (uri (git-reference
13882 (url "https://github.com/NagyD/SDLPoP")
13883 (commit "v1.24-RC")))
13884 (file-name (git-file-name name version))
13885 (sha256
13886 (base32 "16idniqabzwf8kc30mqvkdfvr1kqy26bja3af2c105mhxw3jx77f"))))
13887 (build-system cmake-build-system)
13888 (arguments
13889 (list
13890 #:tests? #f ;no tests provided
13891 #:phases
13892 #~(modify-phases %standard-phases
13893 (add-after 'unpack 'fix-data-path
13894 (lambda _
13895 (chdir "src")
13896 (substitute* "config.h"
13897 (("(#define SHARE_PATH ).*" all first)
13898 (string-append first "\""
13899 #$output "/share\"\n")))))
13900 (replace 'install
13901 (lambda _
13902 (let* ((out #$output)
13903 (bin (string-append out "/bin"))
13904 (opt (string-append out "/share/SDLPoP"))
13905 (app (string-append out "/share/applications"))
13906 (template "src/SDLPoP.desktop.template"))
13907 (chdir "..")
13908 (for-each mkdir-p
13909 (list bin opt app))
13910 (install-file "prince" opt)
13911 (symlink (string-append opt "/prince")
13912 (string-append bin "/prince"))
13913 (substitute* template
13914 (("\\$ROOT")
13915 out)
13916 (("(Exec=).*" all first)
13917 (string-append first opt "/prince\n"))
13918 (("(Icon=).*" all first)
13919 (string-append first opt "/data/icon.png\n"))
13920 (("(Path=).*" all first)
13921 (string-append first opt "\n")))
13922 (copy-file template (string-append app "/SDLPoP.desktop"))
13923 (install-file "SDLPoP.ini" opt)
13924 (copy-recursively "data"
13925 (string-append opt "/data"))
13926 (copy-recursively "doc" opt)
13927 (copy-recursively "mods" opt)))))))
13928 (native-inputs (list pkg-config))
13929 (inputs (list (sdl-union (list sdl2 sdl2-image))))
13930 (synopsis "Port of Prince of Persia game")
13931 (description "This package provides port of Prince of Persia, based on the
13932disassembly of the DOS version, extended with new features.")
13933 (home-page "https://github.com/NagyD/SDLPoP")
13934 (license license:gpl3+)))
13935
13936(define-public fheroes2
13937 (package
13938 (name "fheroes2")
13939 (version "1.1.11")
13940 (source
13941 (origin
13942 (method git-fetch)
13943 (uri (git-reference
13944 (url "https://github.com/ihhub/fheroes2")
13945 (commit version)))
13946 (file-name (git-file-name name version))
13947 (sha256
13948 (base32 "0px9ibvkr6q2h6jbiqfy3mp46d1kl52zlqfsbj7p2c4v3c18kj2k"))))
13949 (build-system cmake-build-system)
13950 (arguments
13951 `(#:tests? #f ; no tests
13952 #:make-flags '("FHEROES2_STRICT_COMPILATION=1"
13953 "RELEASE=1")))
13954 (native-inputs
13955 (list gettext-minimal))
13956 (inputs
13957 (list libpng
13958 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
13959 zlib))
13960 (home-page "https://ihhub.github.io/fheroes2/")
13961 (synopsis "Turn-based strategy game engine")
13962 (description "@code{fheroes2} is an implementation of Heroes of Might and
13963Magic II (aka HOMM2) game engine. It requires assets and game resources to
13964play; it will look for them at @file{~/.local/share/fheroes2} folder.")
13965 (license license:gpl2)))
13966
13967(define-public vcmi
13968 (package
13969 (name "vcmi")
13970 (version "1.7.5")
13971 (source (origin
13972 (method git-fetch)
13973 (uri (git-reference
13974 (url "https://github.com/vcmi/vcmi")
13975 (commit version)))
13976 (file-name (git-file-name name version))
13977 (sha256
13978 (base32
13979 "1xqvb64fgsq8wahd5ffh8ykkn6sy6z50d4pa4y2s71ga82pvnfpa"))
13980 (modules '((guix build utils)))
13981 (snippet #~(delete-file-recursively "android")) ;.jar included
13982 (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
13983 (build-system qt-build-system)
13984 (arguments
13985 (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF"
13986 "-DENABLE_INNOEXTRACT=OFF"
13987 "-DENABLE_MMAI=OFF"
13988 "-DENABLE_DISCORD=OFF")
13989 #:qtbase qtbase
13990 ;; Test suites do not seem well supported upstream and are disabled by default.
13991 ;; Pass -DENABLE_TEST to configure to enable.
13992 #:tests? #f))
13993 (inputs
13994 (list boost
13995 ffmpeg
13996 fmt
13997 fuzzylite
13998 libsquish
13999 libxkbcommon
14000 luajit
14001 minizip
14002 onetbb
14003 qtsvg
14004 (sdl-union (list sdl2 sdl2-mixer sdl2-image sdl2-ttf))
14005 vulkan-headers
14006 zlib))
14007 (native-inputs
14008 (list gettext-minimal
14009 ;; googletest ; needed for tests, but tests are disabled
14010 pkg-config
14011 python-minimal
14012 qttools))
14013 (home-page "https://vcmi.eu/")
14014 (synopsis "Turn-based strategy game engine")
14015 (description
14016 "@code{vcmi} is an implementation of the Heroes of Might and
14017Magic III game engine. It requires assets and game resources to
14018play; it will look for them at @file{~/.local/share/vcmi} folder.")
14019 (license license:gpl2+)))
14020
14021(define-public apricots
14022 (package
14023 (name "apricots")
14024 (version "0.2.9")
14025 (source
14026 (origin
14027 (method git-fetch)
14028 (uri (git-reference
14029 (url "https://codeberg.org/moggers87/apricots")
14030 (commit (string-append "v" version))))
14031 (sha256
14032 (base32 "1xwdxiq0g2fb8scmcrjv29qnzrc3w3h0mmmhd6hw9wnfa5mv91lw"))
14033 (file-name (git-file-name name version))))
14034 (build-system gnu-build-system)
14035 (arguments
14036 ;; The test suite doesn't test the built game, but merely runs cppcheck &
14037 ;; clang-format. Useful for the maintainers; not for distributions.
14038 (list #:tests? #f))
14039 (native-inputs (list autoconf ;autom4te used in ./bootstrap
14040 automake)) ;aclocal used in ./bootstrap
14041 (inputs (list alure openal sdl2))
14042 (home-page "https://codeberg.org/moggers87/apricots")
14043 (synopsis "Arcade airplane game")
14044 (description "@code{apricots} is a game where you fly a little plane
14045around the screen and shoot things and drop bombs on enemy targets. It's
14046meant to be quick and fun.")
14047 (license license:gpl2+)))
14048
14049(define-public liquidwar6
14050 (package
14051 (name "liquidwar6")
14052 (version "0.6.3902")
14053 (source (origin
14054 (method url-fetch)
14055 (uri (string-append "mirror://gnu/liquidwar6/" "liquidwar6-"
14056 version ".tar.gz"))
14057 (sha256
14058 (base32
14059 "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn"))))
14060 (native-inputs (list doxygen))
14061 (inputs (list guile-2.0
14062 zlib
14063 expat
14064 sqlite
14065 ncurses
14066 readline
14067 curl
14068 python-2
14069 libxslt
14070 perl
14071 graphviz
14072 glu
14073 libcaca
14074 (sdl-union (list sdl sdl-image sdl-ttf sdl-mixer))))
14075 (build-system gnu-build-system)
14076 (arguments
14077 (list #:configure-flags
14078 #~(list "--enable-allinone" "CFLAGS=-Wno-error -O2 -g"
14079 (string-append "CPPFLAGS=" "-I"
14080 #$(this-package-input "sdl-union")
14081 "/include/SDL"))))
14082 (synopsis "Liquid War 6 is a unique multiplayer wargame")
14083 (description
14084 "Liquid War 6 is a unique multiplayer war game. Your army is a blob of
14085liquid and you have to try and eat your opponents. Rules are very simple yet
14086original, they have been invented by Thomas Colcombet.")
14087 (home-page "https://www.gnu.org/software/liquidwar6/")
14088 (license license:gpl3+)))
14089
14090(define-public plunder
14091 (let ((commit "026ded7083df5134bdf05b1ec7e5a0099ac9b9d2")
14092 (revision "1"))
14093 (package
14094 (name "plunder")
14095 (version (git-version "1.0.0" revision commit))
14096 (source (origin
14097 (method git-fetch)
14098 (uri (git-reference
14099 (url "https://github.com/jappeace/plunder")
14100 (commit commit)))
14101 (file-name (git-file-name name version))
14102 (sha256
14103 (base32
14104 "0m0v8x6q9iq4zihwmysbxjwkq18nar6xhq4g18p2g8c6azj2mgd6"))))
14105 (build-system haskell-build-system)
14106 (inputs (list ghc-monadrandom
14107 ghc-quickcheck
14108 ghc-file-embed
14109 ghc-generic-lens
14110 ghc-lens
14111 ghc-random
14112 ghc-reflex
14113 ghc-reflex-sdl2
14114 ghc-sdl2
14115 ghc-sdl2-gfx
14116 ghc-sdl2-image
14117 ghc-sdl2-ttf
14118 ghc-vector
14119 ghc-witherable))
14120 (native-inputs (list ghc-hspec ghc-hspec-core hspec-discover))
14121 (home-page "https://github.com/jappeace/plunder")
14122 (synopsis "Game about looting a hexagonal-tile world")
14123 (description
14124 "This package provides a work-in-progress game where you control a
14125Viking and your objective is to loot all of the occupied hexagonal tiles in
14126the map.")
14127 (license license:expat))))
14128
14129(define-public freerct
14130 (let ((commit "f85335dc98cdb28081b38cdf23409ac8a91d9a66")
14131 (revision "0"))
14132 (package
14133 (name "freerct")
14134 (version (git-version "0.1" revision commit))
14135 (source (origin
14136 (method git-fetch)
14137 (uri (git-reference
14138 (url "https://codeberg.org/FreeRCT/FreeRCT")
14139 (commit commit)))
14140 (file-name (git-file-name name version))
14141 (sha256
14142 (base32
14143 "1mimwgw487dxr2h1kxciwz34hk06g1lfgpicrav7khh19843a2fq"))))
14144 (build-system cmake-build-system)
14145 (arguments
14146 `(#:tests? #f))
14147 (native-inputs (list flex bison))
14148 (inputs (list libpng glfw glew freetype))
14149 (home-page "https://freerct.net/")
14150 (synopsis "Theme park management simulation game")
14151 (description
14152 "FreeRCT is a game that captures the look and feel of the popular games
14153RollerCoaster Tycoon 1 and 2, graphics- and gameplay-wise.
14154
14155In this game, you play as a manager of a theme park, allowing you to make a
14156park of your dreams. The list of responsibilities includes managing staff,
14157finances, landscaping, and most importantly: rides. Good managers follow the
14158principle of prioritizing the guests' happiness with a well-maintained park.
14159Should they go unwise, a theme park plunge into chaos with vandalizing guests
14160and unsafe rides. Which path will you take?")
14161 (license license:gpl2))))
14162
14163(define-public ultrastar-deluxe
14164 (package
14165 (name "ultrastar-deluxe")
14166 (version "2025.10.1")
14167 (source (origin
14168 (method git-fetch)
14169 (uri (git-reference
14170 (url "https://github.com/UltraStar-Deluxe/USDX.git")
14171 (commit (string-append "v" version))))
14172 (file-name (git-file-name name version))
14173 (sha256
14174 (base32
14175 "009fbxdv4qkc15y4lisi6d4phv3dk9mypl2hhzfhyjh0i04d2wwa"))
14176 (patches (search-patches "ultrastar-deluxe-no-freesans.patch"))
14177 (modules '((guix build utils)))
14178 (snippet
14179 #~(begin
14180 ;; Remove Windows binaries.
14181 (for-each delete-file (find-files "game" "\\.dll$"))
14182 ;; Remove font blobs.
14183 (let ((font-directories
14184 (list "DejaVu" "FreeSans" "NotoSans"
14185 "wqy-microhei")))
14186 (for-each
14187 (lambda (d) (delete-file-recursively
14188 (string-append "game/fonts/" d)))
14189 font-directories))))))
14190 (build-system gnu-build-system)
14191 (arguments
14192 (list
14193 #:tests? #f ; No tests.
14194 #:phases
14195 #~(modify-phases %standard-phases
14196 (add-after 'unpack 'fix-configure
14197 (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
14198 (define (where inputs file)
14199 (dirname (search-input-file inputs file)))
14200 ;; The configure script looks for lua$version, but we
14201 ;; provide lua-$version.
14202 (substitute* "configure.ac"
14203 (("lua\\$i") "lua-$i"))
14204 ;; fpc does not pass -lfoo to the linker, but uses its own
14205 ;; linker script, which references libs. Pass the libraries
14206 ;; listed in that linker script, so our custom linker adds
14207 ;; a correct rpath.
14208 (substitute* "src/Makefile.in"
14209 (("linkflags\\s+:= ")
14210 (string-append
14211 "linkflags := -lpthread -lsqlite3 -lSDL2"
14212 " -lSDL2_image -ldl "
14213 " -lfreetype -lportaudio -lavcodec"
14214 " -lavformat -lavutil -lswresample"
14215 " -lswscale -llua -ldl -lX11 -lportmidi"
14216 " -L" (where inputs "lib/libX11.so")
14217 " -L" (where inputs "lib/libportmidi.so"))))))
14218 (add-after 'install 'font-paths
14219 (lambda* (#:key outputs #:allow-other-keys)
14220 (substitute* (string-append
14221 (assoc-ref outputs "out")
14222 "/share/ultrastardx/fonts/fonts.ini")
14223 (("=NotoSans/") (string-append "=" #$font-google-noto:ttf
14224 "/share/fonts/truetype/"))
14225 (("=DejaVu/") (string-append "=" #$font-dejavu
14226 "/share/fonts/truetype/"))))))))
14227 (inputs (list ffmpeg
14228 font-dejavu
14229 (list font-google-noto "ttf")
14230 ; Not needed, since we don’t have freesans.
14231 ;font-wqy-microhei
14232 freetype
14233 libx11
14234 lua
14235 portaudio
14236 portmidi
14237 sdl2
14238 sdl2-image
14239 sqlite))
14240 (native-inputs (list pkg-config fpc autoconf automake))
14241 (synopsis "Karaoke game")
14242 (description
14243 "UltraStar Deluxe (USDX) is a karaoke game. It allows up to six players
14244to sing along with music using microphones in order to score points, depending
14245on the pitch of the voice and the rhythm of singing.")
14246 (home-page "https://usdx.eu/")
14247 (license license:gpl2+)))
14248
14249(define-public xmahjongg
14250 (package
14251 (name "xmahjongg")
14252 (version "3.7")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (string-append "http://www.lcdf.org/xmahjongg/xmahjongg-"
14257 version ".tar.gz"))
14258 (sha256
14259 (base32 "1kzz8y34q7wibcrmfb3p9rrz88qriz4slxpf1yrrfny23il66g94"))))
14260 (build-system gnu-build-system)
14261 (inputs (list libx11))
14262 (home-page "http://www.lcdf.org/xmahjongg/")
14263 (synopsis "Solitaire Mah Jongg game")
14264 (description
14265 "Xmahjongg is a simple solitaire game. The object is to remove all Mah
14266Jongg tiles from the playing field by taking one matching pair at a time.")
14267 (license license:gpl2+)))
14268
14269(define-public sc-controller
14270 (package
14271 (name "sc-controller")
14272 (version "0.5.2")
14273 (source (origin
14274 (method git-fetch)
14275 (uri (git-reference
14276 (url "https://github.com/C0rn3j/sc-controller")
14277 (commit (string-append "v" version))))
14278 (file-name (git-file-name name version))
14279 (sha256
14280 (base32
14281 "1zczdaxf76n1h6v3daaml7zd2ga808sscfp4bhnagfvw8y3xbf63"))))
14282 (build-system pyproject-build-system)
14283 (arguments
14284 (list
14285 #:imported-modules `((guix build glib-or-gtk-build-system)
14286 ,@%pyproject-build-system-modules)
14287 #:modules '((guix build pyproject-build-system)
14288 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
14289 (guix build utils))
14290 #:phases #~(modify-phases %standard-phases
14291 (delete 'sanity-check)
14292 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
14293 (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file))
14294 (add-before 'build 'no-install-udev
14295 (lambda _
14296 ;; Installing udev rules errors out. Install them manually later
14297 (substitute* "setup.py"
14298 ((".*lib/udev.*") ""))))
14299 (add-after 'unpack 'remove-bundled-libraries
14300 (lambda _
14301 (delete-file "scc/lib/jsonencoder.py")
14302 (substitute* "scc/profile.py"
14303 (("from scc\\.lib\\.jsonencoder")
14304 "from simplejson"))))
14305 (add-after 'unpack 'fix-paths
14306 (lambda _
14307 (substitute* '("scc/lib/xwrappers.py"
14308 "scc/lib/eudevmonitor.py")
14309 (("libXfixes\\.so|libXext\\.so|libudev\\.so" library)
14310 (search-input-file %build-inputs (string-append "lib/" library))))
14311 (substitute* "scc/uinput.py"
14312 (("/usr/include")
14313 (string-append (assoc-ref %build-inputs
14314 "linux-libre-headers")
14315 "/include")))
14316 (substitute* '("scc/gui/app.py"
14317 "scc/osd/inputdisplay.py"
14318 "scc/paths.py")
14319 (("/usr/share/scc")
14320 (string-append #$output "/share/scc")))))
14321 (add-after 'install 'install-udev
14322 (lambda _
14323 (for-each
14324 (lambda (udev-rule)
14325 (install-file udev-rule
14326 (string-append
14327 #$output
14328 "/lib/udev/rules.d")))
14329 (find-files "./scripts" "\\.rules$"))))
14330 (add-after 'install 'glib-or-gtk-compile-schemas
14331 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
14332 (add-after 'wrap 'glib-or-gtk-wrap
14333 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
14334 (add-after 'glib-or-gtk-wrap 'gi-wrap
14335 (lambda _
14336 (let ((bin (string-append #$output "/bin")))
14337 (for-each (lambda (prog)
14338 (wrap-program prog
14339 `("GDK_PIXBUF_MODULE_FILE" =
14340 (,(getenv "GDK_PIXBUF_MODULE_FILE")))
14341 `("GI_TYPELIB_PATH" =
14342 (,(getenv "GI_TYPELIB_PATH")))))
14343 ;; Predicate regex so we don't wrap the existing wrappers
14344 (find-files bin "^[^.]"))))))))
14345 (inputs (list
14346 bash-minimal
14347 eudev
14348 gtk+
14349 gtk-layer-shell
14350 libxext
14351 libxfixes
14352 linux-libre-headers
14353 python-evdev
14354 python-ioctl-opt
14355 python-libusb1
14356 python-pycairo
14357 python-pygobject
14358 python-pylibacl
14359 python-simplejson
14360 python-vdf
14361 zlib))
14362 (native-inputs
14363 (list
14364 python-pytest
14365 python-setuptools
14366 python-setuptools-scm
14367 python-wheel))
14368 (home-page "https://github.com/Ryochan7/sc-controller")
14369 (synopsis "Driver and configuration tool for game controllers")
14370 (description
14371 "Driver and configuration tool for game controllers such as
14372the Steam Controller, Steam Deck, and Dual Shock 4. Install the included udev
14373rules to solve permissions issues.")
14374 (license (list
14375 license:cc0 ; images/*, default_profiles/*, profile_examples/*, default_menus/*
14376 license:zlib ; scripts/gamecontrollerdb.txt
14377 license:gpl2)))) ; everything else
14378
14379(define-public steam-devices-udev-rules
14380 ;; Last release from 2019-04-10
14381 (let ((commit "7dde9ecb3c386363ecd9bd0a3b77e4756d200704")
14382 (revision "2"))
14383 (package
14384 (name "steam-devices-udev-rules")
14385 (version (git-version "1.0.0.61" revision commit))
14386 (source (origin
14387 (method git-fetch)
14388 (uri (git-reference
14389 (url "https://github.com/ValveSoftware/steam-devices")
14390 (commit commit)))
14391 (file-name (git-file-name name version))
14392 (sha256
14393 (base32
14394 "0w0xkgi9fpvdbpl57f8fy2nwy2icm6iag39b8ifpkijlxgclx1p3"))))
14395 (build-system copy-build-system)
14396 (arguments
14397 '(#:install-plan '(("./" "lib/udev/rules.d"
14398 #:include-regexp ("rules$")))
14399 #:phases (modify-phases %standard-phases
14400 (add-after 'unpack 'patch-paths
14401 (lambda* (#:key inputs #:allow-other-keys)
14402 (substitute* "60-steam-input.rules"
14403 (("/bin/sh")
14404 (search-input-file inputs "/bin/sh"))
14405 (("udevadm")
14406 (search-input-file inputs "/bin/udevadm"))))))))
14407 (inputs (list eudev))
14408 (home-page "https://github.com/ValveSoftware/steam-devices")
14409 (synopsis "udev rules for game controllers and virtual reality devices")
14410 (description
14411 "This package provides a set of udev rules for game controllers and
14412virtual reality devices.")
14413 (license license:expat))))
14414
14415(define-public gemrb
14416 (package
14417 (name "gemrb")
14418 (version "0.9.4")
14419 (source
14420 (origin
14421 (method git-fetch)
14422 (uri (git-reference
14423 (url "https://github.com/gemrb/gemrb")
14424 (commit (string-append "v" version))))
14425 (file-name (git-file-name name version))
14426 (sha256
14427 (base32 "16pp9vw717pk9q8q3asxk4j64rmywbnpw91cr3qanwnmdi5p5gj4"))
14428 ;; Remove the patch in the next version, as commit cca8e71 fixes this
14429 (patches (search-patches
14430 "gemrb-remove-ifdef-and-externalize-path-setting-to-cmake.patch"))))
14431 (build-system cmake-build-system)
14432 (arguments
14433 (list
14434 #:configure-flags
14435 #~(list "-DUSE_TESTS=ON" "-DOPENGL_BACKEND=OpenGL")))
14436 (native-inputs (list python
14437 (libc-utf8-locales-for-target (%current-system))
14438 googletest))
14439 (inputs (list freetype
14440 libiconv
14441 libpng
14442 libvorbis
14443 openal
14444 sdl2
14445 sdl2-mixer
14446 vlc
14447 zlib))
14448 (home-page "https://gemrb.org/")
14449 (synopsis "Portable implementation of Bioware's Infinity Engine")
14450 (description
14451 "GemRB (Game Engine Made with preRendered Background) is a portable
14452reimplementation of the Infinity Engine that underpinned Baldur's Gate,
14453Icewind Dale and Planescape: Torment. It sports a cleaner design, greater
14454extensibility and several innovations.")
14455 (license license:gpl2+)))
14456
14457(define-public zeta
14458 (package
14459 (name "zeta")
14460 (version "1.1.4")
14461 (home-page "https://zeta.asie.pl/")
14462 (synopsis "ZZT and Super ZZT emulator")
14463 (description
14464 "An emulator implementing enough of @acronym{DOS, Disk Operating System}
14465to run ZZT and Super ZZT on modern systems.")
14466 (source
14467 (origin
14468 (method git-fetch)
14469 (uri (git-reference
14470 (url "https://github.com/asiekierka/zeta")
14471 (commit version)))
14472 (file-name (git-file-name name version))
14473 (sha256
14474 (base32 "0h7wnxn6rrlqbzgsbhhlx4lpb5apdr3bbxvp74y3axidkgs62bzf"))))
14475 (license (list license:expat))
14476
14477 (build-system gnu-build-system)
14478 (inputs
14479 (list
14480 libdecor
14481 libpng
14482 sdl3))
14483 (native-inputs
14484 (list
14485 autoconf
14486 automake
14487 pkg-config
14488 python
14489 python-pillow))
14490 (arguments
14491 '(#:configure-flags
14492 '("--with-frontend=sdl3"
14493 ;; Upstream requests c11, but the source uses strdup() /
14494 ;; strcasecmp(), which aren't in C11.
14495 "CFLAGS=-std=gnu11")))))
14496
14497;;;
14498;;; Avoid adding new packages to the end of this file. To reduce the chances
14499;;; of a merge conflict, place them above by existing packages with similar
14500;;; functionality or similar names.
14501;;;