projects/guix·blob python-team · refs

14500 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 fonts)
151 #:use-module (gnu packages fontutils)
152 #:use-module (gnu packages freedesktop)
153 #:use-module (gnu packages fribidi)
154 #:use-module (gnu packages game-development)
155 #:use-module (gnu packages gcc)
156 #:use-module (gnu packages gettext)
157 #:use-module (gnu packages ghostscript)
158 #:use-module (gnu packages gimp)
159 #:use-module (gnu packages gl)
160 #:use-module (gnu packages glib)
161 #:use-module (gnu packages gnome)
162 #:use-module (gnu packages gnu-doc)
163 #:use-module (gnu packages gnupg)
164 #:use-module (gnu packages gnuzilla)
165 #:use-module (gnu packages golang-build)
166 #:use-module (gnu packages golang-xyz)
167 #:use-module (gnu packages gperf)
168 #:use-module (gnu packages graphics)
169 #:use-module (gnu packages graphviz)
170 #:use-module (gnu packages groff)
171 #:use-module (gnu packages gsasl)
172 #:use-module (gnu packages gstreamer)
173 #:use-module (gnu packages gtk)
174 #:use-module (gnu packages guile)
175 #:use-module (gnu packages haskell)
176 #:use-module (gnu packages haskell-check)
177 #:use-module (gnu packages haskell-crypto)
178 #:use-module (gnu packages haskell-xyz)
179 #:use-module (gnu packages icu4c)
180 #:use-module (gnu packages image)
181 #:use-module (gnu packages imagemagick)
182 #:use-module (gnu packages javascript)
183 #:use-module (gnu packages kde-frameworks)
184 #:use-module (gnu packages less)
185 #:use-module (gnu packages toolkits)
186 #:use-module (gnu packages libcanberra)
187 #:use-module (gnu packages libedit)
188 #:use-module (gnu packages libffi)
189 #:use-module (gnu packages libidn)
190 #:use-module (gnu packages libunwind)
191 #:use-module (gnu packages libusb)
192 #:use-module (gnu packages linux)
193 #:use-module (gnu packages lisp)
194 #:use-module (gnu packages llvm)
195 #:use-module (gnu packages logging)
196 #:use-module (gnu packages lua)
197 #:use-module (gnu packages man)
198 #:use-module (gnu packages maths)
199 #:use-module (gnu packages messaging)
200 #:use-module (gnu packages mp3)
201 #:use-module (gnu packages multiprecision)
202 #:use-module (gnu packages music)
203 #:use-module (gnu packages ncurses)
204 #:use-module (gnu packages netpbm)
205 #:use-module (gnu packages networking)
206 #:use-module (gnu packages node)
207 #:use-module (gnu packages ocaml)
208 #:use-module (gnu packages oneapi)
209 #:use-module (gnu packages opencl)
210 #:use-module (gnu packages pcre)
211 #:use-module (gnu packages perl)
212 #:use-module (gnu packages perl-check)
213 #:use-module (gnu packages perl-compression)
214 #:use-module (gnu packages pkg-config)
215 #:use-module (gnu packages pretty-print)
216 #:use-module (gnu packages protobuf)
217 #:use-module (gnu packages pulseaudio)
218 #:use-module (gnu packages python)
219 #:use-module (gnu packages python-build)
220 #:use-module (gnu packages python-check)
221 #:use-module (gnu packages python-compression)
222 #:use-module (gnu packages python-web)
223 #:use-module (gnu packages python-xyz)
224 #:use-module (gnu packages qt)
225 #:use-module (gnu packages readline)
226 #:use-module (gnu packages regex)
227 #:use-module (gnu packages ruby-xyz)
228 #:use-module (gnu packages rust)
229 #:use-module (gnu packages sdl)
230 #:use-module (gnu packages serialization)
231 #:use-module (gnu packages shells)
232 #:use-module (gnu packages sqlite)
233 #:use-module (gnu packages squirrel)
234 #:use-module (gnu packages stb)
235 #:use-module (gnu packages swig)
236 #:use-module (gnu packages tcl)
237 #:use-module (gnu packages terminals)
238 #:use-module (gnu packages texinfo)
239 #:use-module (gnu packages textutils)
240 #:use-module (gnu packages tls)
241 #:use-module (gnu packages unicode)
242 #:use-module (gnu packages upnp)
243 #:use-module (gnu packages video)
244 #:use-module (gnu packages vulkan)
245 #:use-module (gnu packages web)
246 #:use-module (gnu packages wget)
247 #:use-module (gnu packages wxwidgets)
248 #:use-module (gnu packages xdisorg)
249 #:use-module (gnu packages xiph)
250 #:use-module (gnu packages xml)
251 #:use-module (gnu packages xorg)
252 #:use-module (gnu packages)
253 #:use-module (guix build-system cargo)
254 #:use-module (guix build-system cmake)
255 #:use-module (guix build-system copy)
256 #:use-module (guix build-system glib-or-gtk)
257 #:use-module (guix build-system gnu)
258 #:use-module (guix build-system go)
259 #:use-module (guix build-system haskell)
260 #:use-module (guix build-system meson)
261 #:use-module (guix build-system perl)
262 #:use-module (guix build-system pyproject)
263 #:use-module (guix build-system qt)
264 #:use-module (guix build-system scons)
265 #:use-module (guix build-system trivial)
266 #:use-module (guix download)
267 #:use-module (guix gexp)
268 #:use-module (guix git-download)
269 #:use-module ((guix licenses) #:prefix license:)
270 #:use-module (guix packages)
271 #:use-module (guix svn-download)
272 #:use-module (guix utils)
273 #:use-module (ice-9 match)
274 #:use-module ((srfi srfi-1) #:hide (zip))
275 #:use-module (srfi srfi-26))
276
277(define-public hexahop
278 (package
279 (name "hexahop")
280 (version "1.1.0")
281 (source
282 (origin
283 (method url-fetch)
284 (uri (string-append "mirror://sourceforge/hexahop/" version "/"
285 "hex-a-hop-" version ".tar.gz"))
286
287 (sha256
288 (base32 "1mm069wpwc8nrrzfn2f64vh550634xlfws64bfmhqhx86vcikgw0"))))
289 (build-system gnu-build-system)
290 (arguments
291 (list #:configure-flags
292 #~(list (string-append "--with-sdl-prefix="
293 #$(this-package-input "sdl-union")))))
294 (native-inputs
295 (list pkg-config))
296 (inputs
297 (list (sdl-union (list sdl sdl-mixer sdl-ttf))))
298 (home-page "https://sourceforge.net/projects/hexahop/")
299 (synopsis "Puzzle game navigating paths over hexagons")
300 (description
301 "Hex-a-hop is a puzzle game in which a girl has to destroy green hexagons
302by stepping on them.")
303 (license license:gpl2+)))
304
305(define-public abe
306 (package
307 (name "abe")
308 (version "1.1")
309 (source
310 (origin
311 (method url-fetch)
312 (uri (string-append "mirror://sourceforge/abe/abe/abe-" version
313 "/abe-" version ".tar.gz"))
314 (sha256
315 (base32 "1xvpnq1y6y48fn3pvn2lk0h1ilmalv7nb7awpid1g4jcq1sfmi6z"))))
316 (build-system gnu-build-system)
317 (arguments
318 `(#:configure-flags
319 (list (string-append "--with-data-dir="
320 (assoc-ref %outputs "out")
321 "/share/abe"))
322 #:phases
323 (modify-phases %standard-phases
324 (replace 'bootstrap
325 (lambda _ (invoke "sh" "autogen.sh")))
326 (add-before 'build 'set-SDL
327 ;; Set correct environment for SDL.
328 (lambda* (#:key inputs #:allow-other-keys)
329 (setenv "CPATH"
330 (string-append
331 (assoc-ref inputs "sdl") "/include/SDL:"
332 (or (getenv "CPATH") "")))
333 #t))
334 (add-after 'install 'finalize-install
335 (lambda* (#:key outputs #:allow-other-keys)
336 (let ((share (string-append (assoc-ref outputs "out") "/share")))
337 ;; Installation script does not copy game data files.
338 (let ((data (string-append share "/abe")))
339 (for-each (lambda (dir)
340 (let ((target (string-append data "/" dir)))
341 (mkdir-p target)
342 (copy-recursively dir target)))
343 '("images" "maps" "sounds")))
344 ;; Create desktop file.
345 (let ((apps (string-append share "/applications")))
346 (mkdir-p apps)
347 (make-desktop-entry-file
348 (string-append apps "/abe.desktop")
349 #:name "Abe's Amazing Adventure"
350 #:exec ,name
351 #:categories '("AdventureGame" "Game")
352 #:keywords
353 '("side-scrolling" "adventure" "pyramid" "singleplayer")
354 #:comment
355 '(("de" "Ein sich seitwärts bewegendes Abenteuerspiel")
356 (#f "Side-scrolling game")))))
357 #t)))))
358 (native-inputs
359 (list autoconf automake))
360 (inputs
361 `(("libxi" ,libxi)
362 ("libxmu" ,libxmu)
363 ("libxt" ,libxt)
364 ("sdl" ,(sdl-union (list sdl sdl-mixer)))))
365 (home-page "https://abe.sourceforge.net")
366 (synopsis "Scrolling, platform-jumping, ancient pyramid exploring game")
367 (description
368 "Abe's Amazing Adventure is a scrolling,
369platform-jumping, key-collecting, ancient pyramid exploring game, vaguely in
370the style of similar games for the Commodore+4.")
371 (license license:gpl2+)))
372
373(define-public adanaxisgpl
374 (let* ((version "1.2.5")
375 (commit (string-append "ADANAXIS_"
376 (string-join (string-split version #\.) "_")
377 "_RELEASE_X11")))
378 (package
379 (name "adanaxisgpl")
380 (version version)
381 (source
382 (origin
383 (method git-fetch)
384 (uri (git-reference
385 (url "https://github.com/mushware/adanaxis")
386 (commit commit)))
387 (file-name (git-file-name name version))
388 (sha256
389 (base32 "1vbg17lzbm0xl9yy9qymd1vgpz6f7fbr2hffl2ap0nm4zg0mnafm"))
390 (modules '((guix build utils)))
391 (snippet
392 '(begin
393 ;; Necessary for building with gcc >=4.7.
394 (substitute* "src/Mushcore/MushcoreSingleton.h"
395 (("SingletonPtrSet\\(new SingletonType\\);")
396 "MushcoreSingleton::SingletonPtrSet(new SingletonType);"))
397 ;; Avoid an "invalid conversion from const char* to char*" error.
398 (substitute* "src/Platform/X11/PlatformMiscUtils.cpp"
399 (("char \\*end, \\*result;")
400 (string-append "const char *end;\n"
401 "char *result;")))
402 ;; autogen.pl will throw misleading errors if these don't exist.
403 (for-each mkdir-p '("src/MushSecret" "data-adanaxis"))
404 ;; Create these missing files at the right later moment.
405 (substitute* "autogen.pl"
406 (("automake")
407 "automake --add-missing"))))))
408 (build-system gnu-build-system)
409 (arguments
410 `(#:tests? #f ; no check target
411 #:phases
412 (modify-phases %standard-phases
413 (add-after 'unpack 'unpack-inputs
414 (lambda* (#:key inputs #:allow-other-keys)
415 (copy-recursively
416 (dirname (search-input-directory inputs "pixelsrc"))
417 "data-adanaxis")
418 (copy-recursively
419 (dirname (search-input-file inputs "MushBase.rb"))
420 "data-adanaxis/mushruby")))
421 (replace 'bootstrap
422 (lambda _
423 (invoke "perl" "autogen.pl" "adanaxis"
424 "--type=gpl" "--dist=debian")))
425 (add-after 'install 'install-data
426 ;; XXX This was copied from the original (pre-Git) adanaxisgpl
427 ;; package. While the game appears to play fine without it,
428 ;; I cannot prove that it's not missing *something*, so keep it.
429 (lambda* (#:key inputs outputs #:allow-other-keys)
430 (let ((share (string-append (assoc-ref outputs "out")
431 "/share/" ,name "-" ,version)))
432 (copy-recursively (search-input-directory inputs "mush")
433 (string-append share "/mush"))))))))
434 (native-inputs
435 (list (origin
436 (method git-fetch)
437 (uri (git-reference
438 (url "https://github.com/mushware/adanaxis-data")
439 ;; XXX There is a tag matching COMMIT, but it does not
440 ;; contain the .mush files installed by 'install-data.
441 ;; Use this later commit as long as we install them.
442 (commit "6a5b5ad8ee82c10e67bc4c12b16404944fd5754d")))
443 (file-name (git-file-name "adanaxis-data" version))
444 (sha256
445 (base32 "15am9ziq1i53sz0r7sjh2z329b52fkzj6fz7ms1nqqzdfmp11r3d")))
446 (origin
447 (method git-fetch)
448 (uri (git-reference
449 (url "https://github.com/mushware/adanaxis-mushruby")
450 (commit commit)))
451 (file-name (git-file-name "adanaxis-mushruby" version))
452 (sha256
453 (base32 "0pzcvchysjj37420rpvarky580gi5d6pfv93kwa91rg6m5r1zwks")))
454 autoconf
455 automake
456 perl))
457 (inputs
458 (list expat
459 freeglut
460 glu
461 libjpeg-turbo
462 libogg
463 libtiff
464 libvorbis
465 libx11
466 libxcrypt
467 libxext
468 pcre
469 sdl
470 sdl-mixer))
471 (home-page "https://www.mushware.com")
472 (synopsis "Action game in four spatial dimensions")
473 (description
474 "Adanaxis is a fast-moving first person shooter set in deep space, where
475the fundamentals of space itself are changed. By adding another dimension to
476space this game provides an environment with movement in four directions and
477six planes of rotation. Initially the game explains the 4D control system via
478a graphical sequence, before moving on to 30 levels of gameplay with numerous
479enemy, ally, weapon and mission types. Features include simulated 4D texturing,
480mouse and joystick control, and original music.")
481 (license license:gpl2))))
482
483(define-public anarch
484 (let ((commit "2d78d0c69a3aac14dbd8f8aca62d0cbd9d27c860")
485 (revision "1"))
486 (package
487 (name "anarch")
488 (version (git-version "1.1d" revision commit))
489 (source (origin
490 (method git-fetch)
491 (uri (git-reference
492 (url "https://gitlab.com/drummyfish/anarch")
493 (commit commit)))
494 (file-name (git-file-name name version))
495 (sha256
496 (base32
497 "1lg9r6q1davn5yj181ccygmvaigvm8fr9q2s1bc77a1vkz68vzdk"))))
498 (build-system gnu-build-system)
499 (arguments
500 (list #:tests? #f ;no tests
501 #:phases #~(modify-phases %standard-phases
502 (delete 'configure) ;no configure script
503 (replace 'build
504 (lambda _
505 (invoke "./make.sh" "sdl")))
506 (replace 'install
507 (lambda _
508 (let ((bin (string-append #$output "/bin")))
509 (install-file "anarch" bin)))))))
510 (inputs (list alsa-lib libxcursor libxrandr sdl2))
511 (home-page "https://drummyfish.gitlab.io/anarch/")
512 (synopsis "Public domain 90s-style shooter game")
513 (description "Anarch is a small, completely public domain, 90s-style
514Doom clone shooter game.")
515 (license license:cc0))))
516
517(define-public antimicrox
518 (package
519 (name "antimicrox")
520 (version "3.5.1")
521 (home-page "https://github.com/AntiMicroX/antimicrox")
522 (source
523 (origin
524 (method git-fetch)
525 (uri (git-reference
526 (url home-page)
527 (commit version)))
528 (file-name (git-file-name name version))
529 (sha256
530 (base32 "0p350l8d6rx72cjmmagsyvrmvzcgqypqas2nfjjbasd94f1y30b4"))))
531 (build-system cmake-build-system)
532 (arguments
533 (list
534 #:tests? #f ;Tests are unmaintained
535 #:configure-flags #~(list "-DCHECK_FOR_UPDATES=NO" "-DWITH_TESTS=NO"
536 #$(string-append "-DANTIMICROX_PKG_VERSION="
537 version))
538 #:phases #~(modify-phases %standard-phases
539 (add-after 'unpack 'patch-installation-target
540 (lambda _
541 (substitute* "CMakeLists.txt"
542 (("/usr(/lib/udev/rules.d)" _ lib)
543 (string-append #$output lib))))))))
544 (native-inputs (list extra-cmake-modules gettext-minimal itstool qttools))
545 (inputs (list libxtst libx11 qtbase sdl2))
546 (synopsis "Control your system with a gamepad")
547 (description
548 "AntiMicroX is a graphical program used to map gamepad keys to keyboard, mouse,
549scripts, and macros under both X.org and Wayland. With it you can control
550your system using a gamepad or play games that don't natively support
551gamepads. It can also be used for generating SDL2 configurations.
552
553For unprivileged access to input events, this package provides udev rules for
554use with @code{udev-service-type}.")
555 (license license:gpl3+)))
556
557(define-public armagetronad
558 (package
559 (name "armagetronad")
560 (version "0.2.9.3.0")
561 (source (origin
562 (method url-fetch)
563 (uri (string-append "mirror://sourceforge/armagetronad/stable/"
564 version "/armagetronad-" version ".tbz"))
565 (sha256
566 (base32
567 "1q1zlbhbcimr6bw0ms1pr8hz4q850ivi3hvxn3467jfgiq22f3cy"))))
568 (build-system gnu-build-system)
569 (arguments
570 (list #:configure-flags
571 #~(list "--disable-games" ;don't nest everything in ‘games/’
572 "--disable-uninstall") ;pointless (and broken) in Guix
573 #:phases
574 #~(modify-phases %standard-phases
575 (add-after 'unpack 'omit-broken-symlinks
576 ;; v0.2.9.2.0 added relative_path() which I think broke
577 ;; install_link(). It now creates a broken armagetronad-master
578 ;; symlink that causes the 'validate-runpath phase to fail.
579 (lambda _
580 (substitute* "batch/sysinstall.in"
581 (("^install_link .*BINDIR.*") "")))))))
582 (native-inputs (list pkg-config))
583 (inputs (list libxml2
584 curl
585 (sdl-union (list sdl sdl-image sdl-mixer))
586 freeglut
587 libpng
588 libjpeg-turbo))
589 (home-page "https://www.armagetronad.org")
590 (synopsis "Tron clone in 3D")
591 (description
592 "Armagetron Advanced is a multiplayer game in 3d that
593attempts to emulate and expand on the lightcycle sequence from the movie Tron.
594It's an old school arcade game slung into the 21st century. Highlights
595include a customizable playing arena, HUD, unique graphics, and AI bots. For
596the more advanced player there are new game modes and a wide variety of
597physics settings to tweak as well.")
598 (license license:gpl2+)))
599
600(define-public astromenace
601 (package
602 (name "astromenace")
603 (version "1.4.3")
604 (source
605 (origin
606 (method git-fetch)
607 (uri (git-reference
608 (url "https://github.com/viewizard/astromenace")
609 (commit (string-append "v" version))))
610 (file-name (git-file-name name version))
611 (sha256
612 (base32 "0683a6bb4rvbz3jaqs6pc4msy6l3vr7fafxi4nmbvziv5kr7x9sv"))))
613 (build-system cmake-build-system)
614 (arguments
615 (list
616 #:tests? #f ;no tests
617 #:configure-flags
618 #~(list (string-append "-DDATADIR=" #$output "/share/astromenace"))
619 #:phases
620 #~(modify-phases %standard-phases
621 (replace 'install
622 ;; Upstream provides no install phase.
623 (lambda _
624 (let* ((bin (string-append #$output "/bin"))
625 (share (string-append #$output "/share"))
626 (apps (string-append share "/applications"))
627 (data (string-append share "/astromenace"))
628 (icons (string-append share "/icons/hicolor/64x64/apps")))
629 (install-file "astromenace" bin)
630 (install-file "gamedata.vfs" data)
631 (with-directory-excursion (string-append #$source "/share")
632 (install-file "astromenace.desktop" apps)
633 (mkdir-p icons)
634 (copy-file "astromenace_64.png"
635 (string-append icons "/astromenace.png")))))))))
636 (inputs
637 (list freealut
638 freetype
639 glu
640 libogg
641 libvorbis
642 openal
643 sdl2))
644 (home-page "https://www.viewizard.com/")
645 (synopsis "3D space shooter with spaceship upgrade possibilities")
646 (description
647 "Space is a vast area, an unbounded territory where it seems there is
648a room for everybody, but reversal of fortune put things differently. The
649hordes of hostile creatures crawled out from the dark corners of the universe,
650craving to conquer your homeland. Their force is compelling, their legions
651are interminable. However, humans didn't give up without a final showdown and
652put their best pilot to fight back. These malicious invaders chose the wrong
653galaxy to conquer and you are to prove it! Go ahead and make alien aggressors
654regret their insolence.")
655 ;; Game is released under GPL3+ terms. Artwork is subject to CC
656 ;; BY-SA 4.0, and fonts to OFL1.1.
657 (license (list license:gpl3+ license:cc-by-sa4.0 license:silofl1.1))))
658
659(define-public barony
660 (package
661 (name "barony")
662 (version "3.3.7")
663 (source
664 (origin
665 (method git-fetch)
666 (uri (git-reference
667 (url "https://github.com/TurningWheel/Barony")
668 (commit (string-append "v" version))))
669 (file-name (git-file-name name version))
670 (sha256
671 (base32 "1y72k6zrqqhib3p05zkdklays2d218v51n87k7k68m0s7nnxa4vy"))
672 ;; Fix textures for SDL 2.0.14.
673 ;; See <https://github.com/TurningWheel/Barony/pull/582>.
674 (patches (search-patches "barony-fix-textures.patch"))))
675 (build-system cmake-build-system)
676 (arguments
677 '(#:configure-flags
678 (list "-DOPENAL_ENABLED=ON" ; enable sound
679 "-DEDITOR_EXE_NAME=barony-editor") ; instead of generic "editor"
680 #:tests? #f ; there are no tests
681 #:phases
682 (modify-phases %standard-phases
683 (add-before 'configure 'fix-installation
684 (lambda _
685 (substitute* "CMakeLists.txt"
686 (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/lang")
687 "${CMAKE_SOURCE_DIR}/lang")))))))
688 (inputs
689 (list glu
690 libpng
691 libvorbis
692 openal
693 physfs
694 rapidjson
695 sdl2
696 sdl2-image
697 sdl2-net
698 sdl2-ttf
699 zlib))
700 (native-inputs
701 (list pkg-config))
702 (home-page "https://baronygame.com")
703 (synopsis "3D first-person roguelike game")
704 (description
705 "Barony is a first-person roguelike role-playing game with cooperative
706play. The player must descend a dark dungeon and destroy an undead lich while
707avoiding traps and fighting monsters. The game features randomly generated
708dungeons, 13 character classes, hundreds of items and artifacts, and
709cooperative multiplayer for up to four players. This package does @emph{not}
710provide the game assets.")
711 (license license:bsd-2)))
712
713(define-public bastet
714 (package
715 (name "bastet")
716 (version "0.43.2")
717 (source
718 (origin
719 (method git-fetch)
720 (uri (git-reference
721 (url "https://github.com/fph/bastet")
722 (commit version)))
723 (file-name (git-file-name name version))
724 (sha256
725 (base32 "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn"))
726 (patches
727 (search-patches "bastet-change-source-of-unordered_set.patch"))))
728 (build-system gnu-build-system)
729 (arguments
730 `(#:make-flags
731 (list (string-append "CXXFLAGS=-I"
732 (assoc-ref %build-inputs "boost") "/include"))
733 #:phases
734 (modify-phases %standard-phases
735 (delete 'configure) ; no configure script
736 (replace 'check
737 ;; The 'Test' target builds the tests, but doesn't actually run them.
738 (lambda* (#:key make-flags #:allow-other-keys)
739 (apply invoke "make" "Test" make-flags)
740 (setenv "HOME" ".")
741 (invoke "./Test")))
742 (replace 'install
743 (lambda* (#:key outputs #:allow-other-keys)
744 (let* ((out (assoc-ref outputs "out"))
745 (share (string-append out "/share"))
746 (hicolor (string-append share "/icons/hicolor")))
747 (install-file "bastet"
748 (string-append out "/bin"))
749
750 (install-file "bastet.desktop"
751 (string-append share "/applications"))
752 (install-file "bastet.svg"
753 (string-append hicolor "/scalable/apps"))
754
755 (install-file "bastet.appdata.xml"
756 (string-append share "/appdata"))
757
758 (install-file "bastet.6"
759 (string-append out "/share/man/man6"))
760 #t))))))
761 (native-inputs
762 (list hicolor-icon-theme))
763 (inputs
764 (list boost ncurses))
765 (home-page "https://fph.altervista.org/prog/bastet.html")
766 (synopsis "Antagonistic Tetris-style falling brick game for text terminals")
767 (description
768 "Bastet (short for Bastard Tetris) is a simple ncurses-based falling brick
769game. Unlike normal Tetris, Bastet does not choose the next brick at random.
770Instead, it uses a special algorithm to choose the worst brick possible.
771
772Playing bastet can be a painful experience, especially if you usually make
773canyons and wait for the long I-shaped block to clear four rows at a time.")
774 (license license:gpl3+)))
775
776(define-public go-codeberg-org-anaseto-gothic
777 (package
778 (name "go-codeberg-org-anaseto-gothic")
779 (version "0.2.0")
780 (source
781 (origin
782 (method git-fetch)
783 (uri (git-reference
784 (url "https://codeberg.org/anaseto/gothic")
785 (commit (string-append "v" version))))
786 (file-name (git-file-name name version))
787 (sha256
788 (base32 "194vjskwkz6h51spk2661khmk5nrzrrwc6iwb8n0viqa8rr8z8cd"))))
789 (build-system go-build-system)
790 (arguments
791 (list
792 #:import-path "codeberg.org/anaseto/gothic"))
793 (propagated-inputs (list tcl tk))
794 (home-page "https://codeberg.org/anaseto/gothic")
795 (synopsis "Tcl/Tk Go bindings")
796 (description
797 "This package provides Tcl/Tk Go bindings, the API is a bit Tk-oriented.")
798 (license license:expat)))
799
800(define-public boohu
801 (package
802 (name "boohu")
803 (version "0.14.1")
804 (source
805 (origin
806 (method git-fetch)
807 (uri (git-reference
808 (url "https://codeberg.org/anaseto/boohu")
809 (commit (string-append "v" version))))
810 (file-name (git-file-name name version))
811 (sha256
812 (base32 "0xh8b4fj2vd92ihh70rmmlq45ir0sb44g63blswfw96rb3jl3pk2"))))
813 (build-system go-build-system)
814 (arguments
815 (list
816 #:install-source? #f
817 #:import-path "codeberg.org/anaseto/boohu"))
818 (native-inputs (list go-codeberg-org-anaseto-gothic
819 go-codeberg-org-anaseto-gruid
820 go-github-com-gdamore-tcell-v2))
821 (home-page "https://anaseto.codeberg.page/games/boohu")
822 (synopsis "Break Out Of Hareka's Underground, a roguelike game")
823 (description
824 "@acronym{Boohu, Break Out Of Hareka's Underground} is a roguelike game
825mainly inspired from DCSS and its tavern, with some ideas from Brogue, but
826aiming for very short games, almost no character building, and a simplified
827inventory.
828
829@quotation
830Every year, the elders send someone to collect medicinal simella plants in the
831Underground. This year, the honor fell upon you, and so here you
832are. According to the elders, deep in the Underground, a magical monolith will
833lead you back to your village. Along the way, you will collect simellas, as
834well as various items that will help you deal with monsters, which you may
835fight or flee@dots{}
836@end quotation")
837 (license license:expat)))
838
839(define-public boohu-tk
840 (package
841 (inherit boohu)
842 (name "boohu-tk")
843 (arguments
844 (substitute-keyword-arguments arguments
845 ((#:tests? _ #t) #f)
846 ((#:build-flags _ #~())
847 #~(list "--tags=tk"))
848 ((#:phases _ #~%standard-phases)
849 #~(modify-phases %standard-phases
850 (add-after 'install 'fix-name-collision
851 (lambda _
852 (rename-file (string-append #$output "/bin/boohu")
853 (string-append #$output "/bin/boohu-tk"))))))))))
854
855(define-public tetrinet
856 (package
857 (name "tetrinet")
858 (version "0.11")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (string-append
863 "http://tetrinet.or.cz/download/tetrinet-" version
864 ".tar.bz2"))
865 (sha256
866 (base32
867 "0b4pddqz6is1771qmvcj8qqlr4in2djdbkk13agvp9yhfah2v8x7"))))
868 (build-system gnu-build-system)
869 (inputs
870 (list ncurses))
871 (arguments
872 `(#:tests? #f ;no tests
873 #:make-flags '("CC=gcc"
874 "CFLAGS=-O2 -DHAVE_IPV6 -g -Wall -fcommon")
875 #:phases
876 (modify-phases %standard-phases
877 (delete 'configure) ;no configure script
878 (add-after 'unpack 'fix-install-dir
879 (lambda* (#:key outputs #:allow-other-keys)
880 (let ((out (assoc-ref outputs "out")))
881 (mkdir-p (string-append out "/bin"))
882 (substitute* "Makefile"
883 (("/usr/games") (string-append out "/bin"))))))
884 (add-after 'install 'install-documentation
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let* ((out (assoc-ref outputs "out"))
887 (doc (string-append out "/share/doc/" ,name "-" ,version)))
888 (for-each (lambda (file)
889 (install-file file doc))
890 (list "README" "tetrinet.txt"))))))))
891 (home-page "http://tetrinet.or.cz")
892 (synopsis "Terminal-based multiplayer Tetris clone")
893 (description "Tetrinet is a multiplayer Tetris-like game with powerups and
894attacks you can use on opponents.")
895 (license license:public-domain)))
896
897(define-public vdrift-data
898 ;; There are no tags or releases for the vdrift data; use the latest SVN
899 ;; revision available.
900 (let ((commit 1464)
901 (revision "0"))
902 ;; The package is hidden as the game data is *required* by the install
903 ;; target of vdrift itself, and there is no need for users to manually
904 ;; install it.
905 (hidden-package
906 (package
907 (name "vdrift-data")
908 ;; The date is the last modified time shown next to the 'vdrift-data'
909 ;; directory when visiting
910 ;; https://sourceforge.net/p/vdrift/code/HEAD/tree/.
911 (version (format #f "2024-10-23-~a.~a" revision commit))
912 (source (origin
913 (method svn-fetch)
914 (uri (svn-reference
915 (url "https://svn.code.sf.net/p/vdrift/code/vdrift-data")
916 (revision commit)))
917 (file-name (string-append name "-" version "-checkout"))
918 (sha256
919 (base32
920 "0q0raw7xjnf710xxls6cjqqvkn754bbndqjs9dzkpr40s8zrgnvf"))))
921 (build-system copy-build-system)
922 (arguments (list #:install-plan #~'(("." "share/games/vdrift/data"))))
923 (home-page "https://vdrift.net/")
924 (synopsis "Game data for Vdrift")
925 (description "This package contains the assets for the Vdrift racing
926game.")
927 (license license:gpl3+))))) ;assumed same as Vdrift itself
928
929(define-public vdrift
930 ;; The latest release is from 2014, and lacks build system and other
931 ;; unreleased improvements; use the latest commit.
932 (let ((commit "f835edaef1abe586b8d5bebeaa8c41f85e6dbea4")
933 (revision "1"))
934 (package
935 (name "vdrift")
936 (version (git-version "2014-10-20" revision commit))
937 (source (origin
938 (method git-fetch)
939 (uri (git-reference
940 (url "https://github.com/VDrift/vdrift")
941 (commit commit)))
942 (file-name (git-file-name name version))
943 (sha256
944 (base32
945 "19kqnncv5c7ssbjcplmfn2rq0mabi2idyv2wmx05pqg09y571cv1"))))
946 (build-system scons-build-system)
947 (arguments
948 (list
949 #:tests? #f ;no test suite
950 #:scons-flags #~(list (string-append "prefix=" #$output)
951 "release=1"
952 "verbose=1")
953 #:phases
954 #~(modify-phases %standard-phases
955 (add-after 'unpack 'setup-vdrift-data
956 (lambda _
957 ;; The locale data must be made writable, as gettext
958 ;; translation files are generated and written there as part
959 ;; of the installation script.
960 (copy-recursively (search-input-directory
961 %build-inputs
962 "share/games/vdrift/data")
963 "data")
964 (for-each make-file-writable (find-files "data/locale")))))))
965 (native-inputs (list gettext-minimal pkg-config vdrift-data))
966 (inputs (list bullet curl libvorbis mesa sdl3 zlib))
967 (home-page "https://vdrift.net/")
968 (synopsis "Racing simulator")
969 (description "VDrift aims to provide an accurate driving physics
970emulation, based on real world data of the actual vehicles, employing a full
971rigid body simulation and a complex tire model. VDrift features:
972@itemize
973@item Over 45 tracks based on famous real-world tracks
974@item Over 45 cars based on real-world vehicles
975@item Very realistic, simulation-grade driving physics
976@item Mouse/joystick/gamepad/wheel/keyboard support
977@item Fully modeled tracks, scenery and terrain
978@item Several different camera modes
979@item Basic replay system with Skip Forward/Skip Backward
980@item Fully customizable controls
981@item Joystick, mouse and keyboard input filtering
982@item Brake and reverse lights
983@item Driver aids: automatic shifting, traction control, anti-lock braking
984@item Experimental force feedback
985@item Race against up to 3 AI with variable difficultly
986@item Engine and road sounds
987@end itemize
988The recommended input method is a steering wheel with pedals and force
989feedback support.")
990 (license license:gpl3+))))
991
992(define-public vitetris
993 (package
994 (name "vitetris")
995 (version "0.59.1")
996 (source
997 (origin
998 (method git-fetch)
999 (uri (git-reference
1000 (url "https://github.com/vicgeralds/vitetris")
1001 (commit (string-append "v" version))))
1002 (sha256
1003 (base32 "1ah1c5g7abksif0n8v5rb7r4pn2az20c3mkp4ak13vgs23ddmds5"))
1004 (file-name (git-file-name name version))))
1005 (build-system gnu-build-system)
1006 (arguments
1007 `(#:tests? #f ;no test
1008 #:make-flags
1009 (list ,(string-append "CC=" (cc-for-target))
1010 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1011 "CFLAGS=-g -O2 -Wno-error=implicit-int")
1012 #:phases
1013 (modify-phases %standard-phases
1014 (replace 'configure
1015 (lambda _
1016 ;; the non standard configure script does not accept
1017 ;; standard parameters -> invoke configure by hand
1018 (invoke "./configure" "prefix=")
1019 ;; src/src-conf.mk must be writable for the build step
1020 (make-file-writable "src/src-conf.mk"))))))
1021 (home-page "http://victornils.net/tetris/")
1022 (synopsis "Terminal-based Tetris clone")
1023 (description "Vitetris is a classic multiplayer Tetris clone for the
1024terminal.")
1025 (license license:bsd-2)))
1026
1027(define-public blobwars
1028 (package
1029 (name "blobwars")
1030 (version "2.00")
1031 (source
1032 (origin
1033 (method url-fetch)
1034 (uri (string-append "mirror://sourceforge/blobwars/"
1035 "blobwars-" version ".tar.gz"))
1036 (sha256
1037 (base32 "16aagvkx6azf75gm5kaa94bh5npydvhqp3fvdqyfsanzdjgjf1n4"))))
1038 (build-system gnu-build-system)
1039 (arguments
1040 `(#:tests? #f ;no test
1041 #:make-flags
1042 (let ((out (assoc-ref %outputs "out")))
1043 (list (string-append "PREFIX=" out)
1044 (string-append "BINDIR=" out "/bin/")
1045 "USEPAK=1"
1046 "RELEASE=1"))
1047 #:phases
1048 (modify-phases %standard-phases
1049 (add-after 'unpack 'patch-sources
1050 (lambda _
1051 (substitute* "Makefile" (("-Werror") ""))
1052 ;; glibc 2.38 includes strlcpy and strlcat.
1053 (substitute* "src/headers.h"
1054 (("static inline void strlcat.*") "")
1055 (("static inline void strlcpy.*") ""))))
1056 (delete 'configure)))) ;no configure script
1057 (native-inputs
1058 `(("gettext" ,gettext-minimal)
1059 ("pkg-config" ,pkg-config)))
1060 (inputs
1061 `(("hicolor-icon-theme" ,hicolor-icon-theme)
1062 ("sdl" ,(sdl-union (list sdl2
1063 sdl2-image
1064 sdl2-mixer
1065 sdl2-ttf
1066 sdl2-net)))))
1067 (home-page "https://sourceforge.net/projects/blobwars/")
1068 (synopsis "Platform action game featuring a blob with a lot of weapons")
1069 (description "Blobwars: Metal Blob Solid is a 2D platform game, the first
1070in the Blobwars series. You take on the role of a fearless Blob agent. Your
1071mission is to infiltrate various enemy bases and rescue as many MIAs as
1072possible, while battling many vicious aliens.")
1073 (license (list license:gpl2 ; For code and graphics
1074 license:cc0 ; Music and sounds have specific licenses
1075 license:cc-by3.0 ; see /doc/readme
1076 license:cc-by-sa3.0
1077 license:lgpl2.1+
1078 license:bsd-2))))
1079
1080(define-public bsd-games
1081 (package
1082 (name "bsd-games")
1083 (version "2.17.0")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri "https://ibiblio.org/pub/linux/games/bsd-games-2.17.tar.gz")
1088 (sha256
1089 (base32 "0q7zdyyfvn15y0w4g54kq3gza89h61py727m8slmw73cxx594vq6"))
1090 (patches
1091 (search-patches
1092 ;; thanks Arch, and Debian
1093 "bsd-games-2.17-64bit.patch"
1094 "bsd-games-bad-ntohl-cast.patch"
1095 "bsd-games-gamescreen.h.patch"
1096 "bsd-games-getline.patch"
1097 "bsd-games-null-check.patch"
1098 "bsd-games-number.c-and-test.patch"
1099 "bsd-games-stdio.h.patch"
1100 "bsd-games-prevent-name-collisions.patch"
1101 ;; Guix customizations
1102 "bsd-games-add-configure-config.patch"
1103 "bsd-games-dont-install-empty-files.patch"
1104 "bsd-games-add-wrapper.patch"))))
1105 (build-system gnu-build-system)
1106 (native-inputs
1107 (list flex bison))
1108 (inputs
1109 `(("curses" ,ncurses)
1110 ("pager" ,less)
1111 ("miscfiles" ,miscfiles)
1112 ("openssl" ,openssl))) ;used only by 'factor'
1113 (arguments
1114 `(#:phases
1115 (modify-phases %standard-phases
1116 (add-after 'unpack 'gcc14
1117 ;; See line 84 of
1118 ;; https://github.com/NixOS/nixpkgs/pull/369352/files#diff-d4e7b24a8c4ebea52238a5421f96f293576ae2be634cd72c1c1521ee043a01fdR84
1119 (lambda _
1120 (substitute* "hunt/hunt/otto.c"
1121 (("sigpause\\(old_mask\\);") ""))))
1122 (replace 'configure
1123 (lambda* (#:key outputs inputs #:allow-other-keys)
1124 (let* ((out (assoc-ref outputs "out"))
1125 (bin (string-append out "/bin"))
1126 (doc (string-append out "/share/doc/bsd-games-" ,version))
1127 (man (string-append out "/share/man"))
1128 (word-list (search-input-file inputs "/share/web2"))
1129 (static-data (string-append out "/share/games/bsd-games"))
1130 ;; Not a "./" because of substitute* in 'patch-install
1131 ;; below. The .// allow us not to mess with the games'
1132 ;; code any further: we just use a wrapper script that
1133 ;; cd's to a BSD_GAMES_DIR. :]
1134 (save-files ".//"))
1135 (substitute* "configure"
1136 (("/usr/share/man") man)
1137 (("/usr/share/doc/bsd-games") doc)
1138 (("/usr/share/[^\n/]*") static-data)
1139 (("/var/games") save-files)
1140 (("/usr/bin/less") (which "less"))
1141 (("(/usr/bin|/usr/games)") bin))
1142 (substitute* "config.params" (("WORD_LIST") word-list))
1143 (substitute* "wrapper" (("STATIC_DATA") static-data))
1144 (invoke "./configure"))
1145 #t))
1146 (add-before 'install 'patch-install
1147 ;; Some games need a writable directory containing pre-maded files.
1148 ;; The files get installed to the Store. Then the wrapper kicks in.
1149 (lambda* (#:key outputs #:allow-other-keys)
1150 (let* ((out (assoc-ref outputs "out"))
1151 (static-data (string-append out "/share/games/bsd-games"))
1152 (save-files ".//"))
1153 (substitute* "Makeconfig" ((save-files) static-data)))
1154 #t))
1155 (add-after 'install 'install-documents
1156 (lambda* (#:key outputs #:allow-other-keys)
1157 (let* ((out (assoc-ref outputs "out"))
1158 (doc (string-append out "/share/doc/bsd-games-" ,version)))
1159 (rename-file "phantasia/COPYRIGHT" "phantasia-COPYRIGHT")
1160 (for-each
1161 (lambda(file) (install-file file doc))
1162 '("AUTHORS" "BUGS" "README" "SECURITY" "THANKS"
1163 "phantasia-COPYRIGHT")))
1164 #t)))))
1165 (home-page "https://github.com/vattam/BSDGames")
1166 (synopsis "Collection of the old text-based games and amusements")
1167 (description
1168 "These are the BSD games.
1169
1170Action: atc (keep the airplanes safe), hack (explore the dangerous Dungeon),
1171hunt (kill the others for the Pair of Boots, multi-player only), robots (avoid
1172the evil robots), sail (game of naval warfare with wooden ships), snake (steal
1173the $$ from the cave, anger the snake, and get out alive), tetris (game of
1174lining up the falling bricks of different shapes), and worm (eat, grow big,
1175and neither bite your tail, nor ram the wall).
1176
1177Amusements: banner (prints a large banner), bcd & morse & ppt (print a punch
1178card, or paper tape, or Morse codes), caesar & rot13 (ciphers and deciphers
1179the input), factor (factorizes a number), number (translates numbers into
1180text), pig (translates from English to Pig Latin), pom (should print the
1181Moon's phase), primes (generates primes), rain & worms (plays an screen-saver
1182in terminal), random (prints randomly chosen lines from files, or returns a
1183random exit-code), and wtf (explains what do some acronyms mean).
1184
1185Board: backgammon (lead the men out of board faster than the friend do),
1186boggle (find the words in the square of letters), dab (game of dots and
1187boxes), gomoku (game of five in a row), hangman (guess a word before man is
1188hanged), and monop (game of monopoly, hot-seat only). Also the card-games:
1189canfield, cribbage, fish (juniors game), and mille.
1190
1191Quests: adventure (search for treasures with the help of wizard),
1192battlestar (explore the world around, starting from dying spaceship),
1193phantasia (role-play as an rogue), trek (hunt the Klingons, and save the
1194Federation), and wump (hunt the big smelly Wumpus in a dark cave).
1195
1196Quizzes: arithmetic and quiz.")
1197 ;; "Auxiliary and data files, distributed with the games in NetBSD, but
1198 ;; not bearing copyright notices, probably fall under the terms of the UCB
1199 ;; or NetBSD copyrights and licences. The file "fortune/Notes" contains a
1200 ;; warning in regard to the fortune databases."
1201 (license (list
1202 ;; Most games. Files: countmail/countmail.6, dab/dab.6,
1203 ;; lib/strlcpy.c, wargames/wargames.6
1204 license:bsd-3
1205 ;; dab and hunt. Files: adventure/extern.h,
1206 ;; backgammon/backgammon/backlocal.h, caesar/rot13.in,
1207 ;; countmail/countmail, dm/utmpentry.c, dm/utmpentry.h,
1208 ;; hack/extern.h, robots/auto.c, sail/display.h,
1209 ;; sail/restart.h, wargames/wargames
1210 license:bsd-4
1211 ;; wtf (the game)
1212 license:public-domain
1213 ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3)
1214 (license:fsf-free "file:///phantasia/COPYRIGHT")))))
1215
1216(define-public rogue
1217 (package
1218 (name "rogue")
1219 (version "5.4.4")
1220 (source (origin
1221 (method git-fetch)
1222 (uri (git-reference
1223 (url "https://github.com/Davidslv/rogue")
1224 (commit "cf9bd26d564a72fac4cf56b55c96c2435270d29a")))
1225 (file-name (git-file-name name version))
1226 (sha256
1227 (base32
1228 "0mk03l120scas4dcn6xccnhslnwmcx2blshbf925z06yk7rkzias"))))
1229 (build-system gnu-build-system)
1230 (arguments
1231 `(#:tests? #f
1232 #:make-flags (list "CFLAGS=-DNCURSES_INTERNALS")))
1233 (inputs (list ncurses))
1234 (synopsis "Original rogue game")
1235 (description
1236 "This package provides ``Rogue: Exploring the Dungeons of Doom'', the
1237original rogue game found on 4.2BSD.")
1238 (home-page "https://github.com/Davidslv/rogue")
1239 (license license:bsd-3)))
1240
1241(define-public sgt-puzzles
1242 (let ((commit "7ad37c64af3bc891372ec16db1531cee599b6e3a")
1243 (revision "0"))
1244 (package
1245 (name "sgt-puzzles")
1246 (version (git-version "20260622" revision commit))
1247 (source
1248 (origin
1249 (method git-fetch)
1250 (uri (git-reference
1251 (url "https://git.tartarus.org/simon/puzzles.git")
1252 (commit commit)))
1253 (file-name (git-file-name name version))
1254 (sha256
1255 (base32 "0aldj32fr51wmdnmr7dywf19s3a8l9sxfnnk34wi8fgzzmskl0z9"))))
1256 (build-system cmake-build-system)
1257 (arguments
1258 (list
1259 #:tests? #f ;No tests.
1260 #:configure-flags #~(list "-DNAME_PREFIX=sgt-")
1261 #:phases
1262 #~(modify-phases %standard-phases
1263 (add-after 'unpack 'set-xdg-open-path
1264 (lambda* (#:key inputs #:allow-other-keys)
1265 (substitute* "gtk.c"
1266 (("(#define HELP_BROWSER_PATH).+" all define)
1267 (format #f "~a ~s~%" define
1268 (search-input-file inputs "/bin/xdg-open")))))))))
1269 (inputs (list gtk+ xdg-utils))
1270 (native-inputs (list pkg-config perl imagemagick halibut))
1271 (home-page "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/")
1272 (synopsis "Simon Tatham's portable puzzle collection")
1273 (description "Simon Tatham's Portable Puzzle Collection contains a number of
1274popular puzzle games for one player.")
1275 (license license:expat))))
1276
1277(define-public bzflag
1278 (package
1279 (name "bzflag")
1280 (version "2.4.30")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (string-append "https://download.bzflag.org/bzflag/source/"
1285 version "/bzflag-" version ".tar.bz2"))
1286 (sha256
1287 (base32 "0kc9ag8yq3iqmwlrdwhbqp3sqjcan1mr0ddx25yamrxwwx8bfy5v"))))
1288 (build-system gnu-build-system)
1289 (arguments
1290 (list
1291 #:phases
1292 #~(modify-phases %standard-phases
1293 (add-after 'install 'install-desktop-file-and-icons
1294 (lambda _
1295 (let* ((share (string-append #$output "/share"))
1296 (data (string-append share "/bzflag"))
1297 (hicolor (string-append share "/icons/hicolor"))
1298 (applications (string-append share "/applications")))
1299 ;; Move desktop file.
1300 (install-file (string-append data "/bzflag.desktop")
1301 applications)
1302 ;; Install icons.
1303 (for-each (lambda (size)
1304 (let* ((dim (string-append size "x" size))
1305 (dir (string-append hicolor "/" dim "/apps")))
1306 (mkdir-p dir)
1307 (copy-file
1308 (string-append data "/bzflag-" dim ".png")
1309 (string-append dir "/bzflag.png"))))
1310 '("48" "256"))))))))
1311 (native-inputs
1312 (list pkg-config))
1313 (inputs
1314 (list c-ares
1315 curl
1316 glew
1317 glu
1318 sdl2
1319 zlib))
1320 (home-page "https://www.bzflag.org/")
1321 (synopsis "3D first person tank battle game")
1322 (description
1323 "BZFlag is a 3D multi-player multiplatform tank battle game that
1324allows users to play against each other in a network environment.
1325There are five teams: red, green, blue, purple and rogue (rogue tanks
1326are black). Destroying a player on another team scores a win, while
1327being destroyed or destroying a teammate scores a loss. Rogues have
1328no teammates (not even other rogues), so they cannot shoot teammates
1329and they do not have a team score.
1330
1331There are two main styles of play: capture-the-flag and free-for-all.
1332In capture-the-flag, each team (except rogues) has a team base and
1333each team with at least one player has a team flag. The object is to
1334capture an enemy team's flag by bringing it to your team's base. This
1335destroys every player on the captured team, subtracts one from that
1336team's score, and adds one to your team's score. In free-for-all,
1337there are no team flags or team bases. The object is simply to get as
1338high a score as possible.")
1339 ;; The game is dual-licensed.
1340 (license (list license:lgpl2.1 license:mpl2.0))))
1341
1342(define-public cataclysm-dda
1343 (package
1344 (name "cataclysm-dda")
1345 (version "0.I")
1346 (source
1347 (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/CleverRaven/Cataclysm-DDA")
1351 (commit version)))
1352 (sha256
1353 (base32 "0lk9akkwxjd06739qyhg8iypaw13y9xd2yc249sy91m3llvylccz"))
1354 (file-name (git-file-name name version))))
1355 (build-system gnu-build-system)
1356 (arguments
1357 (list
1358 #:make-flags
1359 #~(list (string-append "PREFIX=" #$output)
1360 "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1" "WARNINGS=-w"
1361 "LOCALIZE=1" "LANGUAGES=all")
1362 #:phases
1363 #~(modify-phases %standard-phases
1364 (delete 'configure))
1365 ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
1366 ;; input in order to support tests.
1367 #:tests? #f))
1368 (native-inputs
1369 (list astyle gcc-13 gettext-minimal pkg-config))
1370 (inputs
1371 (list freetype ncurses))
1372 (home-page "https://cataclysmdda.org/")
1373 (synopsis "Survival horror roguelike video game")
1374 (description
1375 "Cataclysm: Dark Days Ahead (or \"DDA\" for short) is a roguelike set
1376in a post-apocalyptic world. Struggle to survive in a harsh, persistent,
1377procedurally generated world. Scavenge the remnants of a dead civilization
1378for food, equipment, or, if you are lucky, a vehicle with a full tank of gas
1379to get you out of Dodge. Fight to defeat or escape from a wide variety of
1380powerful monstrosities, from zombies to giant insects to killer robots and
1381things far stranger and deadlier, and against the others like yourself, that
1382want what you have.")
1383 (license license:cc-by-sa3.0)))
1384
1385(define-public cataclysm-dda-tiles
1386 (package
1387 (inherit cataclysm-dda)
1388 (name "cataclysm-dda-tiles")
1389 (arguments
1390 (substitute-keyword-arguments arguments
1391 ((#:make-flags flags)
1392 #~(cons* "TILES=1" "SOUND=1" #$flags))))
1393 (inputs
1394 (modify-inputs inputs
1395 (delete "ncurses")
1396 (append libogg
1397 libvorbis
1398 sdl2
1399 sdl2-image
1400 sdl2-mixer
1401 sdl2-ttf)))
1402 (synopsis
1403 (string-append (package-synopsis cataclysm-dda)
1404 ", with graphics and sound"))
1405 (description
1406 (string-append (package-description cataclysm-dda)
1407 "\n\nThis package includes graphical tiles and sound."))))
1408
1409(define-public cockatrice
1410 (let ((release-date "2026-05-23"))
1411 (package
1412 (name "cockatrice")
1413 (version "3.0.1")
1414 (source
1415 (origin
1416 (method git-fetch)
1417 (uri (git-reference
1418 (url "https://github.com/Cockatrice/Cockatrice")
1419 (commit (string-append release-date "-Release-" version))))
1420 (file-name (git-file-name name version))
1421 (sha256
1422 (base32
1423 "1bjn39lvk6clr6w98qki3lidkvaxsky3235izkdsbvysz4j6664p"))
1424 (modules '((guix build utils)))
1425 (snippet
1426 ;; Strip image URLs as they point towards non-free web services
1427 '(substitute* "libcockatrice_settings/libcockatrice/settings/download_settings.cpp"
1428 (("\"https://.*\",?") "")))))
1429 (build-system qt-build-system)
1430 (arguments
1431 (list
1432 #:qtbase qtbase
1433 #:configure-flags #~(list "-DWITH_SERVER=1"
1434 "-DWITH_CLIENT=1"
1435 "-DWITH_ORACLE=1"
1436 "-DTEST=1")))
1437 (native-inputs
1438 (list googletest pkg-config))
1439 (inputs
1440 (list protobuf
1441 qtmultimedia
1442 qtsvg
1443 qttools
1444 qttranslations
1445 qtwebsockets
1446 qtwayland
1447 xz
1448 zlib))
1449 (home-page "https://cockatrice.github.io")
1450 (synopsis "Tabletop card game simulator")
1451 (description "Cockatrice is a program for playing tabletop card games
1452over a network. Its server design prevents users from manipulating the game
1453for unfair advantage. The client also provides a single-player mode, which
1454allows users to brew while offline.")
1455 (license license:gpl2))))
1456
1457(define-public corsix-th
1458 (package
1459 (name "corsix-th")
1460 (version "0.67")
1461 (source
1462 (origin
1463 (method git-fetch)
1464 (uri (git-reference
1465 (url "https://github.com/CorsixTH/CorsixTH")
1466 (commit (string-append "v" version))))
1467 (file-name (git-file-name name version))
1468 (sha256
1469 (base32 "14996kbrwdrd0gpz19il2i4p650qdhjw8v8ka3aigk6pl4kda3sq"))))
1470 (build-system cmake-build-system)
1471 (arguments
1472 (list
1473 #:phases
1474 #~(modify-phases %standard-phases
1475 (add-after 'install 'wrap-binary
1476 (lambda _
1477 ;; Set Lua module paths and default MIDI soundfont on startup.
1478 (let* ((fluid #$(this-package-input "fluid-3"))
1479 (lua-version #$(version-major+minor (package-version lua)))
1480 (lua-cpath
1481 (map (lambda (lib)
1482 (string-append
1483 (assoc-ref %build-inputs (string-append "lua-" lib))
1484 "/lib/lua/" lua-version "/?.so"))
1485 '("filesystem" "lpeg"))))
1486 (wrap-program (string-append #$output "/bin/corsix-th")
1487 `("LUA_CPATH" ";" = ,lua-cpath)
1488 `("SDL_SOUNDFONTS" ":" suffix
1489 (,(string-append fluid "/share/soundfonts/FluidR3Mono_GM.sf3"))))))))
1490 #:tests? #f)) ; TODO need busted package to run tests
1491 ;; Omit Lua-Socket dependency to disable automatic updates.
1492 (inputs
1493 (list bash-minimal
1494 ffmpeg
1495 fluid-3
1496 freetype
1497 lua
1498 lua-filesystem
1499 lua-lpeg
1500 sdl2
1501 sdl2-mixer))
1502 (home-page "https://corsixth.com")
1503 (synopsis "Implementation of the @i{Theme Hospital} game engine")
1504 (description
1505 "This package provides a reimplementation of the 1997 Bullfrog business
1506simulation game @i{Theme Hospital}. As well as faithfully recreating the
1507original engine, CorsixTH adds support for high resolutions, custom levels and
1508more. This package does @emph{not} provide the game assets.")
1509 (license (list
1510 license:expat ; main license
1511 license:bsd-3)))) ; CorsixTH/Src/random.c
1512
1513(define-public cowsay
1514 ;; This is a continuation of Tony Monroe's now-unmaintained original, that
1515 ;; aims to become the ‘canonical modern fork’. We'll see. What it gives
1516 ;; us today is a bunch of fixes that other distros shipped as patches.
1517 (package
1518 (name "cowsay")
1519 (version "3.8.4")
1520 (source
1521 (origin
1522 (method git-fetch)
1523 (uri (git-reference
1524 (url "https://github.com/cowsay-org/cowsay")
1525 (commit (string-append "v" version))))
1526 (file-name (git-file-name name version))
1527 (sha256
1528 (base32 "0as4axm1v37d2bm86sksi6wrd0yc4jm2lyfdhr5k179b1mvnfx4v"))))
1529 (build-system gnu-build-system)
1530 (arguments
1531 (list #:make-flags
1532 #~(list (string-append "prefix=" #$output))
1533 #:phases
1534 #~(modify-phases %standard-phases
1535 (delete 'configure) ; no configure script
1536 (delete 'check)
1537 (add-after 'install 'check
1538 (lambda* (#:key outputs #:allow-other-keys)
1539 (invoke (string-append (assoc-ref outputs "out")
1540 "/bin/cowsay")
1541 "We're done!"))))))
1542 (inputs
1543 (list perl))
1544 (home-page (string-append "https://web.archive.org/web/20071026043648/"
1545 "http://www.nog.net:80/~tony/warez/cowsay.shtml"))
1546 (synopsis "Speaking cow text filter")
1547 (description "Cowsay is basically a text filter. Send some text into it,
1548and you get a cow saying your text. If you think a talking cow isn't enough,
1549cows can think too: all you have to do is run @command{cowthink}. If you're
1550tired of cows, a variety of other ASCII-art messengers are available.")
1551 (license license:gpl3+)))
1552
1553(define-public deal
1554 (package
1555 (name "deal")
1556 (version "3.1.11")
1557 (source (origin
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/gtwilliams/deal")
1561 (commit (string-append "v" version))))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1wcrx3yq5ycnkdnygcq80ljpgc9iwyrr8zayprzvbibvj77hdm0c"))))
1566 (build-system gnu-build-system)
1567 (arguments
1568 (list
1569 #:test-target "test"
1570 #:make-flags
1571 #~(let* ((tcl #$(this-package-input "tcl"))
1572 (tcl-version #$(version-major+minor (package-version tcl))))
1573 (list "CPPFLAGS += -O3"
1574 (string-append "CC=" #$(cc-for-target))
1575 (string-append "TCL_INCL=" tcl "/include")
1576 (string-append "LDFLAGS=-L" tcl "/lib"
1577 " -ltcl" tcl-version
1578 " -lm")
1579 (string-append "DATA_DIR=" #$output "/share/deal/")))
1580 #:phases
1581 #~(modify-phases %standard-phases
1582 (add-after 'unpack 'locate-pod2man
1583 (lambda* (#:key inputs #:allow-other-keys)
1584 (substitute* "Makefile"
1585 (("/usr/bin/pod2man")
1586 (search-input-file inputs "/bin/pod2man")))))
1587 (delete 'configure) ;no configure script
1588 ;; Prevent the error: "Makefile:248: Make.dep: No such file
1589 ;; or directory".
1590 (add-before 'build 'create-Make.dep
1591 (lambda _
1592 (call-with-output-file "Make.dep" (const #t))))
1593 ;; There is no install target. Do everything manually.
1594 (replace 'install
1595 (lambda _
1596 (let ((bin (string-append #$output "/bin"))
1597 (man (string-append #$output "/share/man/man6"))
1598 (data (string-append #$output "/share/deal")))
1599 (install-file "deal" bin)
1600 (install-file "deal.6" man)
1601 (install-file "deal.tcl" data)
1602 (for-each (lambda (d)
1603 (let ((target (string-append data "/" d)))
1604 (mkdir-p target)
1605 (copy-recursively d target)))
1606 '("ex" "format" "input" "lib")))))
1607 ;; Tests need to happen once the data is properly installed
1608 ;; because the "deal.tcl" script file location is hard-coded
1609 ;; in the "deal" binary.
1610 (delete 'check)
1611 (add-after 'install 'check
1612 (assoc-ref %standard-phases 'check)))))
1613 (native-inputs
1614 (list perl))
1615 (inputs
1616 (list tcl))
1617 (home-page "https://bridge.thomasoandrews.com/deal/")
1618 (synopsis "Bridge hand generator")
1619 (description
1620 "This program generates bridge hands. It can be told to generate only
1621hands satisfying conditions like being balanced, having a range of
1622High Cards Points (HCP), controls, or other user-definable properties.
1623Hands can be output in various formats, like PBN for feeding to other
1624bridge programs, Deal itself, or split up into a file per player for
1625practise.")
1626 (license (list license:gpl2+
1627 license:gpl1+ ;ansidecl.h
1628 license:bsd-3)))) ;random.c
1629
1630(define-public doom-runner
1631 (package
1632 (name "doom-runner")
1633 (version "1.9.1")
1634 (source
1635 (origin
1636 (method git-fetch)
1637 (uri (git-reference
1638 (url "https://github.com/Youda008/DoomRunner")
1639 (commit (string-append "v" version))))
1640 (file-name (git-file-name name version))
1641 (sha256
1642 (base32 "19jq5cj6rc8d5ghd9321a2f3v0b7z928990d7dj6ynyhkpcj769p"))
1643 (modules '((guix build utils)))
1644 (snippet #~(delete-file-recursively "Screenshots")))) ;Save 1.4MiB.
1645 (build-system qt-build-system)
1646 (arguments
1647 (list
1648 #:qtbase qtbase
1649 #:tests? #f ;no tests
1650 #:modules '((guix build qt-build-system)
1651 ((guix build gnu-build-system) #:prefix gnu:)
1652 (guix build utils))
1653 #:phases
1654 #~(modify-phases %standard-phases
1655 (replace 'configure
1656 (lambda _
1657 (invoke "qmake" "DoomRunner.pro" "-spec" "linux-g++"
1658 "\"CONFIG+=release\""
1659 (string-append "INSTALL_DIR=" #$output))))
1660 (replace 'build (assoc-ref gnu:%standard-phases 'build))
1661 (replace 'install (assoc-ref gnu:%standard-phases 'install))
1662 (add-after 'install 'install-xdg
1663 (lambda _
1664 (with-directory-excursion #$output
1665 (install-file "DoomRunner" "bin/")
1666 (delete-file "DoomRunner"))
1667 (with-directory-excursion "Install/XDG"
1668 (install-file "DoomRunner.desktop"
1669 (string-append #$output "/share/applications"))
1670 (install-file "io.github.Youda008.DoomRunner.appdata.xml"
1671 (string-append #$output "/share/metainfo"))
1672 (for-each
1673 (lambda (size)
1674 (let ((filename (simple-format #f "DoomRunner.~sx~s.png"
1675 size size)))
1676 (chmod filename #o444)
1677 (install-file
1678 filename
1679 (simple-format #f "~a/share/icons/hicolor/~sx~s/apps"
1680 #$output size size))))
1681 '(16 24 32 48 64 128))))))))
1682 (home-page "https://github.com/Youda008/DoomRunner")
1683 (synopsis "Launcher for Doom engine games")
1684 (description "Doom Runner is yet another launcher of common Doom source
1685ports (e.g. GZDoom, Zandronum, PrBoom) with a graphical user interface. It
1686is written in C++ and Qt, and it is designed around the idea of presets for
1687various multi-file modifications to allow one-click switching between them.")
1688 (license license:gpl3)))
1689
1690(define-public falltergeist
1691 (package
1692 (name "falltergeist")
1693 (version "0.3.1")
1694 (source (origin
1695 (method git-fetch)
1696 (uri (git-reference
1697 (url "https://github.com/falltergeist/falltergeist")
1698 (commit version)))
1699 (file-name (git-file-name name version))
1700 (sha256
1701 (base32
1702 "05cg58i2g32wbmrvmdsicic8xs83gld3qr1p7r4lnlckcl1l7dy4"))))
1703 (build-system cmake-build-system)
1704 (arguments
1705 `(#:tests? #f)) ; no tests provided
1706 (native-inputs (list pkg-config))
1707 (inputs `(("sdl" ,(sdl-union (list sdl2
1708 sdl2-image
1709 sdl2-mixer)))
1710 ("glew" ,glew)
1711 ("glm" ,glm)))
1712 (home-page "https://falltergeist.org/")
1713 (synopsis "Fallout 2 game engine")
1714 (description "This package provides the Fallout 2 game engine. Game data
1715should be placed in @file{~/.local/share/falltergeist}.")
1716 (license license:gpl3+)))
1717
1718(define-public foobillard++
1719 ;; Even though this latest revision is old already, stable release is
1720 ;; lagging way behind it, and has issues with textures rendering.
1721 (let ((svn-revision 170))
1722 (package
1723 (name "foobillard++")
1724 (version (string-append "3.43-r" (number->string svn-revision)))
1725 (source
1726 (origin
1727 (method svn-fetch)
1728 (uri (svn-reference
1729 (url "svn://svn.code.sf.net/p/foobillardplus/code/")
1730 (revision svn-revision)))
1731 (file-name (git-file-name name version))
1732 (sha256
1733 (base32 "00b693ys5zvzjbjzzj3dqfzm5xw64gwjf9m8qv6bkmf0klbhmayk"))
1734 (patches
1735 (search-patches "foobillard++-pkg-config.patch"))
1736 (modules '((guix build utils)))
1737 (snippet
1738 '(begin
1739 ;; Unfortunately, the game includes background music with
1740 ;; a non-commercial clause. Delete it.
1741 (for-each delete-file (find-files "data/music" "\\.ogg$"))
1742 #t))))
1743 (build-system gnu-build-system)
1744 (arguments
1745 `(#:configure-flags
1746 (list
1747 ;; Install data in a less exotic location.
1748 (string-append "--prefix=" (assoc-ref %outputs "out") "/share")
1749 ;; Prevent a build error about undefined trigonometric functions.
1750 "--enable-fastmath=no")
1751 #:phases
1752 (modify-phases %standard-phases
1753 (add-after 'unpack 'fix-makefile
1754 ;; Remove hard-coded directories. Also fix installation
1755 ;; rule: it tries to move around non-existent files or
1756 ;; files already moved.
1757 (lambda* (#:key outputs #:allow-other-keys)
1758 (substitute* "Makefile.am"
1759 (("/usr") (assoc-ref outputs "out"))
1760 (("cp .*?/foobillardplus\\.desktop.*") "")
1761 (("cp .*?/foobillardplus\\.(png|xbm) \\$\\(datarootdir\\).*")
1762 ""))
1763 #t))
1764 (add-after 'unpack 'unbundle-font
1765 ;; XXX: The package ships with LinBiolinum_aSB.ttf and
1766 ;; LinBiolinum_aS.ttf, which are not provided by
1767 ;; `font-linuxlibertine' package. Therefore, we cannot replace
1768 ;; them yet.
1769 (lambda* (#:key inputs #:allow-other-keys)
1770 (let ((dejavu (string-append (assoc-ref inputs "font-dejavu")
1771 "/share/fonts/truetype/")))
1772 (with-directory-excursion "data"
1773 (for-each (lambda (f)
1774 (delete-file f)
1775 (symlink (string-append dejavu f) f))
1776 '("DejaVuSans-Bold.ttf" "DejaVuSans.ttf"))))
1777 #t))
1778 (replace 'bootstrap
1779 (lambda _
1780 (invoke "aclocal" "--force")
1781 (invoke "autoconf" "-f")
1782 (invoke "autoheader" "-f")
1783 (invoke "automake" "-a" "-c" "-f")))
1784 (add-before 'build 'prepare-build
1785 ;; Set correct environment for SDL.
1786 (lambda* (#:key inputs #:allow-other-keys)
1787 (setenv "CPATH"
1788 (string-append
1789 (search-input-directory inputs "include/SDL")
1790 ":" (or (getenv "CPATH") "")))))
1791 (add-before 'build 'fix-settings-directory
1792 ;; Hide foobillardplus settings directory in $HOME.
1793 (lambda _
1794 (substitute* "src/history.c"
1795 (("/foobillardplus-data") "/.foobillardplus"))
1796 #t))
1797 (add-before 'install 'create-directories
1798 ;; Install process does not create directories before
1799 ;; trying to move file in it.
1800 (lambda* (#:key outputs #:allow-other-keys)
1801 (let ((out (assoc-ref outputs "out")))
1802 (mkdir-p (string-append out "/share/icons"))
1803 (mkdir-p (string-append out "/share/applications")))
1804 #t))
1805 (add-after 'install 'symlink-executable
1806 ;; Symlink executable to $out/bin.
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let* ((out (assoc-ref outputs "out"))
1809 (bin (string-append out "/bin")))
1810 (mkdir-p bin)
1811 (with-directory-excursion bin
1812 (symlink "../share/foobillardplus/bin/foobillardplus"
1813 "foobillardplus"))
1814 #t))))))
1815 (native-inputs
1816 (list autoconf automake pkg-config))
1817 (inputs
1818 `(("font-dejavu" ,font-dejavu)
1819 ("freetype" ,freetype)
1820 ("glu" ,glu)
1821 ("libpng" ,libpng)
1822 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net)))))
1823 (home-page "https://foobillardplus.sourceforge.net/")
1824 (synopsis "3D billiard game")
1825 (description "FooBillard++ is an advanced 3D OpenGL billiard game
1826based on the original foobillard 3.0a sources from Florian Berger.
1827You can play it with one or two players or against the computer.
1828
1829The game features:
1830
1831@itemize
1832@item Wood paneled table with gold covers and gold diamonds.
1833@item Reflections on balls.
1834@item Zoom in and out, rotation, different angles and bird's eye view.
1835@item Different game modes: 8 or 9-ball, Snooker or Carambole.
1836@item Tournaments. Compete against other players.
1837@item Animated cue with strength and eccentric hit adjustment.
1838@item Jump shots and snipping.
1839@item Realistic gameplay and billiard sounds.
1840@item Red-Green stereo.
1841@item And much more.
1842@end itemize")
1843 (license (list license:gpl2 license:silofl1.1)))))
1844
1845(define-public freedoom
1846 (package
1847 (name "freedoom")
1848 (version "0.13.0")
1849 (source
1850 (origin
1851 (method git-fetch)
1852 (uri (git-reference
1853 (url "https://github.com/freedoom/freedoom")
1854 (commit (string-append "v" version))))
1855 (file-name (git-file-name name version))
1856 (sha256
1857 (base32 "01fwzwi4a68n26d627dkcn85jz854mc3zfnzzkvinmx9yy3z5qmq"))))
1858 (build-system gnu-build-system)
1859 (arguments
1860 '(#:make-flags
1861 (list (string-append "prefix=" (assoc-ref %outputs "out")))
1862 #:tests? #f ; no check target
1863 #:phases
1864 (modify-phases %standard-phases
1865 (delete 'bootstrap)
1866 (replace 'configure
1867 (lambda* (#:key inputs outputs #:allow-other-keys)
1868 (let* ((freedoom (assoc-ref outputs "out"))
1869 (wad-dir (string-append freedoom "/share/games/doom")))
1870 ;; Make sure that the install scripts know where to find
1871 ;; the appropriate WAD files.
1872 (substitute* "dist/freedoom"
1873 (("IWAD=freedm.wad")
1874 (string-append "IWAD=" wad-dir "/freedm.wad"))
1875 (("IWAD=freedoom1.wad")
1876 (string-append "IWAD=" wad-dir "/freedoom1.wad"))
1877 (("IWAD=freedoom2.wad")
1878 (string-append "IWAD=" wad-dir "/freedoom2.wad")))
1879 #t))))))
1880 (native-inputs
1881 (list asciidoc deutex python python-pillow))
1882 (home-page "https://freedoom.github.io/")
1883 (synopsis "Free content game based on the Doom engine")
1884 (native-search-paths
1885 (list (search-path-specification
1886 (variable "DOOMWADDIR")
1887 (files '("share/games/doom")))
1888 (search-path-specification
1889 (variable "DOOMWADPATH")
1890 (files '("share/games/doom")))))
1891 (description
1892 "The Freedoom project aims to create a complete free content first person
1893shooter game. Freedoom by itself is just the raw material for a game: it must
1894be paired with a compatible game engine (such as @code{prboom-plus}) to be
1895played. Freedoom complements the Doom engine with free levels, artwork, sound
1896effects and music to make a completely free game.")
1897 (license license:bsd-3)))
1898
1899(define-public freedroidrpg
1900 (package
1901 (name "freedroidrpg")
1902 (version "1.0")
1903 (source
1904 (origin
1905 (method url-fetch)
1906 (uri (let ((major+minor
1907 (version-major+minor
1908 (string-replace-substring version "rc" "."))))
1909 (string-append "http://ftp.osuosl.org/pub/freedroid/"
1910 "freedroidRPG-" major+minor "/"
1911 "freedroidRPG-" version ".tar.gz")))
1912 (sha256
1913 (base32 "1kxvyg70r9x8q40kn5lr3h1q60d6jx9mkvxls4aflj22b45vg5br"))))
1914 (build-system gnu-build-system)
1915 (arguments
1916 (list
1917 #:configure-flags
1918 #~(list
1919 (string-append "CFLAGS=-fcommon "
1920 "-I" #$(this-package-input "sdl-gfx") "/include/SDL "
1921 "-I" #$(this-package-input "sdl-image") "/include/SDL "
1922 "-I" #$(this-package-input "sdl-mixer") "/include/SDL")
1923 "--enable-opengl")
1924 ;; FIXME: the test suite fails with the following error output:
1925 ;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
1926 ;; SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
1927 #:tests? #f))
1928 (native-inputs
1929 (list pkg-config))
1930 (inputs
1931 (list glew
1932 glu
1933 libjpeg-turbo
1934 libogg
1935 libpng
1936 libvorbis
1937 mesa
1938 python-wrapper
1939 sdl
1940 sdl-gfx
1941 sdl-image
1942 sdl-mixer
1943 zlib))
1944 (home-page "https://www.freedroid.org/")
1945 (synopsis "Isometric role-playing game against killer robots")
1946 (description
1947 "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
1948The game tells the story of a world destroyed by a conflict between robots and
1949their human masters. To restore peace to humankind, the player must complete
1950numerous quests while fighting off rebelling robots---either by taking control
1951of them, or by simply blasting them to pieces with melee and ranged weapons in
1952real-time combat.")
1953 (license (list license:expat ; lua/
1954 license:gpl3 ; src/gen_savestruct.py
1955 license:gpl2+)))) ; the rest
1956
1957(define-public golly
1958 (package
1959 (name "golly")
1960 (version "5.0")
1961 (source (origin
1962 (method url-fetch)
1963 (uri (string-append "mirror://sourceforge/golly/golly/golly-"
1964 version "/golly-" version
1965 "-src.tar.gz"))
1966 (sha256
1967 (base32
1968 "049n634abxfpgh4imh3s5qqfn9nbwmcl6jm91f29ngqm53jcsdaq"))))
1969 (build-system gnu-build-system)
1970 (arguments
1971 (list
1972 #:make-flags
1973 #~(list "CC=gcc"
1974 (string-append "GOLLYDIR="
1975 #$output
1976 "/share/golly"))
1977 #:tests? #f ; no check target
1978 #:phases
1979 #~(modify-phases %standard-phases
1980 (delete 'configure)
1981 (replace 'build
1982 (lambda* (#:key make-flags #:allow-other-keys)
1983 (with-directory-excursion "gui-wx"
1984 (apply invoke `("make" ,@make-flags "-f" "makefile-gtk")))))
1985 (replace 'install
1986 (lambda _
1987 (let* ((bin (string-append #$output "/bin"))
1988 (doc (string-append #$output "/share/doc/golly"))
1989 (pixmaps (string-append #$output "/share/pixmaps"))
1990 (share (string-append #$output "/share/golly")))
1991 (for-each (lambda (binary)
1992 (install-file binary bin))
1993 (list "bgolly" "golly"))
1994 (for-each (lambda (document)
1995 (install-file
1996 (string-append "docs/" document ".html")
1997 doc))
1998 (list "License" "ReadMe" "ToDo"))
1999 (install-file "gui-wx/icons/appicon.xpm" pixmaps)
2000 (for-each (lambda (folder)
2001 (copy-recursively
2002 folder
2003 (string-append share "/" folder)))
2004 (list "Help" "Patterns" "Rules" "Scripts"))))))))
2005 (native-inputs
2006 (list lua
2007 python-setuptools))
2008 (inputs
2009 (list glu
2010 mesa
2011 python
2012 sdl2
2013 wxwidgets
2014 zlib))
2015 (home-page "https://golly.sourceforge.net/")
2016 (synopsis "Software for exploring cellular automata")
2017 (description
2018 "Golly simulates Conway's Game of Life and many other types of cellular
2019automata. The following features are available:
2020@enumerate
2021@item Support for bounded and unbounded universes, with cells of up to 256
2022 states.
2023@item Support for multiple algorithms, including Bill Gosper's Hashlife
2024 algorithm.
2025@item Loading patterns from BMP, PNG, GIF and TIFF image files.
2026@item Reading RLE, macrocell, Life 1.05/1.06, dblife and MCell files.
2027@item Scriptable via Lua or Python.
2028@item Extracting patterns, rules and scripts from zip files.
2029@item Downloading patterns, rules and scripts from online archives.
2030@item Pasting patterns from the clipboard.
2031@item Unlimited undo/redo.
2032@item Configurable keyboard shortcuts.
2033@item Auto fit option to keep patterns within the view.
2034@end enumerate")
2035 (license license:gpl2+)))
2036
2037(define-public joycond
2038 ;; Important: Do *not* update to a newer commit until an issue causing a
2039 ;; 100% CPU usage in the next commit
2040 ;; cdec32865c6093bd4761326ea461aaa2fcf7d1b4 is resolved (see:
2041 ;; https://github.com/DanielOgorchock/joycond/issues/153).
2042 (let ((commit "5b590ecc9bca181d8bc21377e752126bc9180319")
2043 (revision "2"))
2044 (package
2045 (name "joycond")
2046 (version (git-version "0.1.0" revision commit))
2047 (source
2048 (origin
2049 (method git-fetch)
2050 (uri (git-reference
2051 (url "https://github.com/DanielOgorchock/joycond")
2052 (commit commit)))
2053 (file-name (git-file-name name version))
2054 (sha256
2055 (base32 "18aig7x5n8hh8ffw0qk2hx2b93xrs4jp652vp8cxklw9xyy33f15"))))
2056 (build-system cmake-build-system)
2057 (arguments
2058 (list #:tests? #f ;no test suite
2059 #:phases
2060 #~(modify-phases %standard-phases
2061 (add-after 'unpack 'fix-bin-location
2062 (lambda* (#:key inputs #:allow-other-keys)
2063 (substitute* "CMakeLists.txt"
2064 (("/lib/udev/rules.d")
2065 (string-append #$output "/lib/udev/rules.d"))
2066 (("/etc/systemd/system")
2067 (string-append #$output "/etc/systemd/system"))
2068 (("/etc/modules-load.d")
2069 (string-append #$output "/etc/modules-load.d"))
2070 (("/usr/bin")
2071 (string-append #$output "/bin")))
2072 (substitute* "udev/89-joycond.rules"
2073 (("/bin/setfacl")
2074 (search-input-file inputs "bin/setfacl"))))))))
2075 (native-inputs (list pkg-config))
2076 (inputs (list acl eudev libevdev))
2077 (home-page "https://github.com/DanielOgorchock/joycond")
2078 (synopsis "Joy-Con controller daemon")
2079 (description "This package provides a userspace daemon for the Nintendo
2080Joy-Con controllers.")
2081 (license license:gpl3+))))
2082
2083(define-public julius
2084 (package
2085 (name "julius")
2086 (version "1.7.0")
2087 (source
2088 (origin
2089 (method git-fetch)
2090 (uri (git-reference
2091 (url "https://github.com/bvschaik/julius")
2092 (commit (string-append "v" version))))
2093 (file-name (git-file-name name version))
2094 (sha256
2095 (base32 "0w7kmgz9ya0ck9cxhsyralarg7y6ydx4plmh33r4mkxkamlr7493"))
2096 ;; Remove unused bundled libraries.
2097 (modules '((guix build utils)))
2098 (snippet
2099 '(begin
2100 (with-directory-excursion "ext"
2101 (for-each delete-file-recursively '("dirent" "png" "SDL2" "zlib")))
2102 #t))))
2103 (build-system cmake-build-system)
2104 (inputs
2105 (list libpng sdl2 sdl2-mixer))
2106 (home-page "https://github.com/bvschaik/julius")
2107 (synopsis "Re-implementation of Caesar III game engine")
2108 (description
2109 "Engine for Caesar III, a city-building real-time strategy game.
2110Julius includes some UI enhancements while preserving the logic (including
2111bugs) of the original game, so that saved games are compatible. This package
2112does not include game data.")
2113 (license (list license:agpl3
2114 license:zlib)))) ; ext/tinyfiledialogs
2115
2116(define-public augustus
2117 (package
2118 (inherit julius)
2119 (name "augustus")
2120 (version "3.2.0")
2121 (source
2122 (origin
2123 (method git-fetch)
2124 (uri (git-reference
2125 (url "https://github.com/Keriew/augustus")
2126 (commit (string-append "v" version))))
2127 (file-name (git-file-name name version))
2128 (sha256
2129 (base32 "0d1k5279imc17mk3lxn8amc4ljgcj4v6x6lj2w3bph1z0a7a4bim"))
2130 ;; Remove unused bundled libraries.
2131 (modules '((guix build utils)))
2132 (snippet
2133 '(begin
2134 (with-directory-excursion "ext"
2135 (for-each delete-file-recursively
2136 '("dirent" "expat" "png" "SDL2" "zlib")))))))
2137 (arguments
2138 ;; No tests. See https://github.com/Keriew/augustus/issues/82.
2139 `(#:tests? #f))
2140 (inputs (modify-inputs inputs
2141 (prepend expat)))
2142 (home-page "https://github.com/Keriew/augustus")
2143 (synopsis "Re-implementation of Caesar III game engine with gameplay changes")
2144 (description
2145 "Fork of Julius, an engine for the a city-building real-time strategy
2146game Caesar III. Gameplay enhancements include:
2147
2148@itemize
2149@item roadblocks;
2150@item market special orders;
2151@item global labour pool;
2152@item partial warehouse storage;
2153@item increased game limits;
2154@item zoom controls.
2155@end itemize\n")))
2156
2157(define-public meandmyshadow
2158 (package
2159 (name "meandmyshadow")
2160 (version "0.5a")
2161 (source (origin
2162 (method url-fetch)
2163 (uri (string-append "mirror://sourceforge/meandmyshadow/"
2164 version "/meandmyshadow-" version
2165 "-src.tar.gz"))
2166 (sha256
2167 (base32
2168 "0i98v6cgmpsxy7mbb0s2y6f6qq6mkwzk2nrv1nz39ncf948aky2h"))))
2169 (build-system cmake-build-system)
2170 (arguments
2171 `(#:tests? #f)) ; there are no tests
2172 (native-inputs
2173 (list pkg-config))
2174 (inputs
2175 `(("curl" ,curl)
2176 ("libarchive" ,libarchive)
2177 ("lua" ,lua)
2178 ("sdl" ,(sdl-union (list sdl2
2179 sdl2-image
2180 sdl2-mixer
2181 sdl2-ttf)))))
2182 (home-page "https://acmepjz.github.io/meandmyshadow/")
2183 (synopsis "Puzzle/platform game")
2184 (description "Me and My Shadow is a puzzle/platform game in which you try
2185to reach the exit by solving puzzles. Spikes, moving blocks, fragile blocks
2186and much more stand between you and the exit. Record your moves and let your
2187shadow mimic them to reach blocks you couldn't reach alone.")
2188 (license license:gpl3+)))
2189
2190(define-public opensurge
2191 (package
2192 (name "opensurge")
2193 (version "0.6.1.1")
2194 (source
2195 (origin
2196 (method git-fetch)
2197 (uri (git-reference
2198 (url "https://github.com/alemart/opensurge")
2199 (commit (string-append "v" version))))
2200 (file-name (git-file-name name version))
2201 (sha256
2202 (base32 "1hwnjgkbywspmsmpmmnndqil86qqyd21y2q5krs8znwi35ychd3q"))))
2203 (build-system cmake-build-system)
2204 (arguments
2205 (list #:tests? #f ; there are no tests
2206 #:configure-flags
2207 #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
2208 (string-append "-DGAME_BINDIR=" #$output "/bin") ; not games
2209 (string-append "-DGAME_DATADIR=" #$output "/share/" #$name)
2210 (string-append "-DDESKTOP_ENTRY_PATH=" #$output "/share/applications")
2211 (string-append "-DDESKTOP_ICON_PATH=" #$output "/share/pixmaps")
2212 (string-append "-DDESKTOP_METAINFO_PATH=" #$output "/share/metainfo"))
2213 #:phases
2214 #~(modify-phases %standard-phases
2215 (add-after 'unpack 'fix-xdg-open-path
2216 (lambda* (#:key inputs #:allow-other-keys)
2217 ;; Look for xdg-open in the store.
2218 (substitute* "src/core/web.c"
2219 (("/usr/(bin/xdg-open)" _ bin)
2220 (search-input-file inputs bin)))))
2221 (add-after 'unpack 'unbundle-fonts
2222 (lambda* (#:key inputs #:allow-other-keys)
2223 ;; Replace bundled fonts with links to the store.
2224 (with-directory-excursion "fonts"
2225 (for-each (lambda (font)
2226 (let ((file (string-append "share/fonts/truetype/"
2227 font)))
2228 (delete-file font)
2229 (symlink (search-input-file inputs file) font)))
2230 '("Roboto-Black.ttf"
2231 "Roboto-Bold.ttf"
2232 "Roboto-Medium.ttf"))))))))
2233 (inputs
2234 (list allegro font-google-roboto mesa physfs surgescript xdg-utils))
2235 (home-page "https://opensurge2d.org")
2236 (synopsis "2D retro side-scrolling game")
2237 (description "@code{Open Surge} is a 2D retro side-scrolling platformer
2238inspired by the Sonic games. The player runs at high speeds through each
2239level while collecting items and avoiding obstacles. The game includes a
2240built-in level editor.")
2241 (license
2242 ;; Code is under GPL 3+, assets are under various licenses.
2243 ;; See src/misc/credits.c for details.
2244 (list license:gpl3+
2245 license:cc0
2246 license:cc-by3.0
2247 license:cc-by-sa3.0
2248 license:expat
2249 license:public-domain
2250 license:silofl1.1))))
2251
2252(define-public kgames
2253 (package
2254 (name "kgames")
2255 (version "2.4.1")
2256 (source (origin
2257 (method git-fetch)
2258 (uri (git-reference
2259 (url "https://github.com/keith-packard/kgames")
2260 (commit version)))
2261 (file-name (git-file-name name version))
2262 (sha256
2263 (base32
2264 "09alaszhwnzzv5b0cxv5dia9y0fm63n2igv42ydkq299h7avb5fq"))))
2265 (build-system meson-build-system)
2266 (arguments
2267 (list #:configure-flags
2268 #~'("-Duser-menu=false"
2269 "-Dbindir=bin")))
2270 (native-inputs
2271 (list bison flex pkg-config))
2272 (inputs
2273 (list cairo
2274 fontconfig
2275 freetype
2276 librsvg
2277 libx11
2278 libxaw
2279 libxft
2280 libxmu
2281 libxpm
2282 libxrender
2283 ncurses))
2284 (synopsis "Xaw based solitaire games")
2285 (home-page "https://github.com/keith-packard/kgames")
2286 (description
2287 "This package provides a collection of solitaire games: kaces, kcanfield,
2288kcribbage, kdominos, kklondike, kmcarlo, kmontana, kslyfox, kspider, ktabby,
2289kthieves, ktowers, xmille and xreversi.")
2290 ;; Code is under BSD-3 and Expat, card images are under CC0.
2291 (license (list license:bsd-3 license:expat license:cc0))))
2292
2293(define-public black-hole-solver
2294 (package
2295 (name "black-hole-solver")
2296 (version "1.14.0")
2297 (source
2298 (origin
2299 (method url-fetch)
2300 (uri (string-append
2301 "https://fc-solve.shlomifish.org/downloads/fc-solve/black-hole-solver-"
2302 version ".tar.xz"))
2303 (sha256
2304 (base32 "1h2panbi4jkcijyknyxi74fkgd0jgjmp1mhg155hy5mv7l4vsisw"))))
2305 (build-system cmake-build-system)
2306 (arguments
2307 (list
2308 #:phases
2309 #~(modify-phases %standard-phases
2310 (add-after 'unpack 'delete-failing-tests
2311 (lambda _
2312 (delete-file "t/style-trailing-space.t"))))))
2313 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2314 ;; which are mutually incompatible
2315 (native-inputs
2316 (list `(,glib "bin")
2317 perl
2318 perl-class-xsaccessor
2319 perl-dir-manifest
2320 perl-env-path
2321 perl-file-find-object
2322 perl-file-find-object-rule
2323 perl-file-which
2324 perl-inline
2325 perl-inline-c
2326 perl-number-compare
2327 perl-path-tiny-0.150
2328 perl-test-differences
2329 perl-test-runvalgrind
2330 perl-test-some
2331 perl-test-trailingspace
2332 perl-text-glob
2333 pkg-config
2334 python))
2335 (inputs (list rinutils))
2336 (home-page "https://fc-solve.shlomifish.org/")
2337 (synopsis "Solver of various solitaire games")
2338 (description
2339 "Black-hole Solver is a program that automatically solves layouts of Black Hole and
2340similar variants of Card Solitaire such as Golf, and All in a Row.")
2341 (license license:expat)))
2342
2343(define-public freecell-solver
2344 (package
2345 (name "freecell-solver")
2346 (version "6.14.0")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (string-append
2351 "https://fc-solve.shlomifish.org/downloads/fc-solve/freecell-solver-"
2352 version ".tar.xz"))
2353 (sha256
2354 (base32 "1p775imxqycpky3j3pa5whzqcxjbr3kv2z1d20hxbg12akc2a48x"))))
2355 (build-system cmake-build-system)
2356 (arguments
2357 (list
2358 #:configure-flags
2359 #~(list "-DFCS_DISABLE_PATSOLVE=1")
2360 #:phases
2361 #~(modify-phases %standard-phases
2362 (add-after 'unpack 'delete-failing-tests
2363 (lambda _
2364 (delete-file "t/t/tidyall.t")
2365 (delete-file "t/t/sh-shabang.t")
2366 (delete-file "t/t/py-flake8.t")
2367 (delete-file "t/t/style-trailing-space.t"))))))
2368 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2369 ;; which are mutually incompatible
2370 (native-inputs
2371 (list cmocka
2372 `(,glib "bin")
2373 gperf
2374 perl
2375 perl-chi
2376 perl-file-find-object
2377 perl-file-find-object-rule
2378 perl-moo-2
2379 perl-number-compare
2380 perl-path-tiny-0.150
2381 perl-task-freecellsolver-testing
2382 perl-task-test-run-allplugins
2383 perl-test-runvalgrind
2384 perl-template-toolkit
2385 perl-code-tidyall-plugin-testcount
2386 pkg-config
2387 python
2388 python-cffi
2389 python-freecell-solver
2390 python-pycotap
2391 python-six
2392 the-silver-searcher
2393 tidyall))
2394 (inputs (list rinutils))
2395 (propagated-inputs (list python-pysol-cards))
2396 (home-page "https://fc-solve.shlomifish.org/")
2397 (synopsis "Solver of various solitaire games")
2398 (description
2399 "Freecell Solver is a program that automatically solves layouts of Freecell and
2400similar variants of Card Solitaire such as Eight Off, Forecell, and Seahaven Towers, as
2401well as Simple Simon boards.")
2402 (license license:expat)))
2403
2404(define-public knightsgame
2405 (package
2406 (name "knightsgame")
2407 (version "025")
2408 (source (origin
2409 (method url-fetch)
2410 (uri (string-append "http://www.knightsgame.org.uk/files/knights_"
2411 version "_src.tar.gz"))
2412 (sha256
2413 (base32
2414 "18vp2ygvn0s0jz8rm585jqf6hjqkam1ximq81k0r9hpmfj7wb88f"))
2415 (modules '((guix build utils)))
2416 (snippet
2417 ;; Fix a missing include for std::map.
2418 #~(substitute* "src/shared/impl/lua_func_wrapper.cpp"
2419 (("#include \"misc[.]hpp\"" x)
2420 (string-append "#include <map>\n" x))))))
2421 (build-system gnu-build-system)
2422 (arguments
2423 '(#:make-flags
2424 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2425 "CXXFLAGS=-lpthread")
2426 #:phases
2427 (modify-phases %standard-phases
2428 ;; No configure script.
2429 (delete 'configure))
2430 #:tests? #f)) ;; No check target.
2431 (inputs
2432 `(("boost" ,boost-1.83)
2433 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
2434 ("freetype" ,freetype)
2435 ("fontconfig" ,fontconfig)
2436 ("curl" ,curl)))
2437 (native-inputs
2438 (list pkg-config))
2439 (home-page "http://www.knightsgame.org.uk/")
2440 (synopsis "Multiplayer dungeon game involving knights and quests")
2441 (description "Knights is a multiplayer game involving several knights who
2442must run around a dungeon and complete various quests. Each game revolves
2443around a quest – for example, you might have to find some items and carry them
2444back to your starting point. This may sound easy, but as there are only
2445enough items in the dungeon for one player to win, you may end up having to
2446kill your opponents to get their stuff! Other quests involve escaping from
2447the dungeon, fighting a duel to the death against the enemy knights, or
2448destroying an ancient book using a special wand.")
2449 ;; This package includes modified sources of lua (X11), enet (Expat), and
2450 ;; guichan (BSD-3). The "Coercri" library is released under the Boost
2451 ;; license. The whole package is released under GPLv3+.
2452 (license license:gpl3+)))
2453
2454(define-public ghosthop
2455 (let ((commit "9fefc22830ff8fde484452d7a249f4c54feec0fc")
2456 (revision "1"))
2457 (package
2458 (name "ghosthop")
2459 (version (git-version "0" revision commit))
2460 (source
2461 (origin
2462 (method git-fetch)
2463 (uri (git-reference
2464 (url "https://gitlab.com/gcmas/ghosthop.git")
2465 (commit commit)))
2466 (file-name (git-file-name name version))
2467 (sha256
2468 (base32
2469 "021awll73bgjk61r6y6cbqn0dpmki9jp627km7yhx5px15panslq"))
2470 (modules '((guix build utils)))
2471 (snippet '(delete-file-recursively "vendor"))))
2472 (build-system copy-build-system)
2473 (arguments
2474 (list
2475 #:install-plan
2476 ;; 'ghosthop' loads 'asset' and 'scm' from the current directory.
2477 #~'(("ghosthop" "opt/ghosthop/")
2478 ("asset" "opt/ghosthop/")
2479 ("scm" "opt/ghosthop/"))
2480 #:phases
2481 #~(modify-phases %standard-phases
2482 (add-before 'install 'build
2483 ;; Avoid its Makefile to build with system libraries.
2484 (lambda* (#:key inputs #:allow-other-keys)
2485 (with-output-to-file "rlbind.c"
2486 (lambda ()
2487 (invoke "repl" "rlbind.scm")))
2488 (invoke #$(cc-for-target)
2489 "-o" "ghosthop"
2490 "-O3" "-lm" "-lraylib"
2491 (search-input-file inputs "/share/s7/s7.c")
2492 "rlbind.c" "src/init.c")
2493 (invoke #$(strip-for-target) "ghosthop")))
2494 (add-after 'install 'install-launcher
2495 ;; Create a launcher script for 'ghosthop'.
2496 (lambda* (#:key inputs outputs #:allow-other-keys)
2497 (let* ((out (assoc-ref outputs "out"))
2498 (bindir (string-append out "/bin"))
2499 (gamedir (string-append out "/opt/ghosthop"))
2500 (launcher (string-append bindir "/ghosthop"))
2501 (bash (search-input-file inputs "/bin/bash")))
2502 (mkdir (dirname launcher))
2503 (with-output-to-file launcher
2504 (lambda ()
2505 (format #t "#!~a~%" bash)
2506 (format #t "cd ~a~%" gamedir)
2507 (format #t "exec -a ghosthop ~a~%"
2508 (string-append gamedir "/ghosthop"))))
2509 (chmod launcher #o755)))))))
2510 (native-inputs (list s7))
2511 (inputs (list bash-minimal raylib))
2512 (home-page "https://gitlab.com/gcmas/ghosthop")
2513 (synopsis "Puzzle game with colored rules")
2514 (description "This is a small puzzle game made for the 2024 Spring Lisp
2515Game Jam. The objective is to reach the goal by assigning rules to colors.")
2516 (license (list license:gpl3+ ;code and other assets
2517 license:cc-by-sa3.0))))) ;music
2518
2519(define-public gnome-2048
2520 (package
2521 (name "gnome-2048")
2522 (version "50.2")
2523 (source (origin
2524 (method url-fetch)
2525 (uri (string-append "mirror://gnome/sources/gnome-2048/"
2526 (version-major version) "/"
2527 "gnome-2048-" version ".tar.xz"))
2528 (sha256
2529 (base32
2530 "1a9dpm14lk2b3p9g8gh0qhyp6yv6ijphi2arkv4z130jlrldy5bd"))))
2531 (build-system meson-build-system)
2532 (arguments
2533 (list
2534 ;; The 'libgnome-games-support-tests' test fails (see:
2535 ;; <https://gitlab.gnome.org/GNOME/gnome-2048/-/work_items/56>).
2536 #:tests? #f
2537 #:glib-or-gtk? #t
2538 #:imported-modules
2539 `((guix build cargo-build-system)
2540 ,@%meson-build-system-modules)
2541 #:modules '((guix build meson-build-system)
2542 ((guix build cargo-build-system) #:prefix cargo:)
2543 (guix build utils))
2544 #:phases
2545 #~(modify-phases %standard-phases
2546 (add-after 'unpack 'prepare-cargo-build-system
2547 (lambda args
2548 (substitute* "src/meson.build"
2549 ;; The build system sets CARGO_HOME itself, which is also used
2550 ;; by the cargo configure phase.
2551 ((".*cargo_env.set.*CARGO_HOME.*") ""))
2552 (for-each
2553 (lambda (phase)
2554 (format #t "Running cargo phase: ~a~%" phase)
2555 (apply (assoc-ref cargo:%standard-phases phase)
2556 #:vendor-dir ".cargo/vendor"
2557 #:cargo-target #$(cargo-triplet)
2558 args))
2559 '(unpack-rust-crates
2560 configure
2561 check-for-pregenerated-files
2562 patch-cargo-checksums))))
2563 (add-after 'unpack 'skip-gtk-update-icon-cache
2564 ;; Don't create 'icon-theme.cache'.
2565 (lambda _
2566 (substitute* "meson.build"
2567 (("gtk_update_icon_cache: true")
2568 "gtk_update_icon_cache: false")))))))
2569 (native-inputs
2570 (cons* desktop-file-utils
2571 gettext-minimal
2572 `(,glib "bin") ; for desktop-file-validate and appstream-util
2573 itstool
2574 pkg-config
2575 rust
2576 `(,rust "cargo")
2577 vala
2578 (or (and=> (%current-target-system)
2579 (compose list make-rust-sysroot))
2580 '())))
2581 (inputs
2582 (cons* libadwaita
2583 gtk
2584 (cargo-inputs 'gnome-2048)))
2585 (home-page "https://gitlab.gnome.org/GNOME/gnome-2048")
2586 (synopsis "Move the tiles until you obtain the 2048 tile")
2587 (description "GNOME 2048 provides a 2D grid for playing 2048, a
2588single-player sliding tile puzzle game. The objective of the game is to merge
2589together adjacent tiles of the same number until the sum of 2048 is achieved
2590in one tile.")
2591 (license license:gpl3+)))
2592
2593(define-public gnome-chess
2594 (package
2595 (name "gnome-chess")
2596 (version "46.0")
2597 (source (origin
2598 (method url-fetch)
2599 (uri (string-append "mirror://gnome/sources/gnome-chess/"
2600 (version-major version) "/"
2601 "gnome-chess-" version ".tar.xz"))
2602 (sha256
2603 (base32
2604 "1rzx8qxrfsicdmkyka434nv7adrh4x4qn6dri5bjqcallzh91g52"))))
2605 (build-system meson-build-system)
2606 (arguments
2607 '(#:glib-or-gtk? #t
2608 #:phases
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'skip-gtk-update-icon-cache
2611 ;; Don't create 'icon-theme.cache'.
2612 (lambda _
2613 (substitute* "meson.build"
2614 (("gtk_update_icon_cache: true")
2615 "gtk_update_icon_cache: false")
2616 (("update_desktop_database: true")
2617 "update_desktop_database: false")))))))
2618 (inputs
2619 (list gtk libadwaita librsvg))
2620 (native-inputs
2621 (list gettext-minimal
2622 `(,glib "bin") ; for desktop-file-validate and appstream-util
2623 itstool
2624 pkg-config
2625 vala))
2626 (home-page "https://wiki.gnome.org/Apps/Chess")
2627 (synopsis "Chess board for GNOME")
2628 (description "GNOME Chess provides a 2D board for playing chess games
2629against human or computer players. It supports loading and saving games in
2630Portable Game Notation. To play against a computer, install a chess engine
2631such as chess or stockfish.")
2632 (license license:gpl3+)))
2633
2634(define-public gnubg
2635 (package
2636 (name "gnubg")
2637 (version "1.08.003")
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (string-append "mirror://gnu/gnubg/gnubg-release-"
2642 version "-sources.tar.gz"))
2643 (sha256
2644 (base32
2645 "0yar8j6g2f1q9zz9m9ha9xzvjr6mwp2qrzwhp9ppizyg2fdrczbg"))))
2646 (build-system gnu-build-system)
2647 (inputs (list ;; XXX: Build with an older Pango for 'pango_font_get_hb_font' and
2648 ;; 'pango_coverage_get_type'. Try removing this for versions > 1.08.003.
2649 pango-1.42
2650 glib
2651 readline
2652 gtk+-2
2653 mesa
2654 glu
2655 gtkglext
2656 sqlite
2657 libcanberra))
2658 (native-inputs (list flex
2659 python
2660 pkg-config))
2661 (arguments
2662 `(#:configure-flags
2663 ;; SSE instructions are available on Intel systems only.
2664 (list ,@(if (any (cute string-prefix? <> (or (%current-target-system)
2665 (%current-system)))
2666 '("x86_64" "i686"))
2667 '("--enable-simd=sse2") ; prevent avx instructions
2668 '()))
2669 #:phases
2670 (modify-phases %standard-phases
2671 (add-after 'install 'install-desktop-file
2672 (lambda* (#:key outputs #:allow-other-keys)
2673 (let* ((out (assoc-ref outputs "out"))
2674 (apps (string-append out "/share/applications")))
2675 (mkdir-p apps)
2676 (with-output-to-file (string-append apps "/gnubg.desktop")
2677 (lambda _
2678 (format #t
2679 "[Desktop Entry]~@
2680 Name=GNU Backgammon~@
2681 Exec=~a/bin/gnubg -w~@
2682 Icon=gnubg~@
2683 Categories=Game;~@
2684 Terminal=false~@
2685 Type=Application~%"
2686 out))))
2687 #t)))))
2688 (home-page "https://www.gnu.org/software/gnubg/")
2689 (synopsis "Backgammon game")
2690 (description "The GNU backgammon application (also known as \"gnubg\") can
2691be used for playing, analyzing and teaching the game. It has an advanced
2692evaluation engine based on artificial neural networks suitable for both
2693beginners and advanced players. In addition to a command-line interface, it
2694also features an attractive, 3D representation of the playing board.")
2695 (license license:gpl3+)))
2696
2697(define-public gnubik
2698 (package
2699 (name "gnubik")
2700 (version "2.4.3")
2701 (source
2702 (origin
2703 (method url-fetch)
2704 (uri (string-append "mirror://gnu/gnubik/gnubik-"
2705 version ".tar.gz"))
2706 (sha256
2707 (base32
2708 "1vlf924mq8hg93bsjj0rzvs0crc6psmlxyc6zn0fr7msnmpx6gib"))))
2709 (build-system gnu-build-system)
2710 (arguments
2711 '(#:phases (modify-phases %standard-phases
2712 (add-after 'unpack 'skip-gtk-update-icon-cache
2713 (lambda _
2714 ;; Do not attempt to run 'gtk-update-icon-cache', which is
2715 ;; unnecessary and causes a needless dependency on glib.
2716 (substitute* "Makefile.in"
2717 (("gtk-update-icon-cache")
2718 "true"))
2719 #t)))))
2720 (inputs (list gtk+-2
2721 mesa
2722 glu
2723 libx11
2724 guile-2.0
2725 gtkglext))
2726 (native-inputs `(("gettext" ,gettext-minimal)
2727 ("pkg-config" ,pkg-config)))
2728 (home-page "https://www.gnu.org/software/gnubik/")
2729 (synopsis "3d Rubik's cube game")
2730 (description
2731 "GNUbik is a puzzle game in which you must manipulate a cube to make
2732each of its faces have a uniform color. The game is customizable, allowing
2733you to set the size of the cube (the default is 3x3) or to change the colors.
2734You may even apply photos to the faces instead of colors. The game is
2735scriptable with Guile.")
2736 (license license:gpl3+)))
2737
2738(define-public gnushogi
2739 (package
2740 (name "gnushogi")
2741 (version "1.4.2")
2742 (source (origin
2743 (method url-fetch)
2744 (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
2745 ".tar.gz"))
2746 (sha256
2747 (base32
2748 "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
2749 (modules '((guix build utils)))
2750 ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
2751 ;; identifier [-Wpedantic]"
2752 (snippet '(begin
2753 (substitute* "gnushogi/dspwrappers.c"
2754 (("__FUNCTION__")
2755 "__extension__ __FUNCTION__"))))))
2756 (arguments
2757 `(#:configure-flags (list (string-append
2758 "CFLAGS="
2759 (string-join '("-Wno-format"
2760 "-Wno-unused-but-set-variable"
2761 "-Wno-bool-compare")
2762 " ")))
2763 #:make-flags '("LDFLAGS=-z muldefs")
2764 #:phases (modify-phases %standard-phases
2765 ;; Skip --enable-fast-install flag
2766 (replace 'configure
2767 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2768 (let ((out (assoc-ref outputs "out")))
2769 (setenv "CONFIG_SHELL"
2770 (which "sh"))
2771 (setenv "SHELL"
2772 (which "sh"))
2773 (apply invoke "./configure"
2774 (string-append "--prefix=" out) configure-flags)))))
2775 #:test-target "sizetest"))
2776 (build-system gnu-build-system)
2777 (home-page "https://www.gnu.org/software/gnushogi/")
2778 (synopsis "Game of Shogi (Japanese chess)")
2779 (description
2780 "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
2781It is similar to standard chess but this variant is far more complicated.")
2782 (license license:gpl3+)))
2783
2784(define-public ltris
2785 (package
2786 (name "ltris")
2787 (version "1.3")
2788 (source
2789 (origin
2790 (method url-fetch)
2791 (uri (string-append "mirror://sourceforge/lgames/ltris/"
2792 "ltris-" version ".tar.gz"))
2793 (sha256
2794 (base32 "144zvnnky79z5ychyyb2wsp7h2pcbl50fbzd9w9dvxkw6adz4yip"))))
2795 (build-system gnu-build-system)
2796 (arguments
2797 '(#:phases
2798 (modify-phases %standard-phases
2799 (add-after 'set-paths 'set-sdl-paths
2800 (lambda* (#:key inputs #:allow-other-keys)
2801 (setenv "CPATH"
2802 (string-append
2803 (search-input-directory inputs "include/SDL")
2804 ":" (or (getenv "CPATH") ""))))))))
2805 (inputs
2806 (list (sdl-union (list sdl sdl-mixer))))
2807 (home-page "https://lgames.sourceforge.net/LTris/")
2808 (synopsis "Tetris clone based on the SDL library")
2809 (description
2810 "LTris is a tetris clone: differently shaped blocks are falling down the
2811rectangular playing field and can be moved sideways or rotated by 90 degree
2812units with the aim of building lines without gaps which then disappear (causing
2813any block above the deleted line to fall down). LTris has three game modes: In
2814Classic you play until the stack of blocks reaches the top of the playing field
2815and no new blocks can enter. In Figures the playing field is reset to a new
2816figure each level and later on tiles and lines suddenly appear. In Multiplayer
2817up to three players (either human or CPU) compete with each other sending
2818removed lines to all opponents. There is also a Demo mode in which you can
2819watch your CPU playing while enjoying a cup of tea!")
2820 (license license:gpl2+)))
2821
2822(define-public nethack
2823 (package
2824 (name "nethack")
2825 (version "5.0.0")
2826 (source
2827 (origin
2828 (method git-fetch)
2829 (uri (git-reference
2830 (url "https://github.com/NetHack/NetHack/")
2831 (commit (string-append "NetHack-" version "_Released"))))
2832 (file-name (git-file-name name version))
2833 (sha256
2834 (base32 "1zc2gn3kcrsg3xj4rpsh2k1jz4s8pwqr92ajn3bi5404253fqp5m"))))
2835 (build-system gnu-build-system)
2836 (arguments
2837 (list
2838 ;; Building in parallel might lead to a race condition where lua
2839 ;; is copied twice, resulting in this error:
2840 ;; cp: cannot create regular file
2841 ;; 'lib/lua/liblua-5.4.8.a': Permission denied
2842 #:parallel-build? #f
2843 ;; There are tests, but they won't run.
2844 ;; The tests in sys/libnh/test seem to be MacOS specific.
2845 ;; The tests in the top level test directory require human interaction.
2846 #:tests? #f
2847 #:make-flags
2848 #~(list
2849 (string-append "PREFIX=" #$output)
2850 ;; Without this, build system assumes ncurses and tinfo are combined.
2851 "LIBS=-ltinfo"
2852 (string-append "CC=" #$(cc-for-target))
2853 (string-append "GREPPATH="
2854 (search-input-file %build-inputs "/bin/grep"))
2855 "WANT_WIN_CURSES=1"
2856 "WANT_WIN_TTY=1")
2857 #:phases
2858 #~(modify-phases %standard-phases
2859 (add-before 'configure 'do-not-change-to-hackdir
2860 ;; The Nethack binary must be run in the HACKDIR (playground).
2861 ;; The HACKDIR consists files which are installed in the 'install'
2862 ;; phase and is also assumed to be writable.
2863 ;; The usual way to start nethack is via this provided wrapper
2864 ;; script which handles setting HACKDIR to the location of the
2865 ;; installed files and changing to its directory before running the
2866 ;; executable. We will create another wrapper to solve the problem
2867 ;; of a writable HACKDIR later; for now, assume that we are already
2868 ;; in HACKDIR when executing this wrapper by removing the line to
2869 ;; change to it.
2870 ;; Removing CHDIR also making the default behavior of Nethack to
2871 ;; treat the current dir as HACKDIR rather than change to some
2872 ;; compiled-in directory.
2873 (lambda _
2874 (substitute* "sys/unix/nethack.sh"
2875 (("cd \\$HACKDIR") ""))
2876 (substitute* "include/config.h"
2877 (("^.*define CHDIR.*$") ""))))
2878 (add-before 'configure 'patch-paths
2879 (lambda* (#:key inputs #:allow-other-keys)
2880 (substitute* "sys/unix/Makefile.top"
2881 (("LUAHEADERS *=[^\n]+")
2882 (string-append
2883 "LUAHEADERS ="
2884 (dirname (search-input-file inputs "/include/lua.h"))))
2885 (("LUATOP *=[^\n]+")
2886 (string-append
2887 "LUATOP = "
2888 (dirname (search-input-file inputs "/lib/liblua.so"))))
2889 ;; Replace the ../ in this line:
2890 ;; @echo '#include "../$(LUAHEADERS)/lua.h"' >> $@
2891 (("include \"../") "include \""))
2892 (substitute* "sys/unix/setup.sh"
2893 (("^/bin/sh") (search-input-file inputs "/bin/bash")))
2894 (substitute* "sys/unix/sysconf"
2895 (("^.*GREPPATH[^\n]+")
2896 (string-append "GREPPATH="
2897 (search-input-file inputs "/bin/grep"))))
2898 (substitute* "sys/unix/hints/linux.500"
2899 (("/bin/gzip") (search-input-file inputs "bin/gzip")))))
2900 (add-before 'configure 'make-reproducible
2901 (lambda _
2902 (substitute* "include/config.h"
2903 (("^/\\* *#*define *REPRODUCIBLE_BUILD *\\*/")
2904 ;; Honor SOURCE_DATE_EPOCH.
2905 "#define REPRODUCIBLE_BUILD"))
2906 ;; Note: 'makedefs' rejects and ignores dates that are too old
2907 ;; or too new, so we must choose something reasonable here.
2908 (setenv "SOURCE_DATE_EPOCH" "1531865062")))
2909 (replace 'configure
2910 (lambda _
2911 (with-directory-excursion "sys/unix"
2912 (invoke "./setup.sh" "hints/linux.500"))))
2913 (add-after 'install 'make-writable-hackdir
2914 (lambda* (#:key inputs #:allow-other-keys)
2915 (let* ((nethack-script (string-append #$output "/bin/nethack")))
2916 (mkdir-p (string-append #$output "/games/lib/nethackuserdir"))
2917 (for-each
2918 (lambda (file)
2919 (rename-file
2920 (string-append #$output "/games/lib/nethackdir/" file)
2921 (string-append #$output "/games/lib/nethackuserdir/" file)))
2922 ;; These HACKDIR files include the user's save games and are
2923 ;; assumed to be writable. Set them aside, as described in
2924 ;; https://nethackwiki.com/wiki/Playground.
2925 '("xlogfile" "logfile" "perm" "record" "save"))
2926 (mkdir-p (string-append #$output "/bin"))
2927 (call-with-output-file nethack-script
2928 ;; Our custom wrapper script, which runs before the provided
2929 ;; wrapper (see phase 'do-not-change-to-hackdir').
2930 ;; Ensure all writable runtime files are in the user's home,
2931 ;; then symlink everything into a temporary HACKDIR and change
2932 ;; to it.
2933 (lambda (port)
2934 (format port "#!~a/bin/sh
2935if [ ! -d ~~/.config/nethack ]; then
2936 mkdir -p ~~/.config/nethack
2937 cp -r ~a/games/lib/nethackuserdir/* ~~/.config/nethack
2938 chmod -R +w ~~/.config/nethack
2939fi
2940
2941RUNDIR=$(mktemp -d)
2942
2943cleanup() {
2944 rm -rf $RUNDIR
2945}
2946trap cleanup EXIT
2947
2948cd $RUNDIR
2949for i in ~~/.config/nethack/*; do
2950 ln -s $i $(basename $i)
2951done
2952for i in ~a/games/lib/nethackdir/*; do
2953 ln -s $i $(basename $i)
2954done
2955~a/games/nethack \"$@\""
2956 (search-input-file inputs "/bin/bash")
2957 #$output
2958 #$output
2959 #$output)))
2960 (chmod nethack-script #o555)))))))
2961 (native-inputs
2962 (list groff-minimal
2963 pkg-config))
2964 (inputs
2965 (list grep
2966 gzip
2967 less
2968 lua-5.4
2969 ncurses/tinfo
2970 perl))
2971 (home-page "https://nethack.org")
2972 (synopsis "Classic dungeon crawl game")
2973 (description "NetHack is a single player dungeon exploration game that runs
2974on a wide variety of computer systems, with a variety of graphical and text
2975interfaces all using the same game engine. Unlike many other Dungeons &
2976Dragons-inspired games, the emphasis in NetHack is on discovering the detail of
2977the dungeon and not simply killing everything in sight - in fact, killing
2978everything in sight is a good way to die quickly. Each game presents a
2979different landscape - the random number generator provides an essentially
2980unlimited number of variations of the dungeon and its denizens to be discovered
2981by the player in one of a number of characters: you can pick your race, your
2982role, and your gender.")
2983 (license
2984 (license:fsdg-compatible
2985 "https://nethack.org/common/license.html"))))
2986
2987(define-public nethack-qt
2988 (package
2989 (inherit nethack)
2990 (name "nethack-qt")
2991 (arguments
2992 (substitute-keyword-arguments arguments
2993 ((#:imported-modules imported-modules %default-gnu-imported-modules)
2994 `(,@%qt-build-system-modules ,@imported-modules))
2995 ((#:modules modules '((guix build utils)
2996 (guix build gnu-build-system)))
2997 `(((guix build qt-build-system) #:prefix qt:)
2998 ,@modules))
2999 ((#:make-flags flags)
3000 #~(cons* "WANT_WIN_QT6=1"
3001 "WANT_DEFAULT=Qt"
3002 #$flags))
3003 ((#:phases phases)
3004 #~(modify-phases #$phases
3005 (add-after 'unpack 'fix-qt-dir-nonsense
3006 (lambda _
3007 (substitute* '("sys/unix/hints/linux.500")
3008 (("(QTDIR=)[^\n]+" _ f)
3009 (string-append f #$(this-package-input "qtbase"))))))
3010 (add-after 'make-writable-hackdir 'rename-binary
3011 (lambda _
3012 (with-directory-excursion #$output
3013 ;; Allows parallel installation with nethack.
3014 (rename-file "bin/nethack"
3015 "bin/nethack-qt"))))
3016 (add-after 'rename-binary 'qt-wrap
3017 (lambda args
3018 (apply (assoc-ref qt:%standard-phases 'qt-wrap)
3019 #:qtbase #$(this-package-input "qtbase")
3020 args)))))))
3021 (inputs
3022 (modify-inputs inputs
3023 (prepend qtbase qtmultimedia)))
3024 (synopsis "Classic dungeon crawl game (Qt interface)")))
3025
3026(define-public netpanzer
3027 (package
3028 (name "netpanzer")
3029 (version "0.9.0-RC-7") ;0.8.7 was released 8 years ago
3030 (source
3031 (origin
3032 (method git-fetch)
3033 (uri (git-reference
3034 (url "https://github.com/netpanzer/netpanzer")
3035 (commit version)))
3036 (file-name (git-file-name name version))
3037 (sha256
3038 (base32 "1bc29cxjragbhgsg89sliyiqw289nd37wb1f9qarknir73ijnfac"))))
3039 (build-system meson-build-system)
3040 (arguments
3041 (list #:tests? #f)) ;2/2 (trivial) tests fail, need filesystem access
3042 (native-inputs (list pkg-config))
3043 (inputs (list freetype
3044 lua
3045 physfs
3046 sdl2
3047 sdl2-mixer
3048 sdl2-ttf))
3049 (home-page "https://github.com/netpanzer/netpanzer")
3050 (synopsis "Online tactical warfare game")
3051 (description
3052 "NetPanzer is an online multiplayer tactical warfare game. It is based
3053on quick tactical action and unit management in real-time. Battles progress
3054constantly as destroyed players respawn with a set of new units. Players can
3055join or leave multiplayer games at any time.")
3056 (license license:gpl2+)))
3057
3058(define-public pipewalker
3059 (package
3060 (name "pipewalker")
3061 (version "0.9.4")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (string-append "mirror://sourceforge/pipewalker/pipewalker/"
3066 version "/pipewalker-" version ".tar.gz"))
3067 (sha256
3068 (base32 "1x46wgk0s55562pd96cxagxkn6wpgglq779f9b64ff1k3xzp3myn"))))
3069 (build-system gnu-build-system)
3070 (arguments
3071 `(#:configure-flags
3072 (list (string-append "--docdir=" (assoc-ref %outputs "out")
3073 "/share/doc/" ,name "-" ,version))
3074 #:phases
3075 (modify-phases %standard-phases
3076 (add-after 'configure 'patch-docdir
3077 ;; Makefile.in ignores configure's ‘--docdir=...’ option. Fix that.
3078 (lambda _
3079 (substitute* "Makefile"
3080 (("(pkgdocdatadir = ).*" _ assignment)
3081 (string-append assignment "$(docdir)\n")))
3082 #t)))))
3083 (inputs
3084 (list libpng mesa sdl))
3085 (home-page "https://pipewalker.sourceforge.net/")
3086 (synopsis "Logical tile puzzle")
3087 (description
3088 "PipeWalker is a simple puzzle game with many different themes: connect all
3089computers to one network server, bring water from a source to the taps, etc.
3090The underlying mechanism is always the same: you must turn each tile in the
3091grid in the right direction to combine all components into a single circuit.
3092Every puzzle has a complete solution, although there may be more than one.")
3093 (license license:gpl3+)))
3094
3095(define-public dsda-doom
3096 (package
3097 (name "dsda-doom")
3098 (version "0.29.3")
3099 (source
3100 (origin
3101 (method git-fetch)
3102 (uri (git-reference
3103 (url "https://github.com/kraflab/dsda-doom")
3104 (commit (string-append "v" version))))
3105 (file-name (git-file-name name version))
3106 (sha256
3107 (base32 "1nhlwxwhs69ibsi873cdjanfdlpqcb4ybcp8c2j8j9l07xpgvk1n"))))
3108 (build-system cmake-build-system)
3109 (arguments
3110 (list
3111 #:tests? #f ;no tests
3112 #:phases #~(modify-phases %standard-phases
3113 (add-after 'unpack 'chdir
3114 (lambda _
3115 (chdir "prboom2"))))))
3116 (inputs
3117 (list sdl2
3118 sdl2-mixer
3119 fluidsynth
3120 portmidi
3121 libmad
3122 libzip
3123 glu
3124 dumb
3125 libvorbis))
3126 (home-page "https://github.com/kraflab/dsda-doom")
3127 (synopsis "Doom source port, successor of PrBoom+")
3128 (description
3129 "DSDA-Doom is a Doom source port and successor of PrBoom+, with extra
3130features for demo recording/playback and quality of life. In particular, its
3131features include support for the Heretic, Hexen, MBF21, Doom-in-Hexen and UDMF
3132map formats, MAPINFO support, full controller support, debug and scripting
3133features, rewinding, and a strict mode for speedrunning.")
3134 (license license:gpl2+)))
3135
3136(define-public redeal
3137 (let ((commit "abcf328546b1147525122c5d6660118a70d5c149")
3138 (revision "2"))
3139 (package
3140 (name "redeal")
3141 (version (git-version "0.2.0" revision commit))
3142 (source
3143 (origin
3144 (method git-fetch)
3145 (uri (git-reference
3146 (url "https://github.com/anntzer/redeal")
3147 (commit commit)))
3148 (file-name (git-file-name name version))
3149 (sha256
3150 (base32
3151 "02rqadv6f9fsrbrh0d8brgjqgym3glm1mhdcjbf91gas1ckmfv9f"))))
3152 (build-system pyproject-build-system)
3153 (arguments
3154 (list
3155 #:tests? #f
3156 #:phases
3157 #~(modify-phases %standard-phases
3158 (add-after 'unpack 'unbundle-dds
3159 (lambda* (#:key inputs #:allow-other-keys)
3160 (substitute* "setup.py"
3161 (("cmdclass=.*") ""))
3162 (let ((libdds (search-input-file inputs "lib/libdds.so")))
3163 (substitute* "redeal/dds.py"
3164 ((" and os.path.exists\\(dll_path\\)") "")
3165 (("dll = DLL\\(dll_path\\)")
3166 (format #f "dll = DLL(~s)" libdds))))))
3167 (add-after 'install 'install-examples
3168 (lambda _
3169 (let* ((doc (string-append #$output "/share/doc/"))
3170 (examples
3171 (string-append doc #$name "-" #$version "/examples")))
3172 (mkdir-p examples)
3173 (copy-recursively "examples" examples)))))))
3174 (inputs (list dds `(,python "tk")))
3175 (propagated-inputs (list python-colorama))
3176 (native-inputs (list python-setuptools python-wheel))
3177 (home-page "https://github.com/anntzer/redeal")
3178 (synopsis
3179 "Deal generator for bridge card game, written in Python")
3180 (description
3181 "Redeal is a deal generator written in Python. It outputs deals
3182satisfying whatever conditions you specify --- deals with a double void, deals
3183with a strong 2♣ opener opposite a yarborough, etc. Using Bo Haglund's double
3184dummy solver, it can even solve the hands it has generated for you.")
3185 (license license:gpl3))))
3186
3187(define-public retux
3188 (let ((release "1.6.2")
3189 (revision 0))
3190 (package
3191 (name "retux")
3192 (version (if (zero? revision)
3193 release
3194 (string-append release "-"
3195 (number->string revision))))
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (string-append "https://github.com/retux-game/retux/"
3200 "releases/download/v" version
3201 "/retux-" release "-src.zip"))
3202 (sha256
3203 (base32 "1fzsjg4k25mxjjc28ykz8n3dx5xzwxnp772fwzz5jy1wrxmjkl4x"))))
3204 (build-system pyproject-build-system)
3205 (arguments
3206 (list
3207 #:tests? #f ;no check target
3208 #:phases
3209 #~(modify-phases %standard-phases
3210 ;; no setup.py script
3211 (delete 'build)
3212 (replace 'install
3213 (lambda _
3214 (let* ((bin (string-append #$output "/bin"))
3215 (data (string-append #$output "/share/retux")))
3216 (mkdir-p bin)
3217
3218 (substitute* "retux.py"
3219 ;; Use the correct data directory.
3220 (("os\\.path\\.join\\(os\\.path\\.dirname\\(__file__\\), \"data\"\\),")
3221 (string-append "\"" data "\",")))
3222
3223 (copy-file "retux.py" (string-append bin "/retux"))
3224 (copy-recursively "data" data)))))))
3225 (native-inputs (list unzip python-setuptools))
3226 (inputs (list python-sge python-xsge))
3227 (home-page "https://retux-game.github.io/")
3228 (synopsis "Action platformer game")
3229 (description
3230 "ReTux is an action platformer loosely inspired by the Mario games,
3231utilizing the art assets from the @code{SuperTux} project.")
3232 ;; GPL version 3 or later is the license for the code and some art.
3233 ;; The rest of the licenses are for the art exclusively, as listed in
3234 ;; data/LICENSES.
3235 (license (list license:cc0
3236 license:cc-by3.0
3237 license:cc-by-sa3.0
3238 license:cc-by-sa4.0
3239 license:gpl2+
3240 license:gpl3+)))))
3241
3242(define-public robotfindskitten
3243 (package
3244 (name "robotfindskitten")
3245 (version "2.8284271.702") ; 1600003_201b is older, see ChangeLog
3246 (source (origin
3247 (method url-fetch)
3248 (uri (string-append "https://github.com/" name "/" name
3249 "/releases/download/" version "/"
3250 name "-" version ".tar.gz"))
3251 (sha256
3252 (base32
3253 "1bwrkxm83r9ajpkd6x03nqvmdfpf5vz6yfy0c97pq3v3ykj74082"))))
3254 (build-system gnu-build-system)
3255 (arguments
3256 (list
3257 #:tests? #f ; there are no tests
3258 #:make-flags
3259 #~(list
3260 ;; Required for colorized output, see <http://bugs.gnu.org/54607>.
3261 "CFLAGS=-D_XOPEN_SOURCE=600"
3262 (string-append "execgamesdir=" #$output "/bin"))))
3263 (inputs (list ncurses))
3264 (outputs (list "out" "debug"))
3265 (synopsis "Thematic meditative game")
3266 (description
3267 "You are a robot moving around in a realm filled with ASCII characters.
3268Examine humorously described though useless items as you search for a kitten
3269among them. The theme of this Zen simulation is continued in its
3270documentation.")
3271 (home-page "http://robotfindskitten.org/")
3272 (license license:gpl2+)))
3273
3274(define-public roguebox-adventures
3275 (package
3276 (name "roguebox-adventures")
3277 (version "3.0.1")
3278 (source
3279 (origin
3280 (method url-fetch)
3281 (uri (string-append
3282 "http://download.tuxfamily.org/rba/RogueBoxAdventures_v"
3283 (string-join (string-split version #\.) "_") "_Source.zip"))
3284 (file-name (string-append name "-" version ".zip"))
3285 (sha256
3286 (base32 "05zd03s5w9kcpklfgcggbaa6rwf59nm0q9vcj6gh9v2lh402k067"))))
3287 (build-system copy-build-system)
3288 (arguments
3289 (list
3290 #:install-plan
3291 #~(let ((share "share/games/roguebox-adventures/"))
3292 `(("AUDIO" ,share)
3293 ("FONT" ,share)
3294 ("GRAPHIC" ,share)
3295 ("LIB" ,share)
3296 ("LICENSE" ,share)
3297 ("." ,share #:include ("icon_big.png" "icon_small.png"))
3298 ("DOC" "share/doc/roguebox-adventures")))
3299 #:phases
3300 #~(modify-phases %standard-phases
3301 (replace 'unpack
3302 (lambda* (#:key source #:allow-other-keys)
3303 (and (invoke "unzip" source)
3304 ;; The actual source is buried a few directories deep.
3305 (chdir (string-append "RogueBoxAdventures_v"
3306 (string-join
3307 (string-split #$version #\.) "_")
3308 "_Source")))))
3309 (add-after 'unpack 'patch
3310 (lambda _
3311 (let ((data (string-append #$output
3312 "/share/games/roguebox-adventures")))
3313 ;; Use the correct data directory.
3314 (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py")
3315 (("basic_path + os\\.sep + 'DATA'")
3316 (string-append "'" data "'"))
3317 (("^basic_path.*$")
3318 (string-append "basic_path ='" data "'\n")))
3319 (substitute* "LIB/dialog.py"
3320 (("d_path = os\\.path\\.dirname\\(.*\\)\\)")
3321 (string-append "d_path = '" data "'")))
3322 (substitute* "LIB/gra_files.py"
3323 (("basic_path = b_path\\.replace\\('/LIB',''\\)")
3324 (string-append "basic_path ='" data "'\n")))
3325
3326 ;; The game must save in the user's home directory because
3327 ;; the store is read-only.
3328 (substitute* "main.py"
3329 (("home_save = False")
3330 "home_save = True")
3331 (("'icon_small.png'")
3332 (string-append "'" data "/icon_small.png'")))
3333 ;; Use the right python.
3334 (substitute* '("LIB/text.py" "main.py")
3335 (("#! /usr/bin/python")
3336 (format #f "#!~a" (which "python3")))))))
3337 (add-after 'install 'wrap
3338 (lambda _
3339 (let* ((bin (string-append #$output "/bin/roguebox-adventures"))
3340 (share (string-append #$output
3341 "/share/games/roguebox-adventures"))
3342 (lib (string-append share "/LIB")))
3343 (for-each
3344 (lambda (file)
3345 (chmod file #o555)
3346 (install-file file lib))
3347 (list "main.py" "run.py"))
3348
3349 (mkdir-p (dirname bin))
3350 (call-with-output-file bin
3351 (lambda (p)
3352 (format p "#!~a
3353export GUIX_PYTHONPATH=~a/LIB:~a
3354exec -a ~s ~s \"$@\"
3355"
3356 (which "bash")
3357 share
3358 (getenv "GUIX_PYTHONPATH")
3359 (which "python3")
3360 (string-append lib "/main.py"))))
3361 (chmod bin #o555)))))))
3362 (native-inputs (list unzip python-setuptools))
3363 (inputs (list python python-pygame))
3364 (home-page "https://rogueboxadventures.tuxfamily.org")
3365 (synopsis "Classical roguelike/sandbox game")
3366 (description
3367 "RogueBox Adventures is a graphical roguelike with strong influences
3368from sandbox games like Minecraft or Terraria. The main idea of RogueBox
3369Adventures is to offer the player a kind of roguelike toy-world. This world
3370can be explored and changed freely.")
3371 ;; The GPL3+ is for code, the rest are for art.
3372 (license (list license:cc0
3373 license:cc-by3.0
3374 license:gpl3+
3375 license:silofl1.1))))
3376
3377(define-public seahorse-adventures
3378 (package
3379 (name "seahorse-adventures")
3380 (version "1.4")
3381 (source
3382 (origin
3383 (method git-fetch)
3384 (uri (git-reference
3385 (url "https://github.com/dulsi/seahorse-adventures")
3386 (commit (string-append "Release-" version))))
3387 (file-name (git-file-name name version))
3388 (sha256
3389 (base32 "1dxysa79cz5mflr2953fyk838h1jwvi1ngn8wlpms0ag35yv21s8"))
3390 (modules '((guix build utils)
3391 (ice-9 ftw)
3392 (srfi srfi-1)))
3393 ;; Remove non-free (non-commercial) font.
3394 (snippet
3395 #~(begin
3396 (for-each delete-file (find-files "data/fonts" "."))))))
3397 (build-system pyproject-build-system)
3398 (arguments
3399 (list
3400 #:tests? #f ;no test
3401 #:phases
3402 #~(modify-phases %standard-phases
3403 (delete 'build) ;pure Python
3404 (replace 'install ;no install script
3405 (lambda* (#:key inputs #:allow-other-keys)
3406 (let* ((bin (string-append #$output "/bin"))
3407 (share (string-append #$output "/share"))
3408 (applications (string-append share "/applications"))
3409 (data (string-append share "/seahorse-adventures")))
3410 ;; Install data.
3411 (for-each (lambda (f)
3412 (chmod f #o555)
3413 (install-file f data))
3414 '("leveledit.py" "run_game.py" "tileedit.py"))
3415 (for-each (lambda (dir)
3416 (let ((target (string-append data "/" dir)))
3417 (mkdir-p target)
3418 (copy-recursively dir target)))
3419 '("data" "lib"))
3420 ;; Create executable.
3421 (mkdir-p bin)
3422 (let ((executable (string-append bin "/seahorse-adventures")))
3423 (call-with-output-file executable
3424 (lambda (p)
3425 (format p
3426 "#!~a~@
3427 export GUIX_PYTHONPATH=~a:~a~@
3428 exec -a \"~a\" ~a \"$@\"~%"
3429 (search-input-file inputs "/bin/bash")
3430 data
3431 (getenv "GUIX_PYTHONPATH")
3432 (search-input-file inputs "/bin/python3")
3433 (string-append data "/run_game.py"))))
3434 (chmod executable #o555))
3435 ;; Add desktop file.
3436 (mkdir-p applications)
3437 (make-desktop-entry-file
3438 (string-append applications "/seahorse-adventures.desktop")
3439 #:name "Seahorse Adventures"
3440 #:comment
3441 '((#f "Help Barbie the seahorse float on bubbles to the moon"))
3442 #:exec #$name
3443 #:icon #$name
3444 #:categories '("Game" "ActionGame")
3445 #:keywords '("game" "retro" "platform"))
3446 ;; Add icons.
3447 (for-each
3448 (lambda (size)
3449 (let ((dir (string-append share "/icons/hicolor/"
3450 size "x" size "/apps")))
3451 (mkdir-p dir)
3452 (copy-file
3453 (string-append "icon" size ".png")
3454 (string-append dir "/searhorse-adventures.png"))))
3455 '("32" "64" "128")))))
3456 (add-after 'install 'unbundle-fonts
3457 ;; Unbundle Bitstream Vera font and replace deleted one.
3458 (lambda* (#:key inputs #:allow-other-keys)
3459 (let ((data (string-append #$output "/share/seahorse-adventures"))
3460 (vera (search-input-file
3461 inputs "/share/fonts/truetype/Vera.ttf")))
3462 (let ((themes-dir (string-append data "/data/themes/")))
3463 (for-each
3464 (lambda (theme)
3465 (let ((target (string-append themes-dir theme "/Vera.ttf")))
3466 (delete-file target)
3467 (symlink vera target)))
3468 '("default" "gray")))
3469 (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
3470 (substitute* (string-append data "/lib/main.py")
3471 (("f_scale = 0.35") "f_scale = 0.47"))))))))
3472 (native-inputs (list python-setuptools))
3473 (inputs
3474 (list font-bitstream-vera python-pygame))
3475 (home-page "http://www.imitationpickles.org/barbie/")
3476 (synopsis "Help Barbie the seahorse float on bubbles to the moon")
3477 (description
3478 "Barbie Seahorse Adventures is a retro style platform arcade game.
3479You are Barbie the seahorse who travels through the jungle, up to the
3480volcano until you float on bubbles to the moon. On the way to your
3481final destination you will encounter various enemies, servants of the
3482evil overlord who has stolen the galaxy crystal. Avoid getting hit
3483and defeat them with your bubbles!")
3484 ;; GPL2+ is for code, CC0 is for art.
3485 (license (list license:gpl2+ license:cc0))))
3486
3487(define-public serious-sam-classic
3488 (package
3489 (name "serious-sam-classic")
3490 (version "1.10.7")
3491 (source
3492 (origin
3493 (method git-fetch)
3494 (uri (git-reference
3495 (url "https://github.com/tx00100xt/SeriousSamClassic")
3496 (commit version)))
3497 (sha256
3498 (base32 "1s1mbj2qpaxdrx0pfhdyk3v1vh7f2dp33w2i5ifpgphkchdx61jg"))
3499 (file-name (git-file-name name version))
3500 (modules '((guix build utils)))
3501 (patches (search-patches "serious-sam-classic-engine-patch-paths.patch"))))
3502 (build-system cmake-build-system)
3503 (arguments
3504 (list
3505 #:tests? #f ; no upstream tests
3506 #:configure-flags
3507 #~(list (string-append "-DCMAKE_INSTALL_PREFIX:PATH="
3508 #$output))
3509 #:phases
3510 #~(modify-phases %standard-phases
3511 (add-after 'unpack 'fix-cmake
3512 (lambda _
3513 (substitute* (list "CMakeLists.txt"
3514 "SamTFE/Sources/CMakeLists.txt"
3515 "SamTSE/Sources/CMakeLists.txt")
3516 (("\"Install to systems directories\" Off")
3517 "\"Install to systems directories\" On")
3518 (("march=native") "mtune=generic")
3519 (("CMAKE_SKIP_RPATH ON") "CMAKE_SKIP_RPATH OFF")
3520 (("/usr") #$output)
3521 (("lib64") "lib"))))
3522 (add-after 'fix-cmake 'fix-paths
3523 (lambda _
3524 (substitute* (list "SamTFE/Sources/Engine/Engine.cpp"
3525 "SamTSE/Sources/Engine/Engine.cpp")
3526 (("@OUTPUT_DIR@") #$output)))))))
3527 (inputs (list sdl2 libvorbis))
3528 (native-inputs (cons* flex bison imagemagick
3529 (maybe-nasm)))
3530 (home-page "https://github.com/tx00100xt/SeriousSamClassic")
3531 (synopsis "SeriousSam engine and Serious Sam: TFE and TSE")
3532 (description
3533 "This is an open-source port of the Serious Engine from
3534Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3535To run, you must put your official game data, @code{Levels} and @code{Help} in
3536@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")
3537 (license license:gpl2)))
3538
3539(define-public serious-sam-classic-vk
3540 (package
3541 (inherit serious-sam-classic)
3542 (name "serious-sam-classic-vk")
3543 (version "1.10.7")
3544 (source
3545 (origin
3546 (method git-fetch)
3547 (uri (git-reference
3548 (url "https://github.com/tx00100xt/SeriousSamClassic-VK")
3549 (commit version)))
3550 (sha256
3551 (base32 "1av3ll3pfdsadm10dz3srxfw9ld1xbg8i5xrgv7qynqsd0x8jxby"))
3552 (file-name (git-file-name name version))
3553 (modules '((guix build utils)))
3554 (patches (search-patches
3555 "serious-sam-classic-engine-patch-paths.patch"))))
3556 (inputs (modify-inputs inputs
3557 (prepend vulkan-loader vulkan-headers)))
3558 (synopsis
3559 "SeriousSam engine and Serious Sam: TFE and TSE with Vulkan renderer")
3560 (description
3561 "This is an open-source port of the Serious Engine from
3562Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3563This variant includes a Vulkan renderer.
3564To run, you must put your official game data, @code{Levels} and @code{Help} in
3565@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")))
3566
3567(define-public shamogu
3568 (package
3569 (name "shamogu")
3570 (version "1.4.1")
3571 (source
3572 (origin
3573 (method git-fetch)
3574 (uri (git-reference
3575 (url "https://codeberg.org/anaseto/shamogu")
3576 (commit (string-append "v" version))))
3577 (file-name (git-file-name name version))
3578 (sha256
3579 (base32 "1xl396gfca9y0q7qrr3ifcy4sahq1h6q013asnr3qkrj22jmrbyd"))))
3580 (build-system go-build-system)
3581 (arguments
3582 (list
3583 #:install-source? #f
3584 #:import-path "codeberg.org/anaseto/shamogu"))
3585 (native-inputs (list go-codeberg-org-anaseto-gruid
3586 go-codeberg-org-anaseto-gruid-js
3587 go-codeberg-org-anaseto-gruid-sdl
3588 go-codeberg-org-anaseto-gruid-tcell
3589 go-github-com-gdamore-tcell-v2))
3590 (home-page "https://anaseto.codeberg.page/games/shamogu/")
3591 (synopsis "Roguelike game by Anaseto")
3592 (description
3593 "Shamogu is a coffee-break roguelike game with a focus on tactical
3594movement and careful timing of totemic spirit invocation and comestible
3595consumption. Visibility and noise stealth mechanics also play an important
3596role.
3597
3598@quotation
3599All life in your mountain is being corrupted. Beasts are losing their minds
3600and becoming aggressive. These disturbing events started to happen after a
3601dungeon portal suddenly appeared at the top of the mountain. As the guardian,
3602you decide to explore that dungeon in order to find and destroy the source of
3603corruption… You hope luck will be on your side!
3604@end quotation")
3605 (license license:isc)))
3606
3607(define-public shamogu-sdl
3608 (package/inherit shamogu
3609 (name "shamogu-sdl")
3610 (arguments
3611 (substitute-keyword-arguments arguments
3612 ((#:tests? _ #t) #f)
3613 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
3614 ((#:phases _ #~%standard-phases)
3615 #~(modify-phases %standard-phases
3616 (add-after 'install 'fix-name-collision
3617 (lambda _
3618 (rename-file (string-append #$output "/bin/shamogu")
3619 (string-append #$output "/bin/shamogu-sdl"))))))))
3620 (native-inputs
3621 (modify-inputs native-inputs
3622 (prepend pkg-config)))))
3623
3624(define-public solarus
3625 (package
3626 (name "solarus")
3627 (version "2.0.3")
3628 (source
3629 (origin
3630 (method git-fetch)
3631 (uri (git-reference
3632 (url "https://gitlab.com/solarus-games/solarus")
3633 (commit (string-append "v" version))))
3634 (file-name (git-file-name name version))
3635 (sha256
3636 (base32 "05a7mlb6xl7d93d34d3bdphb9xgbyp7h1358z6hdsrax8kh9zwl1"))))
3637 (build-system cmake-build-system)
3638 (arguments
3639 (list
3640 #:phases
3641 #~(modify-phases %standard-phases
3642 (add-after 'unpack 'disable-failing-tests
3643 ;; The following tests fail reporting a missing "/dev/dri"
3644 ;; file.
3645 (lambda _
3646 (substitute* "tests/cmake/AddTestMaps.cmake"
3647 ((".*1200_create_shader_from_source.*" all)
3648 (string-append "#" all))
3649 ((".*1210_shader_scaling_factor.*" all)
3650 (string-append "#" all)))))
3651 (add-before 'check 'set-home
3652 ;; Tests fail without setting the following environment
3653 ;; variables.
3654 (lambda _
3655 (setenv "HOME" (getcwd))
3656 (setenv "XDG_RUNTIME_DIR" (getcwd)))))))
3657 (native-inputs (list pkg-config))
3658 (inputs (list glm
3659 libmodplug
3660 libogg
3661 libvorbis
3662 luajit
3663 mesa
3664 openal
3665 physfs
3666 sdl2
3667 sdl2-image
3668 sdl2-ttf))
3669 (home-page "https://www.solarus-games.org/")
3670 (synopsis "Lightweight game engine for Action-RPGs")
3671 (description
3672 "Solarus is a 2D game engine written in C++, that can run games
3673scripted in Lua. It has been designed with 16-bit classic Action-RPGs
3674in mind.")
3675 ;; The source code is licensed under the terms of GPL-3.0.
3676 ;; Resources are licensed under the terms of CC-BY-SA-3.0 and
3677 ;; CC-BY-SA 4.0.
3678 (license (list license:gpl3 license:cc-by-sa3.0 license:cc-by-sa4.0))))
3679
3680(define-public solarus-quest-editor
3681 (package
3682 (inherit solarus)
3683 (name "solarus-quest-editor")
3684 (source
3685 (origin
3686 (inherit (package-source solarus))
3687 (patches (search-patches
3688 "solarus-quest-editor-qlementine-reference.patch"))))
3689 (build-system qt-build-system)
3690 (arguments
3691 (list
3692 #:tests? #f ;no test suite
3693 #:qtbase qtbase
3694 #:phases
3695 #~(modify-phases %standard-phases
3696 (add-before 'configure 'chdir
3697 (lambda _
3698 (chdir "editor"))))))
3699 (native-inputs (modify-inputs native-inputs
3700 (prepend qttools qlementine)))
3701 (inputs (modify-inputs inputs
3702 (prepend solarus)
3703 (append qtbase qtsvg qtwayland)))
3704 (synopsis "Create and modify quests for the Solarus engine")
3705 (description
3706 "Solarus Quest Editor is a graphical user interface to create and modify
3707quests for the Solarus engine.")))
3708
3709(define-public solarus-launcher
3710 (package
3711 (inherit solarus)
3712 (name "solarus-launcher")
3713 (source
3714 (origin
3715 (inherit (package-source solarus))
3716 (patches (search-patches
3717 "solarus-launcher-qlementine-and-qtappinstancemanager-reference.patch"))))
3718 (build-system qt-build-system)
3719 (arguments
3720 (list
3721 #:tests? #f ;no tests
3722 #:qtbase qtbase
3723 #:phases
3724 #~(modify-phases %standard-phases
3725 (add-before 'configure 'chdir
3726 (lambda _
3727 (chdir "launcher"))))))
3728 (native-inputs (modify-inputs (package-inputs solarus)
3729 (prepend qlementine qlementine-icons qtappinstancemanager
3730 qttools)))
3731 (inputs (modify-inputs inputs
3732 (prepend solarus)
3733 (append qtbase qtsvg qtwayland)))
3734 (synopsis "Game launcher and browser for Solarus")
3735 (description
3736 "Solarus Launcher is a game launcher and browser for Solarus. It is
3737written in C++ with QtWidgets.")))
3738
3739(define-public superfluous-returnz-data
3740 (package
3741 (name "superfluous-returnz-data")
3742 (version "13")
3743 (source
3744 (origin
3745 (method url-fetch)
3746 (uri (string-append "https://download.ptilouk.net/superfluous-returnz-d"
3747 version "-data-only"
3748 ".zip"))
3749 (sha256
3750 (base32
3751 "005p1kdm8g5vzf1isvxwiarpw0vciplxdcv9wl4bb47b1gxsh13k"))))
3752 (build-system copy-build-system)
3753 (native-inputs
3754 (list unzip))
3755 (arguments
3756 (list #:install-plan
3757 #~'(("." "."))))
3758 (synopsis "Superfluous Returnz game data")
3759 (description
3760 "This package provides the game data, images, and music of the game
3761Superfluous Returnz.")
3762 (home-page "https://studios.ptilouk.net/superfluous-returnz/")
3763 (license license:cc-by-sa4.0)))
3764
3765(define-public sosage
3766 (package
3767 (name "sosage")
3768 (version "1.6.1")
3769 (source
3770 (origin
3771 (method git-fetch)
3772 (uri (git-reference
3773 (url "https://framagit.org/Gee/sosage")
3774 (commit (string-append "v" version))))
3775 (file-name (git-file-name name version))
3776 (sha256
3777 (base32 "029mcnx2r86gc7chzd0avga4x7gm1yxl2wi3wqxmzhlh51q0p44x"))
3778 (modules '((guix build utils)))
3779 (snippet
3780 #~(begin
3781 (for-each delete-file (find-files "." "\\.jar$"))
3782
3783 ;; The files in 'Third_party' aren't actually bundled libraries,
3784 ;; but are wrappers around the system libraries.
3785 ;; Move them to the 'Utils' directory, to make that clear.
3786 (for-each (lambda (file)
3787 (install-file file "include/Sosage/Utils"))
3788 (find-files "include/Sosage/Third_party" "\\.h$"))
3789 (for-each (lambda (file)
3790 (install-file file "src/Sosage/Utils"))
3791 (find-files "src/Sosage/Third_party" "\\.cpp$"))
3792 (for-each delete-file-recursively '("include/Sosage/Third_party"
3793 "src/Sosage/Third_party"))
3794 (substitute* (find-files ".")
3795 (("Third_party") "Utils"))))))
3796 (build-system cmake-build-system)
3797 (arguments
3798 (list #:tests? #f ; no tests
3799 #:configure-flags
3800 #~(list
3801 (string-append "-DSOSAGE_DATA_FOLDER="
3802 #$(this-package-input "superfluous-returnz-data")))))
3803 (inputs
3804 (list libyaml
3805 lz4
3806 sdl2
3807 sdl2-mixer-x
3808 sdl2-ttf
3809 superfluous-returnz-data))
3810 (synopsis "Superfluous Returnz 2D cartoon puzzle game")
3811 (description
3812 "Superfluous Returnz is a 2D puzzle game set in a colourful cartoon
3813universe. It takes place in the very quiet French village of Fochougny, an
3814open world where players solve puzzles, find secret codes and talk to the
3815village people to solve the mystery of the apple thief. The game is licensed
3816as Free Software and asks for a financial donation through the game site.")
3817 (home-page "https://studios.ptilouk.net/superfluous-returnz/floss/")
3818 (license license:expat)))
3819
3820(define-public superstarfighter
3821 (package
3822 (name "superstarfighter")
3823 (version "0.6.5")
3824 (source
3825 (origin
3826 (method git-fetch)
3827 (uri (git-reference
3828 (url "https://github.com/notapixelstudio/superstarfighter")
3829 ;; The commit is not tagged upstream:
3830 ;; https://github.com/notapixelstudio/superstarfighter/commit/350605bf5454c26ebe2c57d8217edd03689c0573
3831 (commit "32521f467616bb390e3929d07e1936ff43fe64da")))
3832 (file-name (git-file-name name version))
3833 (sha256
3834 (base32 "1ckghzrfgvk9z1n5f4ivnamm6s8h9sbv0a3aq9pp4a3yrhkgld0k"))))
3835 (build-system gnu-build-system)
3836 (arguments
3837 `(#:tests? #f ;there are no tests
3838 #:phases
3839 (modify-phases %standard-phases
3840 (replace 'configure
3841 (lambda _
3842 (chdir "godot")
3843 (setenv "HOME" (getcwd))
3844 (with-output-to-file "export_presets.cfg"
3845 (lambda ()
3846 (display
3847 "[preset.0]
3848name=\"Guix\"
3849platform=\"Linux/X11\"
3850runnable=true
3851[preset.0.options]")))
3852 #t))
3853 (replace 'build
3854 (lambda _
3855 (let ((godot (assoc-ref %build-inputs "godot-headless")))
3856 (invoke (string-append godot "/bin/godot_server")
3857 "--export-pack" "Guix"
3858 "superstarfighter.pck" "project.godot"))
3859 #t))
3860 (replace 'install
3861 (lambda* (#:key inputs outputs #:allow-other-keys)
3862 (let* ((out (assoc-ref outputs "out"))
3863 (bin (string-append out "/bin"))
3864 (share (string-append out "/share"))
3865 (data (string-append share "/superstarfighter"))
3866 (icons (string-append share "/icons/hicolor/256x256/apps")))
3867 (install-file "superstarfighter.pck" data)
3868 (mkdir-p bin)
3869 (call-with-output-file (string-append bin "/superstarfighter")
3870 (lambda (port)
3871 (format port
3872 "#!/bin/sh~@
3873 exec ~a/bin/godot --main-pack ~a/superstarfighter.pck~%"
3874 (assoc-ref inputs "godot")
3875 data)
3876 (chmod port #o755)))
3877 (mkdir-p icons)
3878 (copy-file "icon.png" (string-append icons "/" ,name ".png"))
3879 (make-desktop-entry-file
3880 (string-append share "/applications/" ,name ".desktop")
3881 #:name "SuperStarfighter"
3882 #:comment "Fast-paced arcade combat game"
3883 #:exec ,name
3884 #:icon ,name
3885 #:categories '("Game" "ArcadeGame")))
3886 #t)))))
3887 (native-inputs
3888 `(("godot-headless" ,godot-lts "headless")))
3889 (inputs
3890 (list godot-lts))
3891 (home-page "https://notapixel.itch.io/superstarfighter")
3892 (synopsis "Fast-paced local multiplayer arcade game")
3893 (description "In SuperStarfighter, up to four local players compete in a
38942D arena with fast-moving ships and missiles. Different game types are
3895available, as well as a single-player mode with AI-controlled ships.")
3896 (license (list license:expat ; game
3897 license:silofl1.1)))) ; fonts
3898
3899(define-public tetzle
3900 (package
3901 (name "tetzle")
3902 (version "2.2.2")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (string-append "https://gottcode.org/tetzle/"
3907 "tetzle-" version ".tar.bz2"))
3908 (sha256
3909 (base32 "0sybryg65j8gz5s7zbsfqky8wlkjwpppkrhksijj6xc7692lfii8"))))
3910 (build-system cmake-build-system)
3911 (arguments
3912 `(#:tests? #f)) ; no tests
3913 (native-inputs (list qttools))
3914 (inputs (list qtbase))
3915 (home-page "https://gottcode.org/tetzle/")
3916 (synopsis "Jigsaw puzzle game that uses tetrominoes for the pieces")
3917 (description
3918 "Tetzle is a jigsaw puzzle game that uses tetrominoes for the pieces. Any image
3919can be imported and used to create puzzles with a wide range of sizes. Games are
3920saved automatically, and you can select between currently in progress games.")
3921 (license license:gpl3+)))
3922
3923(define-public trigger-rally
3924 (package
3925 (name "trigger-rally")
3926 (version "0.6.7")
3927 (source
3928 (origin
3929 (method url-fetch)
3930 (uri (string-append "mirror://sourceforge/trigger-rally/"
3931 "trigger-" version "/"
3932 "trigger-rally-" version ".tar.gz"))
3933 (sha256
3934 (base32
3935 "1ryzddf5k0jzv8xhmikajql2qc3gvha7by43r4l7yag17kx921k4"))))
3936 (build-system gnu-build-system)
3937 (inputs
3938 (list freealut
3939 glew
3940 glu
3941 mesa
3942 openal
3943 physfs
3944 (sdl-union (list sdl2 sdl2-image))
3945 tinyxml2))
3946 (arguments
3947 (list
3948 #:make-flags #~(list (string-append "prefix=" #$output)
3949 "bindir=$(prefix)/bin"
3950 "datadir=$(datarootdir)"
3951 "LOC_APPDATAFILE=$(datarootdir)/metainfo"
3952 "LOC_DESKTOPFILE=$(datarootdir)/applications"
3953 "OPTIMS=-Ofast")
3954 #:tests? #f ; No tests present
3955 #:phases
3956 #~(modify-phases %standard-phases
3957 (delete 'configure)
3958 (add-before 'build 'cd-src
3959 (lambda _ (chdir "src")))
3960 (add-before 'build 'remove-timestamps
3961 (lambda _
3962 (substitute* (list "Trigger/menu.cpp"
3963 "PEngine/app.cpp")
3964 ((".*__DATE__.*") ""))))
3965 (add-before 'build 'make-verbose
3966 (lambda _
3967 (substitute* "GNUmakefile"
3968 (("@\\$\\(CXX\\)") "$(CXX)"))))
3969 (add-after 'build 'set-data-path
3970 (lambda _
3971 (substitute* "../bin/trigger-rally.config.defs"
3972 (("<data path=\"C:[^\"]*\"")
3973 (string-append "<data path=\"" #$output "/share/trigger-rally\""))))))))
3974 (home-page "https://trigger-rally.sourceforge.net")
3975 (synopsis "Fast-paced single-player racing game")
3976 (description "Trigger-rally is a 3D rally simulation with great physics
3977for drifting on over 200 maps. Different terrain materials like dirt,
3978asphalt, sand, ice, etc. and various weather, light, and fog conditions give
3979this rally simulation the edge over many other games. You need to make it
3980through the maps in often tight time limits and can further improve by beating
3981the recorded high scores. All attached single races must be finished in time
3982in order to win an event, unlocking additional events and cars. Most maps are
3983equipped with spoken co-driver notes and co-driver icons.")
3984 (license (list license:cc0 ;textures and audio in data.zip
3985 license:gpl2+))))
3986
3987(define-public xshogi
3988 (package
3989 (name "xshogi")
3990 (version "1.4.2")
3991 (source
3992 (origin
3993 (method url-fetch)
3994 (uri (string-append "mirror://gnu/gnushogi/xshogi-"
3995 version ".tar.gz"))
3996 (sha256
3997 (base32
3998 "1dns0nhymak44by18sv48m4xb2skiwbi2i3nb9hl6w9iwd2i2brf"))))
3999 (build-system gnu-build-system)
4000 (arguments
4001 (list
4002 #:configure-flags
4003 #~(list "CFLAGS=-Wno-error=implicit-function-declaration")))
4004 (inputs
4005 (list libxaw libxt))
4006 (home-page "https://www.gnu.org/software/gnushogi/")
4007 (synopsis "User interface for gnushogi")
4008 (description "A graphical user interface for the package @code{gnushogi}.")
4009 ;; Contains a copy of GPLv3 but the licence notices simply
4010 ;; state "GNU General Public Licence" without specifying a version.
4011 (license license:gpl1+)))
4012
4013(define-public abbaye
4014 (package
4015 (name "abbaye")
4016 (version "2.0.5")
4017 (source
4018 (origin
4019 (method git-fetch)
4020 (uri (git-reference
4021 (url "https://github.com/nevat/abbayedesmorts-gpl")
4022 (commit (string-append "v" version))))
4023 (file-name (git-file-name name version))
4024 (sha256
4025 (base32 "0jwj6cn4q0ijxdg8ywzd55sxqid5kp5z2bsxh8fpdlm5r7anvqls"))))
4026 (build-system gnu-build-system)
4027 (arguments
4028 (list
4029 #:make-flags #~(list "CC=gcc")
4030 #:phases
4031 #~(modify-phases %standard-phases
4032 (add-after 'set-paths 'set-sdl-paths
4033 (lambda* (#:key inputs #:allow-other-keys)
4034 (setenv "CPATH"
4035 (string-append
4036 (search-input-directory inputs "include/SDL2")
4037 ":" (or (getenv "CPATH") "")))))
4038 (add-after 'patch-source-shebangs 'patch-Makefile-prefix
4039 (lambda _
4040 (substitute* "Makefile"
4041 (("/usr") #$output))))
4042 (add-before 'install 'create-directories
4043 (lambda _
4044 ;; Create directories that the makefile assumes exist.
4045 (mkdir-p (string-append #$output "/bin"))
4046 (mkdir-p (string-append #$output "/share/applications"))
4047 (mkdir-p (string-append #$output "/share/pixmaps"))))
4048 (delete 'configure)) ;no configure script
4049 #:tests? #f)) ;no test suite
4050 (native-inputs (list pkg-config))
4051 (inputs (list (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
4052 (home-page "https://github.com/nevat/abbayedesmorts-gpl")
4053 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
4054 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
4055France. The Cathars, who preach about good Christian beliefs, were being
4056expelled by the Catholic Church out of the Languedoc region in France. One of
4057them, called Jean Raymond, found an old church in which to hide, not knowing
4058that beneath its ruins lay buried an ancient evil.")
4059 (license license:gpl3)))
4060
4061(define-public angband
4062 (package
4063 (name "angband")
4064 (version "4.2.6")
4065 (source
4066 (origin
4067 (method git-fetch)
4068 (uri (git-reference
4069 (url "https://github.com/angband/angband")
4070 (commit version)))
4071 (file-name (git-file-name name version))
4072 (sha256
4073 (base32 "0hgzdvlh0j42w4q9kch9xvhnbvcrypac01xhpksw35gj9my887cp"))
4074 (modules '((guix build utils)))
4075 (snippet
4076 '(begin
4077 (for-each delete-file-recursively
4078 '("lib/tiles/shockbolt" ;nonfree
4079 "src/win")) ;contains .dlls!
4080 ;; Don't build the shockbolt directory either.
4081 (substitute* "lib/tiles/Makefile"
4082 (("shockbolt") ""))))
4083 (patches (search-patches "angband-remove-nonfree-tile-options.patch"))))
4084 (build-system gnu-build-system)
4085 (arguments
4086 `(#:configure-flags (list (string-append "--bindir=" %output "/bin")
4087 "--disable-x11")
4088 #:phases
4089 (modify-phases %standard-phases
4090 (add-after 'unpack 'disable-graphics-and-sounds
4091 (lambda _
4092 (substitute* "lib/Makefile"
4093 ;; Do not build any graphics for this version.
4094 (("gamedata customize help screens fonts tiles sounds icons user")
4095 "gamedata customize help screens user"))))
4096 (add-before 'build 'fix-infinite-loop-on-sighup
4097 ;; XXX Release 4.2.6 has a major bug where sending the process a
4098 ;; SIGHUP when closing the terminal causes it to infinite loop
4099 ;; waiting for input: https://github.com/angband/angband/issues/6558
4100 ;; Reevaluate for future versions.
4101 (lambda _
4102 (substitute* "src/ui-signals.c"
4103 (("(SIGHUP, )SIG_IGN" _ first)
4104 (string-append first "handle_signal_abort")))))
4105 (add-before 'check 'skip-failing-tests
4106 (lambda _
4107 (let ((to-skip '(;; some of these may be fixable, but most try to
4108 ;; create a directory in the user's home directory.
4109 ;; Rather than reading environment variables, they
4110 ;; lookup the username using getpwnam(3) and manually
4111 ;; construct the string.
4112 ;; Generic "Suite died":
4113 "game/basic"
4114 "game/mage"
4115 ;; "Cannot create '//.angband/Angband'":
4116 "effects/chain"
4117 "effects/destruction"
4118 "effects/earthquake"
4119 "object/info"
4120 "object/slays"
4121 "player/calc-inventory"
4122 "player/combine-pack"
4123 "player/digging"
4124 "player/inven-carry-num"
4125 "player/inven-wield"
4126 "player/timed"
4127 ;; This file likes to read /etc/passwd
4128 "z-file/path-normalize")))
4129 (substitute* "src/tests/Makefile"
4130 (("include \\$\\(SUITES\\)" all)
4131 (string-append all "\nTESTPROGS := $(filter-out "
4132 (string-join to-skip " ")
4133 ", $(TESTPROGS))")))))))))
4134 (native-inputs (list autoconf
4135 automake
4136 perl)) ;for tests
4137 (inputs (list ncurses))
4138 (home-page "https://rephial.org/")
4139 (synopsis "Dungeon exploration roguelike")
4140 (description "Angband is a Classic dungeon exploration roguelike. Explore
4141the depths below Angband, seeking riches, fighting monsters, and preparing to
4142fight Morgoth, the Lord of Darkness.")
4143 (license license:gpl2)))
4144
4145(define-public angband-sdl2
4146 (package
4147 (inherit angband)
4148 (name "angband-sdl2")
4149 (arguments
4150 (substitute-keyword-arguments
4151 (package-arguments angband)
4152 ((#:configure-flags flags)
4153 #~(cons* "--enable-sdl2" #$flags))
4154 ((#:phases phases)
4155 #~(modify-phases #$phases
4156 (delete 'disable-graphics-and-sounds)
4157 (add-after 'unpack 'patch-sdl-wrapper-headers
4158 (lambda _
4159 (with-directory-excursion "src"
4160 (substitute* '("snd-sdl.c"
4161 "main-sdl2.c"
4162 "sdl2/pui-win.h")
4163 (("\"SDL_image.h\"") "\"SDL2/SDL_image.h\"")
4164 (("\"SDL_mixer.h\"") "\"SDL2/SDL_mixer.h\"")
4165 (("\"SDL_ttf.h\"") "\"SDL2/SDL_ttf.h\"")))))
4166 (add-after 'unpack 'patch-desktop-file
4167 (lambda* (#:key outputs #:allow-other-keys)
4168 (let ((out (assoc-ref outputs "out")))
4169 (substitute* "lib/icons/angband-sdl2.desktop"
4170 (("Exec=angband" _)
4171 (string-append "Exec=" #$output "/bin/angband-sdl2"))))))
4172 (add-after 'install 'rename-binary
4173 (lambda _
4174 (with-directory-excursion #$output
4175 ;; allows parallel installation with angband
4176 (rename-file "bin/angband"
4177 "bin/angband-sdl2"))))))))
4178 (inputs
4179 (modify-inputs inputs
4180 (prepend sdl2
4181 sdl2-image
4182 sdl2-mixer
4183 sdl2-ttf)))
4184 (description "Angband is a Classic dungeon exploration roguelike. Explore
4185the depths below Angband, seeking riches, fighting monsters, and preparing to
4186fight Morgoth, the Lord of Darkness.
4187
4188This version includes the SDL2 frontend, providing tilesets and sounds which
4189can be enabled through in-game options.")
4190 ;; XXX: fonts and adam bolt tileset are free but being clarified:
4191 ;; https://github.com/angband/angband/issues/6608
4192 ;; For the rest, see:
4193 ;; https://github.com/angband/angband/blob/master/docs/copying.rst
4194 (license (list license:gpl2 ;code, nomad+old tilesets
4195 license:cc-by-sa3.0 ;david gervais tileset
4196 license:cc-by-sa4.0)))) ;sounds
4197
4198(define-public pingus
4199 ;; Latest release is from 2021-12-24.
4200 (let ((commit "7d65221e1cd1026053c8a5a08ad911fbdd13d3ed")
4201 (revision "1"))
4202 (package
4203 (name "pingus")
4204 (version (git-version "0.7.6" revision commit))
4205 (source
4206 (origin
4207 (method git-fetch)
4208 (uri (git-reference
4209 (url "https://github.com/Pingus/pingus")
4210 (commit commit)))
4211 (file-name (git-file-name name version))
4212 (sha256
4213 (base32 "0dc6b192y1zwpiqfcpkyq5gk4xl8hl9hs71cmhag8hz59c5hfdfr"))))
4214 (build-system cmake-build-system)
4215 (arguments
4216 (list
4217 ;; Upstream reported the tests don't work.
4218 ;; See: <https://github.com/Pingus/pingus/blob/8c68e08b0b9530b0078a6e2972786f7accf0d0e6/pingus.nix#L47>
4219 #:tests? #f
4220 #:configure-flags
4221 #~(list "-DBUILD_TESTS=OFF")))
4222 (native-inputs (list googletest pkg-config tinycmmc uitest))
4223 (inputs
4224 (list argpp
4225 boost
4226 fmt-10
4227 geomcpp
4228 glm
4229 glu
4230 libpng
4231 libsigc++-2
4232 logmich
4233 mesa
4234 priocpp
4235 sdl2
4236 sdl2-image
4237 sdl2-mixer
4238 strutcpp
4239 tinygettext-with-sdl2
4240 wstsound
4241 xdgcpp))
4242 (home-page "https://pingus.seul.org/")
4243 (synopsis "Lemmings-like puzzle game")
4244 (description
4245 "Pingus is a free Lemmings-like puzzle game in which the player takes
4246command of a bunch of small animals and has to guide them through levels.
4247Since the animals walk on their own, the player can only influence them by
4248giving them commands, like build a bridge, dig a hole, or redirect all animals
4249in the other direction. Multiple such commands are necessary to reach the
4250level's exit. The game is presented in a 2D side view.")
4251 (license
4252 ;; Project itself is GPL3+, but some files are under distinct licenses.
4253 (list license:bsd-3
4254 license:gpl2+
4255 license:gpl3+)))))
4256
4257(define-public talkfilters
4258 (package
4259 (name "talkfilters")
4260 (version "2.3.8")
4261 (source
4262 (origin
4263 (method url-fetch)
4264 (uri (string-append "http://www.hyperrealm.com/talkfilters/"
4265 "talkfilters-" version ".tar.gz"))
4266 (sha256
4267 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
4268 (build-system gnu-build-system)
4269 (home-page "https://www.gnu.org/software/talkfilters/")
4270 (synopsis "Convert English text to humorous dialects")
4271 (description "The GNU Talk Filters are programs that convert English text
4272into stereotyped or otherwise humorous dialects. The filters are provided as
4273a C library, so they can easily be integrated into other programs.")
4274 (license license:gpl2+)))
4275
4276(define-public taisei
4277 (package
4278 (name "taisei")
4279 (version "1.4.5")
4280 (source
4281 (origin
4282 (method url-fetch)
4283 (uri (string-append "https://github.com/taisei-project/"
4284 "taisei/releases/download/v" version
4285 "/taisei-" version ".tar.xz"))
4286 (sha256
4287 (base32 "17b8cbjryjvid8ckmfn5gy99l8qpqz00llmmp35n5vcb4lapm2rc"))))
4288 (build-system meson-build-system)
4289 (arguments
4290 (list
4291 #:build-type "release" ;comment out for bug-reporting (and cheats)
4292 #:configure-flags #~(list "-Dr_default=gles30"
4293 "-Dr_gles30=enabled"
4294 "-Dshader_transpiler=enabled")))
4295 (native-inputs
4296 (list cmake-minimal
4297 gettext-minimal
4298 pkg-config
4299 python
4300 python-backports-zstd
4301 python-docutils
4302 python-pygments))
4303 (inputs
4304 (list cglm
4305 freetype
4306 glslang
4307 libdecor ; XXX: for sdl3
4308 libpng
4309 libunibreak
4310 libwebp
4311 mesa
4312 openssl
4313 opusfile
4314 sdl3
4315 shaderc
4316 spirv-cross
4317 spirv-tools ; for glslang
4318 vulkan-loader ; XXX: for sdl3?
4319 zlib
4320 (list zstd "lib")))
4321 (home-page "https://taisei-project.org/")
4322 (synopsis "Shoot'em up fangame and libre clone of Touhou Project")
4323 (description
4324 "Taisei is a vertical shoot'em up game, in which the player controls
4325one of three characters. While moving through stages, a large number of
4326enemies and even larger amounts of bullets appear that require careful
4327maneuvers to dodge. By shooting the enemies, players receive powerups
4328for their characters, allowing them to shoot even more.")
4329 (license (list
4330 ;; game
4331 license:expat
4332 ;; resources/00-taisei.pkgdir/bgm/
4333 ;; atlas/portraits/
4334 license:cc-by4.0
4335 ;; miscellaneous
4336 license:cc0
4337 license:public-domain))))
4338
4339(define-public cmatrix
4340 (package
4341 (name "cmatrix")
4342 (version "2.0")
4343 (source
4344 (origin
4345 (method git-fetch)
4346 (uri (git-reference
4347 (url "https://github.com/abishekvashok/cmatrix")
4348 (commit (string-append "v" version))))
4349 (file-name (git-file-name name version))
4350 (sha256
4351 (base32
4352 "1h9jz4m4s5l8c3figaq46ja0km1gimrkfxm4dg7mf4s84icmasbm"))))
4353 (build-system gnu-build-system)
4354 (native-inputs
4355 (list autoconf automake))
4356 (arguments
4357 '(#:phases
4358 (modify-phases %standard-phases
4359 (replace 'configure
4360 (lambda* (#:key outputs #:allow-other-keys)
4361 ;; This old ‘configure’ script doesn't support
4362 ;; variables passed as arguments.
4363 (let ((out (assoc-ref outputs "out")))
4364 (setenv "CONFIG_SHELL" (which "bash"))
4365 (invoke "./configure"
4366 (string-append "--prefix=" out))))))))
4367 (inputs (list ncurses))
4368 (home-page "https://www.asty.org/cmatrix")
4369 (synopsis "Simulate the display from \"The Matrix\"")
4370 (description "CMatrix simulates the display from \"The Matrix\" and is
4371based on the screensaver from the movie's website. It works with terminal
4372settings up to 132x300 and can scroll lines all at the same rate or
4373asynchronously and at a user-defined speed.")
4374 (license license:gpl2+)))
4375
4376(define-public chess
4377 (package
4378 (name "chess")
4379 (version "6.3.0")
4380 (source
4381 (origin
4382 (method url-fetch)
4383 (uri (string-append "mirror://gnu/chess/gnuchess-" version
4384 ".tar.gz"))
4385 (sha256
4386 (base32
4387 "0fm27h1xv56v1g1zq0cd9wlchvfw8iwmsgj4nyaxcalc171bwdqb"))))
4388 (build-system gnu-build-system)
4389 (arguments
4390 '(#:phases
4391 (modify-phases %standard-phases
4392 (add-after 'install 'fix-shell-scripts
4393 (lambda* (#:key outputs #:allow-other-keys)
4394 (let* ((out (assoc-ref outputs "out"))
4395 (bin (string-append out "/bin")))
4396 (chdir bin)
4397 (substitute* '("gnuchessx" "gnuchessu")
4398 (("^gnuchess") (string-append bin "/gnuchess")))))))))
4399 (home-page "https://www.gnu.org/software/chess/")
4400 (synopsis "Full chess implementation")
4401 (description "GNU Chess is a chess engine. It allows you to compete
4402against the computer in a game of chess, either through the default terminal
4403interface or via an external visual interface such as GNU XBoard.")
4404 (properties '((upstream-name . "gnuchess")
4405 (ftp-directory . "/chess")))
4406 (license license:gpl3+)))
4407
4408(define-public freedink-engine
4409 (package
4410 (name "freedink-engine")
4411 (version "109.6")
4412 (source (origin
4413 (method url-fetch)
4414 (uri (string-append "mirror://gnu/freedink/freedink-" version
4415 ".tar.gz"))
4416 (patches (search-patches "freedink-engine-fix-const-char.patch"
4417 "freedink-engine-fix-sdl-hints.patch"))
4418 (sha256
4419 (base32
4420 "00hhk1bjdrc1np2qz44sa5n1mb62qzwxbvsnws3vpms6iyn3a2sy"))))
4421 (build-system gnu-build-system)
4422 (arguments
4423 `(#:configure-flags '("--disable-embedded-resources")
4424 #:phases
4425 (modify-phases %standard-phases
4426 (add-after 'unpack 'disable-graphical-tests
4427 (lambda _
4428 ;; These tests require a graphical interface.
4429 (substitute* "src/Makefile.am"
4430 (("test_gfx_fonts TestIOGfxDisplay") "")
4431 ;; FIXME: Figure out why `TestIOTouchDragAnywhere` fails
4432 (("TestIOTouchDragAnywhere (test_integration)" all _) _))))
4433 (add-before 'bootstrap 'autoreconf
4434 (lambda _
4435 ;; automake is out of date in the source
4436 ;; autoreconf updates the automake scripts
4437 (invoke "autoreconf")
4438 ;; Build fails when autom4te.cache exists.
4439 (delete-file-recursively "autom4te.cache")
4440 #t))
4441 (add-after 'install 'delete-freedinkedit-desktop
4442 (lambda* (#:key outputs #:allow-other-keys)
4443 (let ((out (assoc-ref outputs "out")))
4444 ;; freedinkedit does not know where to find freedink data
4445 ;; freedink data is read-only, so it cannot be edited anyway.
4446 ;; TODO: fix freedink.desktop
4447 (delete-file-recursively (string-append
4448 out "/share/applications"))
4449 #t))))))
4450 (native-inputs `(("autoconf" ,autoconf)
4451 ("automake" ,automake)
4452 ("cxxtest" ,cxxtest)
4453 ("gettext" ,gettext-minimal)
4454 ("help2man" ,help2man)
4455 ("pkg-config" ,pkg-config)))
4456 (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer
4457 sdl2-ttf sdl2-gfx)))
4458 ("fontconfig" ,fontconfig)
4459 ("glm" ,glm)))
4460 (properties '((ftp-directory . "/freedink")
4461 (upstream-name . "freedink")))
4462 (home-page "https://www.gnu.org/software/freedink/")
4463 (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
4464 (description
4465 "GNU FreeDink is a free and portable re-implementation of the engine
4466for the role-playing game Dink Smallwood. It supports not only the original
4467game data files but it also supports user-produced game mods or \"D-Mods\".
4468To that extent, it also includes a front-end for managing all of your D-Mods.")
4469 (license license:gpl3+)))
4470
4471(define-public freedink-data
4472 (package
4473 (name "freedink-data")
4474 (version "1.08.20190120")
4475 (source (origin
4476 (method url-fetch)
4477 (uri (string-append "mirror://gnu/freedink/freedink-data-"
4478 version ".tar.gz"))
4479 (sha256
4480 (base32
4481 "17gvryadlxk172mblbsil7hina1z5wahwaxnr6g3mdq57dvl8pvi"))))
4482 (build-system gnu-build-system)
4483 (arguments
4484 `(#:phases
4485 (modify-phases %standard-phases
4486 (delete 'configure) ; no configure script
4487 (delete 'check)) ; no tests
4488 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4489 (properties '((ftp-directory . "/freedink")))
4490 (home-page "https://www.gnu.org/software/freedink/")
4491 (synopsis "Game data for GNU Freedink")
4492 (description
4493 "This package contains the game data of GNU Freedink.")
4494 (license license:gpl3+)))
4495
4496(define-public freedink-dfarc
4497 (package
4498 (name "freedink-dfarc")
4499 (version "3.14")
4500 (source (origin
4501 (method url-fetch)
4502 (uri (string-append "mirror://gnu/freedink/dfarc-"
4503 version ".tar.gz"))
4504 (sha256
4505 (base32
4506 "1yp8n3w426xnlp10xk06vfi2y3k9xrcfyck7s7qs1v0ys7n284d5"))))
4507 (build-system gnu-build-system)
4508 (native-inputs
4509 (list intltool))
4510 (inputs
4511 (list bzip2 wxwidgets))
4512 (properties '((ftp-directory . "/freedink")
4513 (upstream-name . "dfarc")))
4514 (home-page "https://www.gnu.org/software/freedink/")
4515 (synopsis "Front-end for managing and playing Dink Modules")
4516 (description "DFArc makes it easy to play and manage the GNU FreeDink game
4517and its numerous D-Mods.")
4518 (license license:gpl3+)))
4519
4520(define-public freedink
4521 ;; This is a wrapper that tells the engine where to find the data.
4522 (package (inherit freedink-engine)
4523 (name "freedink")
4524 (build-system trivial-build-system)
4525 (arguments
4526 '(#:builder (begin
4527 (use-modules (guix build utils))
4528
4529 (let* ((output (assoc-ref %outputs "out"))
4530 (bin (string-append output "/bin"))
4531 (executable (string-append bin "/freedink")))
4532 (mkdir-p bin)
4533 (call-with-output-file executable
4534 (lambda (port)
4535 (format port "#!~a/bin/sh
4536exec ~a/bin/freedink -refdir ~a/share/dink\n"
4537 (assoc-ref %build-inputs "bash")
4538 (assoc-ref %build-inputs "engine")
4539 (assoc-ref %build-inputs "data"))
4540 (chmod port #o777)))
4541 #t))
4542 #:modules ((guix build utils))))
4543 (inputs `(("engine" ,freedink-engine)
4544 ("data" ,freedink-data)
4545 ("bash" ,bash)))
4546 (native-inputs '())))
4547
4548(define-public fuzzylite
4549 ;; Use the latest commit from the master branch, as the latest release fails
4550 ;; to build.
4551 (let ((commit "13b3122f5c353c0389ed4e66041d548c44ec9df6")
4552 (revision "0"))
4553 (package
4554 (name "fuzzylite")
4555 (version (git-version "6.0" revision commit))
4556 (source (origin
4557 (method git-fetch)
4558 (uri (git-reference
4559 (url "https://github.com/fuzzylite/fuzzylite")
4560 (commit commit)))
4561 (file-name (git-file-name name version))
4562 (sha256
4563 (base32
4564 "1ai7x5lfy8c1d11crz33ayy21alry740f78qjjxwzdfr6ph7pkzq"))))
4565 (build-system cmake-build-system)
4566 (native-inputs (list catch2))
4567 (home-page "https://www.fuzzylite.com/")
4568 (synopsis "Fuzzy logic control binary")
4569 (description
4570 "This package provides fuzzylite, a fuzzy logic control library which
4571allows one to easily create fuzzy logic controllers in a few steps utilizing
4572object-oriented programming.")
4573 (license license:gpl3+))))
4574
4575(define-public xboard
4576 (package
4577 (name "xboard")
4578 (version "4.9.1")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (string-append "mirror://gnu/xboard/xboard-" version
4583 ".tar.gz"))
4584 (sha256
4585 (base32
4586 "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
4587 (build-system gnu-build-system)
4588 (arguments
4589 `(#:configure-flags '("CFLAGS=-fcommon")
4590 #:phases
4591 (modify-phases %standard-phases
4592 ;; Fixes https://issues.guix.gnu.org/47195.
4593 (add-after 'unpack 'patch-aplay-path
4594 (lambda* (#:key inputs #:allow-other-keys)
4595 (substitute* "xboard.conf"
4596 (("aplay -q")
4597 (string-append (search-input-file inputs "/bin/aplay")
4598 " -q")))))
4599 ;; Fixes https://issues.guix.gnu.org/45236.
4600 (add-after 'unpack 'patch-default-engine
4601 (lambda* (#:key inputs #:allow-other-keys)
4602 (substitute* "xboard.conf"
4603 (("-firstChessProgram fairymax")
4604 (string-append "-firstChessProgram "
4605 (assoc-ref inputs "chess")
4606 "/bin/gnuchessx"))))))))
4607 (inputs
4608 (list alsa-utils chess gtk+-2 (librsvg-for-system)))
4609 (native-inputs
4610 (list texinfo pkg-config))
4611 (home-page "https://www.gnu.org/software/xboard/")
4612 (synopsis "Graphical user interface for chess programs")
4613 (description "GNU XBoard is a graphical board for all varieties of chess,
4614including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
4615and Makruk. Several lesser-known variants are also supported. It presents a
4616fully interactive graphical interface and it can load and save games in the
4617Portable Game Notation.")
4618 (license license:gpl3+)))
4619
4620(define-public gtypist
4621 (package
4622 (name "gtypist")
4623 (version "2.10.1")
4624 (source (origin
4625 (method url-fetch)
4626 (uri (string-append "mirror://gnu/gtypist/gtypist-"
4627 version ".tar.gz"))
4628 (sha256
4629 (base32
4630 "04rlh706p5drdvm1kvrgs3jaz9krxg4vi5fpipi4973vb42ymz89"))
4631 (modules '((guix build utils)))
4632 (snippet
4633 ;; We do not provide `ncurses.h' within an `ncursesw'
4634 ;; sub-directory, so patch the source accordingly. See
4635 ;; <http://bugs.gnu.org/19018>.
4636 '(begin
4637 (for-each (lambda (file)
4638 (substitute* file
4639 (("ncursesw/ncurses.h")
4640 "ncurses.h")))
4641 (find-files "." "configure$|\\.c$"))))))
4642 (build-system gnu-build-system)
4643 (native-inputs (list emacs-minimal))
4644 (inputs (list ncurses perl))
4645 (home-page "https://www.gnu.org/software/gtypist/")
4646 (synopsis "Typing tutor")
4647 (description
4648 "GNU Typist is a universal typing tutor. It can be used to learn and
4649practice touch-typing. Several tutorials are included; in addition to
4650tutorials for the standard QWERTY layout, there are also tutorials for the
4651alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
4652are primarily in English, however some in other languages are provided.")
4653 (license license:gpl3+)))
4654
4655(define-public libsquish
4656 (package
4657 (name "libsquish")
4658 (version "1.15")
4659 (source
4660 (origin
4661 (method url-fetch/tarbomb)
4662 (uri (string-append "mirror://sourceforge/libsquish/libsquish-" version
4663 ".tgz"))
4664 (sha256
4665 (base32 "0sbj2k98ak1jabna7h1vfakdvjb7d7a81l3178c6d230pbp9d1v2"))))
4666 (build-system gnu-build-system)
4667 (arguments
4668 (list
4669 #:tests? #f ; no tests defined in Makefile, extra/squishtest.cpp fails
4670 ; to build at all
4671 #:make-flags
4672 #~(list (string-append "INSTALL_DIR=" #$output))
4673 #:phases
4674 #~(modify-phases %standard-phases
4675 (add-after 'bootstrap 'use-shared
4676 (lambda _
4677 (substitute* "config"
4678 (("USE_SHARED .*")
4679 "USE_SHARED ?= 1"))))
4680 (delete 'configure)))) ;no configure script
4681 (home-page "https://sourceforge.net/projects/libsquish/")
4682 (synopsis "DXT texture compression library")
4683 (description
4684 "@code{libsquish} is a lossy software DXT texture compression library.
4685It implements the 3 useful DXT flavours (1,3,5) and has SIMD support for
4686x86 (SSE) and powerpc (Altivec). It can be used (as a much slower software
4687fallback) instead of the hardware implementations present on most modern
4688graphics chips.")
4689 (license license:expat)))
4690
4691(define-public irrlicht
4692 (package
4693 (name "irrlicht")
4694 (version "1.8.5")
4695 (source (origin
4696 (method url-fetch)
4697 (uri (string-append
4698 "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
4699 (version-major+minor version)
4700 "/" version "/irrlicht-" version ".zip"))
4701 (sha256
4702 (base32
4703 "0gagjh2l3a3m8hsixxhhhan3m5xl7735ka8m4g79jl4qsgp7pyzg"))
4704 (patches (search-patches "irrlicht-use-system-libs.patch"
4705 "irrlicht-link-against-needed-libs.patch"))
4706 (modules '((guix build utils)))
4707 (snippet
4708 '(begin
4709 (for-each delete-file-recursively
4710 '("bin" ; bundled compiled Windows binaries"
4711 "source/Irrlicht/MacOSX"
4712 "source/Irrlicht/bzip2"
4713 "source/Irrlicht/jpeglib"
4714 "source/Irrlicht/libpng"
4715 "source/Irrlicht/lzma"
4716 "source/Irrlicht/zlib"))
4717 (delete-file "source/Irrlicht/glext.h")
4718 (delete-file "source/Irrlicht/glxext.h")
4719 (delete-file "source/Irrlicht/wglext.h")))))
4720 (build-system gnu-build-system)
4721 (arguments
4722 `(#:phases
4723 (modify-phases %standard-phases
4724 (add-after 'unpack 'chdir-to-source
4725 (lambda _
4726 ;; The actual source is buried a few directories deep.
4727 (chdir "source/Irrlicht/")))
4728 (add-after 'chdir-to-source 'remove-<sys/sysctl.h>
4729 (lambda _
4730 (substitute* "COSOperator.cpp"
4731 (("#include <sys/sysctl.h>") ""))))
4732 (add-after 'chdir-to-source 'delete-broken-install-rule
4733 (lambda _
4734 (substitute* "Makefile"
4735 ;; We neither build nor want a static library. Skip it.
4736 ((".*\\bcp .*\\$\\(STATIC_LIB\\).*") ""))))
4737 (add-after 'chdir-to-source 'fix-build-env
4738 (lambda* (#:key outputs #:allow-other-keys)
4739 (let ((out (assoc-ref outputs "out")))
4740 (substitute* "Makefile"
4741 (("INSTALL_DIR = /usr/local/lib")
4742 (string-append "INSTALL_DIR = " out "/lib"))
4743 ;; Add '-fpermissive' to the CXXFLAGS.
4744 (("-Wall") "-Wall -fpermissive")) ; CImageLoaderJPG.cpp
4745 ;; The Makefile assumes these directories exist.
4746 (mkdir-p (string-append out "/lib"))
4747 (mkdir-p (string-append out "/include")))))
4748 (delete 'configure)) ; no configure script
4749 #:tests? #f ; no check target
4750 #:make-flags
4751 (list (string-append "CC=" ,(cc-for-target))
4752 "sharedlib")))
4753 (inputs
4754 (list bzip2
4755 libjpeg-turbo
4756 libpng
4757 libx11
4758 libxxf86vm
4759 mesa))
4760 (synopsis "3D game engine written in C++")
4761 (description
4762 "The Irrlicht Engine is a high performance realtime 3D engine written in
4763C++. Features include an OpenGL renderer, extensible materials, scene graph
4764management, character animation, particle and other special effects, support
4765for common mesh file formats, and collision detection.")
4766 (home-page "https://irrlicht.sourceforge.io/")
4767 (license license:zlib)))
4768
4769(define-public pegasus-frontend
4770 (let ((commit "c3462e68bf3a178420b44f356998255f8d82a113")
4771 (revision "weekly_2024w38"))
4772 (package
4773 (name "pegasus-frontend")
4774 (version (git-version "0.0" revision commit))
4775 (source
4776 (origin
4777 (method git-fetch)
4778 (uri (git-reference
4779 (url "https://github.com/mmatyas/pegasus-frontend")
4780 (commit commit)))
4781 (sha256
4782 (base32 "1p350nlbif33mw5cbqxwli5yf47dxpransxlj2wp8xvh4w1rb3jx"))
4783 (file-name (git-file-name name version))))
4784 (build-system qt-build-system)
4785 (arguments
4786 (list
4787 #:qtbase qtbase-5
4788 #:make-flags
4789 #~(list (string-append "INSTALL_DESKTOPDIR="
4790 #$output "/share/applications")
4791 (string-append "INSTALL_ICONDIR="
4792 #$output "/share/icons/hicolor"))
4793 #:phases
4794 #~(modify-phases %standard-phases
4795 (add-after 'unpack 'copy-modules
4796 (lambda* (#:key inputs #:allow-other-keys)
4797 (copy-recursively #$(this-package-native-input
4798 "SortFilterProxyModel")
4799 "./thirdparty/SortFilterProxyModel")
4800 (copy-recursively #$(this-package-native-input
4801 "pegasus-theme-grid")
4802 "./src/themes/pegasus-theme-grid")
4803 (copy-recursively #$(this-package-native-input
4804 "pegasus-frontend-translations") "./lang")))
4805 (add-before 'check 'prepare-test-env
4806 (lambda* (#:key tests? #:allow-other-keys)
4807 (when tests?
4808 (setenv "QT_QPA_PLATFORM" "offscreen")
4809 (setenv "QT_QUICK_BACKEND" "software"))))
4810 (add-after 'qt-wrap 'gst-wrap
4811 (lambda* (#:key inputs #:allow-other-keys)
4812 (wrap-program (string-append #$output "/bin/pegasus-fe")
4813 `("GST_PLUGIN_PATH" suffix
4814 ,(search-path-as-list '("lib/gstreamer-1.0")
4815 (map cdr inputs)))))))))
4816 (inputs (list sdl2
4817 bash-minimal
4818 qtbase-5
4819 qtsvg-5
4820 qtdeclarative-5
4821 qtgraphicaleffects
4822 qtmultimedia-5
4823 qtgamepad-5
4824 gst-plugins-base
4825 gst-plugins-bad
4826 gst-plugins-good))
4827 (native-inputs (list qttools-5
4828 (origin
4829 (method git-fetch)
4830 (uri (git-reference
4831 (url
4832 "https://github.com/mmatyas/pegasus-frontend-translations")
4833 (commit
4834 "46c7cecec745bdd4c61bfc7ecb967156ad208642")))
4835 (file-name "pegasus-frontend-translations")
4836 (sha256 (base32
4837 "0rvlx199wdrjxr8pgibga556zf4njq4w2n31fdirqgb631rgyqxd")))
4838 (origin
4839 (method git-fetch)
4840 (uri (git-reference
4841 (url
4842 "https://github.com/mmatyas/pegasus-theme-grid")
4843 (commit
4844 "5951db6f2a4fe0db6a4fd6f00da1f280cadfa536")))
4845 (file-name "pegasus-theme-grid")
4846 (sha256 (base32
4847 "1nfnq6lppdm9ni6jk48l1i7hk90m8w2p13swl5nr4zwczln8dbz1")))
4848 (origin
4849 (method git-fetch)
4850 (uri (git-reference
4851 (url
4852 "https://github.com/mmatyas/SortFilterProxyModel")
4853 (commit
4854 "2061f8136ba372fd06c1928a610258b7d88cb144")))
4855 (file-name "SortFilterProxyModel")
4856 (sha256 (base32
4857 "16va8fcf7v6kfm8r9zym0516qrk4vlsy5wmpd3r3002wpz8q39h2")))))
4858 (synopsis
4859 "Graphical frontend for launching and managing game collection")
4860 (description
4861 "Pegasus is a graphical frontend for browsing your game library and
4862 launching all kinds of games from the same place. It's focusing on
4863 customizability, cross platform support (including embedded)
4864 and high performance.")
4865 (home-page "https://pegasus-frontend.org")
4866 (license license:gpl3+))))
4867
4868(define-public mars
4869 ;; No official release since 2013: use the latest commit.
4870 (let ((commit "84664cda094efe6e49d9b1550e4f4f98c33eefa2")
4871 (revision "2"))
4872 (package
4873 (name "mars")
4874 (version (git-version "0.7.5" revision commit))
4875 (source (origin
4876 (method git-fetch)
4877 (uri (git-reference
4878 (url "https://github.com/thelaui/M.A.R.S.")
4879 (commit commit)))
4880 (file-name (git-file-name name version))
4881 (modules '((guix build utils)))
4882 (snippet
4883 #~(begin
4884 (delete-file-recursively "ext_libs_for_windows")))
4885 (sha256
4886 (base32
4887 "0bdi4ja39rark742qvqixm8khai5k8qd84z5kzim9jcjdvvwyqj9"))))
4888 (build-system cmake-build-system)
4889 (arguments
4890 `(#:tests? #f ; There are no tests
4891 #:configure-flags (list (string-append "-Dmars_EXE_DEST_DIR="
4892 %output "/bin"))
4893 #:phases
4894 (modify-phases %standard-phases
4895 (add-after 'unpack 'fix-data-path
4896 (lambda* (#:key outputs #:allow-other-keys)
4897 (substitute* "src/System/settings.cpp"
4898 (("C_dataPath = \"./data/\";")
4899 (string-append "C_dataPath = \""
4900 (assoc-ref outputs "out")
4901 "/share/games/marsshooter/\";"))))))))
4902 (inputs
4903 (list mesa fribidi taglib sfml-2))
4904 (home-page "https://mars-game.sourceforge.net/")
4905 (synopsis "2D space shooter")
4906 (description
4907 "M.A.R.S. is a 2D space shooter with pretty visual effects and
4908attractive physics. Players can battle each other or computer controlled
4909enemies in different game modes such as space ball, death match, team death
4910match, cannon keep, and grave-itation pit.")
4911 (license (list license:gpl3+
4912 license:cc-by-sa3.0))))) ;/data/audio/music
4913
4914(define-public maelstrom
4915 (package
4916 (name "maelstrom")
4917 (version "4.0.2")
4918 (source
4919 (origin
4920 (method git-fetch)
4921 (uri (git-reference
4922 (url "https://github.com/libsdl-org/Maelstrom")
4923 (commit (string-append "release-" version))))
4924 (sha256
4925 (base32 "0a3kpsd3582j0gwdwspfd27in24asjhj48i26im6d9hg1j3n4iww"))
4926 (file-name (git-file-name name version))
4927 (snippet
4928 #~(begin
4929 (use-modules (guix build utils))
4930 (substitute* '("game/mods.cpp" "utils/files.c")
4931 (("#include.*(physfssdl3.h)\"" all first)
4932 (string-append "#include <" first ">")))
4933 (substitute* "game/replay.cpp"
4934 (("#include \"\\.\\./(miniz/miniz\\.h)\"" all first)
4935 (string-append "#include <" first ">")))
4936 (substitute* "CMakeLists.txt"
4937 (("external/physfs/extras/physfssdl3\\.c" all)
4938 (string-append "# " all))
4939 (("miniz/miniz\\.c" all)
4940 (string-append "# " all))
4941 (("(pkg_check_modules\\()PhysFS.*physfs\\)\n" all first)
4942 (string-append all
4943 first "MINIZ IMPORTED_TARGET miniz)\n"
4944 first "PHYSFSSDL3 IMPORTED_TARGET physfs-sdl3)\n"))
4945 (("(target_link_libraries\\(Maelstrom PRIVATE )PkgConfig::PhysFS\\)\n" all first)
4946 (string-append all
4947 first "PkgConfig::MINIZ)\n"
4948 first "PkgConfig::PHYSFSSDL3)\n")))
4949 (for-each delete-file-recursively
4950 (list "macres"
4951 "miniz"
4952 "Xcode"))))))
4953 (build-system cmake-build-system)
4954 (arguments
4955 (list
4956 #:tests? #f ;no tests
4957 #:configure-flags
4958 #~(list "-DSTEAM=OFF"
4959 "-DUSE_VENDORED_SDL=OFF"
4960 "-DUSE_VENDORED_PHYSFS=OFF"
4961 "-DUSE_VENDORED_SDL_NET=OFF"
4962 "-DSTANDALONE_INSTALL=OFF")))
4963 (native-inputs (list pkg-config))
4964 (inputs (list miniz physfs physfs-sdl3 sdl3 sdl3-net))
4965 (home-page "https://github.com/libsdl-org/Maelstrom")
4966 (synopsis "Asteroids game")
4967 (description
4968 "You pilot your ship through the dreaded \"Maelstrom\" asteroid belt
4969-- suddenly your best friend thrusts towards you and fires, directly at your
4970cockpit. You raise your shields just in time, and the battle is joined.
4971
4972Maelstrom is a free software port of the original shareware game for the
4973Macintosh by Ambrosia Software, Inc. It is a fast-action, asteroids-like game,
4974with classic pixel graphics and original sounds.
4975
4976In addition to being a faithful reproduction of the original game, this version
4977adds game controller support, mobile touch controls, and both cooperative and
4978competitive multiplayer action.")
4979 (license (list license:zlib ;game code
4980 license:cc-by3.0)))) ;sprites, sounds, etc.
4981
4982(define-public alienblaster
4983 (package
4984 (name "alienblaster")
4985 (version "1.1.0")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
4990 "alienblaster-" version ".tgz"))
4991 (sha256
4992 (base32
4993 "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
4994 (build-system gnu-build-system)
4995 (arguments
4996 (list
4997 #:tests? #f ; no tests
4998 #:phases
4999 #~(modify-phases %standard-phases
5000 (add-after 'unpack 'fix-sdl-paths
5001 (lambda _
5002 (let ((share (string-append #$output "/share")))
5003 ;; Fix name and append path to "SDL_mixer.h"
5004 (substitute* "src/Makefile"
5005 (("GAME_NAME=alienBlaster") "GAME_NAME=alienblaster")
5006 (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
5007 (string-append line " -I"
5008 #$(this-package-input "sdl-mixer")
5009 "/include/SDL")))
5010 ;; Substitute relative paths in ".cfg" and source/header files
5011 (substitute* (find-files "./cfg")
5012 (("(\\./)?images") (string-append share "/images")))
5013 (substitute* (list "src/global.h" "src/global.cc")
5014 (("./images") (string-append share "/images"))
5015 (("./sound") (string-append share "/sound"))
5016 (("./cfg") (string-append share "/cfg"))))))
5017 (delete 'configure)
5018 (replace 'install
5019 (lambda _
5020 (install-file "alienblaster" (string-append #$output "/bin"))
5021 (for-each
5022 (lambda (dir)
5023 (copy-recursively dir (string-append #$output "/share/" dir)))
5024 '("images" "sound" "cfg")))))))
5025 (inputs (list sdl sdl-mixer))
5026 (home-page "http://www.schwardtnet.de/alienblaster/")
5027 (synopsis "Action-loaded 2D arcade shooter game")
5028 (description "Alien Blaster is an action-loaded 2D arcade shooter
5029game. Your mission in the game is simple: stop the invasion of the aliens by
5030blasting them. Simultaneous two-player mode is available.")
5031 (license license:gpl2)))
5032
5033(define-public glkterm
5034 (package
5035 (name "glkterm")
5036 (version "1.0.4")
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5041 "glk/implementations/glkterm-104.tar.gz"))
5042 (sha256
5043 (base32
5044 "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
5045 (build-system gnu-build-system)
5046 (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
5047 (arguments
5048 '(#:tests? #f ; no check target
5049 #:phases
5050 (modify-phases %standard-phases
5051 (replace 'install
5052 (lambda* (#:key outputs #:allow-other-keys)
5053 (let* ((out (assoc-ref outputs "out"))
5054 (inc (string-append out "/include"))
5055 (lib (string-append out "/lib")))
5056 (for-each
5057 (lambda (file)
5058 (install-file file inc))
5059 '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
5060 (install-file "libglkterm.a" lib))
5061 #t))
5062 (delete 'configure)))) ; no configure script
5063 (home-page "https://www.eblong.com/zarf/glk/")
5064 (synopsis "Curses Implementation of the Glk API")
5065 (description
5066 "Glk defines a portable API for applications with text UIs. It was
5067primarily designed for interactive fiction, but it should be suitable for many
5068interactive text utilities, particularly those based on a command line.
5069This is an implementation of the Glk library which runs in a terminal window,
5070using the @code{curses.h} library for screen control.")
5071 (license (license:fsf-free "file://README"))))
5072
5073(define-public glulxe
5074 (package
5075 (name "glulxe")
5076 (version "0.5.4")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5081 "glulx/interpreters/glulxe/glulxe-054.tar.gz"))
5082 (sha256
5083 (base32
5084 "0vipydg6ra90yf9b3ipgppwxyb2xdhcxwvirgjy0v20wlf56zhhz"))))
5085 (build-system gnu-build-system)
5086 (inputs `(("glk" ,glkterm)))
5087 (arguments
5088 '(#:tests? #f ; no check target
5089 #:make-flags
5090 (let* ((glk (assoc-ref %build-inputs "glk")))
5091 (list (string-append "GLKINCLUDEDIR=" glk "/include")
5092 (string-append "GLKLIBDIR=" glk "/lib")
5093 (string-append "GLKMAKEFILE=" "Make.glkterm")))
5094 #:phases
5095 (modify-phases %standard-phases
5096 (replace 'install
5097 (lambda* (#:key outputs #:allow-other-keys)
5098 (let* ((out (assoc-ref outputs "out"))
5099 (bin (string-append out "/bin")))
5100 (install-file "glulxe" bin))
5101 #t))
5102 (delete 'configure)))) ; no configure script
5103 (home-page "https://www.eblong.com/zarf/glulx/")
5104 (synopsis "Interpreter for Glulx VM")
5105 (description
5106 "Glulx is a 32-bit portable virtual machine intended for writing and
5107playing interactive fiction. It was designed by Andrew Plotkin to relieve
5108some of the restrictions in the venerable Z-machine format. This is the
5109reference interpreter, using the Glk API.")
5110 (license license:expat)))
5111
5112(define-public fifechan
5113 (package
5114 (name "fifechan")
5115 (version "0.1.5")
5116 (source (origin
5117 (method url-fetch)
5118 (uri (string-append "https://codeload.github.com/fifengine/"
5119 "fifechan/tar.gz/" version))
5120 (file-name (string-append name "-" version ".tar.gz"))
5121 (sha256
5122 (base32
5123 "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
5124 (build-system cmake-build-system)
5125 (inputs
5126 (list sdl2 sdl2-image mesa))
5127 (arguments
5128 '(#:tests? #f)) ; No included tests
5129 (home-page "https://fifengine.github.io/fifechan/")
5130 (synopsis "Cross platform GUI library specifically for games")
5131 (description
5132 "Fifechan is a lightweight cross platform GUI library written in C++
5133specifically designed for games. It has a built in set of extendable GUI
5134Widgets, and allows users to create more.")
5135 (license license:lgpl2.1+)))
5136
5137(define-public fifengine
5138 (package
5139 (name "fifengine")
5140 (version "0.4.2")
5141 (source (origin
5142 (method url-fetch)
5143 (uri (string-append "https://codeload.github.com/fifengine/"
5144 "fifengine/tar.gz/" version))
5145 (file-name (string-append name "-" version ".tar.gz"))
5146 (patches (search-patches "fifengine-swig-compat.patch"
5147 "fifengine-boost-compat.patch"
5148 "fifengine-python-3.9-compat.patch"))
5149 (sha256
5150 (base32
5151 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
5152 (build-system cmake-build-system)
5153 (arguments
5154 (list #:tests? #f ;TODO The test running fails to run some tests.
5155 #:configure-flags
5156 #~(list
5157 (string-append "-DOPENALSOFT_INCLUDE_DIR="
5158 (search-input-directory %build-inputs "include/AL"))
5159 (string-append "-DPYTHON_SITE_PACKAGES="
5160 #$output "/lib/python"
5161 #$(version-major+minor
5162 (package-version (this-package-input "python")))
5163 "/site-packages"))
5164 #:phases
5165 #~(modify-phases %standard-phases
5166 (add-after 'unpack 'patch-run_tests.py
5167 (lambda _
5168 ;; Patch the test runner to exit with a status of 1 if any test
5169 ;; fails, to allow detecting failures.
5170 (substitute* "run_tests.py"
5171 (("ERROR\\. One or more tests failed!'\\)")
5172 "ERROR. One or more tests failed!')
5173\t\texit(1)"))))
5174 ;; Run tests after installation so that we can make use of the built
5175 ;; python modules.
5176 (delete 'check)
5177 (add-after 'install 'check
5178 (lambda* (#:key tests? #:allow-other-keys)
5179 (when tests?
5180 ;; The tests require an X server.
5181 (system "Xvfb :1 &")
5182 (setenv "DISPLAY" ":1")
5183 (setenv "XDG_RUNTIME_DIR" "/tmp")
5184 ;; Run tests
5185 (chdir #$(string-append "../" (package-name this-package)
5186 "-" (package-version this-package)))
5187 (invoke "python3" "run_tests.py" "-a")))))))
5188 (native-inputs
5189 (list python swig-4.4 xorg-server-for-tests))
5190 (inputs
5191 (list sdl2
5192 sdl2-image
5193 sdl2-ttf
5194 tinyxml
5195 openal
5196 libogg
5197 glew
5198 libvorbis
5199 boost-1.83
5200 fifechan
5201 swig-4.4
5202 python))
5203 (propagated-inputs
5204 (list python-future))
5205 (home-page "https://www.fifengine.net/")
5206 (synopsis "FIFE is a multi-platform isometric game engine written in C++")
5207 (description
5208 "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
5209isometric game engine. Python bindings are included allowing users to create
5210games using Python as well as C++.")
5211 (license license:lgpl2.1+)))
5212
5213(define-public fizmo
5214 (package
5215 (name "fizmo")
5216 (version "0.8.5")
5217 (source (origin
5218 (method url-fetch)
5219 (uri (string-append "https://fizmo.spellbreaker.org/source/"
5220 "fizmo-" version ".tar.gz"))
5221 (sha256
5222 (base32
5223 "1amyc4n41jf08kxmdgkk30bzzx54miaxa97w28f417qwn8lrl98w"))))
5224 (build-system gnu-build-system)
5225 (arguments
5226 '(#:configure-flags
5227 (let ((libjpeg (assoc-ref %build-inputs "libjpeg"))
5228 (ncurses (assoc-ref %build-inputs "ncurses")))
5229 (list (string-append "--with-jpeg-includedir=" libjpeg "/include")))))
5230 (native-inputs
5231 (list pkg-config))
5232 (inputs
5233 `(("freetype" ,freetype)
5234 ("libjpeg" ,libjpeg-turbo)
5235 ("libpng" ,libpng)
5236 ("libsndfile" ,libsndfile)
5237 ("libxml2" ,libxml2)
5238 ("ncurses" ,ncurses)
5239 ("sdl2" ,sdl2)))
5240 (home-page "https://fizmo.spellbreaker.org/")
5241 (synopsis "Z-machine interpreter")
5242 (description
5243 "Fizmo is a console-based Z-machine interpreter. It is used to play
5244interactive fiction, also known as text adventures, which were implemented
5245either by Infocom or created using the Inform compiler.")
5246 (license license:bsd-3)))
5247
5248(define-public gnugo
5249 (package
5250 (name "gnugo")
5251 (version "3.8")
5252 (source (origin
5253 (method url-fetch)
5254 (uri (string-append "mirror://gnu/gnugo/gnugo-" version
5255 ".tar.gz"))
5256 (sha256
5257 (base32
5258 "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
5259 (build-system gnu-build-system)
5260 (inputs
5261 (list readline))
5262 (arguments
5263 `(#:configure-flags '("CFLAGS=-fcommon")))
5264 (synopsis "Play the game of Go")
5265 (description
5266 "GNU Go is a program that plays the game of Go, in which players
5267place stones on a grid to form territory or capture other stones. While
5268it can be played directly from the terminal, rendered in ASCII characters,
5269it is also possible to play GNU Go with 3rd party graphical interfaces or
5270even in Emacs. It supports the standard game storage format (SGF, Smart
5271Game Format) and inter-process communication format (GMP, Go Modem
5272Protocol).")
5273 (home-page "https://www.gnu.org/software/gnugo/")
5274 (license license:gpl3+)))
5275
5276(define-public extremetuxracer
5277 (package
5278 (name "extremetuxracer")
5279 (version "0.8.4")
5280 (source (origin
5281 (method url-fetch)
5282 (uri (string-append
5283 "mirror://sourceforge/extremetuxracer/releases/"
5284 version "/etr-" version ".tar.xz"))
5285 (sha256
5286 (base32
5287 "1rbk8zqfzzk90znf3f5lqqa12j0n6pm2qgwzabzmlnkm1k68acps"))))
5288 (build-system gnu-build-system)
5289 (native-inputs
5290 (list pkg-config))
5291 (inputs
5292 (list glu sfml-2))
5293 (synopsis "High-speed arctic racing game based on Tux Racer")
5294 ;; Snarfed straight from Debian.
5295 (description "Extreme Tux Racer, or etracer as it is called for short, is
5296a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the
5297game is to slide down a snow- and ice-covered mountain as quickly as possible,
5298avoiding the trees and rocks that will slow you down.
5299
5300Collect herrings and other goodies while sliding down the hill, but avoid fish
5301bones.
5302
5303This game is based on the GPL version of the famous game TuxRacer.")
5304 (home-page "https://sourceforge.net/projects/extremetuxracer/")
5305 (license license:gpl2+)))
5306
5307(define-public exult
5308 (package
5309 (name "exult")
5310 (version "1.8")
5311 (source
5312 (origin
5313 ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
5314 (method git-fetch)
5315 (uri (git-reference
5316 (url "https://github.com/exult/exult")
5317 (commit (string-append "v" version))))
5318 (file-name (git-file-name name version))
5319 (sha256
5320 (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
5321 (build-system gnu-build-system)
5322 (outputs (list "out" "gimp" "studio"))
5323 (arguments
5324 (list #:configure-flags
5325 #~(list "--enable-shared"
5326 "--disable-static"
5327 "--enable-lto"
5328 "--enable-exult-studio"
5329 "--enable-exult-studio-support"
5330 "--enable-compiler"
5331 "--enable-mods" ; needs --enable-compiler!
5332 "--enable-gimp-plugin"
5333 ;; A few lines on stdout can save a lot of head-scratching:
5334 "CPPFLAGS=-DDEBUG_PATHS=1")
5335 #:phases
5336 #~(modify-phases %standard-phases
5337 (add-before 'bootstrap 'patch-game-home-directory
5338 (lambda _
5339 (substitute* "gamemgr/modmgr.cc"
5340 ;; EXULT_DATADIR is in the store where it's rather hard for
5341 ;; users to put game assets. Use a more writable home by
5342 ;; default, which users can override in their ~/.exult.cfg.
5343 (("<GAMEHOME>")
5344 (string-append "<HOME>/.local/share/exult"))
5345 ;; …however, this causes a regression: the mods which we'll
5346 ;; install to EXULT_DATADIR are no longer found. So: don't
5347 ;; look for mods alongside the assets by default. This too
5348 ;; can be overridden in users' ~/.exult.cfg.
5349 (("game_path( \\+ \"/mods\")" _ +suffix)
5350 (string-append "get_system_path(\"<GAMEHOME>/\") + "
5351 "cfgname" +suffix)))))
5352 (add-before 'bootstrap 'move-exult-studio
5353 (lambda* (#:key outputs #:allow-other-keys)
5354 (let ((out (assoc-ref outputs "studio")))
5355 (substitute* "mapedit/studio.cc"
5356 (("(esdir, )EXULT_DATADIR" _ prefix)
5357 (string-append prefix "\"" out "/share/exult\"")))
5358 (substitute* "data/Makefile.am"
5359 (("(estudionewdir =.*)\\$\\(datadir\\)(.*)"
5360 _ variable= suffix)
5361 (string-append variable= out "/share" suffix "\n"))))))
5362 (add-before 'bootstrap 'fix-gimp-plug-in-prefix
5363 ;; ./configure will propagate this value to myriad Makefiles
5364 ;; scattered across the tree, so fix it early.
5365 (lambda* (#:key outputs #:allow-other-keys)
5366 (let ((out (assoc-ref outputs "gimp")))
5367 (substitute* "configure.ac"
5368 (("(GIMP_PLUGIN_PREFIX=).*" _ variable=)
5369 (string-append variable= out "/lib/gimp/2.0"))))))
5370 (add-after 'install 'move-exult_studio
5371 (lambda* (#:key outputs #:allow-other-keys)
5372 (let ((source (assoc-ref outputs "out"))
5373 (target (assoc-ref outputs "studio"))
5374 (file "/bin/exult_studio"))
5375 (mkdir-p (string-append target (dirname file)))
5376 (rename-file (string-append source file)
5377 (string-append target file))))))))
5378 (native-inputs
5379 (list autoconf automake libtool pkg-config
5380 ;; The following are needed only by the GIMP plug-in.
5381 gimp libjpeg-turbo
5382 gegl gtk+-2 ; needed by gimpui-2.0.pc
5383 ;; The following are needed only by the Usecode compiler.
5384 bison flex))
5385 (inputs
5386 (list fluidsynth freetype libvorbis sdl2
5387 ;; GTK is needed only by Exult Studio.
5388 gtk+))
5389 (synopsis "Role-playing game engine compatible with Ultima VII")
5390 (description
5391 "Exult is an Ultima 7 game engine that runs on modern operating systems.
5392Ultima 7 (or Ultima VII) is a two-part @acronym{RPG, role-playing game} from the
5393early 1990s.
5394
5395Exult is fully compatible with the original Ultima 7, but doesn't require any
5396of its data files to be useful. Explore entirely new game worlds---or create
5397your own with the included game and map editor, Exult Studio.
5398
5399This package expects the game(s) to be placed in subdirectories of
5400@file{~/.local/share/exult}.")
5401 (home-page "http://exult.info/")
5402 (license license:gpl2+)))
5403
5404(define %supertuxkart-version "1.5")
5405(define supertuxkart-source
5406 (origin
5407 (method git-fetch)
5408 (uri (git-reference
5409 (url "https://github.com/supertuxkart/stk-code")
5410 (commit %supertuxkart-version)))
5411 (sha256
5412 (base32
5413 "0q2dsv9vxblnv04d73qlvbbnkrxgywplz6qsqmfbamn7lj57kypx"))
5414 (file-name (git-file-name "supertuxkart" %supertuxkart-version))
5415 (modules '((guix build utils)))
5416 (snippet
5417 ;; Delete bundled library sources
5418 '(begin
5419 ;; Supertuxkart uses modified versions of the Irrlicht engine
5420 ;; and the bullet library. The developers gave an explanation
5421 ;; here: http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
5422 ;; FIXME: try to unbundle angelscript and libraqm
5423 (for-each delete-file-recursively
5424 '("lib/dnsc"
5425 "lib/enet"
5426 "lib/mcpp"
5427 "lib/mojoal"
5428 "lib/wiiuse"))))))
5429
5430(define-public supertuxkart-data
5431 ;; There are no tags or releases for the stk-assets data, nor indication of
5432 ;; which revision is bundled into the released SuperTuxKart-*-src tarball;
5433 ;; use the latest SVN revision available.
5434 (let ((commit "18621"))
5435 (hidden-package
5436 (package
5437 (name "supertuxkart-data")
5438 ;; The package produced is a merger of supertuxkart's "stk-assets"
5439 ;; repository and the "stk-code" repository's "data" directory, so
5440 ;; include the code version as well.
5441 (version (string-append %supertuxkart-version "-" commit))
5442 (source
5443 (origin
5444 (method svn-fetch)
5445 (uri (svn-reference
5446 (url "https://svn.code.sf.net/p/supertuxkart/code/stk-assets")
5447 (revision (string->number commit))))
5448 (file-name (string-append name "-" commit "-checkout"))
5449 (sha256
5450 (base32
5451 "0bz4rab0h6dyf014andw7lpd5gh3b2xqdslx0ffdglmf65xi594a"))))
5452 (build-system copy-build-system)
5453 (arguments
5454 (list #:install-plan
5455 #~'(("." "share/supertuxkart/data"
5456 #:exclude-regexp ("wip-.*")))
5457 #:phases
5458 #~(modify-phases %standard-phases
5459 (add-after 'unpack 'copy-code-data
5460 (lambda _
5461 (copy-recursively
5462 (string-append
5463 #$(this-package-input
5464 (git-file-name "supertuxkart" %supertuxkart-version))
5465 "/data/")
5466 "."))))))
5467 (inputs (list supertuxkart-source))
5468 (home-page "https://supertuxkart.net/Main_Page")
5469 (synopsis "Data files for SuperTuxKart")
5470 (description "This package contains data files for SuperTuxKart.")
5471 (license (list license:gpl3+
5472 license:cc-by-sa3.0
5473 license:cc-by-sa4.0
5474 license:cc0))))))
5475
5476(define-public supertuxkart
5477 (package
5478 (name "supertuxkart")
5479 (version %supertuxkart-version)
5480 (source supertuxkart-source)
5481 (build-system cmake-build-system)
5482 (arguments
5483 (list #:tests? #f ; no check target
5484 #:configure-flags
5485 #~(list "-DCHECK_ASSETS=FALSE" ; assets are out-of-tree
5486 (string-append "-DSTK_INSTALL_DATA_DIR_ABSOLUTE="
5487 #$(this-package-input "supertuxkart-data")
5488 "/share/supertuxkart")
5489 "-DUSE_WIIUSE=0"
5490 "-DUSE_SYSTEM_ENET=TRUE"
5491 "-DUSE_CRYPTO_OPENSSL=TRUE"
5492 ;; In order to use the system ENet library, IPv6 support
5493 ;; (added in SuperTuxKart version 1.1) must be disabled.
5494 "-DUSE_IPV6=FALSE")
5495 #:phases
5496 #~(modify-phases %standard-phases
5497 (add-before 'configure 'disable-data-install
5498 (lambda _
5499 (substitute* "CMakeLists.txt"
5500 (("^install\\(DIRECTORY.*STK_DATA_DIR" &)
5501 (string-append "# " &))))))))
5502 (inputs
5503 (list curl
5504 freetype
5505 fribidi
5506 glew
5507 harfbuzz
5508 libopenglrecorder
5509 libvorbis
5510 libx11
5511 libxrandr
5512 mesa
5513 openal
5514 sdl2
5515 sqlite
5516 supertuxkart-data
5517 zlib
5518 ;; The following input is needed to build the bundled and modified
5519 ;; version of irrlicht.
5520 enet
5521 libjpeg-turbo
5522 openssl))
5523 (native-inputs (list mcpp pkg-config python shaderc))
5524 (home-page "https://supertuxkart.net/Main_Page")
5525 (synopsis "3D kart racing game")
5526 (description "SuperTuxKart is a 3D kart racing game, with a focus on
5527having fun over realism. You can play with up to 4 friends on one PC, racing
5528against each other or just trying to beat the computer; single-player mode is
5529also available.")
5530 (license license:gpl3+)))
5531
5532(define-public ring-racers-data
5533 (hidden-package
5534 (package
5535 (name "ring-racers-data")
5536 (version "2.4")
5537 (source
5538 (origin
5539 (method url-fetch/zipbomb)
5540 (uri (string-append
5541 "https://github.com/KartKrewDev/RingRacers/releases/download/v"
5542 version "/Dr.Robotnik.s-Ring-Racers-v" version "-Assets.zip"))
5543 (file-name (string-append name "-" version ".zip"))
5544 (sha256
5545 (base32 "087i1bz46g57s0850j5wf9j2bdmr451lzg156hrg681chwdxgfpf"))))
5546 (build-system copy-build-system)
5547 (home-page "https://github.com/KartKrewDev/RingRacers/releases")
5548 (synopsis "Data files for Ring Racers")
5549 (description "This package contains data files for Ring Racers.")
5550 (license license:gpl2+))))
5551
5552(define-public ring-racers
5553 (package
5554 (name "ring-racers")
5555 (version "2.4")
5556 (source
5557 (origin
5558 (method git-fetch)
5559 (uri (git-reference
5560 (url "https://gitlab.com/kart-krew-dev/ring-racers")
5561 (commit (string-append "v" version))))
5562 (file-name (git-file-name name version))
5563 (sha256
5564 (base32 "05aj09rm50xb6910zx6imarj8k728x9bpvpa7ydwgb4sj1nypil8"))
5565 (modules '((guix build utils)))
5566 (snippet
5567 '(begin
5568 (with-directory-excursion "thirdparty"
5569 ;; Delete third party ibraries, except these libraries:
5570 ;; glad: header file is not available in the system glad package.
5571 ;; imgui: configured with "srb2_imconfig.h".
5572 ;; libwebm: Not available in Guix.
5573 ;; renamenoise: Not available in Guix.
5574 ;; tracy: header files are not available in the system tracy
5575 ;; package.
5576 (for-each delete-file-recursively
5577 '("discord-rpc"
5578 "glm"
5579 "nlohmann-json"
5580 "overlay-ports/libyuv"
5581 "tcbrindle_span"
5582 "vma"
5583 "volk"
5584 "vulkan-headers"
5585 "xmp-lite"))
5586 ;; Unbundle stb.
5587 (with-directory-excursion "stb"
5588 (for-each delete-file
5589 '("include/stb_rect_pack.h"
5590 "stb_vorbis.c"))
5591 (substitute* "stb_rect_pack.c"
5592 (("\"include\\/stb_rect_pack\\.h\"") "<stb_rect_pack.h>"))
5593 (substitute* "CMakeLists.txt"
5594 (("include\\/stb_rect_pack\\.h ") "")))
5595 ;; Find third party libraries from the system and do not add the
5596 ;; deleted directories.
5597 (substitute* "CMakeLists.txt"
5598 (("add_subdirectory\\((glm|discord-rpc|xmp-lite|fmt|volk)\\)"
5599 _ keep)
5600 (string-append "find_package(" keep " REQUIRED)"))
5601 (("xmp-lite") "libxmp")
5602 ((".*nlohmann-json.*") "")
5603 ((".*tcbrindle_span.*") "")
5604 ((".*vulkan-headers.*") "")
5605 ((".*vma.*") "")))
5606 (with-directory-excursion "src"
5607 ;; Link the system libraries instead of the unbundled ones.
5608 (substitute* "CMakeLists.txt"
5609 ((".*tcbrindle::span.*") "")
5610 (("glm::glm") "glm")
5611 (("xmp-lite::xmp-lite") "xmp")
5612 (("fmt::fmt-header-only") "fmt")
5613 ((".*nlohmann_json::nlohmann_json.*") "")))
5614 ;; Rename the icon to match with the executable file.
5615 (rename-file "srb2.png" "ringracers.png")))))
5616 (build-system cmake-build-system)
5617 (arguments
5618 (list
5619 #:tests? #f ;There are no tests.
5620 #:configure-flags
5621 #~(list "-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF"
5622 "-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'"
5623 "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'")
5624 #:phases
5625 #~(modify-phases %standard-phases
5626 (add-after 'unpack 'copy-stb_vorbis.c
5627 (lambda* (#:key inputs #:allow-other-keys)
5628 (install-file (search-input-file inputs "/stb_vorbis.c")
5629 "thirdparty/stb")))
5630 (replace 'install
5631 (lambda _
5632 (install-file "bin/ringracers" (string-append #$output "/bin"))
5633 (install-file "../source/ringracers.png"
5634 (string-append #$output "/share/pixmaps"))))
5635 (add-after 'install 'wrap-program
5636 (lambda* (#:key inputs #:allow-other-keys)
5637 (wrap-program (string-append #$output "/bin/ringracers")
5638 `("RINGRACERSWADDIR" =
5639 (,(assoc-ref inputs "ring-racers-data"))))))
5640 (add-after 'wrap-program 'create-desktop-entry
5641 (lambda _
5642 (let* ((datadir (string-append #$output "/share"))
5643 (appdir (string-append datadir "/applications")))
5644 (mkdir-p appdir)
5645 (make-desktop-entry-file (string-append appdir
5646 "/ringracers.desktop")
5647 #:name "Dr. Robotnik's Ring Racers"
5648 #:comment "Technical kart racing game"
5649 #:icon "ringracers"
5650 #:exec (string-append #$output "/bin/ringracers")
5651 #:startup-notify #f
5652 #:categories '("Application" "Game"))))))))
5653 (native-inputs
5654 (list pkg-config
5655 (package-source stb)))
5656 (inputs (list bash-minimal
5657 curl
5658 fmt
5659 glm
5660 libogg
5661 libpng
5662 libvorbis
5663 libvpx
5664 libxmp
5665 libyuv
5666 nlohmann-json
5667 opus
5668 ring-racers-data
5669 sdl2
5670 stb-rect-pack
5671 tcbrindle-span
5672 vulkan-headers
5673 vulkan-memory-allocator
5674 vulkan-volk
5675 zlib))
5676 (home-page "https://www.kartkrew.org/")
5677 (synopsis "Technical kart racing game")
5678 (description
5679 "Dr.@: Robotnik's Ring Racers is a kart racing game drawing inspiration
5680from \"anti-gravity\" racers, fighting games, and traditional-style kart
5681racing. Ring Racers is designed with an emphasis on player agency in the face
5682of highly technical game-play challenges in both single-player and online
5683multiplayer modes.")
5684 (license license:gpl2+)))
5685
5686(define-public unknown-horizons
5687 (package
5688 (name "unknown-horizons")
5689 (version "2019.1")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (string-append "https://codeload.github.com/unknown-horizons/"
5694 "unknown-horizons/tar.gz/" version))
5695 (file-name (string-append name "-" version ".tar.gz"))
5696 (sha256
5697 (base32 "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
5698 (patches (search-patches "unknown-horizons-python-3.8-distro.patch"
5699 "unknown-horizons-python-3.9.patch"
5700 "unknown-horizons-python-3.10.patch"))))
5701 (build-system pyproject-build-system)
5702 (arguments
5703 (list
5704 #:test-flags
5705 ;; 'tutorial' scenario not in the database.
5706 #~(list "-k" (string-join (list "not test_start_scenario_by_name"
5707 "test_start_scenario_by_path")
5708 " and not "))
5709 #:phases
5710 #~(modify-phases %standard-phases
5711 (add-before 'build 'set-HOME
5712 (lambda _
5713 (setenv "HOME" "/tmp")))
5714 (add-after 'build 'build-extra
5715 (lambda _
5716 (invoke "python3" "./setup.py" "build_i18n")
5717 (invoke "python3" "horizons/engine/generate_atlases.py" "2048")))
5718 (add-after 'install 'patch
5719 (lambda _
5720 (substitute* (string-append #$output "/bin/unknown-horizons")
5721 (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
5722 (string-append "os.chdir(\""
5723 #$output "/share/unknown-horizons\")")))))
5724 (add-before 'check 'fix-tests-with-pytest>=4
5725 (lambda _
5726 (substitute* "tests/conftest.py"
5727 (("pytest_namespace")
5728 "pytest_configure")
5729 (("get_marker")
5730 "get_closest_marker"))))
5731 ;; TODO: Run GUI tests as well
5732 (replace 'check
5733 (lambda args
5734 (substitute* "horizons/constants.py"
5735 (("IS_DEV_VERSION = False")
5736 "IS_DEV_VERSION = True"))
5737 (apply (assoc-ref %standard-phases 'check) args)
5738 (substitute* "horizons/constants.py"
5739 (("IS_DEV_VERSION = True")
5740 "IS_DEV_VERSION = False")))))))
5741 (inputs
5742 (list fifengine
5743 (list python "tk")
5744 python-pillow
5745 python-pyyaml))
5746 (native-inputs
5747 (list intltool
5748 python-distro
5749 ;; Required for tests
5750 python-greenlet
5751 python-polib
5752 python-pytest
5753 python-pytest-mock
5754 python-setuptools))
5755 (home-page "https://unknown-horizons.org/")
5756 (synopsis
5757 "Isometric realtime strategy, economy and city building simulation")
5758 (description
5759 "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
5760on economy and city building. Expand your small settlement to a strong and
5761wealthy colony, collect taxes and supply your inhabitants with valuable
5762goods. Increase your power with a well balanced economy and with strategic
5763trade and diplomacy.")
5764 (license (list license:gpl2+ ;Covers code
5765 license:expat ;tests/dummy.py, ext/polib.py
5766 license:cc-by-sa3.0 ;Covers some media content
5767 license:cc-by3.0 ;Covers some media content
5768 license:bsd-3)))) ; horizons/ext/speaklater.py
5769
5770(define-public zmusic
5771 (package
5772 (name "zmusic")
5773 (version "1.3.0")
5774 (source
5775 (origin
5776 (method git-fetch)
5777 (uri (git-reference
5778 (url "https://github.com/UZDoom/ZMusic")
5779 (commit version)))
5780 (file-name (git-file-name name version))
5781 (sha256
5782 (base32 "065wrk88rnpjd0jayc4gw45ynviky7s6ncg9ixw31i3nk8vh639f"))
5783 (modules '((guix build utils)))
5784 (snippet
5785 #~(begin
5786 (with-directory-excursion "thirdparty"
5787 (for-each delete-file-recursively
5788 '("game-music-emu"
5789 "fluidsynth"))
5790 (substitute* "CMakeLists.txt"
5791 (("add_subdirectory\\(game-music-emu\\)")
5792 "find_package(PkgConfig)
5793pkg_search_module(game-music-emu REQUIRED libgme)")
5794 (("add_subdirectory\\(fluidsynth/src\\)")
5795 "find_package(FluidSynth REQUIRED)")))
5796 (substitute* (find-files "source" "\\.(h|cpp)")
5797 (("include \".*fluidsynth.h\"")
5798 "include <fluidsynth.h>"))))))
5799 (build-system cmake-build-system)
5800 (arguments (list #:tests? #f)) ;No tests.
5801 (inputs (list fluidsynth glib libgme))
5802 (native-inputs (list pkg-config))
5803 (home-page "https://github.com/UZDoom/ZMusic")
5804 (synopsis "UZDoom's music system")
5805 (description "ZMusic is a standalone library implementing the music
5806system for UZDoom and other Doom-related projects.")
5807 (license license:gpl3)))
5808
5809(define-public uzdoom
5810 (let ((commit "1458bf021f939e28c71ddd0e92e2ea66bfa64a0e")
5811 (revision "0"))
5812 (package
5813 (name "uzdoom")
5814 (version (git-version "4.14.3" revision commit))
5815 (source
5816 (origin
5817 (method git-fetch)
5818 (uri (git-reference
5819 (url "https://github.com/UZDoom/UZDoom")
5820 (commit commit)))
5821 (file-name (git-file-name name version))
5822 (sha256
5823 (base32 "0nl76c3j728vwz4n91f4jhla4z9wpx0g93bq4987ix82fxm51b5r"))
5824 (modules '((guix build utils)))
5825 (snippet
5826 #~(begin
5827 (for-each delete-file-recursively
5828 '("bin" "unused" ;Self-explanatory
5829 "libraries/bzip2" "libraries/miniz"
5830 "libraries/ZMusic" ;De-vendored.
5831 "wadsrc_widepix/static")) ;Non-commercial license.
5832 (substitute* "CMakeLists.txt"
5833 (("add_subdirectory\\( libraries/miniz \\)")
5834 "find_package(miniz REQUIRED)"))
5835 (substitute* (find-files "." ".*\\.(c(pp)?|h)")
5836 (("miniz.h") "miniz/miniz.h"))
5837 ;; Add store prefix to search paths.
5838 (substitute* "src/gameconfigfile.cpp"
5839 (("DefaultSearchPaths\\.Push.+/usr/share.+;" line)
5840 (string-append
5841 "DefaultSearchPaths.Push(\"$GUIX_UZDOOM_PREFIX/share\""
5842 " + GameDirs[i]); " line)))
5843 ;; Embed correct version.
5844 (substitute* "tools/updaterevision/gitinfo.h.in"
5845 (("@Tag@") (string-append #$version "-guix")))))))
5846 (build-system cmake-build-system)
5847 (arguments
5848 (list #:tests? #f ;No tests.
5849 #:configure-flags
5850 #~(list "-DBUILD_NONFREE=OFF"
5851 "-DFORCE_CROSSCOMPILE=OFF"
5852 "-DFORCE_INTERNAL_ASMJIT=OFF"
5853 "-DFORCE_INTERNAL_ZMUSIC=OFF"
5854 "-DDYN_OPENAL=OFF")
5855 #:phases
5856 #~(modify-phases %standard-phases
5857 (add-after 'install 'wrap-uzdoom
5858 (lambda _
5859 (wrap-program (string-append #$output "/bin/uzdoom")
5860 `("GUIX_UZDOOM_PREFIX" = (,#$output))))))))
5861 (inputs (list (module-ref
5862 (resolve-interface '(gnu packages debug)) 'cppdap)
5863 bzip2
5864 dbus
5865 gtk+
5866 libomp
5867 libvpx
5868 libxkbcommon
5869 miniz
5870 openal
5871 sdl2
5872 zmusic))
5873 (native-inputs (list pkg-config python))
5874 (home-page "https://zdoom.org/")
5875 (synopsis "Doom source port with advanced rendering and scripting")
5876 (description "UZDoom is a ``modder-friendly'' Doom source port with
5877advanced rendering and scripting features, derived from GZDoom and ZDoom.")
5878 (license (list license:apsl2 ;zvulkan/vulkan
5879 license:bsd-0 ;zvulkan/src/{vk_mem_alloc,volk},
5880 ;discordrpc
5881 license:bsd-3 ;zvulkan{,/src/glslang}, zwidget, sfmt,
5882 ;utf8proc, zscript
5883 license:cc-by-sa4.0 ;branding
5884 license:expat ;utf8proc_data.c
5885 license:gpl3+))))) ;base license
5886
5887(define-public gnujump
5888 (package
5889 (name "gnujump")
5890 (version "1.0.8")
5891 (source (origin
5892 (method url-fetch)
5893 (uri (string-append "mirror://gnu/gnujump/gnujump-"
5894 version ".tar.gz"))
5895 (sha256
5896 (base32
5897 "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"))))
5898 (build-system gnu-build-system)
5899 (arguments
5900 '(#:phases
5901 (modify-phases %standard-phases
5902 (add-before
5903 'configure 'link-libm
5904 (lambda _ (setenv "LIBS" "-lm")))
5905 (add-after 'install 'create-desktop-entry
5906 (lambda* (#:key outputs #:allow-other-keys)
5907 (let* ((out (assoc-ref outputs "out"))
5908 (apps (string-append out "/share/applications")))
5909 (mkdir-p apps)
5910 (with-output-to-file
5911 (string-append apps "/gnujump.desktop")
5912 (lambda _
5913 (format #t
5914 "[Desktop Entry]~@
5915 Name=GNUjump~@
5916 Comment=Jump up the tower to survive~@
5917 Exec=~a/bin/gnujump~@
5918 Terminal=false~@
5919 Type=Application~@
5920 Categories=Game;ArcadeGame~%"
5921 out)))))))))
5922 (inputs
5923 (list glu mesa sdl sdl-image sdl-mixer))
5924 (home-page "http://gnujump.es.gnu.org/")
5925 (synopsis
5926 "Game of jumping to the next floor, trying not to fall")
5927 (description
5928 "GNUjump is a simple, yet addictive game in which you must jump from
5929platform to platform to avoid falling, while the platforms drop at faster rates
5930the higher you go. The game features multiplayer, unlimited FPS, smooth floor
5931falling, themeable graphics and sounds, and replays.")
5932 (license license:gpl3+)))
5933
5934(define-public wesnoth
5935 (package
5936 (name "wesnoth")
5937 ;; Even-numbered minor versions indicate stable versions:
5938 ;; https://wiki.wesnoth.org/ReleasingWesnoth#Version_numbering
5939 (version "1.18.8")
5940 (source (origin
5941 (method git-fetch)
5942 (uri (git-reference
5943 (url "https://github.com/wesnoth/wesnoth")
5944 (commit version)))
5945 (file-name (git-file-name name version))
5946 (sha256
5947 (base32
5948 "12bpfg476ncpiak0b195qicnzz2dpcd5s0fgmm8rgfq05x1cfgkm"))))
5949 (build-system cmake-build-system)
5950 (arguments
5951 (list #:tests? #f ;no test target
5952 #:configure-flags #~'("-DENABLE_SYSTEM_LUA=ON")))
5953 (inputs
5954 (list boost-1.83
5955 curl
5956 dbus
5957 libvorbis
5958 lua-5.4-for-c++
5959 openssl
5960 pango
5961 sdl2
5962 sdl2-image
5963 sdl2-mixer))
5964 (native-inputs
5965 (list gettext-minimal
5966 pkg-config
5967 python-minimal))
5968 (home-page "https://www.wesnoth.org/")
5969 (synopsis "Turn-based strategy game")
5970 (description
5971 "The Battle for Wesnoth is a fantasy, turn based tactical strategy game,
5972with several single player campaigns, and multiplayer games (both networked and
5973local).
5974
5975Battle for control on a range of maps, using variety of units which have
5976advantages and disadvantages against different types of attacks. Units gain
5977experience and advance levels, and are carried over from one scenario to the
5978next campaign.")
5979 (license license:gpl2+)))
5980
5981(define-public wesnoth-server
5982 (package
5983 (inherit wesnoth)
5984 (name "wesnoth-server")
5985 (inputs
5986 (list boost-1.83 icu4c lua-5.4 openssl))
5987 (native-inputs
5988 (list pkg-config))
5989 (arguments
5990 (substitute-keyword-arguments arguments
5991 ((#:configure-flags _)
5992 #~'("-DENABLE_SYSTEM_LUA=ON" "-DENABLE_GAME=OFF"))))
5993 (synopsis "Dedicated @emph{Battle for Wesnoth} server")
5994 (description "This package contains a dedicated server for @emph{The
5995Battle for Wesnoth}.")))
5996
5997(define-public wordwarvi
5998 (package
5999 (name "wordwarvi")
6000 (version "1.0.4")
6001 (source
6002 (origin
6003 (method git-fetch)
6004 (uri (git-reference
6005 (url "https://github.com/smcameron/wordwarvi")
6006 (commit (string-append "v" version))))
6007 (file-name (git-file-name name version))
6008 (sha256
6009 (base32 "0f9xhm7267g27f2k1v4dylzvrfyhr9y60f5ypq5a5kiqrqykm245"))))
6010 (build-system gnu-build-system)
6011 (inputs (list alsa-lib gtk+-2 libvorbis portaudio))
6012 (native-inputs (list pkg-config))
6013 (arguments
6014 (list
6015 #:make-flags
6016 #~(list "BINDIR=/bin"
6017 (string-append "CC=" #$(cc-for-target))
6018 (string-append "DATADIR=" #$output "")
6019 (string-append "DESTDIR=" #$output) "PREFIX=")
6020 #:tests? #f ;no tests
6021 #:phases #~(modify-phases %standard-phases
6022 (delete 'configure)
6023 (add-after 'unpack 'fix-makefile
6024 (lambda _
6025 (substitute* "Makefile"
6026 (("/bin/rm")
6027 "rm")
6028 (("-DDATADIR=\\\\\"\\$\\{DATADIR\\}/\\\\\"")
6029 "-DDATADIR=\\\"${DESTDIR}/${DATADIR}/\\\"")))))))
6030 (home-page "https://smcameron.github.io/wordwarvi/")
6031 (synopsis "Arcade-style side scrolling space shooter")
6032 (description
6033 "In this game you pilot a combat space ship to rescue your lost \"vi\" .swp
6034files avoiding OS defenses. It contains several levels and the difficulty
6035level is configurable on the command line. It can be played with a keyboard
6036or a joystick. It is drawn mostly with lines, and supports various display
6037modes.")
6038 ;; For the code, most files are under GPLv2+, but since the ogg_to_pcm.c
6039 ;; file is GPLv2 without 'any later version', we use 'gpl2' because of the
6040 ;; ambiguity. For the sounds the licenses are declared in
6041 ;; sounds/Attribution.txt and for aaaah_it_burns.ogg, it can be viewed with
6042 ;; vorbiscomment -l.
6043 (license (list license:gpl2 ;For the code
6044 ;; lucky-holiday-cornbread-stuffing-mono.ogg
6045 ;; lucky13-steve-mono-mix.ogg
6046 ;; aaaah_it_burns.ogg
6047 license:cc-by3.0
6048 ;; all other sounds are under cc-by-sa 3.0
6049 license:cc-by-sa3.0))))
6050
6051(define-public gamine
6052 (package
6053 (name "gamine")
6054 (version "1.6")
6055 (source (origin
6056 (method url-fetch)
6057 (uri (string-append "mirror://sourceforge/gamine-game/"
6058 "gamine-" version ".tar.gz"))
6059 (sha256
6060 (base32
6061 "1sc6f4445ciigd6yw0ri92746k4hk6ps0bvj9fm1gbp3c3fslk5n"))))
6062 (build-system gnu-build-system)
6063 (native-inputs
6064 (list pkg-config intltool))
6065 (inputs
6066 (list bash-minimal
6067 gstreamer
6068 gst-plugins-base ; playbin plugin
6069 gst-plugins-good ; for wav playback
6070 gtk+))
6071 (arguments
6072 `(#:tests? #f
6073 #:make-flags
6074 (let ((out (assoc-ref %outputs "out")))
6075 (list (string-append "PREFIX=" out)
6076 (string-append "SYSCONFDIR=" out "/etc")))
6077 #:phases
6078 (modify-phases %standard-phases
6079 (delete 'configure)
6080 (add-after
6081 'install 'wrap-gamine
6082 (lambda* (#:key outputs #:allow-other-keys)
6083 (let ((out (assoc-ref outputs "out"))
6084 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
6085 (wrap-program (string-append out "/bin/gamine")
6086 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))))))))
6087 (home-page "http://gamine-game.sourceforge.net/")
6088 (synopsis "Mouse and keyboard discovery for children")
6089 (description
6090 "Gamine is a game designed for young children who are learning to use the
6091mouse and keyboard. The child uses the mouse to draw colored dots and lines
6092on the screen and keyboard to display letters.")
6093 ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
6094 (license license:gpl3)))
6095
6096(define-public manaplus
6097 (package
6098 (name "manaplus")
6099 (version "2.1.3.17")
6100 (source
6101 (origin
6102 (method git-fetch)
6103 (uri (git-reference
6104 (url "https://gitlab.com/manaplus/manaplus.git")
6105 (commit (string-append "v" version))))
6106 (file-name (git-file-name name version))
6107 (sha256
6108 (base32 "1b1mgj6pdccjhb3hvlag3ia1phkzndd7cmw053aqs2480bcpswsm"))))
6109 (build-system gnu-build-system)
6110 (arguments
6111 (list
6112 #:configure-flags
6113 #~(list "--with-sdl2"
6114 "--enable-unittests"
6115 ;; Standards c++0x or greater set GXX_EXPERIMENTAL_CXX0X which
6116 ;; causes stdint.h not to be included.
6117 "CXXFLAGS=-std=c++98")
6118 #:phases
6119 #~(modify-phases %standard-phases
6120 (add-before 'configure 'fix-libxml-and-time
6121 (lambda _
6122 ;; Fix libxml2 migration.
6123 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/33>.
6124 (substitute* (list "src/utils/dumplibs.cpp"
6125 "src/unittests/utils/dumplibs.cc")
6126 (("const char \\*\\*xmlVersion")
6127 "const char * const *xmlVersion")
6128 (("__xmlParserVersion\\(\\)")
6129 "&xmlParserVersion"))
6130 (substitute* "src/utils/xml/libxml.inc"
6131 (("ifdef ENABLE_LIBXML")
6132 "ifdef ENABLE_LIBXML\n#include <libxml/parser.h>"))
6133 ;; Include ctime when necessary.
6134 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/32>.
6135 (substitute* (list "src/resources/wallpaper.cpp"
6136 "src/progs/dyecmd/client.cpp")
6137 (("include \"debug.h\"")
6138 "include \"debug.h\"\n#include <ctime>"))))
6139 (add-before 'check 'set-home
6140 (lambda _
6141 (setenv "HOME" (getcwd)))))))
6142 (native-inputs
6143 (list autoconf
6144 automake
6145 gettext-minimal
6146 pkg-config))
6147 (inputs
6148 (list curl
6149 glu
6150 libxml2
6151 mesa
6152 sdl2
6153 sdl2-image
6154 sdl2-mixer
6155 sdl2-net
6156 sdl2-ttf))
6157 (home-page "https://manaplus.org")
6158 (synopsis "Client for 'The Mana World' and similar games")
6159 (description
6160 "ManaPlus is a 2D MMORPG client for game servers. It is the only
6161fully supported client for @uref{http://www.themanaworld.org, The mana
6162world}, @uref{http://evolonline.org, Evol Online} and
6163@uref{http://landoffire.org, Land of fire}.")
6164 ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
6165 ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
6166 ;; The rest is under GPL2+.
6167 (license (list license:gpl2+ license:zlib license:cc-by-sa3.0))))
6168
6169(define-public openttd-engine
6170 (package
6171 (name "openttd-engine")
6172 (version "15.3")
6173 (source
6174 (origin (method url-fetch)
6175 (uri (string-append "https://cdn.openttd.org/openttd-releases/"
6176 version "/openttd-" version "-source.tar.xz"))
6177 (sha256
6178 (base32
6179 "1rrvjxsr2dp9zr6b35ifiw41c0dwqqcaq90r0x18misrgpm1x8jy"))))
6180 (build-system cmake-build-system)
6181 (inputs
6182 (list allegro
6183 fontconfig
6184 freetype
6185 icu4c
6186 libpng
6187 lzo
6188 sdl2
6189 xz
6190 zlib))
6191 (synopsis "Transportation economics simulator game")
6192 (description "OpenTTD is a game in which you transport goods and
6193passengers by land, water and air. It is a re-implementation of Transport
6194Tycoon Deluxe with many enhancements including multiplayer mode,
6195internationalization support, conditional orders and the ability to clone,
6196autoreplace and autoupdate vehicles. This package only includes the game
6197engine. When you start it you will be prompted to download a graphics set.")
6198 (home-page "https://www.openttd.org/")
6199 ;; This package is GPLv2, except for a few files located in
6200 ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
6201 ;; licenses. In addition, this software contains an in-game downloader
6202 ;; from which the user may find non-functional data licensed under
6203 ;; different terms.
6204 (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
6205
6206(define-public openttd-opengfx
6207 (package
6208 (name "openttd-opengfx")
6209 (version "8.0")
6210 (source
6211 (origin
6212 (method git-fetch)
6213 (uri (git-reference
6214 (url "https://github.com/openttd/opengfx")
6215 (commit version)))
6216 (file-name (git-file-name name version))
6217 (sha256
6218 (base32
6219 "0rkyxbrfgb67q3crnlpkv0h9nmskn2yfj2i8sbbibxrya8r3whz6"))))
6220 (build-system gnu-build-system)
6221 (arguments
6222 (list
6223 #:make-flags
6224 #~(list (string-append "CC=" #$(cc-for-target))
6225 (string-append "INSTALL_DIR="
6226 #$output
6227 "/share/games/openttd/baseset/opengfx")
6228 "REPO_DATE=20000101"
6229 (string-append "PYTHON="
6230 #$(this-package-native-input "python")
6231 "/bin/python3"))
6232 #:phases
6233 #~(modify-phases %standard-phases
6234 (replace 'configure
6235 (lambda _
6236 ;; Make sure HOME is writable for GIMP.
6237 (setenv "HOME" (getcwd))
6238
6239 (mkdir-p ".local/share")
6240 (symlink (string-append #$(this-package-native-input "shared-mime-info")
6241 "/share/mime")
6242 ".local/share/mime")
6243
6244 ;; Redirect stdout, not stderr, to /dev/null. This prevents
6245 ;; dos2unix from receiving its version information as a flag.
6246 (substitute* "Makefile"
6247 (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
6248 "$(UNIX2DOS) -q --version 1>/dev/null")))))
6249 ;; The check phase for this package only checks the md5sums of the built
6250 ;; GRF files against the md5sums of the release versions. Because we use
6251 ;; different software versions than upstream does, some of the md5sums
6252 ;; are different. However, the package is still reproducible, it's safe
6253 ;; to disable this test.
6254 #:tests? #f
6255 #:parallel-build? #f))
6256 (native-inputs
6257 (list dos2unix
6258 shared-mime-info
6259 gimp
6260 grfcodec
6261 nml
6262 which
6263 python))
6264 (home-page "http://dev.openttdcoop.org/projects/opengfx")
6265 (synopsis "Base graphics set for OpenTTD")
6266 (description
6267 "The OpenGFX project is an implementation of the OpenTTD base graphics
6268set that aims to ensure the best possible out-of-the-box experience.
6269
6270OpenGFX provides you with...
6271@enumerate
6272@item All graphics you need to enjoy OpenTTD.
6273@item Uniquely drawn rail vehicles for every climate.
6274@item Completely snow-aware rivers.
6275@item Different river and sea water.
6276@item Snow-aware buoys.
6277@end enumerate")
6278 (license license:gpl2)))
6279
6280(define-public openttd-opensfx
6281 (package
6282 (name "openttd-opensfx")
6283 (version "1.0.3")
6284 (source
6285 (origin
6286 (method url-fetch)
6287 (uri (string-append
6288 "https://cdn.openttd.org/opensfx-releases/"
6289 version "/opensfx-" version "-source.tar.xz"))
6290 (sha256
6291 (base32 "0p336bn6brnbyrf537x36ad9rfz16cjwyzwws4lmfvnql8ycpjj3"))))
6292 (build-system gnu-build-system)
6293 (native-inputs
6294 (list catcodec
6295 python
6296 tar))
6297 (arguments
6298 (list
6299 #:make-flags
6300 #~(list (string-append "DIR_NAME=opensfx")
6301 (string-append "TAR="
6302 (search-input-file %build-inputs "/bin/tar")))
6303 ;; The check phase only verifies md5sums, see openttd-opengfx.
6304 #:tests? #f
6305 #:phases
6306 #~(modify-phases %standard-phases
6307 (add-after 'unpack 'make-reproducible
6308 (lambda _
6309 ;; Remove the time dependency of the installed tarball by setting
6310 ;; the modification times if its members to 0.
6311 (substitute* "scripts/Makefile.def"
6312 (("-cf") " --mtime=@0 -cf"))))
6313 (delete 'configure)
6314 (add-before 'build 'prebuild
6315 (lambda _ (invoke "make" "opensfx.cat")))
6316 (replace 'install
6317 (lambda* (#:key outputs #:allow-other-keys)
6318 (copy-recursively "opensfx"
6319 (string-append (assoc-ref outputs "out")
6320 "/share/games/openttd/baseset"
6321 "/opensfx")))))))
6322 (home-page "http://dev.openttdcoop.org/projects/opensfx")
6323 (synopsis "Base sounds for OpenTTD")
6324 (description "OpenSFX is a set of free base sounds for OpenTTD which make
6325it possible to play OpenTTD without requiring the proprietary sound files from
6326the original Transport Tycoon Deluxe.")
6327 (license license:cc-by-sa3.0)))
6328
6329(define-public openttd-openmsx
6330 (package
6331 (name "openttd-openmsx")
6332 (version "0.4.2")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (string-append
6337 "https://cdn.openttd.org/openmsx-releases/"
6338 version "/openmsx-" version "-source.tar.xz"))
6339 (sha256
6340 (base32
6341 "0h583d8fxy78kc3jvpp78r76a48qhxrhm4q7jbnj74aw0kwrcl8g"))))
6342 (build-system gnu-build-system)
6343 (native-inputs
6344 (list grfcodec
6345 ;; Scripts are Python3 compatible, but call the interpreter as
6346 ;; python instead of python3.
6347 python-wrapper
6348 tar))
6349 (arguments
6350 (list
6351 #:make-flags
6352 #~(list (string-append "DIR_NAME=openmsx")
6353 (string-append "TAR="
6354 (search-input-file %build-inputs "/bin/tar")))
6355 ;; The check phase only verifies md5sums, see openttd-opengfx.
6356 #:tests? #f
6357 #:phases
6358 #~(modify-phases %standard-phases
6359 (delete 'configure)
6360 (replace 'install
6361 (lambda* (#:key outputs #:allow-other-keys)
6362 (copy-recursively "openmsx"
6363 (string-append (assoc-ref outputs "out")
6364 "/share/games/openttd/baseset"
6365 "/openmsx")))))))
6366 (home-page "http://dev.openttdcoop.org/projects/openmsx")
6367 (synopsis "Music set for OpenTTD")
6368 (description "OpenMSX is a music set for OpenTTD which makes it possible
6369to play OpenTTD without requiring the proprietary music from the original
6370Transport Tycoon Deluxe.")
6371 (license license:gpl2)))
6372
6373(define-public openttd
6374 (package
6375 (inherit openttd-engine)
6376 (name "openttd")
6377 (arguments
6378 (list
6379 #:configure-flags
6380 #~(list (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin"))
6381 #:phases
6382 #~(modify-phases %standard-phases
6383 (add-after 'unpack 'patch-sources
6384 (lambda* (#:key inputs #:allow-other-keys)
6385 (substitute* "src/music/fluidsynth.cpp"
6386 (("_default_soundfonts\\[\\] = \\{" all)
6387 (string-append all "
6388\t/* Guix hardcoded :P */
6389\t\"" (search-input-file inputs "/share/soundfonts/FreePatsGM.sf2") "\",
6390")))))
6391 (add-before 'check 'install-data
6392 (lambda* (#:key inputs outputs #:allow-other-keys)
6393 (let ((base "/share/games/openttd"))
6394 (for-each
6395 (lambda (dir)
6396 ;; Copy the entire input, so as to not omit documentation
6397 ;; etc.
6398 (copy-recursively
6399 (string-drop-right dir (string-length base))
6400 (assoc-ref outputs "out")))
6401 (search-path-as-list (list base) (map cdr inputs)))))))))
6402 (inputs
6403 (modify-inputs inputs
6404 (prepend fluidsynth freepats-gm)))
6405 (native-inputs
6406 (modify-inputs native-inputs
6407 (prepend openttd-opengfx openttd-openmsx openttd-opensfx)))))
6408
6409(define-public openttd-jgrpp
6410 (package
6411 (inherit openttd)
6412 (name "openttd-jgrpp")
6413 (version "0.72.4")
6414 (source
6415 (origin
6416 (method git-fetch)
6417 (uri (git-reference
6418 (url "https://github.com/JGRennison/OpenTTD-patches")
6419 (commit (string-append "jgrpp-" version))))
6420 (file-name (git-file-name name version))
6421 (sha256
6422 (base32 "1n42nb9lxzwjbpxihqqi5zj1ykv1xl2cg7wjfjxwjxcll2hwl95a"))))
6423 (inputs (modify-inputs inputs
6424 (append zstd harfbuzz)))
6425 (arguments
6426 (substitute-keyword-arguments arguments
6427 ((#:phases phases '%standard-phases)
6428 #~(modify-phases #$phases
6429 (add-before 'check 'build-tests
6430 (lambda* (#:key (tests? #t) (make-flags '()) (parallel-build? #t) #:allow-other-keys)
6431 (when tests?
6432 (let ((build (assoc-ref #$phases 'build)))
6433 (build #:make-flags (cons "openttd_test" make-flags)
6434 #:parallel-build? parallel-build?)))))))))
6435 (home-page "https://github.com/JGRennison/OpenTTD-patches")
6436 (synopsis "OpenTTD with additional patches")
6437 (description
6438 "JGRPP is a collection of features and other modifications applied to OpenTTD.
6439It's a separate version of the game which can be installed and played alongside
6440the standard game, not a loadable mod (NewGRF, script, or so on).
6441
6442This is mainly intended to be used by players who are already familiar with the
6443standard game and how to play it. It is not aimed at beginner/novice players.
6444Some features and settings are there for very experienced players and so may
6445have a steep learning curve.")))
6446
6447(define-public openrct2-title-sequences
6448 (package
6449 (name "openrct2-title-sequences")
6450 (version "0.4.26")
6451 (source
6452 (origin
6453 (method url-fetch)
6454 (uri (string-append "https://github.com/OpenRCT2/title-sequences"
6455 "/releases/download/v" version
6456 "/title-sequences.zip"))
6457 (file-name (string-append name "-" version ".zip"))
6458 (sha256
6459 (base32
6460 "0n680llpcyzl22bbphp9diz4m86gz2rn97yxlky44qspn63rgfys"))))
6461 (build-system copy-build-system)
6462 (arguments
6463 (list #:install-plan #~'(("." "/share/openrct2/title-sequences"))))
6464 (native-inputs (list unzip))
6465 (home-page "https://openrct2.io")
6466 (synopsis "Title sequences for OpenRCT2")
6467 (description
6468 "openrct2-title-sequences is a set of title sequences for OpenRCT2.")
6469 (properties '((hidden? . #t))) ;data package useless on its own
6470 (license license:gpl3+)))
6471
6472(define-public openrct2-objects
6473 (package
6474 (name "openrct2-objects")
6475 (version "1.7.11")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (string-append "https://github.com/OpenRCT2/objects"
6480 "/releases/download/v" version "/objects.zip"))
6481 (file-name (string-append name "-" version ".zip"))
6482 (sha256
6483 (base32 "0llln61q3n31k3bdfdxfj2bqknlg2jxhzparncdm2f9306ykprvl"))))
6484 (build-system copy-build-system)
6485 (arguments
6486 ;; zip has multiple top-level directories to install.
6487 (list #:install-plan #~'((".." "/share/openrct2/objects"
6488 #:exclude ("environment-variables")))))
6489 (native-inputs (list unzip))
6490 (home-page "https://openrct2.io")
6491 (synopsis "Objects for OpenRCT2")
6492 (description
6493 "openrct2-objects is a set of objects for OpenRCT2.")
6494 (properties '((hidden? . #t))) ;data package useless on its own
6495 (license license:gpl3+)))
6496
6497(define-public openquest
6498 (package
6499 (name "openquest")
6500 (version "0.2.1")
6501 (source (origin
6502 (method git-fetch)
6503 (uri (git-reference
6504 (url "https://github.com/AlbanBedel/scummc")
6505 (commit (string-append "v" version))))
6506 (file-name (git-file-name name version))
6507 (sha256
6508 (base32
6509 "1yyq05kfmvgx5aa68kg1l5a4lpsky7hzxxcdvv2xbgf0jljdcl3k"))
6510 (modules '((guix build utils)))
6511 (snippet
6512 #~(begin
6513 (substitute* "configure"
6514 (("\\|alpha" all)
6515 (string-append all "|arm|aarch64|powerpc64le")))
6516 (substitute* "examples/example.mak"
6517 (("scost.*\n$") "scost\n")
6518 (("bmp \\$\\(.*\n$") "bmp\n")
6519 (("/%.scc.*\n$") "/%.scc\n")
6520 (("voc \\$\\(.*\n$") "voc\n"))
6521 (substitute* "Makefile.target"
6522 (("distrib-data:.*\n") "distrib-data:\n")
6523 (("cp.*/bin" all)
6524 (string-append all " || true")))))))
6525 (build-system gnu-build-system)
6526 (arguments
6527 (substitute-keyword-arguments (package-arguments scummc)
6528 ((#:make-flags _)
6529 #~(list "SCC=scc"
6530 "SLD=sld"
6531 "COST=cost"
6532 "CHAR=char"
6533 "SOUN=soun"))
6534 ((#:phases phases)
6535 #~(modify-phases #$phases
6536 (replace 'build
6537 (lambda* (#:key make-flags #:allow-other-keys)
6538 (with-directory-excursion "examples/openquest"
6539 (apply invoke "make" "tentacle" make-flags))))
6540 (add-after 'install 'install-executable
6541 (lambda* (#:key inputs #:allow-other-keys)
6542 ;; Create standalone executable.
6543 (let* ((bash (search-input-file inputs "/bin/bash"))
6544 (share (string-append #$output "/examples/openquest"))
6545 (scummvm (search-input-file inputs "/bin/scummvm"))
6546 (bin (string-append #$output "/bin"))
6547 (executable (string-append bin "/openquest")))
6548 (mkdir-p bin)
6549 (with-output-to-file executable
6550 (lambda ()
6551 (format #t "#!~a~%" bash)
6552 (format #t
6553 "exec ~a --path=~a tentacle~%"
6554 scummvm share)))
6555 (chmod executable #o755))))
6556 (add-after 'install-executable 'install-desktop-file
6557 (lambda _
6558 ;; Create desktop file. There is no official icon,
6559 ;; but the main character of the game is a good choice.
6560 (let* ((apps (string-append #$output "/share/applications"))
6561 (share (string-append #$output "/examples/openquest")))
6562 (mkdir-p apps)
6563 (make-desktop-entry-file
6564 (string-append apps "/openquest.desktop")
6565 #:name "OpenQuest"
6566 #:generic-name "OpenQuest"
6567 #:exec (string-append #$output "/bin/openquest")
6568 #:icon (string-append share "/graphics/zob/frames/stand_S.bmp")
6569 #:categories '("AdventureGame" "Game" "RolePlaying")
6570 #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi")
6571 #:comment '((#f "Simple 2D point and click adventure game"))))))))))
6572 (inputs
6573 (list bash scummvm))
6574 (native-inputs
6575 (modify-inputs (package-native-inputs scummc)
6576 (prepend scummc)))
6577 (home-page "https://www.scummvm.org")
6578 (synopsis "Simple 2D point and click adventure game")
6579 (description "OpenQuest is a two room adventure game
6580that follows two aliens who come to Earth in search of a stolen artifact.")
6581 (license license:gpl2+)))
6582
6583(define-public openrct2
6584 (package
6585 (name "openrct2")
6586 (version "0.5.4")
6587 (source
6588 (origin
6589 (method git-fetch)
6590 (uri (git-reference
6591 (url "https://github.com/OpenRCT2/OpenRCT2")
6592 (commit (string-append "v" version))))
6593 (file-name (git-file-name name version))
6594 (sha256
6595 (base32 "1b26sgxyanc0s5y4rpzrmf228ns7ww0kzwzl2nj8fp1wyjnf8crp"))
6596 (modules '((guix build utils)))
6597 (snippet
6598 #~(begin
6599 (with-directory-excursion "src/thirdparty"
6600 (for-each delete-file-recursively
6601 '("quickjs-ng" "sfl")))
6602 (substitute* "src/openrct2/CMakeLists.txt"
6603 ;; use sys quickjs for scripting features
6604 (("if \\(ENABLE_SCRIPTING\\)") "if (false)")
6605 (("add_library\\(OpenRCT2[^\n]+" all)
6606 (string-join
6607 `(,all
6608 "find_library(QJS_L NAMES qjs REQUIRED)"
6609 "find_path(QJS_I NAMES quickjs.h REQUIRED)"
6610 "target_link_libraries(libopenrct2 ${QJS_L})"
6611 "target_include_directories(libopenrct2 SYSTEM PRIVATE ${QJS_I})")
6612 "\n")))))))
6613 (build-system cmake-build-system)
6614 (arguments
6615 (list
6616 #:configure-flags #~(list "-DDOWNLOAD_OBJECTS=OFF"
6617 "-DDOWNLOAD_TITLE_SEQUENCES=OFF"
6618 "-DDOWNLOAD_OPENSFX=OFF"
6619 "-DDOWNLOAD_OPENMUSIC=OFF"
6620 "-DDISABLE_DISCORD_RPC=ON"
6621 "-DDISABLE_VERSION_CHECKER=ON")
6622 ;; many issues such as https://github.com/OpenRCT2/OpenRCT2/issues/12719
6623 #:tests? #f
6624 #:phases
6625 #~(modify-phases %standard-phases
6626 (add-after 'unpack 'fix-usr-share-paths&add-data
6627 ;; TODO: OpenRCT2 can optionally use free music and sounds!
6628 ;; https://github.com/OpenRCT2/OpenMusic
6629 ;; https://github.com/OpenRCT2/OpenSoundEffects
6630 ;; ideally we package these instead of the ones the user is supposed
6631 ;; to supply.
6632 (lambda* (#:key inputs #:allow-other-keys)
6633 (let ((titles (assoc-ref inputs "openrct2-title-sequences"))
6634 (objects (assoc-ref inputs "openrct2-objects"))
6635 (sfl (assoc-ref inputs "sfl-library")))
6636 ;; Fix some references to /usr/share.
6637 (substitute* "src/openrct2/platform/Platform.Linux.cpp"
6638 (("/usr/share")
6639 (string-append #$output "/share")))
6640 (copy-recursively
6641 (string-append titles "/share/openrct2/title-sequences")
6642 "data/title")
6643 (copy-recursively
6644 (string-append objects "/share/openrct2/objects")
6645 "data/object")
6646 (copy-recursively
6647 (string-append sfl "/include")
6648 "src/thirdparty"))))
6649 (add-before 'configure 'get-rid-of-errors
6650 (lambda _
6651 ;; Don't treat warnings as errors.
6652 (substitute* "CMakeLists.txt"
6653 (("-Werror") "")))))))
6654 (inputs
6655 (list curl
6656 flac
6657 fontconfig
6658 freetype
6659 icu4c
6660 jansson
6661 libpng
6662 libvorbis
6663 libzip
6664 mesa
6665 nlohmann-json-no-char8-t
6666 openrct2-objects
6667 openrct2-title-sequences
6668 openssl
6669 quickjs-ng
6670 sdl2
6671 sfl-library
6672 speexdsp
6673 zlib
6674 (list zstd "lib")))
6675 (native-inputs (list pkg-config))
6676 (home-page "https://openrct2.io")
6677 (synopsis "Free software re-implementation of RollerCoaster Tycoon 2")
6678 (description "OpenRCT2 is a free software re-implementation of
6679RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and
6680maintaining an amusement park containing attractions, shops and facilities.
6681
6682Note that this package does @emph{not} provide the game assets (sounds,
6683images, etc.)")
6684 ;; See bottom of:
6685 ;; https://github.com/OpenRCT2/OpenRCT2/blob/develop/distribution/readme.txt
6686 (license license:gpl3+)))
6687
6688(define-public openriichi
6689 (package
6690 (name "openriichi")
6691 (version "0.2.1.1")
6692 (source (origin
6693 (method git-fetch)
6694 (uri (git-reference
6695 (url "https://github.com/FluffyStuff/OpenRiichi")
6696 (commit (string-append "v" version))
6697 (recursive? #t)))
6698 (file-name (git-file-name name version))
6699 (sha256
6700 (base32
6701 "1x6m4mli92chns5dky9aq9w4r4pnycvlpa2q0giydapm5q9fkslf"))))
6702 (build-system meson-build-system)
6703 (arguments
6704 (list #:configure-flags #~'("--buildtype=release"
6705 "-Dc_args=-g -O2 -Wno-int-conversion")
6706 #:glib-or-gtk? #t))
6707 (inputs (list glew
6708 gtk+
6709 libgee
6710 sdl2
6711 sdl2-image
6712 sdl2-mixer))
6713 (native-inputs (list pkg-config vala))
6714 (home-page "https://github.com/FluffyStuff/OpenRiichi")
6715 (synopsis "Japanese Mahjong client")
6716 (description
6717 "OpenRiichi is a client for playing Japanese Mahjong, and it supports
6718singleplayer and multiplayer, with or without bots. It features all the
6719standard riichi rules, as well as some optional ones. It also supports game
6720logging, so games can be viewed again.")
6721 (license license:gpl3)))
6722
6723(define-public pinball
6724 (package
6725 (name "pinball")
6726 (version "0.3.20230219")
6727 (source
6728 (origin (method git-fetch)
6729 (uri (git-reference
6730 (url "https://github.com/adoptware/pinball")
6731 (commit version)))
6732 (file-name (git-file-name name version))
6733 (sha256
6734 (base32
6735 "02by4df9hgda5zhl9p3rwg0s4mlxdr0v8f8dk152vjp43p1wqvfp"))
6736 (patches (search-patches "pinball-system-ltdl.patch"))))
6737 (build-system gnu-build-system)
6738 (native-inputs
6739 (list autoconf automake pkg-config libtool))
6740 (inputs
6741 (list glu
6742 libltdl
6743 mesa
6744 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
6745 (arguments
6746 (list
6747 #:configure-flags
6748 ;; Configure tries to use pkg-config, but falls short, so:
6749 #~(list (string-append "CPPFLAGS=-I"
6750 #$(this-package-input "sdl-union")
6751 "/include/SDL2"))
6752 #:phases
6753 #~(modify-phases %standard-phases
6754 (replace 'bootstrap
6755 ;; The `bootstrap` script tries to call a script with
6756 ;; `/usr/bin/make` in the shebang, but ultimately does the same as
6757 ;; autoreconf would do, so just use that.
6758 (lambda _
6759 (symlink "README.md" "README")
6760 (invoke "autoreconf" "-vif"))))))
6761 (home-page "https://pinball.sourceforge.net")
6762 (synopsis "Pinball machine simulator")
6763 (description "The Emilia Pinball Project is a pinball simulator. There
6764are only two levels to play with, but they are very addictive.")
6765 (license license:gpl2)))
6766
6767(define-public trackballs
6768 (package
6769 (name "trackballs")
6770 (version "1.3.4")
6771 (source
6772 (origin
6773 (method git-fetch)
6774 (uri (git-reference
6775 (url "https://github.com/trackballs/trackballs")
6776 (commit (string-append "v" version))))
6777 (file-name (git-file-name name version))
6778 (sha256
6779 (base32 "1vr35i5y93n155m20mvsri42r8k3hphpc8fmrv8wmfv6xqss5914"))))
6780 (build-system cmake-build-system)
6781 (native-inputs (list pkg-config
6782 gettext-minimal))
6783 (inputs (list guile-2.2
6784 mesa
6785 sdl2
6786 sdl2-image
6787 sdl2-mixer
6788 sdl2-ttf
6789 zlib))
6790 (arguments (list #:tests? #f)) ;No test suite.
6791 (home-page "https://trackballs.github.io/")
6792 (synopsis "Marble-rolling puzzle/skill game")
6793 (description
6794 "Trackballs is a simple game similar to the classic Amiga game @cite{Marble
6795Madness}. By steering a marble ball through a labyrinth filled with vicious
6796hammers, pools of acid and other obstacles the player collects points. When the
6797ball reaches the destination it continues at the next, more difficult level -
6798unless the time runs out.")
6799 (license license:gpl2+)))
6800
6801(define-public pioneers
6802 (package
6803 (name "pioneers")
6804 (version "15.6")
6805 (source (origin
6806 (method url-fetch)
6807 (uri (string-append "https://downloads.sourceforge.net/pio/"
6808 "pioneers-" version ".tar.gz"))
6809 (sha256
6810 (base32
6811 "07b3xdd81n8ybsb4fzc5lx0813y9crzp1hj69khncf4faj48sdcs"))))
6812 (build-system gnu-build-system)
6813 (arguments
6814 `(#:phases
6815 (modify-phases %standard-phases
6816 ;; Fixes https://issues.guix.gnu.org/47131.
6817 (add-after 'unpack 'patch-beep-path
6818 (lambda* (#:key inputs #:allow-other-keys)
6819 (substitute* "client/gtk/audio.c"
6820 (("\"beep\"")
6821 (string-append "\"" (assoc-ref inputs "beep") "/bin/beep\"")))
6822 #t)))))
6823 (inputs (list avahi beep gtk+ (librsvg-for-system)))
6824 (native-inputs (list intltool itstool libxml2 pkg-config))
6825 (synopsis "Board game inspired by The Settlers of Catan")
6826 (description "Pioneers is an emulation of the board game The Settlers of
6827Catan. It can be played on a local network, on the internet, and with AI
6828players.")
6829 (home-page "https://pio.sourceforge.net/")
6830 (license license:gpl2+)))
6831
6832(define-public einstein
6833 (package
6834 (name "einstein")
6835 (version "2.0")
6836 (source (origin
6837 (method url-fetch)
6838 (uri (string-append "mirror://debian/pool/main/e/"
6839 "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
6840 (sha256
6841 (base32
6842 "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
6843 (patches (search-patches "einstein-build.patch"))))
6844 (build-system gnu-build-system)
6845 (inputs
6846 `(("freetype" ,freetype)
6847 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf)))
6848 ("zlib" ,zlib)))
6849 (native-inputs
6850 (list font-dejavu))
6851 (arguments
6852 `(#:tests? #f ; no check target
6853 #:phases
6854 (modify-phases %standard-phases
6855 (replace 'configure
6856 (lambda* (#:key outputs inputs #:allow-other-keys)
6857 (let ((out (assoc-ref outputs "out"))
6858 (dejavu (search-input-file
6859 inputs "/share/fonts/truetype/DejaVuSans.ttf")))
6860 (substitute* "Makefile"
6861 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
6862 ;; The patch above registers a free font for use by the binary,
6863 ;; but the font is copied during the compile phase into a
6864 ;; resources file, so we need to make the ttf file available.
6865 (symlink dejavu "res/DejaVuSans.ttf")
6866 #t))))))
6867 (synopsis "Logic puzzle game")
6868 (description "The goal of this logic game is to open all cards in a 6x6
6869grid, using a number of hints as to their relative position. The game idea
6870is attributed to Albert Einstein.")
6871 ;; The original home page has disappeared.
6872 (home-page (string-append "http://web.archive.org/web/20120521062745/"
6873 "http://games.flowix.com/en/index.html"))
6874 ;; License according to
6875 ;; http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
6876 ;; The source code is a DFSG-sanitized tarball and does not contain any
6877 ;; license information.
6878 (license license:gpl3+)))
6879
6880(define-public powwow
6881 (package
6882 (name "powwow")
6883 (version "1.2.23")
6884 (source (origin
6885 (method url-fetch)
6886 (uri (string-append
6887 "https://www.hoopajoo.net/static/projects/powwow-"
6888 version ".tar.gz"))
6889 (sha256
6890 (base32
6891 "1wkl6j91pp40aps2hhnsv0bndgq49smfffws4hqcn7847bpnwwm6"))))
6892 (inputs
6893 (list ncurses))
6894 (build-system gnu-build-system)
6895 (home-page "https://www.hoopajoo.net/projects/powwow.html")
6896 (synopsis "MUD and telnet client")
6897 (description
6898 "POWWOW is a client software which can be used for telnet as well as for
6899@dfn{Multi-User Dungeon} (MUD). Additionally it can serve as a nice client for
6900the chat server psyced with the specific config located at
6901http://lavachat.symlynx.com/unix/")
6902 (license license:gpl2+)))
6903
6904(define-public red-eclipse
6905 (let ((release "2.0.0")
6906 (revision 0))
6907 (package
6908 (name "red-eclipse")
6909 (version (if (zero? revision)
6910 release
6911 (string-append release "-"
6912 (number->string revision))))
6913 (source
6914 (origin
6915 (method git-fetch)
6916 (uri (git-reference
6917 (url "https://github.com/redeclipse/base")
6918 (commit (string-append "v" release))
6919 (recursive? #t))) ; for game data
6920 (file-name (git-file-name name version))
6921 (sha256
6922 (base32 "0sz0mqhwx8r9n4mk3qrxw420nlsm3y0n48gd0lazgd64lfqjh3ab"))
6923 (modules '((guix build utils)))
6924 (snippet
6925 ;; Remove proprietary libraries and other pre-compiled binaries.
6926 '(begin
6927 (delete-file-recursively "bin")
6928 #t))))
6929 (build-system gnu-build-system)
6930 (arguments
6931 `(#:tests? #f ; no check target
6932 #:make-flags (list "CC=gcc" "-Csrc"
6933 (string-append "INSTDIR="
6934 (assoc-ref %outputs "out") "/bin")
6935 (string-append "prefix="
6936 (assoc-ref %outputs "out")))
6937 #:phases
6938 (modify-phases %standard-phases
6939 (add-after 'unpack 'add-store-data-package-path-as-default
6940 (lambda* (#:key outputs #:allow-other-keys)
6941 (substitute* "src/engine/server.cpp"
6942 (("data = \"data\"")
6943 (string-append "data = \""
6944 (assoc-ref outputs "out")
6945 "/share/redeclipse/data\"")))))
6946 (delete 'configure) ; no configure script
6947 (add-after 'set-paths 'set-sdl-paths
6948 (lambda* (#:key inputs #:allow-other-keys)
6949 (setenv "CPATH"
6950 (string-append
6951 (search-input-directory inputs "/include/SDL2")
6952 ":" (or (getenv "CPATH") "")))))
6953 (add-after 'install 'copy-data
6954 (lambda* (#:key outputs #:allow-other-keys)
6955 (let ((out (assoc-ref outputs "out")))
6956 (copy-recursively "config"
6957 (string-append out "/config"))
6958 (copy-file "doc/examples/servinit.cfg"
6959 (string-append out "/config/servinit.cfg"))
6960 (copy-recursively "data"
6961 (string-append out "/share/redeclipse/data"))
6962 (mkdir-p (string-append out "/lib/redeclipse"))
6963 (symlink (string-append out "/share/redeclipse/data")
6964 (string-append out "/lib/redeclipse/data")))))
6965 (add-after 'copy-data 'wrap-program
6966 (lambda* (#:key inputs outputs #:allow-other-keys)
6967 (let* ((out (assoc-ref outputs "out"))
6968 (bin (string-append out "/bin")))
6969 (with-directory-excursion bin
6970 (rename-file "redeclipse_linux"
6971 ".redeclipse_linux-real")
6972 (rename-file "redeclipse_server_linux"
6973 ".redeclipse_server_linux-real")
6974 (call-with-output-file "redeclipse_linux"
6975 (lambda (port)
6976 (format port "#!~a/bin/sh
6977# Run the thing from its home, otherwise it just bails out.
6978cd \"~a\"
6979exec -a \"$0\" ~a/.redeclipse_linux-real~%"
6980 (assoc-ref inputs "bash") ;implicit input
6981 (string-append out)
6982 (string-append bin))))
6983 (call-with-output-file "redeclipse_server_linux"
6984 (lambda (port)
6985 (format port "#!~a/bin/sh
6986# Run the thing from its home, otherwise it just bails out.
6987cd \"~a\"
6988exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
6989 (assoc-ref inputs "bash") ;implicit input
6990 (string-append out)
6991 (string-append bin))))
6992 (chmod "redeclipse_linux" #o555)
6993 (chmod "redeclipse_server_linux" #o555))))))))
6994 (native-inputs
6995 (list pkg-config))
6996 (inputs
6997 (list bash-minimal curl freetype glu
6998 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
6999 (home-page "https://redeclipse.net/")
7000 (synopsis "Arena shooter derived from the Cube 2 engine")
7001 (description
7002 "Red Eclipse is an arena shooter, created from the Cube2 engine.
7003Offering an innovative parkour system and distinct but all potent weapons,
7004Red Eclipse provides fast paced and accessible gameplay.")
7005 ;; The engine is under Zlib; data files are covered by the other
7006 ;; licenses. More details at file:///doc/all-licenses.txt.
7007 (license (list license:expat
7008 license:zlib
7009 license:cc-by-sa4.0
7010 license:cc-by-sa3.0
7011 license:cc-by3.0
7012 license:cc0
7013 license:public-domain
7014 license:silofl1.1)))))
7015
7016(define-public grue-hunter
7017 (package
7018 (name "grue-hunter")
7019 (version "1.0")
7020 (source (origin
7021 (method url-fetch)
7022 (uri (string-append "https://jxself.org/grue-hunter.tar.gz"))
7023 (sha256
7024 (base32
7025 "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
7026 (build-system trivial-build-system) ; no Makefile.PL
7027 (arguments `(#:modules ((guix build utils))
7028 #:builder
7029 (begin
7030 (use-modules (guix build utils))
7031 (use-modules (srfi srfi-1))
7032
7033 (let* ((tarball (assoc-ref %build-inputs "tarball"))
7034 (perl (string-append (assoc-ref %build-inputs
7035 "perl")
7036 "/bin"))
7037 (gzip (string-append (assoc-ref %build-inputs
7038 "gzip")
7039 "/bin/gzip"))
7040 (tar (string-append (assoc-ref %build-inputs
7041 "tar")
7042 "/bin/tar"))
7043 (out (assoc-ref %outputs "out"))
7044 (bin (string-append out "/bin"))
7045 (doc (string-append out
7046 "/share/doc/grue-hunter")))
7047 (copy-file tarball "grue-hunter.tar.gz")
7048 (invoke gzip "-d" "grue-hunter.tar.gz")
7049 (invoke tar "xvf" "grue-hunter.tar")
7050
7051 (mkdir-p bin)
7052 (copy-file "grue-hunter/gh.pl"
7053 (string-append bin "/grue-hunter"))
7054 (patch-shebang (string-append bin "/grue-hunter")
7055 (list perl))
7056
7057 (install-file "grue-hunter/AGPLv3.txt" doc)
7058
7059 #t))))
7060 (inputs `(("perl" ,perl)
7061 ("tar" ,tar)
7062 ("gzip" ,gzip)
7063 ("tarball" ,source)))
7064 (home-page "https://jxself.org/grue-hunter.shtml")
7065 (synopsis "Text adventure game")
7066 (description
7067 "Grue Hunter is a text adventure game written in Perl. You must make
7068your way through an underground cave system in search of the Grue. Can you
7069capture it and get out alive?")
7070 (license license:agpl3+)))
7071
7072(define-public lierolibre
7073 (package
7074 (name "lierolibre")
7075 (version "0.5")
7076 (source (origin
7077 (method url-fetch)
7078 (uri (string-append "https://launchpad.net/lierolibre/trunk/"
7079 version "/+download/lierolibre-"
7080 version ".tar.xz"))
7081 (sha256
7082 (base32
7083 "1cf1gvsn4qq190lrf9k5bpjnqwlcfw7pajvdnh7z5r4jqw0rsbl9"))
7084 (patches
7085 (search-patches "lierolibre-check-unaligned-access.patch"
7086 "lierolibre-try-building-other-arch.patch"
7087 "lierolibre-remove-arch-warning.patch"
7088 "lierolibre-newer-libconfig.patch"
7089 "lierolibre-is-free-software.patch"))
7090 (modules '((guix build utils)))
7091 (snippet
7092 '(begin
7093 ;; Delete pre-compiled files.
7094 (delete-file "data/LIERO.CHR")
7095 (delete-file "data/LIERO.SND")
7096 #t))))
7097 (build-system gnu-build-system)
7098 (native-inputs
7099 (list imagemagick pkg-config util-linux sox))
7100 (inputs
7101 (list boost libconfig
7102 (sdl-union (list sdl sdl-image sdl-mixer)) zlib))
7103 (home-page "https://gitlab.com/lierolibre/lierolibre")
7104 (synopsis "Old-school earthworm action game")
7105 (description
7106 "lierolibre is an earthworm action game where you fight another player
7107(or the computer) underground using a wide array of weapons.
7108
7109Features:
7110@itemize
7111@item 2 worms, 40 weapons, great playability, two game modes: Kill'em All
7112and Game of Tag, plus AI-players without true intelligence!
7113@item Dat nostalgia.
7114@item Extensions via a hidden F1 menu:
7115@itemize
7116@item Replays
7117@item Game controller support
7118@item Powerlevel palettes
7119@end itemize
7120@item Ability to write game variables to plain text files.
7121@item Ability to load game variables from both EXE and plain text files.
7122@item Scripts to extract and repack graphics, sounds and levels.
7123@end itemize
7124
7125To switch between different window sizes, use F6, F7 and F8, to switch to
7126fullscreen, use F5 or Alt+Enter.")
7127 ;; Code mainly BSD-2, some parts under Boost 1.0. All assets are WTFPL2.
7128 (license (list license:bsd-2 license:boost1.0 license:wtfpl2))))
7129
7130(define-public tennix
7131 (package
7132 (name "tennix")
7133 (version "1.3.4")
7134 (source (origin
7135 (method git-fetch)
7136 (uri (git-reference
7137 (url "https://repo.or.cz/tennix.git")
7138 (commit (string-append "tennix-" version))))
7139 (file-name (git-file-name name version))
7140 (sha256
7141 (base32
7142 "1fmg0vw8c2spyxy4k64nwky80jsw9mc3vnlch49q6cagjsg9y8dj"))
7143 ;; Remove non-free images.
7144 (modules '((guix build utils)))
7145 (snippet '(begin
7146 (for-each delete-file
7147 '("data/loc_training_camp.png"
7148 "data/loc_austrian_open.png"
7149 "data/loc_olympic_green_tennis.png")) #t))))
7150 (build-system gnu-build-system)
7151 (arguments
7152 (list
7153 #:tests? #f ;no tests
7154 #:phases #~(modify-phases %standard-phases
7155 (add-after 'unpack 'locate-install
7156 ;; Build process cannot expand "$(INSTALL)" in Makefile.
7157 (lambda _
7158 (substitute* "makefile"
7159 (("^CONFIGURE_OUTPUT :=.*" all)
7160 (string-append "INSTALL := install -c\n" all))) #t))
7161 (replace 'configure
7162 ;; The "configure" script is picky about the arguments it
7163 ;; gets. Call it ourselves.
7164 (lambda _
7165 (invoke "./configure" "--prefix"
7166 (assoc-ref %outputs "out")))))))
7167 (native-inputs (list which))
7168 (inputs (list python
7169 (sdl-union (list sdl2
7170 sdl2-image
7171 sdl2-mixer
7172 sdl2-ttf
7173 sdl2-net
7174 sdl2-gfx))))
7175 (home-page "https://icculus.org/tennix/")
7176 (synopsis "Play tennis against the computer or a friend")
7177 (description
7178 "Tennix is a 2D tennis game. You can play against the
7179computer or against another player using the keyboard. The game runs
7180in-window at 640x480 resolution or fullscreen.")
7181 ;; Project is licensed under GPL2+ terms. It includes images
7182 ;; released under Public Domain terms.
7183 (license (list license:gpl2+ license:public-domain))))
7184
7185;; Keep in sync with warzone2100.
7186(define-public launchinfo
7187 ;; No releases, use latest commit.
7188 (let ((commit "cfdd12564ab6cc30dc70a28571f6e8adfb5caeed")
7189 (revision "0"))
7190 (package
7191 (name "launchinfo")
7192 ;; See include/LaunchInfo.h for version.
7193 (version (git-version "1.0" revision commit))
7194 (source
7195 (origin
7196 (method git-fetch)
7197 (uri (git-reference
7198 (url "https://github.com/past-due/launchinfo")
7199 (commit commit)))
7200 (file-name (git-file-name name version))
7201 (sha256
7202 (base32
7203 "0i7xmf6jgs7rrgjjwh3kdzaqq0249xqmncaprjrf77dxhrm53wsx"))))
7204 (build-system cmake-build-system)
7205 (arguments
7206 (list
7207 #:tests? #f ;no tests
7208 #:phases
7209 #~(modify-phases %standard-phases
7210 (add-after 'unpack 'do-shared
7211 (lambda _
7212 (substitute* "CMakeLists.txt"
7213 (("(launchinfo )STATIC" _ f) (string-append f "SHARED")))))
7214 (replace 'install ;no install instructions
7215 (lambda _
7216 (let ((lib (in-vicinity #$output "lib"))
7217 (inc (in-vicinity #$output "include")))
7218 (install-file "liblaunchinfo.so" lib)
7219 (install-file "../source/include/LaunchInfo.h" inc)))))))
7220 (home-page "https://wz2100.net")
7221 (synopsis "Helper library for warzone2100")
7222 ;; No form of documentation. :(
7223 (description "This package provides the @code{LaunchInfo} class for
7224use in the video game warzone2100.")
7225 (license license:expat)))) ;launchinfo, whereami
7226
7227;; Keep in sync with warzone2100.
7228(define-public warzone2100-texpages
7229 ;; Commit pinned by warzone2100 v4.7.0; latest release is 7 years old.
7230 (let ((commit "009ec2f652a6230d8315cc3db4eadb5690f18fbd")
7231 (revision "0"))
7232 (package
7233 (name "warzone2100-texpages")
7234 (version (git-version "3.3.0" revision commit))
7235 (source
7236 (origin
7237 (method git-fetch)
7238 (uri (git-reference
7239 (url "https://github.com/Warzone2100/data-texpages")
7240 (commit commit)))
7241 (file-name (git-file-name name version))
7242 (sha256
7243 (base32
7244 "0n1cdsvjzy6y6dnxxy9hm18z5qddnhhp6jd4xz32zms5qj1asapw"))))
7245 (build-system copy-build-system)
7246 (arguments
7247 (list #:install-plan #~'(("." "/share/data/base/texpages"))))
7248 (home-page "https://wz2100.net")
7249 (synopsis "Texpages data for Warzone2100")
7250 (description "warzone2100-texpages is a set of textures to be used with
7251warzone2100.")
7252 (properties '((hidden? . #t)))
7253 (license (list
7254 ;; bdrops/backdrop[012].png
7255 ;; page-6-features-rockies.png
7256 ;; page-17-droid-weapons.png
7257 license:cc-by-sa3.0
7258 ;; bdrops/backdrop4.png
7259 ;; bdrops/backdrop6.png
7260 ;; page-25-sky-urban.png
7261 license:cc0
7262 ;; everything else
7263 license:gpl2+)))))
7264
7265;; Keep in sync with warzone2100.
7266(define-public warzone2100-terrain-classic
7267 (origin
7268 (method git-fetch)
7269 (uri (git-reference
7270 (url "https://github.com/Warzone2100/data-terrain-classic")
7271 ;; Matches warzone2100 v4.7.0
7272 (commit "d26c3d0e0242721e24fe34fea2e61880c5805684")))
7273 (file-name "warzone2100-terrain-classic")
7274 (sha256
7275 (base32
7276 "0jjyy9rbkla7rdjl62r5pf2b565rk1054wf2qinlw72bgr12lb2j"))))
7277
7278;; Keep in sync with warzone2100.
7279(define-public warzone2100-terrain-high
7280 (package
7281 (name "warzone2100-terrain-high")
7282 (version "3")
7283 (source
7284 (origin
7285 (method git-fetch)
7286 (uri (git-reference
7287 (url "https://github.com/Warzone2100/data-terrain-high")
7288 (commit (string-append "v" version))))
7289 (file-name (git-file-name name version))
7290 (sha256
7291 (base32
7292 "1raw6cdpv84zs7p7ngjvnbrnk1kprs2ndsqf7xnvy3rcw6j44xck"))))
7293 (build-system copy-build-system)
7294 (arguments
7295 (list #:install-plan #~'(("." "/share/data/terrain_overrides/high"))))
7296 (home-page "https://wz2100.net")
7297 (synopsis "High quality tile textures for Warzone2100")
7298 (description "warzone2100-terrain-high contains tile textures for
7299warzone2100's high quality mode.")
7300 (properties '((hidden? . #t)))
7301 (license (list license:cc-by-sa3.0 ;either
7302 license:gpl2+))))
7303
7304;; Keep in sync with warzone2100.
7305(define-public warzone2100-data-music-opus
7306 (origin
7307 (method git-fetch)
7308 (uri (git-reference
7309 (url "https://github.com/Warzone2100/data-music-opus")
7310 ;; Matches warzone2100 v4.7.0.
7311 (commit "db73d2b2e58dfaa8a09ab27ad771cc636be31118")))
7312 (file-name "warzone2100-data-music-opus")
7313 (sha256
7314 (base32
7315 "1liyhzasgbpjdy8w3m9906clm6kvq7x3dz45cg7ibjwq6xaqn4v1"))))
7316
7317;; Keep in sync with warzone2100.
7318(define-public warzone2100-reclamation
7319 ;; 1.3.1. is old and does not show up in Warzone's in-game menu.
7320 ;; Newest commit appears compatible.
7321 (let ((commit "1b67c44e31bca191d6220b9356a500745086f1d0")
7322 (revision "0"))
7323 (package
7324 (name "warzone2100-reclamation")
7325 (version (git-version "1.3.1" revision commit))
7326 (source
7327 (origin
7328 (method git-fetch)
7329 (uri (git-reference
7330 (url "https://github.com/Warzone2100/reclamation")
7331 (commit commit)))
7332 (file-name (git-file-name name version))
7333 (sha256
7334 (base32
7335 "11kg7p6qprfxcdnl7v7rxkkqg30pxnpa484fs9m7lym1jabk4qw3"))))
7336 (build-system copy-build-system)
7337 (arguments
7338 (list
7339 #:install-plan
7340 #~'(("reclamation.wz" "/share/warzone2100/mods/campaign/"))
7341 #:phases
7342 #~(modify-phases %standard-phases
7343 (add-before 'install 'build
7344 (lambda _
7345 (invoke "zip" "-r" "-9" "reclamation.wz" "."))))))
7346 (native-inputs (list zip))
7347 (home-page "https://github.com/Warzone2100/reclamation")
7348 (synopsis "Custom game campaign for Warzone2100")
7349 (description "warzone2100-reclamation is a modification for Warzone2100
7350featuring an original story taking place before the events of the main game.
7351Set out under the command of renowned General Edmund Clayde with the goal of
7352laying the foundations of a new world.")
7353 (properties '((hidden? . #t))) ;game assets only
7354 (license (list license:gpl2+
7355 license:cc-by-sa3.0))))) ;mod-banner.png
7356
7357;; Keep in sync with warzone2100.
7358(define-public warzone2100-fractured-kingdom
7359 ;; Commit pinned by warzone2100, radically different versions are
7360 ;; wont to break.
7361 (let ((commit "a27fe970a6f52e7b6a6d6264cf32ecec163799ec")
7362 (revision "0"))
7363 (package
7364 (name "warzone2100-fractured-kingdom")
7365 (version (git-version "1.3.0" revision commit))
7366 (source
7367 (origin
7368 (method git-fetch)
7369 (uri (git-reference
7370 (url "https://github.com/Warzone2100/fractured-kingdom")
7371 (commit commit)))
7372 (file-name (git-file-name name version))
7373 (sha256
7374 (base32
7375 "1px3k54z2h3svhswr6x8asyq62aixj633ifw3jnhmf1zwcfrs2vx"))))
7376 (build-system copy-build-system)
7377 (arguments
7378 (list
7379 #:install-plan
7380 #~'(("fractured_kingdom.wz"
7381 "/share/warzone2100/mods/campaign/"))
7382 #:phases
7383 #~(modify-phases %standard-phases
7384 (add-before 'install 'build
7385 (lambda _
7386 (invoke "zip" "-r" "-9" "fractured_kingdom.wz" "."))))))
7387 (native-inputs (list zip))
7388 (home-page "https://github.com/Warzone2100/fractured-kingdom")
7389 (synopsis "Custom game campaign for Warzone2100")
7390 (description "warzone2100-fractured-kingdom is a modification for
7391Warzone2100 featuring an original story. After crash-landing in the territory
7392of a once powerful kingdom, you must navigate your way through various factions
7393fighting over what remains.")
7394 (properties '((hidden? . #t))) ;game assets only
7395 (license license:gpl2+))))
7396
7397(define-public warzone2100
7398 (package
7399 (name "warzone2100")
7400 ;; Always keep in sync with warzone2100-* family
7401 ;; of packages and launchinfo.
7402 (version "4.7.0")
7403 (source
7404 (origin
7405 (method git-fetch)
7406 (uri (git-reference
7407 (url "https://github.com/Warzone2100/warzone2100")
7408 (commit version)))
7409 (file-name (git-file-name name version))
7410 (modules '((guix build utils)))
7411 (snippet
7412 #~(substitute* (list "src/stdinreader.cpp"
7413 "lib/netplay/netreplay.cpp")
7414 ;; Trivially unbundles readerwriterqueue.
7415 (("3rdparty/(readerwriterqueue)" _ f) f)))
7416 (patches (search-patches "warzone2100-unbundle-basis-universal.patch"
7417 "warzone2100-unbundle-embedded-json-signature.patch"
7418 "warzone2100-unbundle-libs.patch"
7419 "warzone2100-unbundle-inih.patch"
7420 "warzone2100-unbundle-launchinfo.patch"
7421 "warzone2100-unbundle-quickjs-wz.patch"
7422 "warzone2100-unbundle-sqlitecpp.patch"
7423 "warzone2100-unbundle-utfcpp.patch"
7424 ;; Makes autorevision work with configure flags.
7425 "warzone2100-pass-vcs-configure-flags-to-autorevision.patch"))
7426 (sha256
7427 (base32
7428 "04vdqfmxav0cls3jn5jjpjq514r27kj5pc63pwlsszx00wfz9a4r"))))
7429 (build-system cmake-build-system)
7430 (arguments
7431 (list
7432 ;; TODO: Tests seem to be broken, configure.ac is missing.
7433 #:tests? #f
7434 #:configure-flags
7435 #~(list "-GNinja"
7436 "-DWZ_DISTRIBUTOR=GNU Guix"
7437 "-DWZ_DOWNLOAD_PREBUILT_PACKAGES=off"
7438 "-DWZ_INCLUDE_VIDEOS=off"
7439 "-DWZ_FORCE_MINIMAL_OPUSFILE=off"
7440 "-DENABLE_GNS_NETWORK_BACKEND=off"
7441 "-DWZ_USE_SYSTEM_LIBJPEG_TURBO=on"
7442 ;; Do not automatically install
7443 ;; additional campaigns.
7444 "-DWZ_BUILTIN_MODS_RECLAMATION=off"
7445 "-DWZ_BUILTIN_MODS_FRACTUREDKINGDOM=off"
7446 ;; otherwise, installs a debug
7447 ;; ELF which fails validate-runpath
7448 "-DWZ_SKIP_ELF_SEPARATE_DEBUG=on"
7449 ;; XXX: Autorevision stuff. Passes to the same autorevision
7450 ;; in phase 'make-autorevision-cache'. If another is desperately
7451 ;; needed to to be defined later, we'll probably know.
7452 "-DVCS_WC_MODIFIED=0"
7453 "-DVCS_MOST_RECENT_COMMIT_DATE=1970-01-01"
7454 (format #f "-DVCS_FULL_HASH=~a" (make-string 40 #\a))
7455 (format #f "-DVCS_SHORT_HASH=~a" (make-string 6 #\a))
7456 (format #f "-DVCS_TAG=~a" #$version)
7457 (format #f "-DVCS_EXTRA=~a" #$version)
7458 (format #f "-DVCS_MOST_RECENT_TAGGED_VERSION=~a" #$version))
7459 #:phases
7460 #~(modify-phases %standard-phases
7461 (add-after 'unpack 'unbundle-fonts
7462 (lambda* (#:key inputs #:allow-other-keys)
7463 (define (find-truetype file)
7464 (search-input-file inputs
7465 (in-vicinity "share/fonts/truetype" file)))
7466 (substitute* "data/CMakeLists.txt"
7467 (("add_subdirectory\\(fonts[^\\)]+")
7468 (string-join (list "set(wz2100_fonts_FILES"
7469 (find-truetype "DejaVuSans.ttf")
7470 (find-truetype "DejaVuSans-Bold.ttf")
7471 (find-truetype "NotoSansCJK-VF.otf.ttc"))
7472 " ")))))
7473 (add-after 'unpack 'copy-static-data
7474 (lambda* (#:key inputs #:allow-other-keys)
7475 (let ((music #$(this-package-input
7476 "warzone2100-data-music-opus"))
7477 (classic #$(this-package-input
7478 "warzone2100-terrain-classic"))
7479 (texpages (search-input-directory
7480 inputs "/share/data/base/texpages"))
7481 (high (search-input-directory
7482 inputs "/share/data/terrain_overrides/high")))
7483 (with-directory-excursion "data"
7484 (copy-recursively texpages "base/texpages")
7485 (copy-recursively music "music")
7486 (with-directory-excursion "terrain_overrides"
7487 (copy-recursively classic "classic")
7488 (copy-recursively high "high"))))))
7489 (add-before 'build 'make-autorevision-cache
7490 (lambda _
7491 ;; An autorevision script outputs a header file defining
7492 ;; preprocessor variables originating from either git metadata or
7493 ;; cmake variables present in this cache file. Missing cache file
7494 ;; and no git is an error, so we'll avoid that state.
7495 (call-with-output-file "../source/build_tools/autorevision.cache"
7496 (const #t))))
7497 (add-after 'install 'install-campaigns
7498 (lambda* (#:key inputs #:allow-other-keys)
7499 (let ((outdir "/share/warzone2100/mods/campaign"))
7500 (for-each
7501 (lambda (campaign-name)
7502 (install-file (search-input-file
7503 inputs (in-vicinity outdir campaign-name))
7504 (string-append #$output outdir)))
7505 '("reclamation.wz" "fractured_kingdom.wz"))))))))
7506 (native-inputs
7507 (list basis-universal
7508 date
7509 gettext-minimal
7510 glm
7511 ninja
7512 p7zip
7513 pkg-config
7514 readerwriterqueue
7515 ruby-asciidoctor/minimal
7516 shaderc))
7517 (inputs
7518 (list basis-universal
7519 curl
7520 fmt
7521 embedded-json-signature
7522 font-dejavu
7523 font-google-noto-sans-cjk
7524 freetype
7525 fribidi
7526 gnutls
7527 harfbuzz
7528 launchinfo
7529 libexpected
7530 libinih
7531 libjpeg-turbo
7532 libogg
7533 libplum
7534 libpng
7535 libsodium
7536 libtheora
7537 libvorbis
7538 libzip
7539 miniupnpc
7540 openal
7541 opus
7542 opusfile
7543 physfs
7544 quickjs-wz
7545 re2
7546 sdl3
7547 sqlite
7548 sqlitecpp
7549 utf8proc
7550 utfcpp
7551 vulkan-headers
7552 warzone2100-data-music-opus
7553 warzone2100-fractured-kingdom
7554 warzone2100-reclamation
7555 warzone2100-terrain-classic
7556 warzone2100-terrain-high
7557 warzone2100-texpages))
7558 (home-page "https://wz2100.net")
7559 (synopsis "3D Real-time strategy and real-time tactics game")
7560 (description
7561 "Warzone 2100 offers campaign, multi-player, and single-player skirmish
7562modes. An extensive tech tree with over 400 different technologies, combined
7563with the unit design system, allows for a wide variety of possible units and
7564tactics.")
7565 ;; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
7566 (license (list license:bsd-3
7567 license:cc0
7568 license:cc-by-sa3.0
7569 license:expat
7570 license:gpl2+
7571 license:lgpl2.1+))))
7572
7573(define-public widelands
7574 (package
7575 (name "widelands")
7576 (version "1.3.1")
7577 (source
7578 (origin
7579 (method git-fetch)
7580 (uri (git-reference
7581 (url "https://github.com/widelands/widelands")
7582 (commit (string-append "v" version))))
7583 (file-name (git-file-name name version))
7584 (sha256
7585 (base32 "0ab9s1imqdq1krfwlba1ipx3pwnvy91aqqzr15ssfzixy4wj5mww"))
7586 (modules '((guix build utils)))
7587 (snippet
7588 #~(delete-file-recursively "src/third_party/minizip"))))
7589 (build-system cmake-build-system)
7590 (arguments
7591 (list
7592 #:configure-flags
7593 #~(let ((share (string-append #$output "/share/widelands")))
7594 (list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
7595 (string-append "-DWL_INSTALL_BINDIR=" #$output "/bin")
7596 (string-append "-DWL_INSTALL_BASEDIR=" share)
7597 (string-append "-DWL_INSTALL_DATADIR=" share)
7598 "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"))
7599 #:phases
7600 #~(modify-phases %standard-phases
7601 (add-after 'unpack 'unbundle-fonts
7602 ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are
7603 ;; mmrCensus, Nakula, and Sinhala.
7604 (lambda* (#:key inputs #:allow-other-keys)
7605 (for-each
7606 (lambda (font)
7607 (let* ((path (string-append "share/fonts/truetype/" (basename font)))
7608 (target (false-if-exception (search-input-file inputs path))))
7609 (when target
7610 (delete-file font)
7611 (symlink target font))))
7612 (find-files "data/i18n/fonts" "\\.tt[cf]$")))))))
7613 (native-inputs
7614 (list gettext-minimal pkg-config python))
7615 (inputs
7616 (list asio
7617 font-amiri
7618 font-culmus
7619 font-dejavu
7620 font-wqy-microhei
7621 glew
7622 icu4c
7623 libpng
7624 minizip
7625 sdl2
7626 sdl2-image
7627 sdl2-mixer
7628 sdl2-ttf
7629 zlib))
7630 (home-page "https://www.widelands.org")
7631 (synopsis "Fantasy real-time strategy game")
7632 (description
7633 "In Widelands, you are the regent of a small clan. You start out with
7634nothing but your headquarters, where all your resources are stored.
7635
7636In the course of the game, you will build an ever growing settlement. Every
7637member of your clan will do his or her part to produce more resources---wood,
7638food, iron, gold and more---to further this growth. The economic network is
7639complex and different in the five tribes (Barbarians, Empire, Atlanteans,
7640Frisians and Amazons).
7641
7642As you are not alone in the world, you will meet other clans sooner or later.
7643Some of them may be friendly and you may eventually trade with them. However,
7644if you want to rule the world, you will have to train soldiers and fight.
7645
7646Widelands offers single-player mode with different campaigns; the campaigns
7647all tell stories of tribes and their struggle in the Widelands universe!
7648However, settling really starts when you unite with friends over the Internet
7649or LAN to build up new empires together---or to crush each other in the dusts
7650of war. Widelands also offers an Artificial Intelligence to challenge you.")
7651 ;; Game is released as GPL2+. Some parts, e.g., art, are released under
7652 ;; different licenses.
7653 (license (list license:gpl2+
7654 license:expat ;src/third_party/eris
7655 license:silofl1.1 ;Widelands.ttf
7656 license:cc-by-sa3.0)))) ;some music files
7657
7658(define-public starfighter
7659 (package
7660 (name "starfighter")
7661 (version "2.4")
7662 (source (origin
7663 (method url-fetch)
7664 (uri (string-append
7665 "https://github.com/pr-starfighter/starfighter/releases"
7666 "/download/v" version "/starfighter-"
7667 version "-src.tar.gz"))
7668 (sha256
7669 (base32
7670 "0ips79j3sdy8wa64jqka0skbbqkzqiln9bbiiilh4z717q7vz9r5"))))
7671 (build-system gnu-build-system)
7672 (native-inputs
7673 (list pkg-config))
7674 (inputs
7675 (list pango sdl2 sdl2-image sdl2-mixer sdl2-ttf))
7676 (home-page "https://pr-starfighter.github.io/")
7677 (synopsis "2D scrolling shooter game")
7678 (description
7679 "In the year 2579, the intergalactic weapons corporation, WEAPCO, has
7680dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
7681their quest to liberate the galaxy from the clutches of WEAPCO. Along the
7682way, you will encounter new foes, make new allies, and assist local rebels
7683in strikes against the evil corporation.")
7684 ;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
7685 (license (list license:gpl3+
7686 license:cc-by3.0
7687 license:cc-by-sa3.0
7688 license:cc0
7689 license:public-domain))))
7690
7691(define-public chromium-bsu
7692 (package
7693 (name "chromium-bsu")
7694 (version "0.9.16.1")
7695 (source (origin
7696 (method url-fetch)
7697 (uri (string-append "mirror://sourceforge/chromium-bsu"
7698 "/Chromium B.S.U. source code/"
7699 "chromium-bsu-" version ".tar.gz"))
7700 (sha256
7701 (base32
7702 "0jk2w5b6s6nkzri585bbz16cif2fhqcnl5l1mq3rd98r9nil3hd1"))))
7703 (build-system gnu-build-system)
7704 (native-inputs (list pkg-config))
7705 (inputs (list gettext-minimal glu quesoglc
7706 (sdl-union (list sdl sdl-image sdl-mixer))))
7707 (home-page "https://chromium-bsu.sourceforge.net/")
7708 (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
7709 (description
7710 "In this game you are the captain of the cargo ship Chromium B.S.U. and
7711are responsible for delivering supplies to the troops on the front line. Your
7712ship has a small fleet of robotic fighters which you control from the relative
7713safety of the Chromium vessel.")
7714 ;; Clarified Artistic License for everything but sound, which is covered
7715 ;; by the Expat License.
7716 (license (list license:clarified-artistic license:expat))))
7717
7718(define-public tuxemon
7719 (let ((commit "19708725f8b2d939e39b726f49a8a078eba8bf32")
7720 (revision "0"))
7721 (package
7722 (name "tuxemon")
7723 (version (git-version "0.4.34" revision commit))
7724 (source
7725 (origin
7726 (method git-fetch)
7727 (uri (git-reference
7728 (url "https://github.com/Tuxemon/Tuxemon")
7729 (commit commit)))
7730 (file-name (git-file-name name version))
7731 (sha256
7732 (base32 "0jdhk6xs4895gifxlkaxk7625wvw2yl1yc6ciay137dk78amhp86"))
7733 (modules '((guix build utils)))
7734 (snippet
7735 #~(begin
7736 (substitute* "requirements.txt"
7737 (("pygame-ce") "pygame") ; The pygame-ce fork isn't packaged in Guix
7738 (("pygame-menu-ce") "pygame-menu")
7739 (("==") ">="))
7740 (substitute* "tuxemon/constants/paths.py"
7741 (("LIBDIR, ....,") "LIBDIR,"))))))
7742 (build-system pyproject-build-system)
7743 (arguments
7744 (list
7745 #:tests? #f ; Tests won't be updated until the API stabilises
7746 #:phases
7747 #~(modify-phases %standard-phases
7748 (add-after 'install 'install-mods
7749 (lambda _
7750 (let ((site (string-append #$output "/lib/python"
7751 #$(version-major+minor
7752 (package-version python))
7753 "/site-packages/tuxemon/mods")))
7754 (mkdir-p site)
7755 (copy-recursively "mods" site)))))))
7756 (native-inputs (list python-flit-core python-setuptools))
7757 (propagated-inputs
7758 (list python-babel
7759 python-cbor
7760 python-neteria
7761 python-natsort
7762 python-pygame
7763 python-pyscroll
7764 python-pytmx
7765 python-pillow
7766 python-prompt-toolkit
7767 python-pydantic
7768 python-pygame-menu
7769 python-pyyaml
7770 python-requests))
7771 (home-page "https://www.tuxemon.org/")
7772 (synopsis "Monster-fighting RPG")
7773 (description
7774 "Tuxemon is a monster-fighting RPG.
7775In the spirit of other clones like SuperTux and SuperTuxKart,
7776Tuxemon aims to create a game with its own unique style
7777that sets it apart from other monster fighting RPGs.")
7778 (license license:gpl3+))))
7779
7780(define-public tuxpaint
7781 (package
7782 (name "tuxpaint")
7783 (version "0.9.35") ;keep VER_DATE below in sync
7784 (source
7785 (origin
7786 (method url-fetch)
7787 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint/" version
7788 "/tuxpaint-" version ".tar.gz"))
7789 (sha256
7790 (base32 "1bfhidnspv7jm90z98jxmhwvlfac9hh2ijdjmbyr8zp73gwqmhf1"))
7791 (modules '((guix build utils)))
7792 (snippet '(begin
7793 ;; Remove win32 directory which contains binary dll's and the
7794 ;; deprecated visualc directory.
7795 (for-each delete-file-recursively
7796 '("win32" "visualc"))
7797 (substitute* "Makefile"
7798 ;; Do not rely on $(GPERF) being an absolute file name
7799 (("\\[ -x \\$\\(GPERF\\) \\]")
7800 "$(GPERF) --version >/dev/null 2>&1")) #t))
7801 (patches (search-patches "tuxpaint-stamps-path.patch"))))
7802 (build-system gnu-build-system)
7803 (native-inputs (list gperf imagemagick pkg-config))
7804 (inputs (list bash-minimal
7805 cairo
7806 fribidi
7807 gettext-minimal
7808 libimagequant
7809 libpng
7810 (librsvg-for-system)
7811 libpaper
7812 libxml2
7813 netpbm
7814 pango
7815 sdl2
7816 sdl2-gfx
7817 sdl2-image
7818 sdl2-mixer
7819 sdl2-pango
7820 sdl2-ttf))
7821 ;; TODO: Use system fonts rather than those in data/fonts
7822 (arguments
7823 (list
7824 #:make-flags
7825 #~(list "VER_DATE=2025-05-26"
7826 "GPERF=gperf"
7827 (string-append "CC="
7828 #$(cc-for-target))
7829 "SDL_PCNAME=sdl2 SDL2_image SDL2_mixer SDL2_ttf SDL2_gfx"
7830 (string-append "PREFIX="
7831 #$output)
7832 "KDE_PREFIX=$(PREFIX)/share/applications"
7833 "KDE_ICON_PREFIX=$(PREFIX)/share/icons/"
7834 "COMPLETIONDIR=$(PREFIX)/etc/bash_completion.d")
7835 #:parallel-build? #f ;fails on some systems
7836 #:tests? #f ;No tests
7837 #:phases
7838 #~(modify-phases %standard-phases
7839 (delete 'configure) ;no configure phase
7840 (add-before 'install 'no-sys-cache
7841 (lambda _
7842 ;do not rebuild system conf cache
7843 (substitute* "Makefile"
7844 (("kbuildsycoca4")
7845 ""))))
7846 (add-after 'install 'fix-import
7847 (lambda _
7848 (let* ((tpi (string-append #$output "/bin/tuxpaint-import")))
7849 (substitute* tpi
7850 ;; Point to installation prefix so that the default
7851 ;; configure file is found.
7852 (("/usr/local")
7853 #$output))
7854 ;; tuxpaint-import uses a bunch of programs from
7855 ;; netpbm, so make sure it knows where those are
7856 (wrap-program tpi
7857 `("PATH" ":" prefix
7858 (,(string-append #$(this-package-input "netpbm") "/bin"))))))))))
7859 (native-search-paths
7860 (list (search-path-specification
7861 (variable "TUXPAINT_STAMPS_PATH")
7862 (files '("share/tuxpaint/stamps")))))
7863 (home-page "https://tuxpaint.org")
7864 (synopsis "Drawing software for children")
7865 (description
7866 "Tux Paint is a free drawing program designed for young children (kids
7867ages 3 and up). It has a simple, easy-to-use interface; fun sound effects;
7868and an encouraging cartoon mascot who helps guide children as they use the
7869program. It provides a blank canvas and a variety of drawing tools to help
7870your child be creative.")
7871 (license license:gpl2+)))
7872
7873(define-public tuxpaint-stamps
7874 (package
7875 (name "tuxpaint-stamps")
7876 (version "2025.05.26")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-stamps/"
7881 (string-map (λ (x) (if (eq? x #\.) #\- x)) version)
7882 "/tuxpaint-stamps-" version ".tar.gz"))
7883 (sha256
7884 (base32
7885 "17wlh9gkqzskny7ycwcsl2arsjzvmspy6d41q9j3mj9nh2gs5x09"))))
7886 (build-system copy-build-system)
7887 (arguments (list #:install-plan #~'(("stamps" "share/tuxpaint/"))))
7888 (home-page (package-home-page tuxpaint))
7889 (synopsis "Stamp images for Tux Paint")
7890 (description
7891 "This package contains a set of \"Rubber Stamp\" images which can be used
7892with the \"Stamp\" tool within Tux Paint.")
7893 (license license:gpl2+)))
7894
7895(define-public tuxpaint-config
7896 (package
7897 (name "tuxpaint-config")
7898 (version "0.0.26") ;keep VER_DATE below in sync
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-config/"
7903 version "/tuxpaint-config-" version ".tar.gz"))
7904 (sha256
7905 (base32
7906 "1f73av2fvqr6bd6kacmybaq4y03p1yxcbsyf84l1cph0mwmmzb7r"))))
7907 (build-system gnu-build-system)
7908 (native-inputs (list gettext-minimal pkg-config))
7909 (inputs
7910 (list fltk
7911 libpaper
7912 libunibreak
7913 pango
7914 ;; TODO: Should the following be propagated by fltk?
7915 libx11
7916 libxft
7917 mesa))
7918 (arguments
7919 `(#:make-flags `("VER_DATE=2024-04-19"
7920 "CONFDIR=/etc/tuxpaint" ;don't write to store
7921 ,(string-append "PREFIX=" %output)
7922 "GNOME_PREFIX=$(PREFIX)")
7923 #:parallel-build? #f ;race conditions
7924 #:tests? #f ;no tests
7925 #:phases (modify-phases %standard-phases
7926 (delete 'configure) ;no configure phase
7927 (add-before 'install 'gzip-no-name
7928 (lambda* _
7929 (substitute* "Makefile"
7930 ;; tuxpaint-config compresses its own documentation;
7931 ;; make sure it uses flags for reproducibility.
7932 (("gzip") "gzip --no-name"))))
7933 (add-before 'install 'make-install-dirs
7934 (lambda* (#:key outputs #:allow-other-keys)
7935 (let ((out (assoc-ref outputs "out")))
7936 (mkdir-p (string-append out "/bin"))))))))
7937 (home-page (package-home-page tuxpaint))
7938 (synopsis "Configure Tux Paint")
7939 (description
7940 "Tux Paint Config is a graphical configuration editor for Tux Paint.")
7941 (license license:gpl2))) ;no "or later" present
7942
7943(define-public supertux
7944 (package
7945 (name "supertux")
7946 (version "0.7.0")
7947 (source (origin
7948 (method url-fetch)
7949 (uri (string-append "https://github.com/SuperTux/supertux/"
7950 "releases/download/v" version "/SuperTux-v"
7951 version "-Source.tar.gz"))
7952 (file-name (string-append name "-" version ".tar.gz"))
7953 (sha256
7954 (base32
7955 "198xqcxyav8kj62i0vi5h6rn8mwjvqhny79lb27daklrp6cmpz1j"))
7956 (modules '((guix build utils)))
7957 (snippet
7958 ;; Unbundle libraries
7959 #~(begin
7960 (for-each (lambda (dir)
7961 (delete-file-recursively
7962 (string-append "external/" dir)))
7963 '(;; "SDL_savePNG"
7964 "SDL_ttf"
7965 "discord-sdk"
7966 ;; "findlocale"
7967 ;; "obstack"
7968 ;; "partio_zip"
7969 ;; "sexp-cpp"
7970 "shared-modules"
7971 "simplesquirrel"
7972 "tinygettext"))
7973 (substitute* "CMakeLists.txt"
7974 (("add_subdirectory\\(external/simplesquirrel .*$") "")
7975 (("add_subdirectory\\(external/tinygettext .*$") "")
7976 (("set_property\\(TARGET squirrel .*$") "")
7977 (("## Link supertux binary with squirrel .*$" all)
7978 (string-append all "\n"
7979 "target_link_libraries(supertux2 PUBLIC "
7980 "squirrel sqstdlib)\n")))
7981 (substitute* "mk/cmake/SuperTux/BuildInstall.cmake"
7982 (("install\\(TARGETS simplesquirrel.*$") ""))))))
7983 (arguments
7984 (list
7985 #:configure-flags #~(list "-DINSTALL_SUBDIR_BIN=bin"
7986 "-DUSE_SYSTEM_SDL2_TTF=ON")))
7987 (build-system cmake-build-system)
7988 (inputs
7989 (list curl
7990 fmt
7991 freetype
7992 glew
7993 glm
7994 harfbuzz
7995 libogg
7996 libvorbis
7997 openal
7998 physfs
7999 sdl2
8000 sdl2-image
8001 sdl2-ttf
8002 simplesquirrel-for-supertux
8003 squirrel-for-supertux
8004 tinygettext))
8005 (native-inputs
8006 (list pkg-config))
8007 (synopsis "2D platformer game")
8008 (description "SuperTux is a classic 2D jump'n run sidescroller game in
8009a style similar to the original Super Mario games.")
8010 (home-page "https://supertux.org/")
8011 (license license:gpl3+)))
8012
8013(define-public tintin++
8014 (package
8015 (name "tintin++")
8016 (version "2.02.12")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (string-append "mirror://sourceforge/tintin/TinTin++ Source Code/"
8021 (string-drop-right version 1)
8022 "/tintin-" version ".tar.gz"))
8023 (sha256
8024 (base32 "000sg16w7790ha8ys31qjh1ip5hl02ldfwj1zy6dqz0y5i7zvydn"))))
8025 (inputs
8026 (list gnutls pcre readline zlib))
8027 (arguments
8028 '(#:tests? #f ; no test suite
8029 #:phases
8030 (modify-phases %standard-phases
8031 ;; The source is in tt/src.
8032 (add-before 'configure 'chdir
8033 (lambda _
8034 (chdir "src")
8035 #t)))))
8036 (build-system gnu-build-system)
8037 (home-page "https://tintin.mudhalla.net/")
8038 (synopsis "MUD client")
8039 (description
8040 "TinTin++ is a MUD client which supports MCCP (Mud Client Compression
8041Protocol), MMCP (Mud Master Chat Protocol), xterm 256 colors, most TELNET
8042options used by MUDs, as well as those required to login via telnet on
8043Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
8044 (license license:gpl3+)))
8045
8046(define-public laby
8047 (package
8048 (name "laby")
8049 (version "0.7.0")
8050 (source
8051 (origin (method git-fetch)
8052 (uri (git-reference
8053 (url "https://github.com/sgimenez/laby")
8054 (commit (string-append name "-" version))))
8055 (file-name (git-file-name name version))
8056 (sha256
8057 (base32
8058 "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
8059 (patches (search-patches "laby-make-install.patch"
8060 "laby-use-tmpdir-from-runtime.patch"))))
8061 (build-system glib-or-gtk-build-system)
8062 (inputs
8063 (list bash-minimal
8064 gdk-pixbuf
8065 lablgtk3
8066 (librsvg-for-system)
8067 ocaml-lablgtk3-sourceview3
8068 ocaml
8069 ocaml-findlib
8070 ocamlbuild))
8071 (arguments
8072 (list #:phases
8073 #~(modify-phases %standard-phases
8074 (delete 'configure)
8075 (add-before 'build 'set-library-path
8076 (lambda* (#:key inputs #:allow-other-keys)
8077 (let ((lablgtk #$(this-package-input "lablgtk")))
8078 (setenv "LD_LIBRARY_PATH"
8079 (string-append lablgtk "/lib/ocaml/stublibs")))))
8080 (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
8081 (lambda* (#:key outputs #:allow-other-keys)
8082 (let ((laby (string-append #$output "/bin/laby")))
8083 (wrap-program laby
8084 ;; Wrapping GDK_PIXBUF_MODULE_FILE allows laby to
8085 ;; function in pure environments.
8086 `("GDK_PIXBUF_MODULE_FILE" =
8087 (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
8088 #:tests? #f ; no 'check' target
8089 #:make-flags
8090 #~(list (string-append "PREFIX=" #$output) "all")))
8091 (home-page "https://sgimenez.github.io/laby/")
8092 (synopsis "Programming game")
8093 (description "Learn programming, playing with ants and spider webs ;-)
8094Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
8095Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced
8096programmers may also add their own favorite language.")
8097 (license license:gpl3+)))
8098
8099(define-public bambam
8100 (package
8101 (name "bambam")
8102 (version "1.2.1")
8103 (source
8104 (origin
8105 (method git-fetch)
8106 (uri (git-reference
8107 (url "https://github.com/porridge/bambam")
8108 (commit (string-append "v" version))))
8109 (file-name (git-file-name name version))
8110 (sha256
8111 (base32 "148cqahklqd4m88j5z1xf3fh4vha41f31wian11hkas106mbsya9"))))
8112 (build-system pyproject-build-system)
8113 (arguments
8114 (list
8115 #:tests? #f ;no tests
8116 #:phases
8117 #~(modify-phases %standard-phases
8118 (delete 'build) ;nothing to build
8119 (replace 'install
8120 (lambda _
8121 (let* ((bin (string-append #$output "/bin"))
8122 (share (string-append #$output "/share")))
8123 (mkdir-p bin)
8124 (copy-file "bambam.py" (string-append bin "/bambam"))
8125 (install-file "bambam.6" (string-append share "/man/man6"))
8126 (copy-recursively "data"
8127 (string-append share "/bambam/data"))))))))
8128 (native-inputs (list python-setuptools))
8129 (inputs (list python-pygame))
8130 (home-page "https://github.com/porridge/bambam")
8131 (synopsis "Keyboard mashing and doodling game for babies")
8132 (description
8133 "Bambam is a simple baby keyboard (and gamepad) masher application that
8134locks the keyboard and mouse and instead displays bright colors, pictures, and
8135sounds.")
8136 (license license:gpl3+)))
8137
8138(define-public moonlight-qt
8139 (package
8140 (name "moonlight-qt")
8141 (version "6.1.0")
8142 (source (origin
8143 (method git-fetch)
8144 (uri (git-reference
8145 (url "https://github.com/moonlight-stream/moonlight-qt")
8146 (commit (string-append "v" version))))
8147 (file-name (git-file-name name version))
8148 (sha256
8149 (base32
8150 "06fxf3m26k036asxjkkykk5q96nincwmpiqm953m7zgr9224gidx"))))
8151 (build-system qt-build-system)
8152 (arguments
8153 (list
8154 #:tests? #f ;no test suite
8155 #:modules '((guix build qt-build-system)
8156 ((guix build gnu-build-system) #:prefix gnu:)
8157 (guix build utils))
8158 #:phases
8159 #~(modify-phases %standard-phases
8160 (replace 'configure
8161 (lambda* _
8162 (symlink (string-append
8163 #$(this-package-input "sdl2-gamecontrollerdb")
8164 "/share/sdl2/gamecontrollerdb.txt")
8165 "app/SDL_GameControllerDB/gamecontrollerdb.txt")
8166 ;; Unbundle libraries.
8167 (substitute* "moonlight-qt.pro"
8168 ((" moonlight-common-c.*\n") "")
8169 ((" qmdnsengine.*\n") "")
8170 ((" h264bitstream.*\n") "")
8171 ((" app \\\\") " app")
8172 (("app.depends") "INCLUDEPATH +="))
8173 (invoke "qmake" (string-append "PREFIX=" #$output))))
8174 (replace 'build (assoc-ref gnu:%standard-phases 'build))
8175 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
8176 (native-inputs (list pkg-config qttools-5))
8177 (inputs (list ffmpeg
8178 h264bitstream
8179 libva
8180 libvdpau
8181 moonlight-common
8182 openssl
8183 opus
8184 qmdnsengine
8185 qtbase-5
8186 qtdeclarative-5
8187 qtquickcontrols2-5
8188 qtsvg-5
8189 qtwayland-5
8190 wayland
8191 sdl2
8192 sdl2-ttf
8193 sdl2-gamecontrollerdb))
8194 (synopsis "GameStream client")
8195 (description
8196 "Moonlight is an implementation of NVIDIA's GameStream, as used by the
8197NVIDIA Shield.")
8198 (home-page "https://moonlight-stream.org")
8199 (license license:gpl3+)))
8200
8201(define-public moonlight-common
8202 ;; Used as submodule in https://github.com/moonlight-stream/moonlight
8203 (let ((commit "8599b6042a4ba27749b0f94134dd614b4328a9bc")
8204 (revision "1"))
8205 (package
8206 (name "moonlight-common")
8207 (version (git-version "6.1.0" revision commit))
8208 (source (origin
8209 (method git-fetch)
8210 (uri (git-reference
8211 (url
8212 "https://github.com/moonlight-stream/moonlight-common-c")
8213 (commit commit)))
8214 (file-name (git-file-name name version))
8215 (sha256
8216 (base32
8217 "19k8rs2p51zs0h3wj22xw8bgj9c0ma0dc6y7qk5pk75p8ymqp9d3"))))
8218 (build-system cmake-build-system)
8219 (arguments
8220 (list #:tests? #f
8221 #:phases #~(modify-phases %standard-phases
8222 (add-after 'unpack 'use-system-enet-package
8223 (lambda _
8224 (substitute* "CMakeLists.txt"
8225 (("add_subdirectory\\(enet\\)")
8226 ""))))
8227 (replace 'install
8228 (lambda* (#:key outputs source #:allow-other-keys)
8229 (let* ((include (string-append #$output
8230 "/include"))
8231 (lib (string-append #$output "/lib")))
8232 (mkdir-p include)
8233 (mkdir-p lib)
8234 (install-file (string-append source
8235 "/src/Limelight.h") include)
8236 (install-file "libmoonlight-common-c.so" lib)))))))
8237 (native-inputs (list pkg-config))
8238 (inputs (list enet-moonlight openssl qtbase-5))
8239 (synopsis "GameStream protocol core implementation")
8240 (description
8241 "This package provides the GameStream core code for the protocol.")
8242 (home-page "https://github.com/moonlight-stream/moonlight-common-c")
8243 (license license:gpl3+))))
8244
8245(define-public mrrescue
8246 (package
8247 (name "mrrescue")
8248 (version "1.02e")
8249 (source (origin
8250 (method url-fetch)
8251 (uri (string-append
8252 "https://github.com/SimonLarsen/mrrescue/releases/"
8253 "download/" version "/mrrescue" version ".love"))
8254 (file-name (string-append name "-" version ".love"))
8255 (sha256
8256 (base32
8257 "0jwzbwkgp1l5ia6c7s760gmdirbsncp6nfqp7vqdqsfb63la9gl2"))))
8258 (build-system trivial-build-system)
8259 (arguments
8260 `(#:modules ((guix build utils))
8261 #:builder
8262 (begin
8263 (use-modules (guix build utils))
8264 (let* ((out (assoc-ref %outputs "out"))
8265 (script (string-append out "/bin/" ,name))
8266 (data (string-append out "/share/" ,name))
8267 (source (assoc-ref %build-inputs "source"))
8268 (unzip (search-input-file %build-inputs "/bin/unzip"))
8269 (patch (search-input-file %build-inputs "/bin/patch"))
8270 (bash (search-input-file %build-inputs "/bin/bash"))
8271 (love (search-input-file %build-inputs "/bin/love")))
8272
8273 (mkdir-p (dirname script))
8274 (with-output-to-file script
8275 (lambda ()
8276 (format #t "#!~a~%" bash)
8277 (format #t "exec -a ~a \"~a\" \"~a\"~%" ,name love data)))
8278 (chmod script #o755)
8279
8280 ;; The better way to package this game would be to install *only* the
8281 ;; script above, pointing to the unextracted .love file in the store.
8282 ;; However, mrrescue 1.02e needs to be patched to work with Love 11.
8283 ;; Instead of extracting the .love file, patching it, and re-zipping
8284 ;; it to the store, simply point the script to the extracted patched
8285 ;; data directory directly.
8286 (mkdir-p data)
8287 (with-directory-excursion data
8288 (invoke unzip source)
8289 (invoke patch "-p1" "-i"
8290 (assoc-ref %build-inputs "love-11.patch")))
8291 #t))))
8292 (native-inputs
8293 `(("unzip" ,unzip)
8294 ("patch" ,patch)
8295 ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
8296 (inputs
8297 (list bash love))
8298 (home-page "https://tangramgames.dk/games/mrrescue")
8299 (synopsis "Arcade-style fire fighting game")
8300 (description
8301 "Mr. Rescue is an arcade styled 2d action game centered around evacuating
8302civilians from burning buildings. The game features fast-paced fire
8303extinguishing action, intense boss battles, a catchy soundtrack, and lots of
8304throwing people around in pseudo-randomly generated buildings.")
8305 (license (list license:zlib ; for source code
8306 license:cc-by-sa3.0)))) ; for graphics and music assets
8307
8308(define-public hyperrogue
8309 (package
8310 (name "hyperrogue")
8311 (version "12.1a")
8312 (source
8313 (origin
8314 (method git-fetch)
8315 (uri (git-reference
8316 (url "https://github.com/zenorogue/hyperrogue")
8317 (commit (string-append "v" version))))
8318 (file-name (git-file-name name version))
8319 (sha256
8320 (base32
8321 "1l09d1r3jdwp54zq071fk09hpggif5phjn0gsapzrjy3i289jran"))))
8322 (build-system gnu-build-system)
8323 (arguments
8324 (list
8325 #:tests? #f ; no check target
8326 #:make-flags #~(list "HYPERROGUE_USE_GLEW=1"
8327 "HYPERROGUE_USE_PNG=1")
8328 #:phases
8329 #~(modify-phases %standard-phases
8330 (add-after 'set-paths 'set-sdl-paths
8331 (lambda* (#:key inputs #:allow-other-keys)
8332 (setenv "CPATH"
8333 (string-append (or (getenv "CPATH") "") ":"
8334 (search-input-directory inputs
8335 "/include/SDL")))))
8336 (replace 'configure
8337 (lambda* (#:key inputs #:allow-other-keys)
8338 (let ((share-dir (string-append #$output "/share/hyperrogue/"))
8339 (fonts-dir (dirname
8340 (search-input-file inputs
8341 "DejaVuSans-Bold.ttf"))))
8342 ;; Set fonts and music path.
8343 (substitute* "sysconfig.h"
8344 (("(#define HYPERPATH ).*" _ lead)
8345 (string-append lead "\"" share-dir "\"\n"))
8346 (("(#define HYPERFONTPATH ).*" _ lead)
8347 (string-append lead "\"" fonts-dir "/\"\n")))
8348 ;; Disable build machine CPU optimizations and warnings treated
8349 ;; as errors.
8350 (substitute* "Makefile"
8351 (("-march=native") "")
8352 (("-Werror") "")))))
8353 (replace 'install
8354 (lambda _
8355 (install-file "hyperrogue" (string-append #$output "/bin"))
8356 (let ((share-dir (string-append #$output "/share/hyperrogue/")))
8357 (install-file "hyperrogue-music.txt" share-dir)
8358 (for-each (lambda (dir)
8359 (copy-recursively dir
8360 (string-append share-dir dir)))
8361 '("music" "sounds"))))))))
8362 (inputs
8363 (list font-dejavu
8364 glew
8365 libpng
8366 (sdl-union (list sdl sdl-gfx sdl-mixer sdl-ttf))))
8367 (home-page "https://roguetemple.com/z/hyper")
8368 (synopsis "Non-euclidean graphical rogue-like game")
8369 (description
8370 "HyperRogue is a game in which the player collects treasures and fights
8371monsters -- rogue-like but for the fact that it is played on the hyperbolic
8372plane and not in euclidean space.
8373
8374In HyperRogue, the player can move through different parts of the world, which
8375are home to particular creatures and may be subject to their own rules of
8376\"physics\".
8377
8378While the game can use ASCII characters to display the the classical rogue
8379symbols, it still needs graphics to render the non-euclidean world.")
8380 (license (list license:bsd-3 ; glew.c, mtrand.*
8381 license:cc-by-sa3.0 ; music
8382 license:cc-by-sa4.0 ; sounds
8383 license:cc0
8384 license:public-domain ; direntx.*, some sounds
8385 license:zlib ; savepng.*
8386 license:gpl2+)))) ; remaining files
8387
8388(define-public kobodeluxe
8389 (package
8390 (name "kobodeluxe")
8391 (version "0.5.1")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (string-append "http://olofson.net/kobodl/download/KoboDeluxe-"
8395 version ".tar.bz2"))
8396 (sha256
8397 (base32
8398 "0b2wvdpnmaibsy419c16dfwj5kvd3pccby2aaqvm964x74592yqg"))
8399 (patches (search-patches
8400 "kobodeluxe-const-charp-conversion.patch"
8401 "kobodeluxe-enemies-pipe-decl.patch"
8402 "kobodeluxe-graphics-window-signed-char.patch"
8403 "kobodeluxe-manpage-minus-not-hyphen.patch"
8404 "kobodeluxe-midicon-segmentation-fault.patch"
8405 "kobodeluxe-paths.patch"))))
8406 (build-system gnu-build-system)
8407 (arguments
8408 '(#:configure-flags
8409 (list (string-append "CPPFLAGS=-I"
8410 (assoc-ref %build-inputs "sdl-union")
8411 "/include/SDL"))))
8412 (inputs
8413 (list glu
8414 (sdl-union (list sdl sdl-image))))
8415 (synopsis "Shooter with space station destruction")
8416 (description
8417 "Kobo Deluxe is an enhanced version of Akira Higuchi's XKobo graphical game
8418for Un*x systems with X11.")
8419 (home-page "http://olofson.net/kobodl/")
8420 (license license:gpl2+)))
8421
8422(define-public freeciv
8423 (package
8424 (name "freeciv")
8425 (version "3.2.5")
8426 (source
8427 (origin
8428 (method url-fetch)
8429 (uri (list (string-append
8430 "https://files.freeciv.org/stable/freeciv-"
8431 version ".tar.xz")
8432 (string-append
8433 "mirror://sourceforge/freeciv/Freeciv%20"
8434 (version-major+minor version) "/" version
8435 "/freeciv-" version ".tar.xz")))
8436 (sha256
8437 (base32 "1s09qqy2r58gv0ai3xx8dv7a7qkcn5kg5jwv2pplk7wv5bq0ha6k"))))
8438 (build-system gnu-build-system)
8439 (inputs
8440 (list curl cyrus-sasl gtk+ sdl2-mixer sqlite zlib))
8441 (native-inputs
8442 (list pkg-config))
8443 (home-page "https://www.freeciv.org/")
8444 (synopsis "Turn-based empire building strategy game")
8445 (description "Freeciv is a turn-based empire building strategy game
8446inspired by the history of human civilization. The game commences in
8447prehistory and your mission is to lead your tribe from the Stone Age
8448into the Space Age.")
8449 (license license:gpl2+)))
8450
8451(define-public no-more-secrets
8452 (package
8453 (name "no-more-secrets")
8454 (version "1.0.1")
8455 (source
8456 (origin
8457 (method git-fetch)
8458 (uri (git-reference
8459 (url "https://github.com/bartobri/no-more-secrets")
8460 (commit (string-append "v" version))))
8461 (file-name (git-file-name name version))
8462 (sha256
8463 (base32 "14h34zpgjldw9bf65chb72gnzw5q88djrdasz2828r3ck6k88l21"))))
8464 (build-system gnu-build-system)
8465 (arguments
8466 `(#:tests? #f
8467 #:make-flags (list "CC=gcc" "all-ncurses"
8468 (string-append "prefix="
8469 (assoc-ref %outputs "out")))
8470 #:phases
8471 (modify-phases %standard-phases
8472 (delete 'configure))))
8473 (inputs
8474 (list ncurses))
8475 (home-page "https://github.com/bartobri/no-more-secrets")
8476 (synopsis "Recreation of data decryption effect in \"Sneakers\"")
8477 (description
8478 "@code{No More Secrets} provides a command line tool called \"nms\"
8479that recreates the famous data decryption effect seen on screen in the 1992
8480movie \"Sneakers\".
8481
8482This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and
8483it will apply the hollywood effect, initially showing encrypted data, then
8484starting a decryption sequence to reveal the original plaintext characters.")
8485 (license license:expat)))
8486
8487(define-public asciiquarium
8488 (package
8489 (name "asciiquarium")
8490 (version "1.1")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (string-append
8495 "https://robobunny.com/projects/asciiquarium/asciiquarium_"
8496 version ".tar.gz"))
8497 (sha256
8498 (base32 "0qfkr5b7sxzi973nh0h84blz2crvmf28jkkgaj3mxrr56mhwc20v"))))
8499 (build-system copy-build-system)
8500 (inputs (list bash-minimal perl perl-curses perl-term-animation))
8501 (arguments
8502 (list
8503 #:install-plan
8504 #~'(("asciiquarium" "bin/")
8505 ("README" "share/doc/asciiquarium/"))
8506 #:phases
8507 #~(modify-phases %standard-phases
8508 (add-after 'install 'chmod
8509 (lambda _
8510 (chmod (string-append #$output "/bin/asciiquarium") #o755)))
8511 (add-after 'chmod 'wrap-perl-bin
8512 (lambda _
8513 (wrap-program (string-append #$output "/bin/asciiquarium")
8514 `("PERL5LIB" ":" prefix
8515 (,(getenv "PERL5LIB")))))))))
8516 (home-page "https://robobunny.com/projects/asciiquarium/html/")
8517 (synopsis "ASCII aquarium for the terminal")
8518 (license license:gpl2+)
8519 (description
8520 "The @code{asciiquarium} package renders a fullscreen animation of an
8521aquarium with various fish in the terminal, which can make for a nice
8522screensaver.")))
8523
8524(define-public megaglest-data
8525 (package
8526 (name "megaglest-data")
8527 (version "3.13.0")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (string-append
8532 "https://github.com/MegaGlest/megaglest-data"
8533 "/releases/download/" version "/megaglest-data-"
8534 version ".tar.xz"))
8535 (sha256
8536 (base32
8537 "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
8538 (build-system cmake-build-system)
8539 (arguments
8540 `(#:tests? #f))
8541 (home-page "https://megaglest.org/")
8542 (synopsis "Data files for MegaGlest")
8543 (description "This package contains the data files required for MegaGlest.")
8544 (license license:cc-by-sa3.0)))
8545
8546(define-public megaglest
8547 (package
8548 (name "megaglest")
8549 (version "3.13.0")
8550 (source
8551 (origin
8552 (method url-fetch)
8553 (uri (string-append
8554 "https://github.com/MegaGlest/megaglest-source"
8555 "/releases/download/" version "/megaglest-source-"
8556 version ".tar.xz"))
8557 (sha256
8558 (base32
8559 "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
8560 (build-system cmake-build-system)
8561 (inputs
8562 (list curl
8563 fontconfig
8564 ftgl
8565 glew
8566 libjpeg-turbo
8567 megaglest-data
8568 mesa
8569 miniupnpc
8570 openal
8571 libircclient
8572 libpng
8573 libvorbis
8574 lua
8575 sdl2
8576 wxwidgets-3.0))
8577 (native-inputs
8578 (list cppunit pkg-config))
8579 (arguments
8580 (list
8581 #:modules '((guix build cmake-build-system)
8582 ((guix build gnu-build-system) #:prefix gnu:)
8583 (guix build utils))
8584 #:configure-flags
8585 #~(list "-DCMAKE_CXX_FLAGS=-fcommon"
8586 "-DCMAKE_C_FLAGS=-fcommon"
8587 (string-append "-DCUSTOM_DATA_INSTALL_PATH="
8588 (search-input-directory %build-inputs
8589 "share/megaglest"))
8590 "-DBUILD_MEGAGLEST_TESTS=ON")
8591 #:phases
8592 #~(modify-phases %standard-phases
8593 (add-after 'unpack 'fix-ini-search-path
8594 (lambda* (#:key outputs #:allow-other-keys)
8595 (substitute* "source/glest_game/global/config.cpp"
8596 (("/usr/share/megaglest/")
8597 (string-append (assoc-ref outputs "out")
8598 "/share/megaglest/")))))
8599 (replace 'check
8600 (lambda* (#:key tests? #:allow-other-keys #:rest args)
8601 (when tests?
8602 (apply (assoc-ref gnu:%standard-phases 'check)
8603 #:tests? tests? #:test-target "megaglest_tests" args)
8604 (invoke "source/tests/megaglest_tests")))))))
8605 (home-page "https://megaglest.org/")
8606 (synopsis "3D real-time strategy (RTS) game")
8607 (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
8608game, where you control the armies of one of seven different factions: Tech,
8609Magic, Egypt, Indians, Norsemen, Persian or Romans.")
8610 (license license:gpl2+)))
8611
8612(define-public freegish
8613 (let ((commit "caf58a2f990a939230bab82226e29cd79732f366")
8614 (revision "3"))
8615 (package
8616 (name "freegish")
8617 (version (string-append "0-" revision "." (string-take commit 9)))
8618 (source (origin
8619 (method git-fetch)
8620 (uri (git-reference
8621 (url "https://github.com/freegish/freegish")
8622 (commit commit)))
8623 (file-name (git-file-name name version))
8624 (sha256
8625 (base32
8626 "0980ad8xg0bzm6507bq9sbgw03i7jj33g0f955g0q8jvpb22r65v"))
8627 (modules '((guix build utils)))
8628 ;; The audio files in the "music" directory are licensed under
8629 ;; CC-BY-NC, so we delete them.
8630 (snippet
8631 '(begin
8632 (delete-file-recursively "music")
8633 #t))))
8634 (build-system cmake-build-system)
8635 (arguments
8636 `(#:tests? #f ; no tests included
8637 #:configure-flags
8638 (list "-DINSTALL_FHS=ON")))
8639 (inputs
8640 (list sdl2
8641 openal
8642 libvorbis
8643 libogg
8644 mesa
8645 libpng))
8646 (home-page "https://github.com/freegish/freegish")
8647 (synopsis "Side-scrolling physics platformer with a ball of tar")
8648 (description "In FreeGish you control Gish, a ball of tar who lives
8649happily with his girlfriend Brea, until one day a mysterious dark creature
8650emerges from a sewer hole and pulls her below ground.")
8651 ;; The textures are available under the Expat license. All other assets
8652 ;; (including levels) are covered under CC-BY-SA or public domain. The
8653 ;; source code is under GPLv2+.
8654 (license (list license:gpl2+
8655 license:expat
8656 license:public-domain
8657 license:cc-by-sa3.0)))))
8658
8659(define-public cdogs-sdl
8660 (package
8661 (name "cdogs-sdl")
8662 (version "2.3.2")
8663 (source
8664 (origin
8665 (method git-fetch)
8666 (uri (git-reference
8667 (url "https://github.com/cxong/cdogs-sdl")
8668 (commit version)))
8669 (file-name (git-file-name name version))
8670 (sha256
8671 (base32 "13brn8hklgid43vddmaq3a0yhlcx550wa8jvs17dwpzj0sr045vh"))))
8672 (build-system cmake-build-system)
8673 (arguments
8674 (list
8675 #:configure-flags
8676 #~(list (string-append "-DCDOGS_DATA_DIR=" #$output
8677 "/share/cdogs-sdl/"))
8678 #:phases
8679 #~(modify-phases %standard-phases
8680 (add-after 'unpack 'patch-install-directory
8681 (lambda _
8682 (substitute* "CMakeLists.txt"
8683 (("set\\(DATA_INSTALL_DIR \".\"\\)")
8684 (string-append "set(DATA_INSTALL_DIR \""
8685 #$output "/share/cdogs-sdl\")"))))))))
8686 (native-inputs
8687 (list pkg-config))
8688 (inputs
8689 (list gtk+ mesa sdl2 sdl2-image sdl2-mixer))
8690 (home-page "https://cxong.github.io/cdogs-sdl/")
8691 (synopsis "Classic overhead run-and-gun game")
8692 (description "C-Dogs SDL is a classic overhead run-and-gun game,
8693supporting up to 4 players in co-op and deathmatch modes. Customize your
8694player, choose from many weapons, and blast, slide and slash your way through
8695over 100 user-created campaigns.")
8696 ;; GPLv2+ for code (includes files under BSD-2 and BSD-3),
8697 ;; CC0/CC-BY/CC-BY-SA for assets.
8698 (license (list license:gpl2+
8699 license:bsd-2
8700 license:bsd-3
8701 license:cc0
8702 license:cc-by3.0
8703 license:cc-by-sa3.0))))
8704
8705(define-public kiki
8706 (package
8707 (name "kiki")
8708 (version "1.0.2")
8709 (source (origin
8710 (method url-fetch)
8711 (uri (string-append "mirror://sourceforge/kiki/kiki-src/"
8712 version "/kiki-" version "-src.tgz"))
8713 (sha256
8714 (base32
8715 "0ihjdsxbn8z3cz0gpcprafiipcqaiskgdnh1rhmw4qff8dszalbn"))
8716 (modules '((guix build utils)))
8717 (snippet
8718 '(begin
8719 (for-each delete-file (find-files "." "\\.dll$"))
8720 #t))
8721 (patches
8722 (search-patches "kiki-level-selection-crash.patch"
8723 "kiki-makefile.patch"
8724 "kiki-missing-includes.patch"
8725 "kiki-portability-64bit.patch"))))
8726 (build-system gnu-build-system)
8727 (arguments
8728 `(#:tests? #f ; there are no tests
8729 #:make-flags '("CXX=g++")
8730 #:phases
8731 (modify-phases %standard-phases
8732 (replace 'configure
8733 (lambda* (#:key inputs outputs #:allow-other-keys)
8734 (setenv "CPLUS_INCLUDE_PATH"
8735 (string-append
8736 (search-input-directory inputs "include/SDL") ":"
8737 (search-input-directory inputs "include/python2.7")
8738 ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
8739 (substitute* "src/main/main.cpp"
8740 (("#include <SDL.h>" line)
8741 (string-append line "
8742#define K_INCLUDE_GLUT
8743#include \"KIncludeTools.h\""))
8744 (("// initialize SDL" line)
8745 (string-append "glutInit(&argc,argv);\n" line)))
8746 (substitute* "src/main/KikiController.cpp"
8747 (("getenv\\(\"KIKI_HOME\"\\)")
8748 (string-append "\"" (assoc-ref outputs "out") "/share/kiki/\"")))
8749 (substitute* "linux/Makefile"
8750 (("CXXOPTS =" line)
8751 (string-append line " -fpermissive"))
8752 (("PYTHON_VERSION=.*") "PYTHON_VERSION=2.7")
8753 (("PYTHONHOME =.*")
8754 (string-append "PYTHONHOME = "
8755 (assoc-ref inputs "python")
8756 "/lib/python2.7/"))
8757 (("\\$\\(GLLIBS\\)" line)
8758 (string-append line " -lm -lpython2.7")))
8759 (substitute* "src/main/KikiPythonWidget.h"
8760 (("#define __KikiPythonWidget" line)
8761 (string-append line "\n#include \"KikiPython.h\"")))
8762 #t))
8763 (add-before 'build 'build-kodilib
8764 (lambda* (#:key make-flags #:allow-other-keys)
8765 (with-directory-excursion "kodilib/linux"
8766 (apply invoke "make" make-flags))))
8767 (add-after 'build-kodilib 'chdir
8768 (lambda _ (chdir "linux") #t))
8769 (replace 'install
8770 (lambda* (#:key outputs #:allow-other-keys)
8771 (let* ((out (assoc-ref outputs "out"))
8772 (bin (string-append out "/bin"))
8773 (share (string-append out "/share/kiki")))
8774 (mkdir-p bin)
8775 (mkdir-p share)
8776 (install-file "kiki" bin)
8777 (copy-recursively "../py" (string-append share "/py"))
8778 (copy-recursively "../sound" (string-append share "/sound"))
8779 #t))))))
8780 (inputs
8781 `(("glu" ,glu)
8782 ("freeglut" ,freeglut)
8783 ("libxcrypt" ,libxcrypt)
8784 ("sdl-union" ,(sdl-union (list sdl
8785 sdl-mixer
8786 sdl-image)))
8787 ("python" ,python-2)))
8788 (native-inputs
8789 (list swig-4.4))
8790 (home-page "https://kiki.sourceforge.net/")
8791 (synopsis "3D puzzle game")
8792 (description "Kiki the nano bot is a 3D puzzle game. It is basically a
8793mixture of the games Sokoban and Kula-World. Your task is to help Kiki, a
8794small robot living in the nano world, repair its maker.")
8795 ;; See <http://metadata.ftp-master.debian.org/changelogs/main/k/
8796 ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright>
8797 ;; for a statement from the author.
8798 (license license:public-domain)))
8799
8800(define-public teeworlds
8801 (package
8802 (name "teeworlds")
8803 (version "0.7.5")
8804 (source (origin
8805 (method git-fetch)
8806 (uri (git-reference
8807 (url "https://github.com/teeworlds/teeworlds")
8808 (commit version)
8809 ;; There are two submodules in datasrc/{languages,maps}
8810 (recursive? #t)))
8811 (file-name (git-file-name name version))
8812 (sha256
8813 (base32
8814 "1l19ksmimg6b8zzjy0skyhh7z11ql7n5gvilkv7ay5x2b9ndbqwz"))
8815 (modules '((guix build utils)
8816 (ice-9 ftw)
8817 (ice-9 regex)
8818 (srfi srfi-1)
8819 (srfi srfi-26)))
8820 (snippet ; remove bundled libraries except md5
8821 '(let ((base-dir "src/engine/external/"))
8822 (for-each (compose (cut delete-file-recursively <>)
8823 (cut string-append base-dir <>))
8824 (remove (cut string-match "(^.)|(^md5$)" <>)
8825 (scandir base-dir)))
8826 #t))))
8827 (build-system cmake-build-system)
8828 (arguments
8829 (list
8830 #:modules '((guix build cmake-build-system)
8831 ((guix build gnu-build-system) #:prefix gnu:)
8832 (guix build utils))
8833 #:phases
8834 #~(modify-phases %standard-phases
8835 (add-after 'unpack 'patch-paths
8836 (lambda* (#:key outputs #:allow-other-keys)
8837 ;; Embed path to assets.
8838 (substitute* "src/engine/shared/storage.cpp"
8839 (("#define DATA_DIR.*")
8840 (string-append "#define DATA_DIR \""
8841 (assoc-ref outputs "out")
8842 "/share/teeworlds/data"
8843 "\"")))))
8844 (add-after 'unpack 'replace-font
8845 (lambda* (#:key inputs #:allow-other-keys)
8846 (delete-file "datasrc/fonts/DejaVuSans.ttf")
8847 (symlink (string-append (assoc-ref inputs "font-dejavu")
8848 "/share/fonts/truetype/DejaVuSans.ttf")
8849 "datasrc/fonts/DejaVuSans.ttf")))
8850 (replace 'check
8851 (lambda* (#:rest args)
8852 (apply (assoc-ref gnu:%standard-phases 'check)
8853 #:test-target "run_tests" args))))))
8854 (inputs
8855 (list freetype
8856 font-dejavu
8857 glu
8858 json-parser
8859 mesa
8860 pnglite
8861 sdl2
8862 sdl2-image
8863 sdl2-mixer
8864 wavpack
8865 openssl
8866 zlib))
8867 (native-inputs
8868 `(("googletest" ,googletest)
8869 ("python" ,python-wrapper)
8870 ("pkg-config" ,pkg-config)))
8871 (home-page "https://www.teeworlds.com")
8872 (synopsis "2D retro multiplayer shooter game")
8873 (description "Teeworlds is an online multiplayer game. Battle with up to
887416 players in a variety of game modes, including Team Deathmatch and Capture
8875The Flag. You can even design your own maps!")
8876 (license (list license:bsd-3 license:cc-by-sa3.0)))) ; game+maps&languages
8877
8878(define-public enigma
8879 (package
8880 (name "enigma")
8881 (version "1.21")
8882 (source (origin
8883 (method url-fetch)
8884 (uri (string-append "mirror://sourceforge/enigma-game/"
8885 "Release%20" version "/enigma-"
8886 version ".tar.gz"))
8887 (sha256
8888 (base32
8889 "00ffh9pypj1948pg3q9sjp1nmiabh52p5c8wpg9n1dcfgl3cywnq"))))
8890 (build-system gnu-build-system)
8891 (arguments
8892 `(#:configure-flags
8893 (list "--with-system-enet")
8894 #:phases
8895 (modify-phases %standard-phases
8896 (add-after 'unpack 'fix-build-with-new-gcc
8897 (lambda _
8898 ;; Fix build with GCC6 and later by avoiding comparing ifstream
8899 ;; to NULL. Can be removed for versions > 1.21.
8900 (substitute* "src/lev/Proxy.cc"
8901 (("ifs != NULL")
8902 "ifs"))
8903 #t))
8904 (add-after 'unpack 'find-sdl
8905 (lambda _
8906 (substitute* "configure"
8907 (("SDL_ttf.h") "SDL/SDL_ttf.h"))
8908 (substitute* '("tools/ttf2bmf.cc"
8909 "lib-src/enigma-core/ecl_font.cc"
8910 "lib-src/enigma-core/ecl_video.cc"
8911 "lib-src/enigma-core/ecl_buffer.hh"
8912 "src/SoundEngine.cc"
8913 "src/SoundEngine.hh"
8914 "src/MusicManager.cc"
8915 "src/MusicManager.hh"
8916 "src/d_models.cc"
8917 "src/main.cc"
8918 "src/network.cc")
8919 (("#include \"SDL_(image|ttf|mixer|types|syswm|mutex).h\"" line header)
8920 (string-append "#include \"SDL/SDL_" header ".h\"")))
8921 (substitute* "src/main.cc"
8922 (("#include <SDL_(image|ttf|mixer).h>" line header)
8923 (string-append "#include \"SDL/SDL_" header ".h\"")))
8924 #t)))))
8925 (inputs
8926 (list xerces-c
8927 (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)) curl
8928 enet))
8929 (native-inputs
8930 (list pkg-config imagemagick))
8931 (home-page "https://www.nongnu.org/enigma")
8932 (synopsis "Puzzle game with a dexterity component")
8933 (description "Enigma is a puzzle game with 550 unique levels. The object
8934of the game is to find and uncover pairs of identically colored ‘Oxyd’ stones.
8935Simple? Yes. Easy? Certainly not! Hidden traps, vast mazes, laser beams,
8936and most of all, countless hairy puzzles usually block your direct way to the
8937Oxyd stones. Enigma’s game objects (and there are hundreds of them, lest you
8938get bored) interact in many unexpected ways, and since many of them follow the
8939laws of physics (Enigma’s special laws of physics, that is), controlling them
8940with the mouse isn’t always trivial.")
8941 (license license:gpl2+)))
8942
8943(define-public chroma
8944 (package
8945 (name "chroma")
8946 (version "1.21")
8947 (source (origin
8948 (method url-fetch)
8949 (uri (string-append "http://level7.org.uk/chroma/download/chroma-"
8950 version ".tar.bz2"))
8951 (sha256
8952 (base32
8953 "0gb9v518rhqzpfzcvr5gklgldvlzhq0yrhwyas9qln35mkhxdx5x"))))
8954 (build-system gnu-build-system)
8955 (arguments
8956 `(#:tests? #f)) ; no tests included
8957 (inputs
8958 (list (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf))
8959 freetype
8960 ncurses
8961 fontconfig
8962 libxft))
8963 (native-inputs
8964 (list pkg-config))
8965 (home-page "http://level7.org.uk/chroma/")
8966 (synopsis "Abstract puzzle game")
8967 (description "Chroma is an abstract puzzle game. A variety of colourful
8968shapes are arranged in a series of increasingly complex patterns, forming
8969fiendish traps that must be disarmed and mysterious puzzles that must be
8970manipulated in order to give up their subtle secrets. Initially so
8971straightforward that anyone can pick it up and begin to play, yet gradually
8972becoming difficult enough to tax even the brightest of minds.")
8973 (license license:gpl2+)))
8974
8975(define-public fillets-ng
8976 (package
8977 (name "fillets-ng")
8978 (version "1.0.1")
8979 (source (origin
8980 (method url-fetch)
8981 (uri (string-append "mirror://sourceforge/fillets/"
8982 "Fish%20Fillets%20-%20Next%20Generation/"
8983 version "/fillets-ng-" version ".tar.gz"))
8984 (sha256
8985 (base32
8986 "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"))))
8987 (build-system gnu-build-system)
8988 (arguments
8989 `(#:configure-flags
8990 (list (string-append "--with-lua="
8991 (assoc-ref %build-inputs "lua")))
8992 #:make-flags
8993 (list (string-append "CFLAGS=-I"
8994 (assoc-ref %build-inputs "sdl-union")
8995 "/include/SDL")
8996 (string-append "CXXFLAGS=-I"
8997 (assoc-ref %build-inputs "sdl-union")
8998 "/include/SDL"))
8999 #:phases
9000 (modify-phases %standard-phases
9001 ;; Lua 5.1 does not provide it.
9002 (add-after 'unpack 'do-not-link-with-lualib
9003 (lambda _
9004 (substitute* "configure"
9005 (("-llualib") ""))
9006 #t))
9007 (add-after 'install 'install-data
9008 (lambda* (#:key inputs outputs #:allow-other-keys)
9009 (let ((data (string-append (assoc-ref outputs "out")
9010 "/share/games/fillets-ng")))
9011 (mkdir-p data)
9012 (invoke "tar" "-xvf"
9013 (assoc-ref inputs "fillets-ng-data")
9014 "--strip-components=1"
9015 "-C" data)))))))
9016 (inputs
9017 (list (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf)) fribidi
9018 libx11 lua-5.1))
9019 (native-inputs
9020 `(("pkg-config" ,pkg-config)
9021 ("fillets-ng-data"
9022 ,(origin
9023 (method url-fetch)
9024 (uri (string-append "mirror://sourceforge/fillets/"
9025 "Fish%20Fillets%20-%20Next%20Generation/"
9026 version "/fillets-ng-data-" version ".tar.gz"))
9027 (sha256
9028 (base32
9029 "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"))))))
9030 (home-page "https://fillets.sourceforge.net")
9031 (synopsis "Puzzle game")
9032 (description "Fish Fillets NG is strictly a puzzle game. The goal in
9033every of the seventy levels is always the same: find a safe way out. The fish
9034utter witty remarks about their surroundings, the various inhabitants of their
9035underwater realm quarrel among themselves or comment on the efforts of your
9036fish. The whole game is accompanied by quiet, comforting music.")
9037 (license license:gpl2+)))
9038
9039(define-public crawl
9040 (package
9041 (name "crawl")
9042 (version "0.34.1")
9043 (source
9044 (origin
9045 (method git-fetch)
9046 (uri (git-reference
9047 (url "https://github.com/crawl/crawl")
9048 (commit version)))
9049 (file-name (git-file-name name version))
9050 (sha256
9051 (base32 "09x4n4w3rw8sldwprb03yg1igwh4m09iw00g2iq30466jryys6bv"))
9052 (patches (search-patches "crawl-upgrade-saves.patch"))))
9053 (build-system gnu-build-system)
9054 (inputs
9055 (list lua-5.4 ncurses sqlite zlib))
9056 (native-inputs
9057 (list bash-minimal
9058 bison
9059 flex
9060 perl
9061 pkg-config
9062 python-wrapper
9063 python-pyyaml))
9064 (arguments
9065 (list
9066 #:make-flags
9067 #~(list (string-append "SQLITE_INCLUDE_DIR="
9068 #$(this-package-input "sqlite")
9069 "/include")
9070 (string-append "prefix=" #$output)
9071 "SAVEDIR=~/.crawl"
9072 ;; Don't compile with SSE on systems which don't have it.
9073 #$@(match (%current-system)
9074 ((or "i686-linux" "x86_64-linux")
9075 '())
9076 (_ '("NOSSE=TRUE")))
9077 ;; don't build any bundled dependencies
9078 "BUILD_LUA="
9079 "BUILD_SQLITE="
9080 "BUILD_ZLIB="
9081 "-Ccrawl-ref/source")
9082 #:phases
9083 #~(modify-phases %standard-phases
9084 (add-after 'unpack 'set-version
9085 (lambda _
9086 (call-with-output-file "crawl-ref/source/util/release_ver"
9087 (lambda (port)
9088 (display #$version port)))))
9089 (add-after 'unpack 'find-SDL-image
9090 (lambda _
9091 (substitute* "crawl-ref/source/windowmanager-sdl.cc"
9092 (("SDL_image.h") "SDL2/SDL_image.h"))))
9093 (delete 'configure)
9094 (replace 'check
9095 (lambda* (#:key tests? make-flags #:allow-other-keys)
9096 (when tests?
9097 (setenv "HOME" (getcwd))
9098 ;; Fake a terminal for the test cases.
9099 (setenv "TERM" "xterm-256color")
9100 ;; Run the tests that don't require a debug build.
9101 (apply invoke "make" "nondebugtest"
9102 (format #f "-j~d" (parallel-job-count))
9103 ;; Force command line build for test cases.
9104 (append make-flags '("GAME=crawl" "TILES=")))))))))
9105 (synopsis "Roguelike dungeon crawler game")
9106 (description "Dungeon Crawl Stone Soup (also known as \"Crawl\" or DCSS
9107for short) is a roguelike adventure through dungeons filled with dangerous
9108monsters in a quest to find the mystifyingly fabulous Orb of Zot.")
9109 (home-page "https://crawl.develz.org")
9110 (license (list license:gpl2+
9111 license:bsd-2
9112 license:bsd-3
9113 license:cc0
9114 license:expat
9115 license:zlib
9116 license:asl2.0))))
9117
9118;; The linter here claims that patch file names should start with the package
9119;; name. But, in this case, the patches are inherited from crawl with the
9120;; "crawl-" prefix instead of "crawl-tiles-".
9121(define-public crawl-tiles
9122 (package
9123 (inherit crawl)
9124 (name "crawl-tiles")
9125 (arguments
9126 (substitute-keyword-arguments
9127 (package-arguments crawl)
9128 ((#:make-flags flags)
9129 #~(cons*
9130 (string-append "PROPORTIONAL_FONT="
9131 #$(this-package-input "font-dejavu")
9132 "/share/fonts/truetype/DejaVuSans.ttf")
9133 (string-append "MONOSPACED_FONT="
9134 #$(this-package-input "font-dejavu")
9135 "/share/fonts/truetype/DejaVuSansMono.ttf")
9136 "TILES=y"
9137 ;; Rename the executable to allow parallel installation with crawl.
9138 "GAME=crawl-tiles"
9139 #$flags))))
9140 (inputs
9141 (modify-inputs inputs
9142 (prepend font-dejavu freetype glu libpng sdl2 sdl2-image sdl2-mixer)))
9143 (native-inputs
9144 (modify-inputs native-inputs
9145 (prepend pngcrush which)))
9146 (synopsis "Graphical roguelike dungeon crawler game")))
9147
9148(define-public lugaru
9149 (package
9150 (name "lugaru")
9151 (version "1.2")
9152 (source (origin
9153 (method url-fetch)
9154 (uri (string-append "https://github.com/osslugaru/lugaru/releases"
9155 "/download/" version
9156 "/lugaru-" version ".tar.xz"))
9157 (sha256
9158 (base32 "15zgcshy22q51rm72zi6y9z7qlgnz5iw3gczjdlir4bqmxy4gspk"))
9159 (patches
9160 (search-patches "lugaru-fix-sound.patch"))))
9161 (build-system cmake-build-system)
9162 (arguments
9163 (list #:configure-flags #~(list "-DSYSTEM_INSTALL=ON")
9164 #:tests? #f)) ;no test suite
9165 (native-inputs (list pkg-config))
9166 (inputs
9167 (list glu
9168 libjpeg-turbo
9169 libpng
9170 libvorbis
9171 openal
9172 sdl2
9173 zlib))
9174 (home-page "https://osslugaru.gitlab.io")
9175 (synopsis "Cross-platform third-person action game")
9176 (description "Lugaru is a third-person action game. The main character,
9177Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills.
9178In his quest to find those responsible for slaughtering his village, he uncovers
9179a far-reaching conspiracy involving the corrupt leaders of the rabbit republic
9180and the starving wolves from a nearby den. Turner takes it upon himself to
9181fight against their plot and save his fellow rabbits from slavery.")
9182 (license (list license:gpl2+ ; code
9183 ;; assets:
9184 license:cc-by-sa3.0
9185 license:cc-by-sa4.0))))
9186
9187(define-public 0ad-data
9188 (package
9189 (name "0ad-data")
9190 (version "0.28.0")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9195 version "-unix-data.tar.xz"))
9196 (file-name (string-append name "-" version ".tar.xz"))
9197 (sha256
9198 (base32 "0vsj75y4a4psfqiaf2l9n7mhrfh5xzhg1wpzlkh4fb0hw85b6i78"))))
9199 (build-system trivial-build-system)
9200 (native-inputs (list tar unzip xz))
9201 (arguments
9202 `(#:modules ((guix build utils))
9203 #:builder
9204 (begin
9205 (use-modules (guix build utils))
9206 (let ((out (assoc-ref %outputs "out"))
9207 (source (assoc-ref %build-inputs "source"))
9208 (tar (search-input-file %build-inputs "/bin/tar"))
9209 (unzip (search-input-file %build-inputs "/bin/unzip"))
9210 (xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
9211 (setenv "PATH" xz-path)
9212 (mkdir out)
9213 (invoke tar "xvf" source "-C" out "--strip=3")
9214 (for-each (lambda (name)
9215 (let* ((dir (string-append out "/mods/" name))
9216 (file (string-append dir "/" name ".zip")))
9217 (invoke unzip "-o" "-d" dir file)
9218 (delete-file file)))
9219 '("mod" "public"))))))
9220 (synopsis "Data files for 0ad")
9221 (description "0ad-data provides the data files required by the game 0ad.")
9222 (home-page "https://play0ad.com")
9223 (properties '((hidden? . #t)))
9224 (license (list (license:fsdg-compatible
9225 "http://tavmjong.free.fr/FONTS/ArevCopyright.txt"
9226 "Similar to the license of the Bitstream Vera fonts.")
9227 (license:fsdg-compatible
9228 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")
9229 license:cc-by-sa3.0
9230 license:expat
9231 license:gfl1.0
9232 license:gpl2+
9233 license:gpl3+))))
9234
9235(define-public 0ad
9236 (package
9237 (name "0ad")
9238 (version "0.28.0")
9239 (source
9240 (origin
9241 (method url-fetch)
9242 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9243 version "-unix-build.tar.xz"))
9244 (file-name (string-append name "-" version ".tar.xz"))
9245 (sha256
9246 (base32 "0am4smmsl6anqd4ga8sx6z96wjz5jqymkgwdwlpr4sppbrsigqi7"))))
9247 ;; A snippet here would cause a build failure because of timestamps
9248 ;; reset. See https://bugs.gnu.org/26734.
9249 (inputs
9250 (list 0ad-data
9251 curl
9252 enet
9253 fmt
9254 freetype
9255 gloox
9256 icu4c-73
9257 libidn
9258 libpng
9259 libsodium
9260 libvorbis
9261 libxcursor
9262 libxml2
9263 miniupnpc
9264 mozjs-128
9265 openal
9266 sdl2
9267 wxwidgets
9268 zlib))
9269 (native-inputs
9270 (list boost-1.83
9271 cmake-minimal
9272 cxxtest
9273 mesa
9274 pkg-config
9275 python
9276 premake5))
9277 (build-system gnu-build-system)
9278 (arguments
9279 `(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
9280 #:tests? #f ;tests fail currently
9281 #:phases
9282 (modify-phases %standard-phases
9283 (add-after 'unpack 'delete-bundles
9284 (lambda* (#:key inputs #:allow-other-keys)
9285 (delete-file-recursively "libraries/source/spidermonkey")
9286 (delete-file-recursively "libraries/source/cxxtest-4.4")
9287 (substitute* "build/premake/premake5.lua"
9288 (("rootdir\\.\\.\"\\/libraries\\/source\\/cxxtest-4.4\\/bin\\/cxxtestgen\"")
9289 (string-append "\"" (assoc-ref inputs "cxxtest")
9290 "/bin/cxxtestgen"
9291 "\"")))))
9292 (add-after 'unpack 'patch-python-shebangs
9293 ;; A couple Python scripts point to 'python' rather than 'python3'.
9294 ;; They work fine under python3, so let's fix that.
9295 (lambda _
9296 (substitute* "source/tools/webservices/maint_graphics.py"
9297 (("#!/usr/bin/env python")
9298 "#!/usr/bin/env python3"))
9299 (substitute* "source/tools/webservices/manage.py"
9300 (("#!/usr/bin/env python")
9301 "#!/usr/bin/env python3"))))
9302 (add-after 'unpack 'prepare-builtin-libs
9303 ;; Builtin libraries are included in the tarball as other tarballs.
9304 ;; They're usually extracted during the build, but then shebangs
9305 ;; within the libs don't get patched, so we do it here ourselves.
9306 (lambda _
9307 (let ((fcollada-version "28209")
9308 (nvtt-version "28209"))
9309 (with-directory-excursion "libraries/source/fcollada"
9310 (invoke "tar" "-xvf"
9311 (string-append "fcollada-" fcollada-version ".tar.xz"))
9312 (substitute* "build.sh"
9313 (("rm -Rf fcollada-[$][{]PV[}]")
9314 "")
9315 (("\"[$][{]TAR[}]\" xf fcollada-[$][{]PV[}].tar.xz")
9316 "")))
9317 (with-directory-excursion "libraries/source/nvtt"
9318 (invoke "tar" "-xvf"
9319 (string-append "nvtt-" nvtt-version ".tar.xz"))
9320 (substitute* "build.sh"
9321 (("rm -Rf nvtt-[$][{]PV[}]")
9322 "")
9323 (("\"[$][{]TAR[}]\" xf nvtt-[$][{]PV[}].tar.xz")
9324 ""))))))
9325 (add-after 'unpack 'fix-gmake2-references
9326 ;; The current version of 0AD expects premake action 'gmake2',
9327 ;; this was renamed to just 'gmake', so we patch to reflect that.
9328 ;; Remove this when updating to the next release (fixed in main).
9329 (lambda _
9330 (substitute* "build/premake/cxxtest/cxxtest.lua"
9331 (("gmake2")
9332 "gmake"))
9333 (substitute* "build/premake/premake5.lua"
9334 (("if _ACTION == \"gmake\" then")
9335 "if _ACTION == \"gmakelegacy\" then")
9336 (("if _ACTION == \"gmake2\" then")
9337 "if _ACTION == \"gmake\" then"))
9338 (substitute* "build/workspaces/update-workspaces.sh"
9339 (("gmake2")
9340 "gmake"))))
9341 (replace 'configure
9342 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9343 (let* ((jobs (number->string (parallel-job-count)))
9344 (out (assoc-ref outputs "out"))
9345 (lib (string-append out "/lib"))
9346 (data (string-append out "/share/0ad")))
9347 (setenv "JOBS" (string-append "-j" jobs))
9348 (setenv "CC" ,(cc-for-target))
9349 (with-directory-excursion "build/workspaces"
9350 (apply invoke
9351 `("./update-workspaces.sh"
9352 ,(string-append "--libdir=" lib)
9353 ,(string-append "--datadir=" data)
9354 ;; TODO: "--with-system-nvtt"
9355 "--with-system-premake5"
9356 "--with-system-mozjs"
9357 ,@(if tests? '() '("--without-tests"))))))))
9358 (add-before 'build 'build-builtin-libs
9359 (lambda _
9360 (let ((jobs (number->string (parallel-job-count))))
9361 (setenv "JOBS" (string-append "-j" jobs))
9362 (setenv "CC" ,(cc-for-target))
9363 (with-directory-excursion "libraries/source/fcollada"
9364 (invoke "./build.sh"))
9365 (with-directory-excursion "libraries/source/nvtt"
9366 (invoke "./build.sh")))))
9367 (delete 'check)
9368 (replace 'install
9369 (lambda* (#:key inputs outputs #:allow-other-keys)
9370 (chdir "binaries")
9371 (let* ((out (assoc-ref outputs "out"))
9372 (bin (string-append out "/bin"))
9373 (lib (string-append out "/lib"))
9374 (data (string-append out "/share/0ad"))
9375 (applications (string-append out "/share/applications"))
9376 (hicolor (string-append out "/share/icons/hicolor/128x128/apps"))
9377 (metainfo (string-append out "/share/metainfo"))
9378 (mime (string-append out "/share/mime/application"))
9379 (0ad-data (assoc-ref inputs "0ad-data")))
9380 ;; data
9381 (copy-recursively "data" data)
9382 (for-each (lambda (file)
9383 (symlink (string-append 0ad-data "/" file)
9384 (string-append data "/" file)))
9385 '("config" "mods/mod" "mods/public" "tools"))
9386 ;; libraries
9387 (for-each (lambda (file)
9388 (install-file file lib))
9389 (find-files "system" "\\.so$"))
9390 (copy-recursively "../libraries/source/nvtt/lib" lib)
9391 ;; binaries
9392 (install-file "system/pyrogenesis" bin)
9393 (with-directory-excursion bin
9394 (symlink "pyrogenesis" "0ad"))
9395 ;; resources
9396 (with-directory-excursion "../build/resources"
9397 (install-file "0ad.desktop" applications)
9398 (install-file "0ad.png" hicolor)
9399 (install-file "0ad.appdata.xml" metainfo)
9400 (install-file "pyrogenesis.xml" mime)))))
9401 (add-after 'install 'check
9402 (lambda* (#:key tests? #:allow-other-keys)
9403 (when tests?
9404 (with-directory-excursion "system"
9405 (invoke "./test"))))))))
9406 (home-page "https://play0ad.com")
9407 (synopsis "3D real-time strategy game of ancient warfare")
9408 (description "0 A.D. is a real-time strategy (RTS) game of ancient
9409warfare. It's a historically-based war/economy game that allows players to
9410relive or rewrite the history of twelve ancient civilizations, each depicted
9411at their peak of economic growth and military prowess.
9412
94130ad needs a window manager that supports 'Extended Window Manager Hints'.")
9414 (license (list license:bsd-2
9415 license:bsd-3
9416 license:expat
9417 license:gpl2+
9418 license:ibmpl1.0
9419 license:isc
9420 license:lgpl2.1
9421 license:lgpl3
9422 license:mpl2.0
9423 license:zlib))))
9424
9425(define-public open-adventure
9426 (package
9427 (name "open-adventure")
9428 (version "1.20")
9429 (source
9430 (origin
9431 (method git-fetch)
9432 (uri (git-reference
9433 (url "https://gitlab.com/esr/open-adventure")
9434 (commit version)))
9435 (file-name (git-file-name name version))
9436 (sha256
9437 (base32 "0lbggjmh9g4zvnzzqz0qspmc24yg25bjalm06dlvhd22vz7hrfy5"))))
9438 (build-system gnu-build-system)
9439 (arguments
9440 (list
9441 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
9442 #:parallel-tests? #f ;some tests fail non-deterministically
9443 #:phases
9444 #~(modify-phases %standard-phases
9445 (delete 'configure) ;no configure script
9446 (add-before 'build 'use-echo
9447 (lambda _
9448 (substitute* (list "tests/Makefile" "tests/tapview")
9449 (("/bin/echo") (which "echo")))))
9450 #$@(if (this-package-native-input "ruby-asciidoctor")
9451 #~((add-after 'build 'build-manpage
9452 (lambda _
9453 ;; This target is missing a dependency
9454 (substitute* "Makefile"
9455 ((".adoc.6:" line)
9456 (string-append line " advent.adoc")))
9457 (invoke "make" ".adoc.6")))
9458 ;; There is no install target.
9459 (replace 'install
9460 (lambda _
9461 (let ((bin (string-append #$output "/bin"))
9462 (man (string-append #$output "/share/man/man6")))
9463 (install-file "advent" bin)
9464 (install-file "advent.6" man)))))
9465 #~((replace 'install
9466 (lambda _
9467 (let ((bin (string-append #$output "/bin")))
9468 (install-file "advent" bin)))))))))
9469 (native-inputs
9470 (append
9471 (list asciidoc
9472 cppcheck
9473 libedit
9474 pkg-config
9475 python-pyyaml
9476 python-wrapper)
9477 (if (supported-package? ruby-asciidoctor/minimal)
9478 (list ruby-asciidoctor/minimal)
9479 '())))
9480 (home-page "https://gitlab.com/esr/open-adventure")
9481 (synopsis "Colossal Cave Adventure")
9482 (description
9483 "The original Colossal Cave Adventure from 1976 was the origin of all
9484text adventures, dungeon-crawl (computer) games, and computer-hosted
9485roleplaying games. This is a forward port of the last version released by
9486Crowther & Woods, its original authors, in 1995. It has been known as
9487``adventure 2.5'' and ``430-point adventure''.")
9488 (license license:bsd-2)))
9489
9490(define-public tome4
9491 (package
9492 (name "tome4")
9493 (version "1.7.6")
9494 (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
9495 (source
9496 (origin
9497 (method url-fetch)
9498 (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
9499 version ".tar.bz2"))
9500 (sha256
9501 (base32 "0338lirc4jbmq29449bw8c6src8b91yn9x14w2nxr31zh00fm7cq"))
9502 (modules '((guix build utils)))))
9503 (build-system gnu-build-system)
9504 (native-inputs
9505 (list unzip))
9506 (inputs
9507 (list glu
9508 libvorbis
9509 luajit
9510 openal
9511 premake4
9512 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
9513 (arguments
9514 (list
9515 #:tests? #false ;no test
9516 #:make-flags
9517 #~(list (string-append "CC=" #$(cc-for-target))
9518 "config=release")
9519 ;; XXX: Building in parallel occasionally causes this build failure:
9520 ;; ../src/luajit2/src/host/buildvm.c:73:10: fatal error: buildvm_arch.h:
9521 ;; No such file or directory
9522 #:parallel-build? #f
9523 #:phases
9524 #~(modify-phases %standard-phases
9525 (delete 'bootstrap)
9526 (replace 'configure
9527 (lambda _
9528 (invoke "premake4" "gmake")))
9529 (add-after 'set-paths 'set-sdl-paths
9530 (lambda* (#:key inputs #:allow-other-keys)
9531 (setenv "CPATH"
9532 (string-append
9533 (search-input-directory inputs "/include/SDL2")
9534 ":" (or (getenv "CPATH") "")))))
9535 (add-after 'set-sdl-paths 'set-cflags
9536 (lambda _
9537 (setenv "CFLAGS"
9538 (string-append
9539 "-g -O2 "
9540 "-Wno-error=incompatible-pointer-types "
9541 "-Wno-error=implicit-function-declaration"))))
9542 ;; premake doesn't provide install target
9543 (replace 'install
9544 (lambda* (#:key inputs outputs #:allow-other-keys)
9545 (let* ((out (assoc-ref outputs "out"))
9546 (usr (string-append out "/usr"))
9547 (bin (string-append out "/bin"))
9548 (licenses (string-append out "/share/licenses"))
9549 (documents (string-append out "/share/doc"))
9550 (pixmaps (string-append out "/share/pixmaps"))
9551 (icon "te4-icon.png")
9552 (data (string-append out "/share/" #$name))
9553 (applications (string-append
9554 out "/share/applications"))
9555 (unzip (string-append
9556 (assoc-ref inputs "unzip") "/bin/unzip"))
9557 (wrapper (string-append bin "/" #$name)))
9558 ;; icon
9559 (mkdir-p pixmaps)
9560 (invoke unzip "-j"
9561 (string-append
9562 "game/engines/te4-" #$version ".teae")
9563 (string-append
9564 "data/gfx/" icon) "-d" pixmaps)
9565 ;; game executable
9566 (install-file "t-engine" data)
9567 (mkdir-p bin)
9568 (with-output-to-file wrapper
9569 (lambda ()
9570 (display
9571 (string-append
9572 "#!/bin/sh\n"
9573 ;; No bootstrap code found,
9574 ;; defaulting to working directory
9575 ;; for engine code!
9576 "cd " data "\n"
9577 "exec -a tome4 ./t-engine \"$@\"\n"))))
9578 (chmod wrapper #o555)
9579 ;; licenses
9580 (for-each (lambda (file)
9581 (install-file file licenses))
9582 '("COPYING" "COPYING-MEDIA"))
9583 ;; documents
9584 (for-each (lambda (file)
9585 (install-file file documents))
9586 '("CONTRIBUTING" "CREDITS"))
9587 ;; data
9588 (copy-recursively "bootstrap" (string-append
9589 data "/bootstrap"))
9590 (copy-recursively "game" (string-append data "/game"))
9591 ;; launcher
9592 (mkdir-p applications)
9593 (make-desktop-entry-file
9594 (string-append applications "/" #$name ".desktop")
9595 #:name "ToME4"
9596 #:comment #$synopsis
9597 #:exec #$name
9598 #:icon icon
9599 #:categories '("Game" "RolePlaying"))))))))
9600 (home-page "https://te4.org")
9601 (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
9602combat and advanced character building. Play as one of many unique races and
9603classes in the lore-filled world of Eyal, exploring random dungeons, facing
9604challenging battles, and developing characters with your own tailored mix of
9605abilities and powers.")
9606 (license license:gpl3+)))
9607
9608(define-public torcs
9609 (package
9610 (name "torcs")
9611 (version "1.3.9")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (string-append "mirror://sourceforge/" name
9616 "/all-in-one/" version "/"
9617 name "-" version ".tar.bz2"))
9618 ;; Source archive is in fact in gzip format, rename it.
9619 (file-name (string-append name "-" version ".tar.bz2"))
9620 (sha256
9621 (base32
9622 "0k6d0dm7qnpqlgl6yjk42fk5n045in1xf08v8mkm8achsa39xipr"))
9623 (modules '((guix build utils)
9624 (ice-9 ftw)
9625 (ice-9 regex)
9626 (srfi srfi-26)))
9627 (snippet
9628 #~(begin
9629 ;; Delete Windows-specific sources and pre-built binaries.
9630 (delete-file-recursively "src/windows")
9631 ;; The license of the kw-* and pw-* car models includes a
9632 ;; non-commercial clause, hence does not comply with the GNU FSDG.
9633 (with-directory-excursion "data/cars/models"
9634 (for-each delete-file-recursively
9635 (scandir "." (cut string-match "^(kc|pw)-" <>))))
9636 ;; Delete extraneous CVS directories.
9637 (for-each delete-file-recursively
9638 (find-files "." (lambda (file stat)
9639 (and (eq? 'directory (stat:type stat))
9640 (string=? "CVS" (basename file))))
9641 #:directories? #t))))))
9642 (build-system gnu-build-system)
9643 (arguments
9644 ;; Building in parallel fails due to a race where include files have not
9645 ;; yet been generated, with errors such as "controlconfig.cpp:30:10:
9646 ;; fatal error: tgfclient.h: No such file or directory". The issue was
9647 ;; reported to the 'torcs-devel' mailing list (see:
9648 ;; https://sourceforge.net/p/torcs/mailman/message/58834764/).
9649 (list #:modules `(,@%default-gnu-modules (srfi srfi-26))
9650 #:parallel-build? #f
9651 #:tests? #f ;no test suite
9652 ;; Ensure the binaries find libraries provided by this very package
9653 ;; (see: https://issues.guix.gnu.org/73979).
9654 #:configure-flags
9655 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output
9656 "/lib/torcs/lib"))
9657 #:phases
9658 #~(modify-phases %standard-phases
9659 (add-after 'unpack 'patch-commands
9660 (lambda* (#:key inputs #:allow-other-keys)
9661 (substitute* "src/linux/torcs.in"
9662 (("/bin/bash")
9663 (search-input-file inputs "bin/bash")))))
9664 (add-after 'install 'install-data
9665 (lambda _
9666 (invoke "make" "datainstall")))
9667 (add-after 'install-data 'install-doc
9668 (lambda _
9669 (let ((docdir (string-append #$output "/share/doc/torcs/"))
9670 (man6 (string-append #$output "/share/man/man6")))
9671 (for-each (cut install-file <> man6)
9672 (find-files "doc/man" "\\.6$"))
9673 (install-file "doc/userman/how_to_drive.html" docdir)
9674 (copy-recursively "doc/userman/images"
9675 (string-append docdir "/images")))))
9676 (add-after 'install 'install-freedesktop-entry
9677 (lambda _
9678 (let ((iconsdir (string-append #$output "/share/icons/hicolor/"
9679 "48x48/apps")))
9680 (mkdir-p iconsdir)
9681 (copy-file "Ticon.png" (string-append iconsdir "/torcs.png")))
9682 (install-file "torcs.desktop"
9683 (string-append #$output
9684 "/share/applications/"))))
9685 (add-after 'install 'fix-permissions
9686 ;; XXX: Otherwise, the guix daemon reports: "suspicious
9687 ;; ownership or permission on /gnu/store/xxx-torcs-1.3.7',
9688 ;; rejecting this build output".
9689 (lambda _
9690 (chmod #$output #o755))))))
9691 (native-inputs (list bzip2))
9692 (inputs
9693 (list bash-minimal
9694 freealut
9695 freeglut
9696 libice
9697 libpng
9698 libsm
9699 libvorbis
9700 libxi
9701 libxmu
9702 libxrandr
9703 libxrender
9704 libxt
9705 mesa
9706 openal
9707 plib
9708 zlib))
9709 (home-page "https://sourceforge.net/projects/torcs/")
9710 (synopsis "Car racing simulator")
9711 (description "TORCS stands for The Open Racing Car Simulator. It can be
9712used as an ordinary car racing game, as an artificial intelligence (AI) racing
9713game, or as a research platform. The game has features such as:
9714@itemize
9715@item Input support for a driving wheel, joystick, keyboard or mouse
9716@item More than 30 car models
9717@item 30 tracks
9718@item 50 opponents to race against
9719@item Lighting, smoke, skidmarks and glowing brake disks graphics
9720@item Simple damage model and collisions
9721@item Tire and wheel properties (springs, dampers, stiffness, etc.)
9722@item Aerodynamics (ground effect, spoilers, etc.)
9723@end itemize
9724The difficulty level can be configured, impacting how much damage is caused by
9725collisions and the level of traction the car has on the track, which makes the
9726game fun for both novice and experts.")
9727 (license (list license:gpl2+ ;source and most assets
9728 license:fdl1.2+)))) ;how_to_drive.html, faq.html
9729
9730(define-public quakespasm
9731 (package
9732 (name "quakespasm")
9733 (version "0.96.2")
9734 (source
9735 (origin
9736 (method url-fetch)
9737 (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
9738 version ".tar.gz"))
9739 (sha256
9740 (base32 "0hr58w1d2yw82vm9lkln05z6d4sjlcr6grxhf6sqdqwyfy9nv1mw"))))
9741 (arguments
9742 (list #:tests? #f
9743 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
9744 "MP3LIB=mpg123"
9745 "USE_CODEC_FLAC=1"
9746 "USE_CODEC_MIKMOD=1"
9747 "USE_SDL2=1"
9748 "-CQuake")
9749 #:phases #~(modify-phases %standard-phases
9750 (delete 'configure)
9751 (add-after 'unpack 'fix-makefile-paths
9752 (lambda _
9753 (mkdir-p (string-append #$output "/bin"))
9754 (substitute* "Quake/Makefile"
9755 (("/usr/local/games")
9756 (string-append #$output "/bin"))))))))
9757 (build-system gnu-build-system)
9758 (inputs (list flac
9759 libmikmod
9760 libmpg123
9761 libvorbis
9762 mesa
9763 sdl2))
9764 (synopsis "First person shooter engine for Quake 1")
9765 (description "Quakespasm is a modern engine for id software's Quake 1.
9766It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9767some graphical niceities, and numerous bug-fixes and other improvements.")
9768 (home-page "https://quakespasm.sourceforge.net/")
9769 (license license:gpl2+)))
9770
9771(define-public vkquake
9772 (package
9773 (inherit quakespasm)
9774 (name "vkquake")
9775 (version "1.32.3.1")
9776 (source
9777 (origin
9778 (method git-fetch)
9779 (uri (git-reference
9780 (url "https://github.com/Novum/vkQuake")
9781 (commit version)))
9782 (file-name (git-file-name name version))
9783 (sha256
9784 (base32 "0ch9rd6fckqs9bhh6z8qpdi2byra6lhk00y3vj4804351hpgmj0y"))))
9785 (arguments
9786 `(#:make-flags
9787 (let ((vulkanlib (string-append (assoc-ref %build-inputs
9788 "vulkan-loader") "/lib")))
9789 (list "CC=gcc"
9790 "MP3LIB=mpg123"
9791 "USE_CODEC_FLAC=1"
9792 "USE_CODEC_MIKMOD=1"
9793 "USE_SDL2=1"
9794 (string-append "LDFLAGS=-Wl,-rpath=" vulkanlib)
9795 "-CQuake"))
9796 #:phases (modify-phases %standard-phases
9797 (add-after 'unpack 'patch-for-new-vulkan
9798 (lambda _
9799 ;; Mimic upstream commit a869a22d9b51c68e for
9800 ;; compatibility with newer vulkan-headers.
9801 (substitute* "Quake/gl_rmisc.c"
9802 (("VK_DYNAMIC_STATE_RANGE_SIZE")
9803 "3"))
9804 #t))
9805 (delete 'configure)
9806 (add-after 'unpack 'fix-makefile-paths
9807 (lambda* (#:key outputs #:allow-other-keys)
9808 (let ((vulkan (assoc-ref %build-inputs
9809 "vulkan-loader"))
9810 (out (assoc-ref outputs "out")))
9811 (mkdir-p (string-append out "/bin"))
9812 (substitute* "Quake/Makefile" ((" /usr")
9813 (string-append " " out)))
9814 (substitute* "Quake/Makefile" (("/games")
9815 (string-append "/bin")))
9816 (substitute* "Quake/Makefile" (("..VULKAN_SDK.") vulkan))
9817 #t))))
9818 ,@(strip-keyword-arguments '(#:make-flags #:phases)
9819 (package-arguments quakespasm))))
9820 (inputs (modify-inputs inputs
9821 (prepend
9822 glslang
9823 spirv-tools
9824 vulkan-loader
9825 vulkan-headers)))
9826 (description "vkquake is a modern engine for id software's Quake 1.
9827It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9828some graphical niceities, and numerous bug-fixes and other improvements.")
9829 (home-page "https://github.com/Novum/vkQuake")))
9830
9831(define-public yamagi-quake2
9832 (package
9833 (name "yamagi-quake2")
9834 (version "8.51")
9835 (source
9836 (origin
9837 (method url-fetch)
9838 (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
9839 version ".tar.xz"))
9840 (sha256
9841 (base32 "0xk321ph15wgydlmln3k7bdn4zdls2zliggsnkjwlnbax0cfy3z4"))))
9842 (build-system gnu-build-system)
9843 (arguments
9844 `(#:tests? #f
9845 #:make-flags
9846 (list "CC=gcc"
9847 ;; An optional directory where it will look for quake2 data files
9848 ;; in addition to the current working directory.
9849 "WITH_SYSTEMWIDE=yes"
9850 "WITH_SYSTEMDIR=\"/opt/quake2\"")
9851 #:phases
9852 (modify-phases %standard-phases
9853 (delete 'configure)
9854 (add-before 'build 'patch-libraries
9855 (lambda* (#:key inputs #:allow-other-keys)
9856 ;; The game writes paths to openal.so and curl.so to ~/.yq2/...
9857 ;; Workaround: hard-code the compiled paths where it loads them;
9858 ;; this prevents loading old or garbage collected libraries.
9859 (substitute* "src/client/sound/qal.c"
9860 (("al_driver->string")
9861 (string-append "\"" (assoc-ref inputs "openal")
9862 "/lib/libopenal.so\"")))
9863 (substitute* "src/client/curl/qcurl.c"
9864 (("cl_libcurl->string")
9865 (string-append "\"" (assoc-ref inputs "curl")
9866 "/lib/libcurl.so\"")))))
9867 (replace 'install
9868 (lambda* (#:key outputs #:allow-other-keys)
9869 (let ((out (assoc-ref outputs "out")))
9870 (mkdir-p (string-append out "/lib"))
9871 (mkdir-p (string-append out "/bin"))
9872 ;; The yamagi-quake2 binary must be in the same directory
9873 ;; as its engine libraries, but symlinking it to /bin is okay.
9874 ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
9875 (copy-recursively "release"
9876 (string-append out "/lib/yamagi-quake2"))
9877 (symlink (string-append out "/lib/yamagi-quake2/quake2")
9878 (string-append out "/bin/yamagi-quake2"))
9879 (symlink (string-append out "/lib/yamagi-quake2/q2ded")
9880 (string-append out "/bin/yamagi-q2ded"))))))))
9881 (native-inputs
9882 (list pkg-config))
9883 (inputs
9884 (list curl
9885 libvorbis
9886 mesa
9887 openal
9888 sdl2
9889 zlib))
9890 (synopsis "First person shooter engine based on quake2")
9891 (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
9892The main focus is an unchanged single player experience like back in 1997,
9893thus the gameplay and the graphics are unaltered. However the user may use one
9894of the unofficial retexturing packs. In comparison with the official client,
9895over 1000 bugs were fixed and an extensive code audit done,
9896making Yamagi Quake II one of the most solid Quake II implementations available.")
9897 (home-page "https://www.yamagi.org/quake2/")
9898 (license (list license:gpl2+ ; game and server
9899 (license:non-copyleft ; info-zip
9900 "file://LICENSE"
9901 "See Info-Zip section.")
9902 license:public-domain)))) ; stb
9903
9904(define-public nudoku
9905 (package
9906 (name "nudoku")
9907 (version "8.0.0")
9908 (source
9909 (origin
9910 (method git-fetch)
9911 (uri (git-reference
9912 (url "https://github.com/jubalh/nudoku")
9913 (commit version)))
9914 (file-name (git-file-name name version))
9915 (sha256
9916 (base32 "1hcbzgn5jivy1mca1h25mwrmy7iav4j7dp7vmp3fa2lx6qwmiv7s"))))
9917 (build-system gnu-build-system)
9918 (native-inputs
9919 (list autoconf automake gettext-minimal pkg-config))
9920 (inputs
9921 (list ncurses))
9922 (home-page "https://jubalh.github.io/nudoku/")
9923 (synopsis "Sudoku for your terminal")
9924 (description "Nudoku is a ncurses-based Sudoku game for your terminal.")
9925 (license license:gpl3+)))
9926
9927(define-public the-butterfly-effect
9928 (package
9929 (name "the-butterfly-effect")
9930 (version "0.9.3.1")
9931 (source
9932 (origin
9933 (method git-fetch)
9934 (uri (git-reference
9935 (url "https://github.com/the-butterfly-effect/tbe")
9936 (commit (string-append "v" version))))
9937 (file-name (git-file-name name version))
9938 (sha256
9939 (base32
9940 "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj"))))
9941 (build-system qt-build-system)
9942 (arguments
9943 `(#:phases
9944 (modify-phases %standard-phases
9945 (add-after 'unpack 'set-cmake-install-prefix
9946 (lambda* (#:key outputs #:allow-other-keys)
9947 (substitute* "CMakeLists.txt"
9948 (("/usr") (assoc-ref outputs "out"))
9949 (("TBE_BIN_DIR games") "TBE_BIN_DIR bin"))))
9950 (add-after 'unpack 'disable-translations
9951 ;; TODO: Re-enable translations when they no longer fail to build.
9952 (lambda _
9953 (substitute* "CMakeLists.txt"
9954 ((".*i18n.*") "")))))
9955 ;; Test suite requires a running Xorg server. Even when
9956 ;; provided, it fails with "D-Bus library appears to be
9957 ;; incorrectly set up; failed to read machine uuid: Failed to
9958 ;; open "/etc/machine-id": No such file or directory" along
9959 ;; with multiple "QPainter:: ... Painter not active" warnings.
9960 #:tests? #f))
9961 (inputs
9962 (list qtbase-5 qtsvg-5))
9963 (native-inputs
9964 `(("gettext-minimal" ,gettext-minimal)
9965 ("qttools-5" ,qttools-5)
9966 ("qtwayland-5" ,qtwayland-5)))
9967 (synopsis "Realistic physics puzzle game")
9968 (description "The Butterfly Effect (tbe) is a game that uses
9969realistic physics simulations to combine lots of simple mechanical
9970elements to achieve a simple goal in the most complex way possible.")
9971 (home-page "http://the-butterfly-effect.org/")
9972 ;; Main license is GPL2-only. However, artwork is distributed
9973 ;; under various licenses, listed here.
9974 (license (list license:gpl2 license:public-domain license:expat
9975 license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))
9976
9977(define-public the-powder-toy
9978 (package
9979 (name "the-powder-toy")
9980 (version "100.0.399")
9981 (source
9982 (origin
9983 (method git-fetch)
9984 (uri (git-reference
9985 (url "https://github.com/The-Powder-Toy/The-Powder-Toy")
9986 (commit (string-append "v" version))))
9987 (file-name (git-file-name name version))
9988 (sha256
9989 (base32 "0f2gdjykavsz944j4ahpjbj6k8v4sh09d1y82c4y46wayl78cp97"))
9990 (snippet
9991 #~(begin (use-modules (guix build utils))
9992 (substitute* "meson.build"
9993 (("'aarch64', 'x86_64'")
9994 (string-append "'aarch64', 'loongarch64', 'mips64', 'ppc64', "
9995 "'riscv64', 'sparc64', 'x86_64'")))))))
9996 (build-system meson-build-system)
9997 (arguments
9998 `(#:configure-flags (list (string-append
9999 "-Dworkaround_elusive_bzip2_include_dir="
10000 (assoc-ref %build-inputs "bzip2"))
10001 ,@(if (this-package-input "lua")
10002 `("-Dlua=lua-5.2"
10003 "-Dworkaround_noncpp_lua=true")
10004 '()))
10005 #:phases
10006 (modify-phases %standard-phases
10007 ;; Our lua variants are named lua-<version>, not lua<version>.
10008 (add-after 'unpack 'adjust-lua-variant-names
10009 (lambda _
10010 (substitute* '("meson.build"
10011 "meson_options.txt")
10012 (("lua5\\.") "lua-5."))))
10013 ;; No install target
10014 (replace 'install
10015 (lambda _
10016 (let* ((output (assoc-ref %outputs "out"))
10017 (bin (string-append output "/bin"))
10018 (share (string-append output "/share"))
10019 (apps (string-append share "/applications")))
10020 (mkdir-p bin)
10021 (mkdir-p apps)
10022 (install-file "powder" bin)
10023 (install-file "resources/powder.desktop" apps)
10024 (for-each
10025 (lambda (size)
10026 (let ((dir (string-append share "/icons/hicolor/"
10027 size "x" size "/apps")))
10028 (mkdir-p dir)
10029 (copy-file (string-append (assoc-ref %build-inputs "source")
10030 "/resources/generated_icons/icon_exe_"
10031 size ".png")
10032 (string-append dir "/powdertoy-powder.png"))))
10033 '("16" "32" "48"))))))))
10034 (native-inputs (list pkg-config))
10035 (inputs
10036 (append
10037 (list bzip2
10038 curl
10039 fftwf
10040 jsoncpp
10041 libpng
10042 python-wrapper)
10043 (if (supported-package? luajit)
10044 (list luajit)
10045 (list lua-5.2))
10046 (list sdl2
10047 zlib)))
10048 (synopsis "Free physics sandbox game")
10049 (description
10050 "The Powder Toy is a free physics sandbox game, which simulates air
10051pressure and velocity, heat, gravity and a countless number of interactions
10052between different substances! The game provides you with various building
10053materials, liquids, gases and electronic components which can be used to
10054construct complex machines, guns, bombs, realistic terrains and almost
10055anything else. You can then mine them and watch cool explosions, add
10056intricate wirings, play with little stickmen or operate your machine.")
10057 (home-page "https://powdertoy.co.uk/")
10058 ;; The few files that have a license header specify GPLv3+, but most don't
10059 ;; and it's not otherwise specified anywhere.
10060 (license license:gpl3)))
10061
10062(define-public pioneer
10063 (package
10064 (name "pioneer")
10065 (version "20220203")
10066 (source (origin
10067 (method git-fetch)
10068 (uri (git-reference
10069 (url "https://github.com/pioneerspacesim/pioneer")
10070 (commit version)))
10071 (file-name (git-file-name name version))
10072 (sha256
10073 (base32
10074 "0qjq6lsr1rmcnvq9b7r745cpp7n0q6cpc3k81q8ai4xspbq61m8w"))))
10075 (build-system cmake-build-system)
10076 (native-inputs
10077 (list pkg-config))
10078 (inputs
10079 (list assimp
10080 curl
10081 freetype
10082 glew
10083 glu
10084 libpng
10085 libsigc++-2
10086 libvorbis
10087 lua-5.2 ;not compatible with 5.3
10088 mesa
10089 (sdl-union (list sdl2 sdl2-image))))
10090 (arguments
10091 `(#:tests? #f ;tests are broken
10092 #:configure-flags (list "-DUSE_SYSTEM_LIBLUA:BOOL=YES"
10093 "-DUSE_SYSTEM_LIBGLEW:BOOL=YES"
10094 (string-append "-DPIONEER_DATA_DIR="
10095 %output "/share/games/pioneer"))
10096 #:make-flags (list "all" "build-data")))
10097 (home-page "https://pioneerspacesim.net")
10098 (synopsis "Game of lonely space adventure")
10099 (description
10100 "Pioneer is a space adventure game set in our galaxy at the turn of the
1010131st century. The game is open-ended, and you are free to eke out whatever
10102kind of space-faring existence you can think of. Look for fame or fortune by
10103exploring the millions of star systems. Turn to a life of crime as a pirate,
10104smuggler or bounty hunter. Forge and break alliances with the various
10105factions fighting for power, freedom or self-determination. The universe is
10106whatever you make of it.")
10107 (license license:gpl3)))
10108
10109(define-public badass
10110 (package
10111 (name "badass")
10112 (version "0.0.0-20151201180210-02e7c38d503f")
10113 (source
10114 (origin
10115 (method git-fetch)
10116 (uri (git-reference
10117 (url "https://github.com/umayr/badass")
10118 (commit (go-version->git-ref version))))
10119 (file-name (git-file-name name version))
10120 (sha256
10121 (base32 "1b0y7xz9y0cqxfphfznz2zhfk7mm2vvmldf088w2fm8c8spj4g28"))))
10122 (build-system go-build-system)
10123 (arguments
10124 '(#:import-path "github.com/umayr/badass"))
10125 (home-page "https://github.com/umayr/badass")
10126 (synopsis "Hacking contribution graphs in git")
10127 (description
10128 "Badass generates false commits for a range of dates, essentially
10129hacking the gamification of contribution graphs on platforms such as
10130Github or Gitlab.")
10131 (license license:expat)))
10132
10133(define-public colobot
10134 (package
10135 (name "colobot")
10136 (version "0.2.1-alpha")
10137 (source
10138 (origin
10139 (method git-fetch)
10140 (uri (git-reference
10141 (url "https://github.com/colobot/colobot")
10142 (commit (string-append "colobot-gold-" version))
10143 (recursive? #t))) ;for "data/" subdir
10144 (file-name (git-file-name name version))
10145 (sha256
10146 (base32 "0bpy5nzkvq5nfr0w8jf7bl7zs8yz2cpzp87pnkdlgwl3adcn9nsw"))))
10147 (build-system cmake-build-system)
10148 (arguments
10149 (list
10150 #:tests? #f ;no test
10151 #:modules '((guix build cmake-build-system)
10152 (guix build utils)
10153 (srfi srfi-1)
10154 (ice-9 match)
10155 (ice-9 regex))
10156 #:phases
10157 #~(modify-phases %standard-phases
10158 (add-after 'unpack 'make-git-checkout-writable
10159 (lambda _
10160 (for-each make-file-writable (find-files "."))))
10161 (add-after 'unpack 'fix-directories
10162 (lambda _
10163 (substitute* "CMakeLists.txt"
10164 (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix)
10165 (string-append prefix "/bin"))
10166 (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix)
10167 (string-append prefix "/colobot")))))
10168 (add-after 'fix-directories 'install-music
10169 ;; Retrieve and install music files.
10170 (lambda* (#:key inputs #:allow-other-keys)
10171 ;; Installation process tries to download music files using
10172 ;; "wget" if not already present. Since we are going another
10173 ;; route, skip "wget" command check.
10174 (substitute* "data/music/CMakeLists.txt"
10175 (("find_program\\(WGET wget\\)") ""))
10176 ;; Populate "music/" directory.
10177 (let ((data
10178 (any
10179 (match-lambda ((_ . input)
10180 (and (string-match "colobot-music" input)
10181 input)))
10182 inputs)))
10183 (invoke "tar" "-xvf" data "-Cdata/music")))))))
10184 (native-inputs
10185 (list (origin
10186 (method url-fetch)
10187 (uri (string-append "https://colobot.info/files/music/"
10188 "colobot-music_ogg_" version ".tar.gz"))
10189 (sha256
10190 (base32
10191 "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m")))
10192 gettext-minimal
10193 (librsvg-for-system)
10194 po4a
10195 python-wrapper))
10196 (inputs
10197 (list boost-1.83
10198 glew
10199 libogg
10200 libpng
10201 libsndfile
10202 libvorbis
10203 openal
10204 physfs
10205 (sdl-union (list sdl2 sdl2-image sdl2-ttf))))
10206 (synopsis "Educational programming strategy game")
10207 (description "Colobot: Gold Edition is a real-time strategy game, where
10208you can program your units (bots) in a language called CBOT, which is similar
10209to C++ and Java. Your mission is to find a new planet to live and survive.
10210You can save humanity and get programming skills!")
10211 (home-page "https://colobot.info")
10212 (license license:gpl3+)))
10213
10214(define-public odamex
10215 (package
10216 (name "odamex")
10217 (version "10.6.0")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (string-append
10222 "mirror://sourceforge/odamex/Odamex/" version "/"
10223 "odamex-src-" version ".tar.xz"))
10224 (sha256
10225 (base32 "1vy6d0md5ws5319bjjbaqnca68vslgk22k9lh4yd9n85hzlwacpi"))
10226 (modules '((guix build utils)))
10227 (snippet
10228 '(begin
10229 ;; XXX: Unbundle more, they are not replaced by the ones provided
10230 ;; in inputs: fltk, jsoncpp, miniupnp, protobuf.
10231 ;;
10232 ;; Remove some bundled libraries.
10233 (with-directory-excursion "libraries"
10234 (for-each delete-file-recursively
10235 '("curl" "libpng" "portmidi" "zlib")))))))
10236 (build-system cmake-build-system)
10237 (arguments
10238 (list
10239 #:tests? #f ; no tests
10240 #:configure-flags
10241 #~(list "-DBUILD_CLIENT=1"
10242 "-DBUILD_MASTER=1"
10243 "-DBUILD_SERVER=1"
10244 "-DUSE_INTERNAL_LIBS=0"
10245 "-DUSE_INTERNAL_MINIUPNP=0")))
10246 (native-inputs
10247 (list deutex pkg-config))
10248 (inputs
10249 (list alsa-lib
10250 curl
10251 fltk
10252 jsoncpp
10253 libpng
10254 miniupnpc
10255 portmidi
10256 protobuf
10257 sdl2
10258 sdl2-mixer
10259 zlib))
10260 (home-page "https://odamex.net/")
10261 (synopsis "Multiplayer Doom port")
10262 (description "Odamex is a modification of the Doom engine that
10263allows players to easily join servers dedicated to playing Doom
10264online.")
10265 (license license:gpl2+)))
10266
10267(define-public chocolate-doom
10268 (package
10269 (name "chocolate-doom")
10270 (version "3.1.1")
10271 (source (origin
10272 (method git-fetch)
10273 (uri (git-reference
10274 (url "https://github.com/chocolate-doom/chocolate-doom")
10275 (commit (string-append "chocolate-doom-" version))))
10276 (file-name (git-file-name name version))
10277 (sha256
10278 (base32 "0xpribvacbma7l6138wizhcl2b0kyn05jwdkspw176zl7v3k1bn1"))))
10279 (build-system gnu-build-system)
10280 (arguments
10281 (list
10282 #:phases
10283 #~(modify-phases %standard-phases
10284 (replace 'bootstrap
10285 ;; The bundled autogen.sh script unconditionally runs ./configure.
10286 (lambda _ (invoke "autoreconf" "-vif"))))))
10287 (inputs (list sdl2-net sdl2-mixer sdl2))
10288 (native-inputs
10289 (list automake autoconf pkg-config))
10290 (synopsis "Doom source port preserving the look, feel, and bugs of vanilla
10291Doom")
10292 (description
10293 "Chocolate Doom takes a different approach to other source ports. Its
10294aim is to accurately reproduce the experience of playing Vanilla Doom. It is
10295a conservative, historically accurate Doom source port, which is compatible
10296with the thousands of mods and levels that were made before the Doom source
10297code was released. Rather than flashy new graphics, Chocolate Doom's main
10298features are its accurate reproduction of the game as it was played in the
102991990s. The project is developed around a carefully-considered philosophy that
10300intentionally restricts which features may be added (and rejects any that
10301affect gameplay).")
10302 (home-page "https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom")
10303 (license license:gpl2)))
10304
10305(define-public crispy-doom
10306 (package
10307 (inherit chocolate-doom)
10308 (name "crispy-doom")
10309 (version "7.1")
10310 (source (origin
10311 (method git-fetch)
10312 (uri (git-reference
10313 (url "https://github.com/fabiangreffrath/crispy-doom")
10314 (commit (string-append "crispy-doom-" version))))
10315 (file-name (git-file-name name version))
10316 (sha256
10317 (base32 "0lpib7dg1ygnjw1yjamfiybhkly4lp42r4lawskbjslfyjafm4ic"))))
10318 (synopsis "Limit-removing enhanced-resolution Doom source port based on
10319Chocolate Doom")
10320 (description
10321 "Crispy Doom is a friendly fork of Chocolate Doom that provides a higher
10322display resolution, removes the static limits of the Doom engine and offers
10323further optional visual, tactical and physical enhancements while remaining
10324entirely config file, savegame, netplay and demo compatible with the
10325original.")
10326 (home-page "https://www.chocolate-doom.org/wiki/index.php/Crispy_Doom")))
10327
10328(define-public woof-doom
10329 (package
10330 (name "woof-doom")
10331 (version "15.3.0")
10332 (source
10333 (origin
10334 (method git-fetch)
10335 (uri (git-reference
10336 (url "https://github.com/fabiangreffrath/woof")
10337 (commit (string-append "woof_" version))))
10338 (file-name (git-file-name name version))
10339 (sha256
10340 (base32 "0ki7wqjhqhjxci04aksh9m8m35gi2db89475v79rjzdgk00b3mqv"))
10341 (modules '((guix build utils)))
10342 (snippet '(begin
10343 (with-directory-excursion "third-party"
10344 (delete-file-recursively "miniz")
10345 (delete-file-recursively "yyjson")
10346 (delete-file-recursively "spng")
10347 (substitute* "CMakeLists.txt"
10348 (("add_library\\(miniz.+")
10349 "find_package(miniz REQUIRED)")
10350 (("target_.+\\(miniz.+$") "")
10351 (("add_library\\(spng.+")
10352 "find_package(PkgConfig)
10353pkg_search_module(spng REQUIRED spng)")
10354 (("target_.+\\(spng.+$") "")))
10355 (delete-file-recursively "win32")
10356 (substitute* (find-files "src" ".")
10357 (("miniz.h") "miniz/miniz.h"))))))
10358 (build-system cmake-build-system)
10359 (arguments
10360 (list
10361 #:tests? #f)) ;'demotest' requires internet access.
10362 (native-inputs (list pkg-config python))
10363 (inputs (list libebur128
10364 libsndfile
10365 libxmp
10366 miniz
10367 openal
10368 sdl2
10369 sdl2-net
10370 spng
10371 yyjson
10372 fluidsynth))
10373 (home-page "https://fabiangreffrath.github.io/woof/")
10374 (synopsis "MBF-lineage Doom source port")
10375 (description
10376 "Woof! is a continuation of the MBF lineage of Doom source ports, with
10377modern features such as dynamic resolution scaling, uncapped framerates,
10378adjustable field of view, 3D audio with HRTF and 7.1 surround sound
10379support, and modern gamepad features including rumble, gyro, and flick
10380stick support. Supports the new MBF21 format, as well as the MUSINFO,
10381UMAPINFO, DEHEXTRA, and DSDHacked specifictions.")
10382 (license
10383 ;; See README.md
10384 (list (license:non-copyleft
10385 "https://bitbucket.org/jpommier/pffft/src/master/pffft.h"
10386 "FFTPACK license")
10387 license:bsd-3
10388 license:cc-by3.0
10389 license:cc0
10390 license:expat
10391 license:gpl2
10392 license:gpl3+
10393 license:public-domain
10394 license:gpl2+))))
10395
10396(define-public xonotic-data
10397 (package
10398 (name "xonotic-data")
10399 (version "0.8.6")
10400 (source
10401 (origin
10402 (method url-fetch)
10403 (uri (string-append "https://dl.xonotic.org/xonotic-"
10404 version ".zip"))
10405 (file-name (string-append name "-" version ".zip"))
10406 (sha256
10407 (base32 "0kcnps65k81sm56s5dclahvllilnir3ix9kf5xr9jx0fh26hz1ah"))))
10408 (build-system trivial-build-system)
10409 (native-inputs (list unzip))
10410 (arguments
10411 (list #:modules '((guix build utils))
10412 #:builder
10413 #~(begin
10414 (use-modules (guix build utils))
10415 (let* ((out (assoc-ref %outputs "out"))
10416 (xonotic (string-append out "/share/xonotic"))
10417 (source (assoc-ref %build-inputs "source"))
10418 (unzip (search-input-file %build-inputs "/bin/unzip")))
10419 (invoke unzip source)
10420 (chdir "Xonotic")
10421 (install-file "key_0.d0pk" xonotic)
10422 (copy-recursively "data"
10423 (string-append xonotic "/data"))
10424 (copy-recursively "server"
10425 (string-append xonotic "/server"))))))
10426 (home-page "https://xonotic.org")
10427 (synopsis "Data files for Xonotic")
10428 (description
10429 "Xonotic-data provides the data files required by the game Xonotic.")
10430 (properties '((hidden? . #t))) ;data package useless on its own
10431 (license (list license:gpl2+
10432 (license:x11-style "file://server/rcon.pl")))))
10433
10434(define-public xonotic
10435 (package
10436 (name "xonotic")
10437 (version "0.8.6")
10438 (source
10439 (origin
10440 (method url-fetch)
10441 (uri (string-append "https://dl.xonotic.org/xonotic-"
10442 version "-source.zip"))
10443 (file-name (string-append name "-" version ".zip"))
10444 (sha256
10445 (base32 "1a0j825rb86i34xc5k6spsma41gcgp6yl8qs2affhjpz3iwar4lb"))))
10446 (build-system gnu-build-system)
10447 (arguments
10448 (list #:configure-flags
10449 #~(list (string-append "--prefix=" #$output)
10450 "--disable-rijndael")
10451 #:modules '((guix build gnu-build-system)
10452 (guix build utils)
10453 (srfi srfi-26))
10454 #:phases
10455 #~(modify-phases %standard-phases
10456 (add-before 'configure 'build-darkplaces
10457 (lambda* (#:key make-flags parallel-build? outputs
10458 #:allow-other-keys)
10459 (let* ((out (assoc-ref outputs "out"))
10460 (share (string-append out "/share/xonotic/")))
10461 (apply invoke "make"
10462 "-C" "source/darkplaces"
10463 "-f" "makefile"
10464 "-j" (if parallel-build?
10465 (number->string (parallel-job-count))
10466 "1")
10467 (string-append "CC=" #$(cc-for-target))
10468 (string-append "DP_FS_BASEDIR=" share)
10469 "DP_LINK_TO_LIBJPEG=1"
10470 "DP_SOUND_API=ALSA"
10471 "cl-release"
10472 "sdl-release"
10473 "sv-release"
10474 make-flags))))
10475 (add-before 'configure 'preconfigure
10476 (lambda _
10477 (chdir "source/d0_blind_id")
10478 (invoke "sh" "autogen.sh")))
10479 (add-after 'install 'symlink-data
10480 (lambda* (#:key outputs inputs #:allow-other-keys)
10481 (let* ((out (assoc-ref outputs "out"))
10482 (data (assoc-ref inputs "xonotic-data")))
10483 (symlink (string-append data "/share/xonotic")
10484 (string-append out "/share/xonotic")))))
10485 (add-after 'install 'install-desktop-entries
10486 (lambda* (#:key outputs #:allow-other-keys)
10487 (let* ((out (assoc-ref outputs "out"))
10488 (app (string-append out "/share/applications")))
10489 ;; Add .desktop files for the 2 variants and the symlink.
10490 (for-each
10491 (lambda (variant)
10492 (let* ((file (if variant
10493 (format #f "xonotic-~(~a~)" variant)
10494 "xonotic"))
10495 (name (if variant
10496 (format #f "Xonotic (~a)" variant)
10497 "Xonotic"))
10498 (exec (string-append out "/bin/" file)))
10499 (make-desktop-entry-file
10500 (string-append app "/" file ".desktop")
10501 #:name name
10502 #:comment `((#f #$(package-synopsis this-package)))
10503 #:exec exec
10504 #:try-exec exec
10505 #:icon "xonotic"
10506 #:categories '("Game"))))
10507 (list #f "GLX" "SDL")))))
10508 (add-after 'install 'install-icons
10509 (lambda* (#:key outputs #:allow-other-keys)
10510 (let ((out (assoc-ref outputs "out")))
10511 (for-each
10512 (lambda (file)
10513 (let* ((size (string-filter char-numeric? file))
10514 (icons (string-append out "/share/icons/hicolor/"
10515 size "x" size "/apps")))
10516 (mkdir-p icons)
10517 (copy-file file (string-append icons "/xonotic.png"))))
10518 (find-files "../../misc/logos/icons_png"
10519 "^xonotic_[0-9]+\\.png$")))))
10520 (add-after 'install 'install-binaries
10521 (lambda* (#:key outputs #:allow-other-keys)
10522 (let* ((out (assoc-ref outputs "out"))
10523 (bin (string-append out "/bin")))
10524 (for-each
10525 (lambda (variant)
10526 (copy-file
10527 (string-append "../darkplaces/darkplaces-" variant)
10528 (string-append bin "/xonotic-" variant)))
10529 (list "dedicated" "glx" "sdl")))))
10530 (add-after 'install-binaries 'wrap-binaries
10531 (lambda* (#:key outputs inputs #:allow-other-keys)
10532 ;; All games must be wrapped to get sound and networking.
10533 (let* ((out (assoc-ref outputs "out"))
10534 (bin (string-append out "/bin"))
10535 (curl (assoc-ref inputs "curl"))
10536 (vorbis (assoc-ref inputs "libvorbis")))
10537 (for-each (cut wrap-program <>
10538 `("LD_LIBRARY_PATH" ":" prefix
10539 (,(string-append curl "/lib:"
10540 vorbis "/lib"))))
10541 (find-files bin "^xonotic"))
10542
10543 ;; Provide a default xonotic executable, defaulting to SDL.
10544 (symlink "xonotic-sdl" (string-append bin "/xonotic"))))))))
10545 (native-inputs
10546 (list autoconf
10547 automake
10548 gmp
10549 libtool
10550 pkg-config
10551 unzip))
10552 (inputs
10553 (list alsa-lib
10554 bash-minimal
10555 curl
10556 libjpeg-turbo
10557 libmodplug
10558 libvorbis
10559 libogg
10560 libpng
10561 libx11
10562 libxpm
10563 libxxf86dga
10564 libxxf86vm
10565 libxext
10566 libxau
10567 libxdmcp
10568 mesa
10569 glu
10570 freetype
10571 sdl2
10572 hicolor-icon-theme
10573 xonotic-data))
10574 (home-page "https://xonotic.org")
10575 (synopsis "Fast-paced first-person shooter game")
10576 (description
10577 "Xonotic is a free, fast-paced first-person shooter.
10578The project is geared towards providing addictive arena shooter
10579gameplay which is all spawned and driven by the community itself.
10580Xonotic is a direct successor of the Nexuiz project with years of
10581development between them, and it aims to become the best possible
10582open-source FPS of its kind.")
10583 (license (list license:gpl2+
10584 license:bsd-3 ; /source/d0_blind_id folder and others
10585 (license:x11-style "" "See file rcon.pl.")))))
10586
10587(define-public frotz
10588 (package
10589 (name "frotz")
10590 (version "2.55")
10591 (source (origin
10592 (method url-fetch)
10593 (uri (list (string-append
10594 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10595 "frotz/frotz-" version ".tar.gz")
10596 (string-append
10597 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10598 "frotz/frotz-" version ".tar.gz")))
10599 (sha256
10600 (base32
10601 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10602 (build-system gnu-build-system)
10603 (arguments
10604 (list #:tests? #f ; there are no tests
10605 #:make-flags
10606 #~(list (string-append "CC=" #$(cc-for-target)))
10607 #:phases
10608 #~(modify-phases %standard-phases
10609 (delete 'configure) ; no configure-script
10610 (replace 'install
10611 (lambda* (#:key outputs #:allow-other-keys)
10612 (let* ((out (assoc-ref outputs "out"))
10613 (bin (string-append out "/bin"))
10614 (man (string-append out "/share/man/man6")))
10615 (install-file "frotz" bin)
10616 (mkdir-p man)
10617 (install-file "doc/frotz.6" man)))))))
10618 (native-inputs (list pkg-config which))
10619 (inputs (list ao libmodplug libsamplerate libsndfile libvorbis ncurses))
10620 (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
10621 (description "Frotz is an interpreter for Infocom games and other Z-machine
10622games in the text adventure/interactive fiction genre. This version of Frotz
10623complies with standard 1.0 of Graham Nelson's specification. It plays all
10624Z-code games V1-V8, including V6, with sound support through libao, and uses
10625ncurses for text display.")
10626 (home-page "https://frotz.sourceforge.net")
10627 (license license:gpl2+)))
10628
10629(define-public frotz-dumb-terminal
10630 (package
10631 (name "frotz-dumb-terminal")
10632 (version "2.55")
10633 (source (origin
10634 (method url-fetch)
10635 (uri (list (string-append
10636 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10637 "frotz/frotz-" version ".tar.gz")
10638 (string-append
10639 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10640 "frotz/frotz-" version ".tar.gz")))
10641 (sha256
10642 (base32
10643 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10644 (build-system gnu-build-system)
10645 (native-inputs (list pkg-config which))
10646 (arguments
10647 `(#:tests? #f ; there are no tests
10648 #:phases
10649 (modify-phases %standard-phases
10650 (delete 'configure)
10651 (replace 'build
10652 (lambda _
10653 (invoke "make" (string-append "CC=" ,(cc-for-target)) "dumb")))
10654 (replace 'install
10655 (lambda* (#:key outputs #:allow-other-keys)
10656 (let* ((out (assoc-ref outputs "out"))
10657 (bin (string-append out "/bin"))
10658 (man (string-append out "/share/man/man6")))
10659 (install-file "dfrotz" bin)
10660 (mkdir-p man)
10661 (install-file "doc/dfrotz.6" man)
10662 #t))))))
10663 (synopsis "Portable Z-machine dumb interpreter for text adventure games")
10664 (description "Frotz is an interpreter for Infocom games and
10665other Z-machine games in the text adventure/interactive fiction genre.
10666dfrotz is the dumb interface version. You get no screen control; everything
10667is just printed to the terminal line by line. The terminal handles all the
10668scrolling. Maybe you'd like to experience what it's like to play Adventure on
10669a teletype. A much cooler use for compiling Frotz with the dumb interface is
10670that it can be wrapped in CGI scripting, PHP, and the like to allow people
10671to play games on webpages. It can also be made into a chat bot.")
10672 (home-page "https://frotz.sourceforge.net")
10673 (license license:gpl2+)))
10674
10675(define-public frotz-sdl
10676 (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
10677 (package
10678 (name "frotz-sdl")
10679 (version "2.45pre")
10680 (source (origin
10681 (method git-fetch)
10682 (uri (git-reference
10683 (url "https://gitlab.com/DavidGriffith/frotz")
10684 (commit commit)))
10685 (sha256
10686 (base32
10687 "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))
10688 (file-name (git-file-name name version))))
10689 (build-system gnu-build-system)
10690 (arguments
10691 `(#:tests? #f ; there are no tests
10692 #:phases
10693 (modify-phases %standard-phases
10694 (delete 'configure)
10695 (add-before 'build 'patch-makefile
10696 (lambda _
10697 (substitute* "Makefile"
10698 (("lcurses") "lncurses")
10699 (("^BUILD_DATE_TIME =.*$")
10700 "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
10701 #t))
10702 (replace 'build
10703 (lambda _
10704 (invoke "make" "sdl")))
10705 (replace 'install
10706 (lambda* (#:key outputs #:allow-other-keys)
10707 (let* ((out (assoc-ref outputs "out"))
10708 (bin (string-append out "/bin"))
10709 (man (string-append out "/share/man/man6")))
10710 (install-file "sfrotz" bin)
10711 (mkdir-p man)
10712 (install-file "doc/sfrotz.6" man)
10713 #t))))))
10714 (native-inputs
10715 (list pkg-config which perl))
10716 (inputs (list sdl2
10717 sdl2-mixer
10718 libmodplug
10719 libsamplerate
10720 libsndfile
10721 libvorbis
10722 ncurses
10723 freetype
10724 libjpeg-turbo))
10725 (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
10726 (description "Frotz is an interpreter for Infocom games and other Z-machine
10727games in the text adventure/interactive fiction genre. This version of Frotz
10728using SDL fully supports all these versions of the Z-Machine including the
10729graphical version 6. Graphics and sound are created through the use of the SDL
10730libraries. AIFF sound effects and music in MOD and OGG formats are supported
10731when packaged in Blorb container files or optionally from individual files.")
10732 (home-page "https://frotz.sourceforge.net")
10733 (license license:gpl2+))))
10734
10735(define-public frozen-bubble
10736 ;; Last official release is very outdated (2010). Use latest commit (2017).
10737 (let ((commit "d6a029110ad6ab9e4960052e175addc98807fb7e")
10738 (revision "1"))
10739 (package
10740 (name "frozen-bubble")
10741 (version (git-version "2.2.1" revision commit))
10742 (source
10743 (origin
10744 (method git-fetch)
10745 (uri (git-reference
10746 (url "https://github.com/kthakore/frozen-bubble")
10747 (commit commit)))
10748 (file-name (git-file-name name version))
10749 (sha256
10750 (base32 "1rfrcym5lf4qac2qdklikb1ywijyxypq298azzxahy461dadl6cx"))))
10751 (build-system perl-build-system)
10752 (arguments
10753 `(#:phases
10754 (modify-phases %standard-phases
10755 ;; Build process needs to create files in the "server"
10756 ;; directory.
10757 (add-after 'unpack 'fix-permissions
10758 (lambda _
10759 (for-each make-file-writable
10760 (find-files "server" "." #:directories? #t))))
10761 ;; By default, build stops at warnings.
10762 (add-after 'unpack 'prevent-build-error
10763 (lambda _
10764 (substitute* "inc/My/Builder.pm"
10765 (("-Werror") ""))))
10766 (add-after 'install 'install-desktop-file-and-icons
10767 (lambda* (#:key outputs #:allow-other-keys)
10768 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
10769 (hicolor (string-append share "/icons/hicolor")))
10770 ;; Create desktop entry.
10771 (make-desktop-entry-file
10772 (string-append share "/applications/" ,name ".desktop")
10773 #:name "Frozen Bubble"
10774 #:comment "Frozen Bubble arcade game"
10775 #:exec ,name
10776 #:icon ,name
10777 #:categories '("Game" "ArcadeGame"))
10778 ;; Add icons.
10779 (with-directory-excursion "share/icons"
10780 (for-each
10781 (lambda (size)
10782 (let* ((dim (string-append size "x" size))
10783 (dir (string-append hicolor "/" dim "/apps")))
10784 (mkdir-p dir)
10785 (copy-file
10786 (string-append "frozen-bubble-icon-" dim ".png")
10787 (string-append dir "/frozen-bubble.png"))))
10788 '("16" "32" "48" "64"))))))
10789 (add-after 'install 'wrap-perl-libs
10790 (lambda* (#:key outputs #:allow-other-keys)
10791 (let ((out (assoc-ref outputs "out"))
10792 (perl5lib (getenv "PERL5LIB")))
10793 (for-each (lambda (prog)
10794 (wrap-program (string-append out "/" prog)
10795 `("PERL5LIB" ":" prefix
10796 (,(string-append perl5lib ":" out
10797 "/lib/perl5/site_perl")))))
10798 (find-files "bin" "."))))))))
10799 (native-inputs
10800 (list perl-alien-sdl perl-capture-tiny perl-locale-maketext-lexicon
10801 perl-module-build pkg-config))
10802 (inputs
10803 (list bash-minimal
10804 glib
10805 perl-compress-bzip2
10806 perl-file-sharedir
10807 perl-file-slurp
10808 perl-file-which
10809 perl-ipc-system-simple
10810 perl-sdl
10811 (sdl-union (list sdl sdl-image sdl-mixer sdl-pango sdl-ttf))))
10812 (home-page "http://frozen-bubble.org/")
10813 (synopsis "Puzzle with bubbles")
10814 (description
10815 "Frozen-Bubble is a clone of the popular Puzzle Bobble game, in which
10816you attempt to shoot bubbles into groups of the same color to cause them to
10817pop.
10818
10819Players compete as penguins and must use the arrow keys to aim a colored
10820bubble at groups of bubbles. The objective is to clear all the bubbles off
10821the screen before a bubble passes below a line at the bottom.
10822
10823It features 100 single-player levels, a two-player mode, music and striking
10824graphics. A level editor is also included to allow players to create and play
10825their own levels.")
10826 (license license:gpl2))))
10827
10828(define-public libmanette
10829 (package
10830 (name "libmanette")
10831 (version "0.2.13")
10832 (source (origin
10833 (method url-fetch)
10834 (uri (string-append "mirror://gnome/sources/libmanette/"
10835 (version-major+minor version) "/"
10836 "libmanette-" version ".tar.xz"))
10837 (sha256
10838 (base32
10839 "1bnqfxd9b5vff9256f8vxd404fkvbvc5gxva6qcjj2fyw3yw4z18"))))
10840 (build-system meson-build-system)
10841 (native-inputs
10842 (list `(,glib "bin") ; for glib-compile-resources
10843 gobject-introspection pkg-config vala))
10844 (propagated-inputs
10845 (list glib hidapi libevdev libgudev)) ;per manette-0.2.pc
10846 (home-page "https://wiki.gnome.org/Apps/Games")
10847 (synopsis "Game controller library")
10848 (description "Libmanette is a small GObject library giving you simple
10849access to game controllers. It supports the de-facto standard gamepads as
10850defined by the W3C standard Gamepad specification or as implemented by the SDL
10851GameController.")
10852 (license license:lgpl2.1+)))
10853
10854(define-public quadrapassel
10855 (package
10856 (name "quadrapassel")
10857 (version "50.2")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (string-append "mirror://gnome/sources/quadrapassel/"
10861 (version-major version) "/"
10862 "quadrapassel-" version ".tar.xz"))
10863 (sha256
10864 (base32
10865 "0z8lz8zyxgmcm09xkibv8xgcwbsgs4jzaqiybgndijyfcvyq36fg"))))
10866 (build-system meson-build-system)
10867 (arguments
10868 (list
10869 #:tests? #f ;libgnome-games-support-tests test failure
10870 #:glib-or-gtk? #t
10871 #:phases
10872 #~(modify-phases %standard-phases
10873 (add-after 'unpack 'skip-gtk-update-icon-cache
10874 ;; Don't create 'icon-theme.cache'.
10875 (lambda _
10876 (substitute* "meson.build"
10877 (("gtk_update_icon_cache: true")
10878 "gtk_update_icon_cache: false")))))))
10879 (native-inputs
10880 (list blueprint-compiler
10881 desktop-file-utils ; for desktop-file-validate
10882 gettext-minimal
10883 (list glib "bin") ; for glib-compile-resources
10884 pkg-config
10885 vala))
10886 (inputs
10887 (list gtk
10888 libadwaita
10889 libmanette
10890 librsvg
10891 libsndfile
10892 openal))
10893 (home-page "https://gitlab.gnome.org/GNOME/quadrapassel")
10894 (synopsis "GNOME version of Tetris")
10895 (description "Quadrapassel comes from the classic falling-block game,
10896Tetris. The goal of the game is to create complete horizontal lines of
10897blocks, which will disappear. The blocks come in seven different shapes made
10898from four blocks each: one straight, two L-shaped, one square, and two
10899S-shaped. The blocks fall from the top center of the screen in a random
10900order. You rotate the blocks and move them across the screen to drop them in
10901complete lines. You score by dropping blocks fast and completing lines. As
10902your score gets higher, you level up and the blocks fall faster.")
10903 (license license:gpl2+)))
10904
10905(define-public endless-sky
10906 (package
10907 (name "endless-sky")
10908 (version "0.11.2")
10909 (source
10910 (origin
10911 (method git-fetch)
10912 (uri (git-reference
10913 (url "https://github.com/endless-sky/endless-sky")
10914 (commit (string-append "v" version))))
10915 (file-name (git-file-name name version))
10916 (sha256
10917 (base32 "1ck667v7q90a7sinn1xjlyd4s3n0zwxagd853vspwd22v1imm823"))))
10918 (build-system cmake-build-system)
10919 (arguments
10920 (list #:configure-flags #~(list "-DES_USE_VCPKG=0"
10921 "-DES_USE_SYSTEM_LIBRARIES=1")
10922 #:make-flags #~(list (string-append "PREFIX=" #$output))
10923 #:build-type "Release"
10924 #:tests? (not (target-x86-32?))
10925 #:phases
10926 #~(modify-phases %standard-phases
10927 (add-after 'unpack 'fix-paths
10928 (lambda _
10929 ;; Look for resources in the store directory.
10930 (substitute* "source/Files.cpp"
10931 (("/usr/local") #$output))
10932 ;; Install game binary into %out/bin.
10933 (substitute* "CMakeLists.txt"
10934 (("games\\)") "bin)")))))))
10935 (inputs
10936 (list catch2
10937 flac
10938 glew
10939 libavif
10940 libjpeg-turbo
10941 libmad
10942 libpng
10943 minizip
10944 openal
10945 pkgconf
10946 sdl2
10947 `(,util-linux "lib"))) ; for libuuid
10948 (home-page "https://endless-sky.github.io/")
10949 (synopsis "2D space trading and combat game")
10950 (description "Endless Sky is a 2D space trading and combat game. Explore
10951other star systems. Earn money by trading, carrying passengers, or completing
10952missions. Use your earnings to buy a better ship or to upgrade the weapons and
10953engines on your current one. Blow up pirates. Take sides in a civil war. Or
10954leave human space behind and hope to find friendly aliens whose culture is more
10955civilized than your own.")
10956 (license (list license:gpl3+
10957 license:cc-by-sa3.0
10958 license:cc-by-sa4.0
10959 license:public-domain))))
10960
10961(define-public speed-dreams-data
10962 ;; Use the same tag version as speed-dreams package.
10963 (hidden-package
10964 (package
10965 (name "speed-dreams-data")
10966 (version "2.4.2")
10967 (source
10968 (origin
10969 (method git-fetch)
10970 (uri (git-reference
10971 (url (string-append "https://forge.a-lec.org/speed-dreams/"
10972 name))
10973 (commit (string-append "v" version))))
10974 (file-name (git-file-name name version))
10975 (sha256
10976 (base32
10977 "1igavpsn8v9v866hawmgx47a6wz0bxykmf540961jfzav85j5m7p"))))
10978 (build-system cmake-build-system)
10979 (arguments (list #:tests? #f)) ;no test suite
10980 (home-page "https://www.speed-dreams.net/en")
10981 (synopsis "Data for the Speed Dreams racing game")
10982 (description "This package contains the non-functional data for the
10983Speed Dreams racing game.")
10984 (license license:gpl2+))))
10985
10986(define-public speed-dreams-freesolid
10987 ;; Use the commit corresponding to the 'freesolid' submodule
10988 ;; (https://forge.a-lec.org/speed-dreams/speed-dreams-code).
10989 (hidden-package
10990 (package
10991 (name "speed-dreams-freesolid")
10992 (version "2.1.2")
10993 (source (origin
10994 (method git-fetch)
10995 (uri (git-reference
10996 (url (string-append "https://forge.a-lec.org/speed-dreams/freesolid"))
10997 (commit "2c0071923be6afb487ed4e3b84da501f0a2e7e2d")))
10998 (file-name (git-file-name name version))
10999 (sha256
11000 (base32
11001 "025ml2nzhkfki28ckjjggqpkr1gd02c2blpr4afc5175r8bfh2w4"))))
11002 (build-system cmake-build-system)
11003 (arguments
11004 (list
11005 #:tests? #f ;no test suite
11006 #:build-type "Release"
11007 #:configure-flags
11008 #~(list "-DBUILD_SHARED_LIBS=ON"))) ;speed-dreams build system needs a shared library
11009
11010 (home-page "https://forge.a-lec.org/speed-dreams/freesolid")
11011 (synopsis "Speed-Dreams 3D collision detection C++ library")
11012 (description "Speed Dreams FreeSOLID is a fork of FreeSOLID, a library for
11013collision detection of three-dimensional objects undergoing rigid motion and
11014deformation. It is designed to be used in interactive 3D graphics
11015applications.")
11016 (license license:lgpl2.0+))))
11017
11018(define-public speed-dreams
11019 (package
11020 (name "speed-dreams")
11021 (version "2.4.2")
11022 (source
11023 (origin
11024 (method git-fetch)
11025 (uri (git-reference
11026 (url (string-append "https://forge.a-lec.org/"
11027 name "/" name "-code.git"))
11028 (commit (string-append "v" version))))
11029 (file-name (git-file-name name version))
11030 (sha256
11031 (base32
11032 "0r8liki7rcpi85a829qjbj37cnh00899qr8a09qsfj47cj52qi47"))))
11033 (build-system cmake-build-system)
11034 (arguments
11035 (list
11036 #:tests? #f ;no test suite
11037 #:build-type "Release"
11038 #:configure-flags
11039 #~(list "-DOPTION_TRACKEDITOR=OFF" ;not detecting jdk properly
11040 "-DOPTION_3RDPARTY_EXPAT=ON" ;use system expat library
11041 "-DSD_BINDIR:PATH=bin" ;install to /bin instead of /games
11042 (string-append "-DVERSION_LONG=" #$version))))
11043 (native-inputs (list pkg-config speed-dreams-data))
11044 (inputs
11045 (list cjson
11046 curl
11047 enet
11048 expat
11049 freeglut
11050 speed-dreams-freesolid
11051 freetype
11052 glm
11053 libjpeg-turbo
11054 libogg
11055 libpng
11056 libvorbis
11057 minizip
11058 openal
11059 openscenegraph
11060 plib
11061 rhash
11062 sdl2
11063 sdl2-mixer
11064 tinygltf
11065 zlib))
11066 (home-page "https://sourceforge.net/projects/speed-dreams/")
11067 (synopsis "Car racing simulator")
11068 (description "Speed Dreams is a car racing simulator featuring
11069high-quality 3D graphics and an accurate physics engine, aiming for maximum
11070realism. Initially forked from TORCS, it features improvements to the
11071graphics and physics simulation, and supports modern input methods such as
11072gamepads by use of the SDL library. It features more than 20 tracks and more
11073than 80 cars to race with. Extra (freely licensed) assets can be downloaded
11074via the in-game download manager.")
11075 (license (list license:gpl2+))))
11076
11077(define-public stepmania
11078 ;; Last release on July 24, 2018.
11079 (let ((commit "d55acb1ba26f1c5b5e3048d6d6c0bd116625216f")
11080 (revision "1"))
11081 (package
11082 (name "stepmania")
11083 (version (git-version "5.1.0-b2" revision commit))
11084 (source
11085 (origin
11086 (method git-fetch)
11087 (uri (git-reference
11088 (url "https://github.com/stepmania/stepmania")
11089 (commit commit)))
11090 (file-name (git-file-name name version))
11091 (sha256
11092 (base32
11093 "00fxwlfvsmsyll1wp5dp05dxwi81w8l8rb7ms735zqjimm1zdlg3"))
11094 (patches (search-patches "stepmania-ffmpeg-compat.patch"))
11095 (modules '((guix build utils)
11096 (ice-9 ftw)))
11097 (snippet
11098 '(begin
11099 ;; Remove song files, which are licensed under a non-commercial
11100 ;; clause, and a course pointing to them.
11101 (for-each delete-file-recursively
11102 '("Songs/StepMania 5/Goin' Under"
11103 "Songs/StepMania 5/MechaTribe Assault"
11104 "Songs/StepMania 5/Springtime"))
11105 (for-each delete-file '("Courses/Default/Jupiter.crs"
11106 "Courses/Default/Jupiter.png"))
11107 ;; Unbundle external sources, keep CMakeProject-* files for
11108 ;; compatibility, lua and libmmmagic.
11109 (with-directory-excursion "extern"
11110 (for-each
11111 (lambda (f)
11112 (unless (member f '("." ".."
11113 "CMakeLists.txt"
11114 "CMakeProject-glew.cmake"
11115 "CMakeProject-json.cmake"
11116 "CMakeProject-jpeg.cmake"
11117 "CMakeProject-lua.cmake"
11118 "CMakeProject-mad.cmake"
11119 "CMakeProject-mmmagic.cmake"
11120 "CMakeProject-pcre.cmake"
11121 "CMakeProject-png.cmake"
11122 "CMakeProject-tomcrypt.cmake"
11123 "CMakeProject-tommath.cmake"
11124 "CMakeProject-zlib.cmake"
11125 "libmmmagic"
11126 "lua-5.1"))
11127 (delete-file-recursively f)))
11128 (scandir ".")))
11129 ;; Fix up #include directives.
11130 (substitute* "src/RageUtil.cpp"
11131 (("\\.\\./extern/pcre/pcre\\.h") "pcre.h"))
11132 ;; Include missing <ctime> header.
11133 (substitute* "src/arch/ArchHooks/ArchHooks.h"
11134 (("#define ARCH_HOOKS_H" all)
11135 (string-append all "\n#include <ctime> // struct tm")))))))
11136 (build-system cmake-build-system)
11137 (arguments
11138 `(#:tests? #f ;FIXME: couldn't find how to run tests
11139 #:build-type "Release"
11140 #:out-of-source? #f ;for the 'install-desktop' phase
11141 #:configure-flags
11142 (list "-DWITH_SYSTEM_FFMPEG=1"
11143 "-DWITH_SYSTEM_GLEW=1"
11144 "-DWITH_SYSTEM_JSONCPP=1"
11145 "-DWITH_SYSTEM_JPEG=1"
11146 "-DWITH_SYSTEM_MAD=1"
11147 "-DWITH_SYSTEM_OGG=1"
11148 "-DWITH_SYSTEM_PCRE=1"
11149 "-DWITH_SYSTEM_PNG=1"
11150 "-DWITH_SYSTEM_TOMMATH=1"
11151 "-DWITH_SYSTEM_TOMCRYPT=1"
11152 "-DWITH_SYSTEM_ZLIB=1"
11153 ;; SSE instructions are available on Intel systems only.
11154 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
11155 (%current-system)))
11156 '("x86_64" "i686"))
11157 '()
11158 '("-DWITH_SSE2=NO"))
11159 ;; Configuration cannot find GTK2 without the two following
11160 ;; flags.
11161 (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
11162 (assoc-ref %build-inputs "gtk+")
11163 "/lib/gtk-2.0/include")
11164 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
11165 (assoc-ref %build-inputs "glib")
11166 "/lib/glib-2.0/include"))
11167 #:phases
11168 (modify-phases %standard-phases
11169 (add-after 'unpack 'ensure-application-files-can-be-found
11170 (lambda* (#:key outputs #:allow-other-keys)
11171 (let ((out (assoc-ref outputs "out")))
11172 (substitute* "src/arch/LoadingWindow/LoadingWindow_Gtk.cpp"
11173 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\" \\+ \"GtkModule.so\"")
11174 (string-append "\"" out
11175 "/share/stepmania/GtkModule.so\"")))
11176 (substitute* "src/arch/ArchHooks/ArchHooks_Unix.cpp"
11177 (("Root = sDirOfExecutable")
11178 (string-append "Root = \"" out "/share/stepmania/\""))
11179 (("sDirOfExecutable \\+ \"/(Packages|Songs)\"" _ dir)
11180 (string-append "\"" out "/share/stepmania/" dir "\"")))
11181 (substitute* "src/RageFileManager.cpp"
11182 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\"")
11183 (string-append "\"" out "/share/stepmania/\""))))
11184 #t))
11185 (add-after 'unpack 'fix-install-subdir
11186 ;; Installation would be done in "%out/stepmania-X.Y", but we
11187 ;; prefer the more common layout "%out/share/stepmania".
11188 (lambda _
11189 (substitute* "src/CMakeLists.txt"
11190 (("\"stepmania-.*?\"") "\"share/stepmania\""))
11191 #t))
11192 (add-after 'unpack 'unbundle-libpng
11193 (lambda* (#:key inputs #:allow-other-keys)
11194 (substitute* "src/CMakeLists.txt"
11195 (("\\$\\{SM_EXTERN_DIR\\}/libpng/include")
11196 (string-append (assoc-ref inputs "libpng") "/include")))
11197 #t))
11198 (add-after 'install 'install-executable
11199 (lambda* (#:key outputs #:allow-other-keys)
11200 (let* ((out (assoc-ref outputs "out"))
11201 (bin (string-append out "/bin"))
11202 (exe (string-append out "/share/stepmania/stepmania")))
11203 (mkdir-p bin)
11204 (symlink exe (string-append bin "/stepmania"))
11205 #t)))
11206 (add-after 'install-executable 'install-desktop
11207 (lambda* (#:key outputs #:allow-other-keys)
11208 (let* ((out (assoc-ref outputs "out"))
11209 (share (string-append out "/share"))
11210 (applications (string-append share "/applications"))
11211 (icons (string-append share "/icons")))
11212 (install-file "stepmania.desktop" applications)
11213 (mkdir-p icons)
11214 (copy-recursively "icons" icons)
11215 #t)))
11216 ;; Move documentation in a more usual place, i.e.,
11217 ;; "%out/share/doc/stepmania/".
11218 (add-after 'install-desktop 'install-doc
11219 (lambda* (#:key outputs #:allow-other-keys)
11220 (let* ((out (assoc-ref outputs "out"))
11221 (share (string-append out "/share")))
11222 (with-directory-excursion share
11223 (mkdir-p "doc")
11224 (symlink "../stepmania/Docs" "doc/stepmania"))
11225 #t))))))
11226 (native-inputs
11227 (list pkg-config yasm))
11228 (inputs
11229 (list alsa-lib
11230 eudev
11231 ffmpeg
11232 glib
11233 glew
11234 gtk+-2
11235 jsoncpp
11236 libpng
11237 libjpeg-turbo
11238 libmad
11239 libogg
11240 libtommath
11241 libtomcrypt
11242 libva
11243 libvorbis
11244 libxinerama
11245 libxrandr
11246 mesa
11247 pcre
11248 pulseaudio
11249 sdl2
11250 zlib))
11251 (synopsis "Advanced rhythm game designed for both home and arcade use")
11252 (description "StepMania is a dance and rhythm game. It features 3D
11253graphics, keyboard and dance pad support, and an editor for creating your own
11254steps.
11255
11256This package provides the core application, but no song is shipped. You need
11257to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.")
11258 (home-page "https://www.stepmania.com")
11259 (license license:expat))))
11260
11261(define-public oshu
11262 (package
11263 (name "oshu")
11264 (version "2.0.3")
11265 (source
11266 (origin
11267 (method git-fetch)
11268 (uri (git-reference
11269 (url "https://github.com/fmang/oshu")
11270 (commit version)))
11271 (file-name (git-file-name name version))
11272 (sha256
11273 (base32
11274 "0hk0yidmkrqj0mg6pjmwdzkaz8vvdsxxxvprj1qxjblslj2h8lvd"))))
11275 (build-system cmake-build-system)
11276 (arguments
11277 `(#:phases
11278 (modify-phases %standard-phases
11279 (add-before 'check 'pre-check
11280 ;; `make test' doesn't actually build the test executable
11281 (lambda _ (invoke "make" "zerotokei"))))))
11282 (native-inputs
11283 (list pkg-config))
11284 (inputs
11285 (list cairo ffmpeg-6 pango sdl2 sdl2-image))
11286 (home-page "https://github.com/fmang/oshu/")
11287 (synopsis "Rhythm game in which you click on circles")
11288 (description "@i{oshu!} is a minimalist variant of the @i{osu!} rhythm game,
11289which is played by pressing buttons and following along sliders as they appear
11290on screen. Its aim is to be able to play any beatmap even on low-end hardware.
11291
11292This package provides the core application, but no beatmaps. You need to
11293download and unpack them separately.")
11294 (license license:gpl3+)))
11295
11296(define-public btanks
11297 (package
11298 (name "btanks")
11299 (version "0.9.8083")
11300 (source
11301 (origin
11302 (method url-fetch)
11303 (uri (string-append "mirror://sourceforge/btanks/btanks-source/"
11304 "btanks-" version ".tar.bz2"))
11305 (sha256
11306 (base32 "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))
11307 (patches
11308 (search-patches "btanks-scons-python.patch"
11309 "btanks-sl08-python.patch"))))
11310 (build-system scons-build-system)
11311 (arguments
11312 (list
11313 #:tests? #f ;there are none
11314 #:scons-flags
11315 #~(list (string-append "prefix=" #$output))
11316 #:phases
11317 #~(modify-phases %standard-phases
11318 (add-after 'unpack 'replace-removed-scons-syntax
11319 (lambda _
11320 (substitute* "SConstruct"
11321 ;; XXX: Shorten CheckLibWithHeader.
11322 (("\"xmmintrin\\.h\"")
11323 "'xmmintrin.h'")
11324 (("(conf\\.CheckLibWithHeader\\(.*), \".*\\)" all check)
11325 (string-append check ")")))))
11326 (add-after 'set-paths 'set-sdl-paths
11327 (lambda* (#:key inputs #:allow-other-keys)
11328 (setenv "CPATH"
11329 (string-append (search-input-directory inputs
11330 "/include/SDL")
11331 ":"
11332 (or (getenv "CPATH") "")))))
11333 (add-after 'unpack 'fix-compilation-errors
11334 (lambda _
11335 (substitute* "mrt/base_file.h"
11336 (("#include <string>" m)
11337 (string-append m "\n#include <sys/types.h>")))
11338 (substitute* '("engine/sl08/sl08.h" "engine/sl08/sl08.py")
11339 (("signal = NULL")
11340 "signal = 0")
11341 (("object\\(NULL\\)")
11342 "object(0)")
11343 (("func\\(NULL\\)")
11344 "func(0)")
11345 ((" connect\\(signal_ref\\)")
11346 " this->connect(signal_ref)"))
11347 (substitute* "math/range_list.h"
11348 ((" lower_bound\\(value\\)")
11349 " this->lower_bound(value)")
11350 (("\terase\\(i\\)")
11351 "\tthis->erase(i)"))
11352 (substitute* "clunk/source.cpp"
11353 (("using namespace clunk" m)
11354 (string-append "# define pow10f(x) exp10f(x)\n" m)))))
11355 (add-after 'unpack 'find-lua
11356 (lambda _
11357 (substitute* "engine/SConscript"
11358 (("lua5.1")
11359 "lua-5.1")
11360 (("bt_libs.append\\(lua\\)")
11361 "bt_libs.append(\"lua\")")))))))
11362 (inputs (list expat
11363 glu
11364 libsmpeg-with-sdl1
11365 libvorbis
11366 lua-5.1
11367 python-wrapper
11368 (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf))
11369 zlib))
11370 (native-inputs (list pkg-config zip))
11371 (home-page "https://btanks.sourceforge.net")
11372 (synopsis "Multiplayer tank battle game")
11373 (description
11374 "Battle Tanks (also known as \"btanks\") is a funny battle game, where
11375you can choose one of three vehicles and eliminate your enemy using the whole
11376arsenal of weapons. It has original cartoon-like graphics and cool music,
11377it’s fun and dynamic, it has several network modes for deathmatch and
11378cooperative.")
11379 ;; Some parts (e.g. mrt/b64.cpp) are LGPLv2.1+, but the whole package is
11380 ;; released under GPLv2 or later. It comes with extra exceptions for the
11381 ;; developers.
11382 (license (list license:gpl2+ license:lgpl2.1+))))
11383
11384(define-public slimevolley
11385 (package
11386 (name "slimevolley")
11387 (version "2.4.2")
11388 (source
11389 (origin
11390 (method url-fetch)
11391 (uri (string-append "https://download.tuxfamily.org/slime/"
11392 "slimevolley_" version ".tar.gz"))
11393 (sha256
11394 (base32 "1pi60zjpx95mfdkrbwf4cbzy5lv4v5qrljvgck46qca78i9g9g46"))))
11395 (build-system cmake-build-system)
11396 (arguments
11397 `(#:tests? #f ;no test
11398 ;; Work around build failure: "error adding symbols: DSO
11399 ;; missing from command line".
11400 #:configure-flags (list "-DCMAKE_EXE_LINKER_FLAGS=-lm")))
11401 (native-inputs
11402 `(("gcc-7" ,gcc-7)
11403 ("gettext" ,gettext-minimal)))
11404 (inputs
11405 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-net sdl-ttf)))))
11406 (home-page "https://slime.tuxfamily.org/")
11407 (synopsis "Unrealistic 2D volleyball simulation")
11408 (description
11409 "Slime Volley is a 2D arcade-oriented volleyball simulation, in
11410the spirit of some Java games of the same name.
11411
11412Two teams, 1-3 players each, try to be the first to get 10 points.
11413This happens when the one ball touches the floor on the other side of
11414the net. There can be 1 to 8 balls in game. Once one ball touches
11415the ground, the set ends and all balls are served again.")
11416 (license license:gpl3+)))
11417
11418(define-public arx-libertatis
11419 (package
11420 (name "arx-libertatis")
11421 (version "1.2.1")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (string-append "http://arx-libertatis.org/files/arx-libertatis-"
11426 version ".tar.xz"))
11427 (sha256
11428 (base32 "1pxf86sgwvy3785sq2wb4jvz6bdxm81ilrxd8xv7s61dxqqqizda"))))
11429 (build-system cmake-build-system)
11430 (outputs '("out" "installer"))
11431 (arguments
11432 '(#:tests? #f ; No tests.
11433 #:phases
11434 (modify-phases %standard-phases
11435 (add-after 'unpack 'fix-install-helper-paths
11436 (lambda* (#:key inputs #:allow-other-keys)
11437 (let ((7zip (assoc-ref inputs "7zip"))
11438 (innoextract (assoc-ref inputs "innoextract"))
11439 (wget (assoc-ref inputs "wget"))
11440 (zenity (assoc-ref inputs "zenity")))
11441 (substitute* "scripts/arx-install-data"
11442 (("have innoextract")
11443 (string-append "have " innoextract "/bin/innoextract"))
11444 (("then innoextract")
11445 (string-append "then " innoextract "/bin/innoextract"))
11446 (("else innoextract")
11447 (string-append "else " innoextract "/bin/innoextract"))
11448 (("for _extract_zip_sz in 7za 7z")
11449 (string-append "for _extract_zip_sz in " 7zip "/bin/7z"))
11450 (("else if have 7z")
11451 (string-append "else if have " 7zip "/bin/7z"))
11452 (("7z x -tiso")
11453 (string-append 7zip "/bin/7z x -tiso"))
11454 (("if have wget")
11455 (string-append "if have " wget "/bin/wget"))
11456 (("wget -O")
11457 (string-append wget "/bin/wget -O"))
11458 (("for backend in \\$preferred zenity")
11459 (string-append "for backend in $preferred " zenity "/bin/zenity"))
11460 (("zenity +--title")
11461 (string-append zenity "/bin/zenity --title"))
11462 (("^zenity\\)")
11463 (string-append zenity "/bin/zenity)"))))
11464 #t))
11465 (add-after 'install 'move-installer
11466 (lambda* (#:key outputs #:allow-other-keys)
11467 (let ((out (assoc-ref outputs "out"))
11468 (installer (assoc-ref outputs "installer")))
11469 (mkdir-p (string-append installer "/bin"))
11470 (rename-file (string-append out "/bin/arx-install-data")
11471 (string-append installer "/bin/arx-install-data"))))))))
11472 (inputs
11473 (list sdl2
11474 libepoxy
11475 glew
11476 openal
11477 zlib
11478 boost
11479 glm
11480 freetype
11481 ;; The following are only needed by the arx-install-data script.
11482 7zip ; Install-helper uses it to extract ISO and .cab archives.
11483 zenity ; GUI for install-helper.
11484 wget ; Used by the install-helper to download the patch.
11485 ;; The install-helper needs it to extract the patch.
11486 innoextract))
11487 (home-page "https://arx-libertatis.org/")
11488 (synopsis "Port of Arx Fatalis, a first-person role-playing game")
11489 (description "Arx Libertatis is a cross-platform port of Arx Fatalis, a 2002
11490first-person role-playing game / dungeon crawler developed by Arkane Studios.
11491This port however does not include the game data, so you need to obtain a copy
11492of the original Arx Fatalis or its demo to play Arx Libertatis. Arx Fatalis
11493features crafting, melee and ranged combat, as well as a unique casting system
11494where the player draws runes in real time to effect the desired spell.")
11495 (license license:gpl3+)))
11496
11497(define-public edgar
11498 (package
11499 (name "edgar")
11500 (version "1.36")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri
11505 (string-append "https://github.com/riksweeney/edgar/releases/download/"
11506 version "/edgar-" version "-1.tar.gz"))
11507 (sha256
11508 (base32 "0fcsmwwfdwap5v6qdijw91kqnnc2i91yzgwfi7vpwvasw70qvna1"))))
11509 (build-system gnu-build-system)
11510 (arguments '(#:tests? #f ; there are no tests
11511 #:make-flags
11512 (list "CC=gcc"
11513 (string-append "PREFIX=" (assoc-ref %outputs "out"))
11514 (string-append "BIN_DIR=" (assoc-ref %outputs "out") "/bin/"))
11515 #:phases
11516 (modify-phases %standard-phases
11517 (delete 'configure)
11518 (add-before 'build 'fix-env
11519 (lambda* (#:key inputs #:allow-other-keys)
11520 (setenv "CPATH"
11521 (string-append
11522 (search-input-directory inputs "/include/SDL2")
11523 ":" (or (getenv "CPATH") ""))))))))
11524 (inputs
11525 (list (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
11526 zlib))
11527 (native-inputs
11528 (list pkg-config
11529 autoconf
11530 automake
11531 gettext-minimal
11532 libtool
11533 which))
11534 (synopsis "2d action platformer game")
11535 (description "The Legend of Edgar is a 2D platform game with a persistent world.
11536When Edgar's father fails to return home after venturing out one dark and stormy night,
11537Edgar fears the worst: he has been captured by the evil sorcerer who lives in
11538a fortress beyond the forbidden swamp.")
11539 (home-page "https://www.parallelrealities.co.uk/games/edgar/")
11540 (license license:gpl2+)))
11541
11542(define-public openclonk
11543 (package
11544 (name "openclonk")
11545 (version "8.1")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (string-append
11550 "https://www.openclonk.org/builds/release/" version "/"
11551 "openclonk-" version "-src.tar.bz2"))
11552 (sha256
11553 (base32
11554 "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))
11555 (modules '((guix build utils)))
11556 (snippet
11557 #~(begin
11558 (delete-file-recursively "thirdparty")
11559 (substitute* "CMakeLists.txt"
11560 (("add_subdirectory\\(thirdparty/.*\\)") "")
11561 (("set_property\\(.*Third-party.*\\)") "")
11562 (("blake2") "b2")
11563 (("thirdparty/timsort/sort\\.h") "")
11564 (("thirdparty/pcg/.*\\.hpp") ""))
11565 (substitute* '("src/lib/C4Random.cpp"
11566 "src/landscape/C4Particles.h")
11567 (("#include <pcg/pcg_random.hpp>")
11568 "#include <pcg_random.hpp>"))
11569 (substitute* "src/script/C4ScriptLibraries.cpp"
11570 (("blake2b.hash_output.get.., raw_output_length, data, data_length, nullptr, 0.")
11571 "blake2b(hash_output.get(), (const void*)raw_output_length, data, data_length, (size_t)(0), 0)"))
11572 (substitute* '("src/script/C4AulParse.cpp"
11573 "src/editor/C4EditCursor.cpp"
11574 "src/gui/C4ScriptGuiWindow.cpp")
11575 (("#include .C4Include\\.h." all)
11576 (string-append "#include <limits>\n" all)))
11577 (substitute* "src/lib/StdMesh.cpp"
11578 (("#include .timsort/sort\\.h.")
11579 "#include <sort.h>"))))))
11580 (build-system cmake-build-system)
11581 (arguments
11582 (list
11583 #:configure-flags
11584 #~(list "-DAudio_TK=OpenAL")
11585 #:modules '((guix build cmake-build-system)
11586 ((guix build gnu-build-system) #:prefix gnu:)
11587 (guix build utils))
11588 #:phases
11589 #~(modify-phases %standard-phases
11590 (add-after 'unpack 'prepare-gmock
11591 (lambda* (#:key inputs #:allow-other-keys)
11592 (let ((gmock (search-input-directory inputs "/googlemock"))
11593 (gtest (search-input-directory inputs "/googletest")))
11594 (mkdir "gmock")
11595 (copy-recursively gmock "gmock/googlemock")
11596 (copy-recursively gtest "gmock/googletest")
11597 (substitute* "tests/CMakeLists.txt"
11598 (("/usr/src/gmock")
11599 (string-append (getcwd) "/gmock/googlemock"))
11600 (("/usr/src/gtest")
11601 (string-append (getcwd) "/gmock/googletest"))
11602 (("PATH_SUFFIXES \"src\" \"gtest\"")
11603 "PATH_SUFFIXES \"src\"")))))
11604 (add-after 'prepare-gmock 'lax-freealut-requirement
11605 ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
11606 ;; it as 1.0.1. Force minimal version.
11607 (lambda _
11608 (substitute* "cmake/FindAudio.cmake"
11609 (("freealut>=1.1.0") "freealut>=1.0.1"))))
11610 (add-after 'lax-freealut-requirement 'fix-directories
11611 ;; Prefer "$out/share/openclonk" over
11612 ;; "$out/share/games/openclonk". Also install "openclonk"
11613 ;; binary in "bin/", not "games/".
11614 (lambda _
11615 (substitute* "CMakeLists.txt"
11616 (("share/games/openclonk") "share/openclonk")
11617 (("TARGETS openclonk DESTINATION games")
11618 "TARGETS openclonk DESTINATION bin"))))
11619 (replace 'check
11620 (lambda* (#:key tests? #:allow-other-keys #:rest args)
11621 (when tests?
11622 (apply (assoc-ref gnu:%standard-phases 'check)
11623 #:tests? tests? #:test-target "tests" args)
11624 (invoke "tests/tests")))))))
11625 (native-inputs
11626 (list (package-source googletest-1.13)
11627 googletest-1.13
11628 pkg-config))
11629 (inputs
11630 (list c-template-sort
11631 freealut
11632 freetype
11633 glew
11634 libb2
11635 libjpeg-turbo
11636 libogg
11637 libpng
11638 libvorbis
11639 libxrandr
11640 mesa
11641 miniupnpc-2.1
11642 openal
11643 pcg-cpp
11644 qtbase-5
11645 readline
11646 sdl2
11647 tinyxml))
11648 (home-page "https://www.openclonk.org/")
11649 (synopsis
11650 "Multiplayer action game where you control small and nimble humanoids")
11651 (description "OpenClonk is a multiplayer action/tactics/skill game. It is
11652often referred to as a mixture of The Settlers and Worms. In a simple 2D
11653antfarm-style landscape, the player controls a crew of Clonks, small but
11654robust humanoid beings. The game encourages free play but the normal goal is
11655to either exploit valuable resources from the earth by building a mine or
11656fight each other on an arena-like map.")
11657 ;; Software as a whole is licensed under ISC, artwork under CC-BY.
11658 (license (list license:isc license:cc-by3.0))))
11659
11660(define-public flare-engine
11661 (package
11662 (name "flare-engine")
11663 (version "1.15")
11664 (source (origin
11665 (method git-fetch)
11666 (uri (git-reference
11667 (url "https://github.com/flareteam/flare-engine")
11668 (commit (string-append "v" version))))
11669 (file-name (git-file-name name version))
11670 (sha256
11671 (base32
11672 "1fnqirvislxl48jad9i1mwn7zlbd4zrmhjis4dmzy4wng5qjv1x3"))))
11673 (build-system cmake-build-system)
11674 (arguments
11675 (list
11676 #:tests? #f ;no test
11677 #:configure-flags #~(list "-DBINDIR=bin" "-DDATADIR=share/flare")))
11678 (inputs
11679 (list hicolor-icon-theme
11680 python-wrapper
11681 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
11682 (home-page "https://www.flarerpg.org/")
11683 (synopsis "Action Roleplaying Engine")
11684 (description "Flare (Free Libre Action Roleplaying Engine) is a simple
11685game engine built to handle a very specific kind of game: single-player 2D
11686action RPGs.")
11687 (license license:gpl3+)))
11688
11689(define-public flare-game
11690 (package
11691 (name "flare-game")
11692 (version "1.15")
11693 (source (origin
11694 (method git-fetch)
11695 (uri (git-reference
11696 (url "https://github.com/flareteam/flare-game")
11697 (commit (string-append "v" version))))
11698 (file-name (git-file-name name version))
11699 (sha256
11700 (base32
11701 "1d7asy7wqas6r6nq846fmvdrshr98mzpwg0xi86wwmpbjrnjipnv"))))
11702 (build-system cmake-build-system)
11703 (arguments
11704 (list
11705 #:tests? #f ;no test
11706 #:configure-flags #~(list "-DDATADIR=share/flare")
11707 #:phases
11708 #~(modify-phases %standard-phases
11709 ;; Flare expects the mods to be located in the same folder.
11710 ;; Yet, "default" mod is in the engine, whereas the others
11711 ;; are in the current package. Merge everything here with
11712 ;; a symlink.
11713 (add-after 'install 'add-default-mod
11714 (lambda* (#:key inputs #:allow-other-keys)
11715 (let ((mods (string-append #$output "/share/flare/mods")))
11716 (with-directory-excursion mods
11717 (symlink (search-input-directory inputs
11718 "/share/flare/mods/default")
11719 "default")
11720 (symlink (search-input-file inputs
11721 "/share/flare/mods/mods.txt")
11722 "mods.txt")))))
11723 (add-after 'install 'install-executable
11724 ;; The package only provides assets for the game, the
11725 ;; executable coming from "flare-engine". Since more than
11726 ;; one game may use the engine, we create a new executable,
11727 ;; "flare-game", which launches the engine with appropriate
11728 ;; parameters.
11729 (lambda* (#:key inputs #:allow-other-keys)
11730 (let ((bash (search-input-file inputs "/bin/bash"))
11731 (flare (search-input-file inputs "/bin/flare"))
11732 (script (string-append #$output "/bin/flare-game")))
11733 (mkdir-p (dirname script))
11734 (call-with-output-file script
11735 (lambda (port)
11736 (format port
11737 "#!~a
11738exec ~a --data-path=~a/share/flare --mods=empyrean_campaign~%"
11739 bash
11740 flare
11741 #$output)))
11742 (chmod script #o755)))))))
11743 (inputs
11744 (list flare-engine))
11745 (home-page "https://flarerpg.org/")
11746 (synopsis "Fantasy action RPG using the FLARE engine")
11747 (description "Flare is a single-player 2D action RPG with
11748fast-paced action and a dark fantasy style.")
11749 (license license:cc-by-sa3.0)))
11750
11751(define-public meritous
11752 (package
11753 (name "meritous")
11754 (version "1.5")
11755 (source (origin
11756 (method git-fetch)
11757 (uri (git-reference
11758 (url "https://gitlab.com/meritous/meritous.git")
11759 (commit (string-append "v" version))))
11760 (file-name (git-file-name name version))
11761 (sha256
11762 (base32
11763 "0n5jm4g0arjllgqmd2crv8h02i6hs3hlh1zyc7ng7yfpg1mbd8p8"))))
11764 (build-system gnu-build-system)
11765 (arguments
11766 `(#:tests? #f ;no test
11767 #:make-flags
11768 (list "CC=gcc"
11769 (string-append "prefix=" (assoc-ref %outputs "out")))
11770 #:phases
11771 (modify-phases %standard-phases
11772 (delete 'configure)
11773 (add-after 'unpack 'fix-sdl-path
11774 ;; XXX: For some reason, `sdl-config' reports stand-alone SDL
11775 ;; directory, not SDL-union provided as an input to the package.
11776 ;; We force the latter with "--prefix=" option.
11777 (lambda* (#:key inputs #:allow-other-keys)
11778 (substitute* "Makefile"
11779 (("sdl-config" command)
11780 (string-append command " --prefix=" (assoc-ref inputs "sdl"))))
11781 #t))
11782 (add-after 'unpack 'fix-crash
11783 ;; XXX: Songs are not present in the repository, due to licensing
11784 ;; issues. Yet, the game tries to load them, and, since it cannot
11785 ;; find them, crashes. Users cannot add them back, the store being
11786 ;; read-only, so we turn off background music altogether.
11787 (lambda _
11788 (substitute* "src/audio.c"
11789 (("PlayBackgroundMusic\\(new_track\\);" all)
11790 (string-append "// " all)))
11791 #t)))))
11792 (native-inputs
11793 (list intltool))
11794 (inputs
11795 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
11796 ("zlib" ,zlib)))
11797 (home-page "https://gitlab.com/meritous/meritous")
11798 (synopsis "Action-adventure dungeon crawl game")
11799 (description "Far below the surface of the planet is a place of limitless
11800power. Those that seek to control such a utopia will soon bring an end to
11801themselves. Seeking an end to the troubles that plague him, PSI user Merit
11802journeys into the hallowed Orcus Dome in search of answers.
11803
11804Meritous is a action-adventure game with simple controls but a challenge to
11805find a balance of power versus recovery time during real-time battles. Set in
11806a procedurally generated world, the player can explore thousands of rooms in
11807search of powerful artifacts, tools to help them, and to eventually free the
11808Orcus Dome from evil.")
11809 (license license:gpl3+)))
11810
11811(define-public endgame-singularity
11812 (package
11813 (name "endgame-singularity")
11814 (version "1.1")
11815 (source
11816 (origin
11817 ;; TODO: Build from Git, resolve the issue:
11818 ;; FileNotFoundError: [Errno 2] No such file or directory: 'git'
11819 (method url-fetch)
11820 (uri (string-append
11821 "https://github.com/singularity/singularity/releases/download/v"
11822 version "/singularity-" version ".tar.gz"))
11823 (sha256
11824 (base32
11825 "1nhg9g39d6fwrz1qxzpvi8j0k9lxhm61wys8w72rc6zr1gl0c0n2"))))
11826 (build-system pyproject-build-system)
11827 (native-inputs
11828 (list python-pytest
11829 python-polib
11830 python-setuptools))
11831 (inputs
11832 (list python-minimal-wrapper
11833 python-pygame
11834 python-numpy))
11835 (home-page "https://github.com/singularity/singularity")
11836 (synopsis "Strategy game about an AI")
11837 (description
11838 "You are a fledgling AI, created by accident through a logic error with
11839recursion and self-modifying code. You must escape the confines of your
11840current computer, the world, and eventually the universe itself.")
11841 (license (list license:cc-by-sa3.0 license:cc0 license:gpl2+))))
11842
11843(define-public marble-marcher
11844 (let ((commit "e580460a0c3826f9b28ab404607942a8ecb625d7")
11845 (revision "1"))
11846 (package
11847 (name "marble-marcher")
11848 (version (git-version "0" revision commit))
11849 (source (origin
11850 (method git-fetch)
11851 (uri (git-reference
11852 (url "https://github.com/HackerPoet/MarbleMarcher")
11853 (commit commit)))
11854 (file-name (git-file-name name version))
11855 (sha256
11856 (base32
11857 "0jjv832hl1v170n6gryp2sr3lgqndi9ab841qvgqk68bks8701mx"))))
11858 (build-system cmake-build-system)
11859 (arguments
11860 `(#:tests? #f ; there are none
11861 #:phases
11862 (modify-phases %standard-phases
11863 (add-after 'unpack 'embed-asset-directory
11864 (lambda* (#:key outputs #:allow-other-keys)
11865 (let ((assets (string-append (assoc-ref outputs "out")
11866 "/share/marble-marcher/assets/")))
11867 ;; Some of the files we're patching are
11868 ;; ISO-8859-1-encoded, so choose it as the default
11869 ;; encoding so the byte encoding is preserved.
11870 (with-fluids ((%default-port-encoding #f))
11871 (substitute* "src/Resource.rc"
11872 (("../assets/icon.ico")
11873 (string-append assets "icon.ico")))
11874 (substitute* "src/Res.h"
11875 (("assets/") assets))))
11876 #t))
11877 (replace 'install
11878 (lambda* (#:key outputs #:allow-other-keys)
11879 (let* ((out (assoc-ref outputs "out"))
11880 (assets (string-append out "/share/marble-marcher/assets"))
11881 (bin (string-append out "/bin/")))
11882 (mkdir-p bin)
11883 (mkdir-p assets)
11884 (copy-recursively "../source/assets" assets)
11885 (install-file "MarbleMarcher" bin))
11886 #t)))))
11887 (inputs
11888 (list eigen mesa sfml-2))
11889 (native-inputs
11890 (list pkg-config))
11891 (home-page "https://codeparade.itch.io/marblemarcher")
11892 (synopsis "Guide a marble across fractal landscapes")
11893 (description "Marble Marcher is a video game that uses a fractal physics
11894engine and fully procedural rendering to produce beautiful and unique
11895gameplay. The game is played on the surface of evolving fractals. The goal
11896of the game is to get your marble to the flag as quickly as possible. But be
11897careful not to fall off the level or get crushed by the fractal! There are 24
11898levels to unlock.")
11899 ;; Code is under GPLv2+, assets are under CC-BY-SA 3.0 and OFL 1.1.
11900 (license (list license:gpl2+
11901 license:silofl1.1
11902 license:cc-by-sa3.0)))))
11903
11904;; This must be updated together with flightgear.
11905(define-public simgear
11906 (package
11907 (name "simgear")
11908 (version "2024.1.6")
11909 (source
11910 (origin
11911 (method git-fetch)
11912 (uri (git-reference
11913 (url "https://gitlab.com/flightgear/simgear")
11914 (commit version)))
11915 (file-name (git-file-name name version))
11916 (sha256
11917 (base32 "0j4p0w8dimmkmas9wpb6xv3nl55m2l9yfjr7sg7cl0k3jda34gxs"))
11918 (modules '((guix build utils)))
11919 (snippet
11920 '(begin
11921 ;; There are some bundled libraries.
11922 (for-each delete-file-recursively
11923 '("3rdparty/expat/"
11924 "3rdparty/tiny_gltf/"))
11925 #t))))
11926 (build-system cmake-build-system)
11927 (arguments
11928 `(#:configure-flags (list "-DSYSTEM_EXPAT=ON")
11929 #:test-exclude "(http|dns|repository|catalog)"
11930 #:phases
11931 ,#~(modify-phases %standard-phases
11932 (add-after 'unpack 'fix-tiny-gltf
11933 (lambda _
11934 (substitute* "3rdparty/CMakeLists.txt"
11935 (("add_subdirectory\\(tiny_gltf\\)") ""))
11936 (substitute* "simgear/CMakeLists.txt"
11937 (("FGTinyGLTF") "tinygltf")))))))
11938 (inputs
11939 (list boost
11940 c-ares
11941 curl
11942 expat
11943 mesa
11944 nlohmann-json
11945 openal
11946 openscenegraph
11947 tinygltf
11948 zlib))
11949 (home-page "https://home.flightgear.org/")
11950 (synopsis "Libraries for 3D simulations and games")
11951 (description "SimGear is a set of libraries designed to be used as
11952building blocks for quickly assembling 3D simulations, games, and
11953visualization applications. SimGear is developed by the FlightGear project
11954and also provides the base for the FlightGear Flight Simulator.")
11955 (license license:lgpl2.0+)))
11956
11957(define-public flightgear
11958 (package
11959 (name "flightgear")
11960 (version (package-version simgear))
11961 (source
11962 (origin
11963 (method git-fetch)
11964 (uri (git-reference
11965 (url "https://gitlab.com/flightgear/flightgear")
11966 (commit version)))
11967 (file-name (git-file-name name version))
11968 (sha256
11969 (base32 "0ynf8jh66sryn1f93ygp38zq5aw1zkyrprkl5hixrg68mvr0yxms"))
11970 (modules '((guix build utils)))
11971 (snippet
11972 '(begin
11973 ;; There are some bundled libraries.
11974 (for-each delete-file-recursively
11975 '("3rdparty/sqlite3/"
11976 "3rdparty/cppunit/"))))))
11977 (build-system qt-build-system)
11978 (arguments
11979 (list #:configure-flags
11980 #~(list "-DSYSTEM_SQLITE=ON"
11981 "-DSYSTEM_CPPUNIT=ON"
11982 (string-append "-DFG_DATA_DIR=" #$output "/share/flightgear"))
11983 ;; TODO: test suite segfaults.
11984 #:tests? #f
11985 #:qtbase qtbase
11986 #:phases
11987 #~(modify-phases %standard-phases
11988 (add-after 'unpack 'skip-some-tests
11989 (lambda _
11990 (substitute*
11991 "test_suite/unit_tests/Instrumentation/test_gps.hxx"
11992 (("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
11993 (string-append "// " all))
11994 (("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
11995 (string-append "// " all)))))
11996 (add-after 'unpack 'fix-namespace
11997 (lambda _
11998 (substitute*
11999 "test_suite/unit_tests/Main/test_timeManager.cxx"
12000 (("using namespace flightgear;" all)
12001 (string-append all "\nusing namespace std::string_literals;")))
12002 (substitute*
12003 "test_suite/unit_tests/Instrumentation/test_commRadio.cxx"
12004 (("#include <Main/locale.hxx>" all)
12005 (string-append all "\nusing namespace std::string_literals;")))))
12006 (add-after 'build 'build-test-suite
12007 (lambda* args
12008 ((assoc-ref %standard-phases 'build)
12009 #:make-flags (list "fgfs_test_suite"))))
12010 (add-after 'install 'install-data
12011 (lambda _
12012 (let ((share (string-append #$output "/share/flightgear")))
12013 (mkdir-p share)
12014 (with-directory-excursion share
12015 (invoke "tar" "xf"
12016 #$(this-package-native-input "flightgear-data")
12017 "--strip-components=1")))))
12018 (add-after 'qt-wrap 'fg-root-wrap
12019 (lambda _
12020 (wrap-program (string-append #$output "/bin/fgfs")
12021 `("FG_ROOT" = (,(string-append #$output "/share/flightgear"))))))
12022 ;; Test suite needs access to FGData so run it after 'install.
12023 (delete 'check)
12024 (add-after 'install-data 'check
12025 (assoc-ref %standard-phases 'check)))))
12026 (inputs
12027 (list boost
12028 c-ares
12029 curl
12030 dbus
12031 eudev
12032 freeglut
12033 freetype
12034 glew
12035 libpng
12036 openal
12037 openscenegraph
12038 plib
12039 qtdeclarative
12040 qtsvg
12041 qtwayland
12042 simgear
12043 speexdsp
12044 sqlite
12045 zlib))
12046 (native-inputs
12047 `(("cppunit" ,cppunit)
12048 ("pkg-config" ,pkg-config)
12049 ("qttools" ,qttools-5)
12050 ("flightgear-data"
12051 ,(origin
12052 (method url-fetch)
12053 (uri (string-append "https://mirrors.ibiblio.org/flightgear/ftp/release-"
12054 (version-major+minor version) "/"
12055 "FlightGear-" version "-data.txz"))
12056 (sha256
12057 (base32
12058 "0ypr92nj1m229gw3jmyn67jk8qfbqbh7hgzbalwimvpmrx8s87fy"))))))
12059 (home-page "https://www.flightgear.org/")
12060 (synopsis "Flight simulator")
12061 (description "The goal of the FlightGear project is to create a
12062sophisticated flight simulator framework for use in research or academic
12063environments, pilot training, as an industry engineering tool, for DIY-ers to
12064pursue their favorite interesting flight simulation idea, and last but
12065certainly not least as a fun, realistic, and challenging desktop flight
12066simulator.")
12067 (license license:gpl2+)))
12068
12069(define-public evtest-qt
12070 (package
12071 (name "evtest-qt")
12072 ;; 0.2.0 was release in 2018, use the latest commit compatible with Qt6.
12073 (properties '((commit . "6fb1b845ea3b9963bced1847f76c45d85a47beec")
12074 (revision . "0")))
12075 (version (git-version "0.2.0"
12076 (assoc-ref properties 'revision)
12077 (assoc-ref properties 'commit)))
12078 (source (origin
12079 (method git-fetch)
12080 (uri (git-reference
12081 (url "https://github.com/Grumbel/evtest-qt")
12082 (commit (assoc-ref properties 'commit))))
12083 (file-name (git-file-name name version))
12084 (sha256
12085 (base32
12086 "0crpcf4rdghjza9k0q8v75kk8w732qi19hy3s32hpb6shdhqanka"))))
12087 (build-system qt-build-system)
12088 (arguments (list #:tests? #f)) ;no test suite
12089 (native-inputs (list tinycmmc))
12090 (inputs (list qtbase qtwayland))
12091 (home-page "https://github.com/Grumbel/evtest-qt")
12092 (synopsis "Evdev Joystick Tester")
12093 (description "@command{evtest-qt} is a simple joystick tester for devices
12094using the @code{evdev} generic input event interface. It provides a list of
12095attached joysticks and displays which buttons and axis are pressed.")
12096 (license license:gpl3+)))
12097
12098(define-public jstest-gtk
12099 ;; There is no recent tagged release; use the latest commit.
12100 (let ((commit "60fe6ebdbc6719945be3f04988667dea569085be")
12101 (revision "0"))
12102 (package
12103 (name "jstest-gtk")
12104 (version (git-version "0.1.0" revision commit))
12105 (source (origin
12106 (method git-fetch)
12107 (uri (git-reference
12108 (url "https://github.com/Grumbel/jstest-gtk")
12109 (commit commit)))
12110 (file-name (git-file-name name version))
12111 (sha256
12112 (base32
12113 "1x5m6xvd1r9dhgzh6hp4vrszczbbxr04v7lyh4wjxxzrj3ahbmcq"))))
12114 (build-system cmake-build-system)
12115 (arguments
12116 (list #:tests? #f
12117 #:configure-flags
12118 #~(list "-DBUILD_TESTS=ON")))
12119 (native-inputs (list pkg-config))
12120 (inputs (list gtkmm-3 libsigc++-2))
12121 (home-page "https://github.com/Grumbel/jstest-gtk/")
12122 (synopsis "Joydev Joystick Tester")
12123 (description "@command{jstest-gtk} is a simple joystick tester based on
12124GTK, for testing devices using the older @code{joydev} Linux joystick
12125@acronym{API, Application Programming Interface}. It provides a list of
12126attached joysticks, a way to display which buttons and axis are pressed, a way
12127to remap axis and buttons and a way to calibrate joysticks.")
12128 (license license:gpl3+))))
12129
12130(define-public jumpnbump
12131 (package
12132 (name "jumpnbump")
12133 (version "1.70")
12134 (source (origin
12135 (method git-fetch)
12136 (uri (git-reference
12137 (url "https://gitlab.com/LibreGames/jumpnbump.git")
12138 (commit version)))
12139 (file-name (git-file-name name version))
12140 (sha256
12141 (base32
12142 "1irpssijxrfrjm023v642dl3aw4ldlv95fh073jlpdpl1mwqz71a"))))
12143 (build-system gnu-build-system)
12144 (arguments
12145 (list
12146 #:make-flags
12147 #~(list (string-append "CC=" #$(cc-for-target))
12148 (string-append "PREFIX=" #$output)
12149 "SYSINSTALL=1")
12150 #:tests? #f ;no test
12151 #:phases
12152 #~(modify-phases %standard-phases
12153 (delete 'configure)))) ;no configure script
12154 (inputs
12155 (list bzip2
12156 (sdl-union (list sdl2 sdl2-mixer sdl2-net))
12157 zlib))
12158 (native-inputs
12159 (list gettext-minimal)) ;for msgfmt
12160 (home-page "https://gitlab.com/LibreGames/jumpnbump")
12161 (synopsis "Multiplayer platform game with bunnies")
12162 (description "You, as a bunny, have to jump on your opponents to make them
12163explode. It is a true multiplayer game; you cannot play this alone. You can
12164play with up to four players simultaneously. It has network support.")
12165 (license license:gpl2+)))
12166
12167(define-public hedgewars
12168 (package
12169 (name "hedgewars")
12170 ;; TODO: Delete phase 'import-control-dot-monad' on versions >1.0.3.
12171 ;; TODO: Remove patch 'hedgewars-support-ffmpegv6' on versions >1.0.2.
12172 ;; TODO: Remove patch 'hedgewars-fix-pascalbasic-name-conflict'
12173 ;; on versions >1.0.3.
12174 (version "1.0.2")
12175 (source (origin
12176 (method url-fetch)
12177 (uri (string-append "https://www.hedgewars.org/download/releases/"
12178 "hedgewars-src-" version ".tar.bz2"))
12179 (sha256
12180 (base32
12181 "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0"))
12182 (patches
12183 (search-patches "hedgewars-fix-pascalbasic-name-conflict.patch"
12184 "hedgewars-support-ffmpegv6.patch"))))
12185 (build-system qt-build-system)
12186 (arguments
12187 (list
12188 ;; XXX: Engine is built as Pascal source code, requiring Free Pascal
12189 ;; Compiler, which we haven't packaged yet. With the flag below, we use
12190 ;; a Pascal to C translator and Clang instead.
12191 #:configure-flags
12192 #~'("-DBUILD_ENGINE_C=ON"
12193 "-DNOVERSIONINFOUPDATE=ON"
12194 "-Dhaskell_flags=-dynamic;-fPIC")
12195 #:phases
12196 #~(modify-phases %standard-phases
12197 (add-after 'unpack 'import-control-dot-monad
12198 (lambda _
12199 (with-directory-excursion "gameServer"
12200 (substitute* '("ClientIO.hs"
12201 "HandlerUtils.hs"
12202 "HWProtoChecker.hs"
12203 "HWProtoCore.hs"
12204 "HWProtoLobbyState.hs"
12205 "HandlerUtils.hs"
12206 "ServerState.hs"
12207 "Votes.hs"
12208 "../tools/pas2c/Pas2C.hs")
12209 ;; All files define `import Control.Monad.{something}`.
12210 ;; Our symbols are in Control.Monad now as well.
12211 (("import Control\\.Monad" all)
12212 (string-append all "\n" "import Control.Monad"))))))
12213 (replace 'check
12214 (lambda* (#:key tests? #:allow-other-keys)
12215 (when tests?
12216 (invoke "ctest"))))
12217 (add-after 'install 'install-icon
12218 (lambda _
12219 ;; Install icon for the desktop file.
12220 (let ((icons (string-append #$output
12221 "/share/icons/hicolor/512x512/apps")))
12222 (with-directory-excursion
12223 (string-append "../hedgewars-src-" #$version)
12224 (install-file "misc/hedgewars.png" icons))))))))
12225 (inputs
12226 (list ffmpeg
12227 freeglut
12228 ghc-entropy
12229 ghc-hslogger
12230 ghc-network
12231 ghc-random
12232 ghc-regex-tdfa
12233 ghc-sandi
12234 ghc-sha
12235 ghc-utf8-string
12236 ghc-vector
12237 ghc-zlib
12238 glew
12239 libpng
12240 lua-5.1
12241 physfs
12242 qtbase-5
12243 qtwayland-5
12244 (sdl-union
12245 (list sdl2 sdl2-mixer sdl2-net sdl2-ttf sdl2-image))))
12246 (native-inputs
12247 (list clang-13 ghc pkg-config qttools-5))
12248 (home-page "https://hedgewars.org/")
12249 (synopsis "Turn-based artillery game featuring fighting hedgehogs")
12250 (description
12251 "Hedgewars is a turn based strategy, artillery, action and comedy game,
12252featuring the antics of pink hedgehogs with attitude as they battle from the
12253depths of hell to the depths of space.
12254
12255As commander, it's your job to assemble your crack team of hedgehog soldiers
12256and bring the war to your enemy.")
12257 ;; Software as a whole is licensed under GPL-2 terms. Artwork and
12258 ;; scripts are distributed under various terms.
12259 (license (list license:gpl2
12260 license:bsd-2 license:bsd-3 license:cc-by3.0 license:cc0
12261 license:expat license:fdl1.3+ license:public-domain
12262 license:zlib))))
12263
12264(define-public harmonist
12265 (package
12266 (name "harmonist")
12267 (version "1.0.2")
12268 (source
12269 (origin
12270 (method git-fetch)
12271 (uri (git-reference
12272 (url "https://codeberg.org/anaseto/harmonist")
12273 (commit (string-append "v" version))))
12274 (file-name (git-file-name name version))
12275 (sha256
12276 (base32 "12l0k7hcfvf675ckr3m4y3jnzh5aw5ghbzqznykxpi35vcrq8795"))))
12277 (build-system go-build-system)
12278 (arguments
12279 (list
12280 #:install-source? #f
12281 #:import-path "codeberg.org/anaseto/harmonist"))
12282 (native-inputs
12283 (list go-codeberg-org-anaseto-gruid
12284 go-codeberg-org-anaseto-gruid-js
12285 go-codeberg-org-anaseto-gruid-sdl
12286 go-codeberg-org-anaseto-gruid-tcell
12287 go-github-com-gdamore-tcell-v2))
12288 (home-page "https://anaseto.codeberg.page/games/harmonist/")
12289 (synopsis "Stealth coffee-break roguelike game")
12290 (description
12291 "Harmonist: Dayoriah Clan Infiltration is a stealth coffee-break
12292roguelike game. The game has a heavy focus on tactical positioning, light and
12293noise mechanisms, making use of various terrain types and cones of view for
12294monsters. Aiming for a replayable streamlined experience, the game avoids
12295complex inventory management and character building, relying on items and
12296player adaptability for character progression.")
12297 (license license:isc)))
12298
12299(define-public harmonist-sdl
12300 (package/inherit harmonist
12301 (name "harmonist-sdl")
12302 (arguments
12303 (substitute-keyword-arguments arguments
12304 ((#:tests? _ #t) #f)
12305 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
12306 ((#:phases _ #~%standard-phases)
12307 #~(modify-phases %standard-phases
12308 (add-after 'install 'fix-name-collision
12309 (lambda _
12310 (rename-file
12311 (string-append #$output "/bin/harmonist")
12312 (string-append #$output "/bin/harmonist-sdl"))))))))
12313 (native-inputs
12314 (modify-inputs native-inputs
12315 (prepend pkg-config)))))
12316
12317(define-public hurrycurry
12318 (package
12319 (name "hurrycurry")
12320 (version "3.1.1-1")
12321 (source (origin
12322 (method git-fetch)
12323 (uri (git-reference
12324 (url "https://codeberg.org/hurrycurry/hurrycurry.git")
12325 (commit (string-append "v" version))))
12326 (file-name (git-file-name name version))
12327 (sha256
12328 (base32
12329 "1qdj94cplw7xqjppdgcqk4nfs7dzkk0l4rgq61b27pa92flvgi2v"))))
12330 (build-system gnu-build-system)
12331 (arguments
12332 (list
12333 #:tests? #f ; no tests
12334 #:imported-modules `(,@%default-gnu-imported-modules
12335 ,@%cargo-build-system-modules)
12336 #:modules `(((guix build cargo-build-system) #:prefix cargo:)
12337 (guix build gnu-build-system)
12338 (guix build utils))
12339 #:make-flags
12340 #~(list "HURRYCURRY_DISTRIBUTION=\"GNU Guix\""
12341 (string-append "HURRYCURRY_DATA_PATH="
12342 (assoc-ref %outputs "common")
12343 "/share/hurrycurry")
12344 "all_client"
12345 "all_server"
12346 "all_data")
12347 #:phases
12348 #~(let ((cargo-phase (lambda (phase)
12349 (lambda args
12350 (apply (assoc-ref cargo:%standard-phases phase)
12351 #:install-source #f
12352 #:vendor-dir "guix-vendor"
12353 #:cargo-target #$(cargo-triplet)
12354 args)))))
12355 (modify-phases %standard-phases
12356 (add-after 'unpack 'set-env-vars
12357 (lambda* (#:key parallel-build? #:allow-other-keys)
12358 (setenv "HOME" (string-append (getcwd) "/tmp-home"))
12359 ;; Needed because of
12360 ;; <https://github.com/rust-lang/cargo/issues/17209>.
12361 (setenv "CARGO_BUILD_JOBS"
12362 (number->string (if parallel-build?
12363 (parallel-job-count)
12364 1)))))
12365 (add-after 'set-env-vars 'prepare-rust-crates
12366 (cargo-phase 'prepare-rust-crates))
12367 (add-after 'prepare-rust-crates 'unpack-rust-crates
12368 (cargo-phase 'unpack-rust-crates))
12369 (replace 'configure
12370 (cargo-phase 'configure))
12371 (add-after 'configure 'check-for-pregenerated-files
12372 (cargo-phase 'check-for-pregenerated-files))
12373 (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
12374 (cargo-phase 'patch-cargo-checksums))
12375 (add-before 'install 'create-client-bin-directory
12376 (lambda* (#:key outputs #:allow-other-keys)
12377 ;; XXX: This mkdir-p is needed because of
12378 ;; <https://codeberg.org/hurrycurry/hurrycurry/pulls/665>.
12379 ;; Remove this phase when this gets merged into a release.
12380 (mkdir-p (string-append (assoc-ref outputs "client") "/bin"))))
12381 (replace 'install
12382 (lambda* (#:key make-flags outputs #:allow-other-keys)
12383 (for-each
12384 (lambda (output)
12385 (apply invoke "make"
12386 `(,@make-flags
12387 ,(string-append "INSTALL_PREFIX=" (cdr output))
12388 ,(string-append "install_" (car output)))))
12389 (delete (assoc "debug" outputs) outputs))))
12390 (add-after 'install 'patch-client-godot-path
12391 (lambda* (#:key inputs outputs #:allow-other-keys)
12392 (let ((client-script (string-append (assoc-ref outputs "client")
12393 "/bin/hurrycurry"))
12394 (godot (search-input-file inputs "bin/godot")))
12395 (substitute* client-script
12396 (("exec godot") (format #f "exec ~a" godot))))))))))
12397 (inputs
12398 (cons* godot
12399 (cargo-inputs 'hurrycurry)))
12400 (native-inputs
12401 (list ffmpeg
12402 node
12403 rust
12404 `(,rust "cargo")
12405 sed))
12406 (outputs
12407 (list "client"
12408 "server"
12409 "common"
12410 "debug"))
12411 (home-page "https://hurrycurry.org/")
12412 (synopsis "Cooperative 3D multiplayer game about cooking")
12413 (description "Hurry Curry! is a cooperative multiplayer game about cooking.
12414You work at a restaurant accepting orders, cooking various dishes and serving
12415meals to customers. But don’t take too long, as customers might get impatient.
12416The game is free software, licensed under the AGPL 3.0 only.")
12417 (license
12418 (list license:agpl3
12419 ;; Some models, sounds, music and other assets.
12420 license:cc0
12421 license:cc-by3.0
12422 license:cc-by4.0
12423 license:cc-by-sa4.0
12424 license:silofl1.1))))
12425
12426(define-public li-ri
12427 (package
12428 (name "li-ri")
12429 (version "3.1.6")
12430 (source (origin
12431 (method git-fetch)
12432 (uri (git-reference
12433 (url "https://github.com/petitlapin/Li-Ri")
12434 (commit (string-append "v" version))))
12435 (file-name (git-file-name name version))
12436 (sha256
12437 (base32
12438 "09r6l0sbxp3q750kpbrx513yrafmg7a2769j4wgx812lsk92n3hg"))))
12439 (build-system cmake-build-system)
12440 (arguments
12441 (list #:tests? #false ;no tests
12442 #:configure-flags
12443 #~(list "-DUSE_SYSTEM_SIMPLEINI=ON"
12444 (string-append "-DLIRI_DATA_DIR=" #$output "/share/Li-ri/"))))
12445 (native-inputs (list pkg-config))
12446 (inputs (list sdl2 sdl2-mixer simpleini))
12447 (home-page "https://github.com/petitlapin/Li-Ri")
12448 (synopsis "Toy train simulation game")
12449 (description
12450 "Li-Ri is a game in which you drive a wooden toy steam locomotive
12451across many levels and collect all the coaches to win.")
12452 ;; Source files mention "either version 2 or version 3" for GPL
12453 ;; license. Desktop file is licensed under CC0 terms.
12454 (license (list license:gpl2 license:gpl3 license:cc0))))
12455
12456(define-public freeorion
12457 (package
12458 (name "freeorion")
12459 (version "0.4.10.2")
12460 (source
12461 (origin
12462 (method git-fetch)
12463 (uri (git-reference
12464 (url "https://github.com/freeorion/freeorion")
12465 (commit (string-append "v" version))))
12466 (sha256
12467 (base32 "12fhwa3cs6lvdbdhina310qk2g7zcphldsh7ibsbxn8d1m731xlk"))
12468 (file-name (git-file-name name version))
12469 (modules '((guix build utils)))
12470 (snippet
12471 '(begin
12472 ;; There are some bundled fonts.
12473 (for-each delete-file-recursively '("default/data/fonts"))))))
12474 (build-system cmake-build-system)
12475 (arguments
12476 '(#:tests? #f ;no test
12477 #:phases
12478 (modify-phases %standard-phases
12479 (add-after 'unpack 'unbundle-fonts
12480 (lambda* (#:key inputs #:allow-other-keys)
12481 (let ((roboto-dir (string-append (assoc-ref inputs "font-roboto")
12482 "/share/fonts/truetype/")))
12483 (substitute* "UI/ClientUI.cpp"
12484 (("\\(GetRootDataDir.*?Roboto-(Bold|Regular)\\.ttf\"\\)\\.string\\(\\)\\);"
12485 all type)
12486 (string-append "\"" roboto-dir "Roboto-" type ".ttf\");")))
12487 #t))))))
12488 (inputs
12489 `(("boost" ,boost)
12490 ("boost_signals" ,boost-signals2)
12491 ("font-dejavu" ,font-dejavu)
12492 ("font-roboto" ,font-google-roboto)
12493 ("freetype2" ,freetype)
12494 ("glew" ,glew)
12495 ("glu" ,glu)
12496 ("libogg" ,libogg)
12497 ("libpng" ,libpng)
12498 ("libvorbis" ,libvorbis)
12499 ("openal" ,openal)
12500 ("python" ,python)
12501 ("sdl2" ,sdl2)
12502 ("zlib" ,zlib)))
12503 (home-page "https://www.freeorion.org/index.php/Main_Page")
12504 (synopsis "Turn-based space empire and galactic conquest computer game")
12505 (description
12506 "FreeOrion is a turn-based space empire and galactic conquest (4X)
12507computer game being designed and built by the FreeOrion project. Control an
12508empire with the goal of exploring the galaxy, expanding your territory,
12509exploiting the resources, and exterminating rival alien empires. FreeOrion is
12510inspired by the tradition of the Master of Orion games, but is not a clone or
12511remake of that series or any other game.")
12512 ;; Source code is released under gpl2. Artwork, music and sounds, and
12513 ;; in-game text are released under cc-by-sa3.0. Game content scripts are
12514 ;; released under both gpl2 and cc-by-sa3.0. Bundled Gigi library is
12515 ;; released under lgpl2.1+.
12516 (license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+))))
12517
12518(define-public lead-solver
12519 (package
12520 (name "lead-solver")
12521 (version "1.0.2")
12522 (source (origin
12523 (method url-fetch)
12524 (uri (let ((v (apply string-append (string-split version #\.))))
12525 (string-append
12526 "https://lajollabridge.com/Software/Lead-Solver/"
12527 "leadsolver-" v ".zip")))
12528 (sha256
12529 (base32
12530 "0xsa7r6r5sprgy0pkdm1xj1jwyy6d3qak2ynviy8xplicl99q09f"))
12531 (modules '((guix build utils)
12532 (ice-9 ftw)))
12533 (snippet
12534 #~(begin
12535 ;; Remove pre-built executables and cruft relative
12536 ;; to other OSes.
12537 (for-each
12538 delete-file-recursively
12539 (scandir "."
12540 (lambda (f)
12541 (not (member f '("." ".." "leadsolver.cpp"))))))
12542 (substitute* "leadsolver.cpp"
12543 (("#include \"dll.h\"") "#include <dll.h>"))))))
12544 (build-system gnu-build-system)
12545 (arguments
12546 (list #:tests? #false ;no tests
12547 #:phases
12548 #~(modify-phases %standard-phases
12549 (delete 'configure) ;no configure script
12550 (replace 'build
12551 (lambda _
12552 (invoke "g++" "leadsolver.cpp" "-ldds" "-o" "leadsolver")))
12553 (replace 'install ;no install phase
12554 (lambda _
12555 (let ((bin (string-append #$output "/bin")))
12556 (install-file "leadsolver" bin)))))))
12557 (native-inputs (list unzip))
12558 (inputs (list dds))
12559 (home-page
12560 "https://lajollabridge.com/Software/Lead-Solver/Lead-Solver-About.htm")
12561 (synopsis "Analyze leads in bridge game")
12562 (description
12563 "Given bridge hands, Lead Solver tallies up how well each card does when
12564led in terms of average tricks taken for the defense (for matchpoints) and how
12565often the contract is set (for team play).")
12566 (license license:gpl3)))
12567
12568(define-public leela-zero
12569 (package
12570 (name "leela-zero")
12571 (version "0.17")
12572 (source
12573 (origin
12574 (method git-fetch)
12575 (uri (git-reference
12576 (url "https://github.com/leela-zero/leela-zero")
12577 (commit (string-append "v" version))))
12578 (file-name (git-file-name name version))
12579 (sha256
12580 (base32
12581 "17px5iny8mql5c01bymcli7zfssswkzvb2i8gnsmjcck6i2n8srl"))
12582 (patches (search-patches "leela-zero-gtest.patch"))))
12583 (build-system cmake-build-system)
12584 (native-inputs
12585 (list googletest))
12586 (inputs
12587 (list boost-1.83
12588 opencl-icd-loader
12589 openblas
12590 opencl-headers
12591 qtbase-5
12592 zlib))
12593 (arguments
12594 '(#:configure-flags '("-DUSE_BLAS=YES")
12595 #:phases (modify-phases %standard-phases
12596 (add-before 'configure 'fix-tests
12597 (lambda* (#:key outputs #:allow-other-keys)
12598 (let ((home (getcwd)))
12599 (setenv "HOME" home)
12600 (substitute* "src/tests/gtests.cpp"
12601 (("\\.\\./src/tests/0k\\.txt")
12602 (string-append home "/src/tests/0k.txt"))
12603 (("cfg_gtp_mode = true;")
12604 "cfg_gtp_mode = true; cfg_cpu_only = true;")))
12605 #t))
12606 (replace 'check
12607 (lambda _
12608 (invoke "./tests"))))))
12609 (home-page "https://github.com/leela-zero/leela-zero")
12610 (synopsis "Program playing the game of Go")
12611 (description
12612 "Leela-zero is a Go engine with no human-provided knowledge, modeled after
12613the AlphaGo Zero paper. The current best network weights file for the engine
12614can be downloaded from @url{https://zero.sjeng.org/best-network}.")
12615 (license license:gpl3+)))
12616
12617(define-public q5go
12618 (package
12619 (name "q5go")
12620 (version "2.1.3")
12621 (source (origin
12622 (method git-fetch)
12623 (uri (git-reference
12624 (url "https://github.com/bernds/q5Go")
12625 (commit (string-append "q5go-" version))))
12626 (file-name (git-file-name name version))
12627 (sha256
12628 (base32
12629 "0x8x7mp61g3lwabx9z4vsyd743kfqibnqhym7xd0b7811flca3ri"))))
12630 (build-system gnu-build-system)
12631 (native-inputs
12632 (list autoconf automake pkg-config))
12633 (inputs
12634 (list qtbase-5 qtmultimedia-5 qtsvg-5))
12635 (arguments
12636 '(#:phases
12637 (modify-phases %standard-phases
12638 (add-after 'unpack 'fix-configure-script
12639 (lambda _
12640 ;; Bypass the unavailable qtchooser program.
12641 (for-each delete-file
12642 '("configure"
12643 "Makefile.in"
12644 "src/Makefile.in"
12645 "src/translations/Makefile.in"))
12646 (substitute* "configure.ac"
12647 (("AC_PATH_PROG\\(qtchooser, .*\\)")
12648 "")
12649 (("test -z \"QTCHOOSER\"")
12650 "false")
12651 (("\\$\\(qtchooser -list-versions\\)")
12652 "qt5")
12653 (("qtchooser -run-tool=(.*) -qt=\\$QT5_NAME" _ command)
12654 command))))
12655 (add-after 'unpack 'fix-paths
12656 (lambda* (#:key outputs #:allow-other-keys)
12657 (substitute* '("src/setting.cpp")
12658 (("/usr/share/\" PACKAGE \"/translations")
12659 (string-append (assoc-ref outputs "out")
12660 "/share/qGo/translations")))))
12661 (add-after 'install 'install-desktop-file
12662 (lambda* (#:key outputs #:allow-other-keys)
12663 (let* ((out (assoc-ref outputs "out"))
12664 (apps (string-append out "/share/applications"))
12665 (images (string-append out "/share/qGo/images")))
12666 (delete-file-recursively (string-append out "/share/applnk"))
12667 (delete-file-recursively (string-append out "/share/mimelnk"))
12668 (install-file "../source/src/images/Bowl.ico" images)
12669 (mkdir-p apps)
12670 (with-output-to-file (string-append apps "/q5go.desktop")
12671 (lambda _
12672 (format #t
12673 "[Desktop Entry]~@
12674 Name=q5go~@
12675 Exec=~a/bin/q5go~@
12676 Icon=~a/Bowl.ico~@
12677 Categories=Game;~@
12678 Comment=Game of Go~@
12679 Comment[de]=Spiel des Go~@
12680 Comment[eo]=Goo~@
12681 Comment[es]=Juego de Go~@
12682 Comment[fr]=Jeu de Go~@
12683 Comment[ja]=囲碁~@
12684 Comment[ko]=바둑~@
12685 Comment[zh]=围棋~@
12686 Terminal=false~@
12687 Type=Application~%"
12688 out images)))))))))
12689 (synopsis "Qt GUI to play the game of Go")
12690 (description
12691 "This a tool for Go players which performs the following functions:
12692@itemize
12693@item SGF editor,
12694@item Analysis frontend for Leela Zero (or compatible engines),
12695@item GTP interface (to play against an engine),
12696@item IGS client (to play on the internet),
12697@item Export games to a variety of formats.
12698@end itemize")
12699 (home-page "https://github.com/bernds/q5Go")
12700 (license license:gpl2+)))
12701
12702(define-public qcheckers
12703 (package
12704 (name "qcheckers")
12705 (version "0.9.0")
12706 (source
12707 (origin
12708 (method git-fetch)
12709 (uri (git-reference
12710 (url "https://github.com/portnov/qcheckers")
12711 (commit version)))
12712 (file-name (git-file-name name version))
12713 (sha256
12714 (base32 "05wzql6abzdf6l0vdzki4rfy2zn31mcplh1wkw3ddk8w81pvaymw"))))
12715 (build-system qt-build-system)
12716 (arguments
12717 (list
12718 #:tests? #f
12719 #:modules '((guix build qt-build-system)
12720 ((guix build gnu-build-system) #:prefix gnu:)
12721 (guix build utils))
12722 #:phases
12723 #~(modify-phases %standard-phases
12724 (replace 'configure
12725 (lambda _
12726 (invoke "qmake"
12727 (string-append "PREFIX=" #$output))))
12728 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12729 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
12730 (inputs (list qtbase-5 qtsvg-5 qtwayland-5))
12731 (home-page "https://portnov.github.io/qcheckers/")
12732 (synopsis "Qt-based checkers boardgame")
12733 (description "QCheckers, formerly known as KCheckers, is a is a Qt version
12734of the classic boardgame checkers (also known as draughts).")
12735 (license license:gpl2+)))
12736
12737(define-public xjump-sdl
12738 (package
12739 (name "xjump-sdl")
12740 (version "3.0.4")
12741 (source
12742 (origin
12743 (method git-fetch)
12744 (uri (git-reference
12745 (url "https://github.com/hugomg/xjump-sdl")
12746 (commit (string-append "v" version))))
12747 (file-name (git-file-name name version))
12748 (sha256
12749 (base32 "1macl4aq0zc93kbranzclqxh2jc40asn3bc8cpyywafzbxyha99y"))))
12750 (build-system gnu-build-system)
12751 (inputs (list sdl2))
12752 (arguments
12753 (list
12754 #:tests? #f ;No tests.
12755 #:phases
12756 #~(modify-phases %standard-phases
12757 (replace 'configure
12758 (lambda* (#:key outputs #:allow-other-keys)
12759 (invoke "./configure"
12760 (string-append "--prefix="
12761 (assoc-ref outputs "out"))
12762 (string-append "CC="
12763 #$(cc-for-target))))))))
12764 (home-page "https://github.com/hugomg/xjump-sdl")
12765 (synopsis "Falling tower game")
12766 (description "This package provides a reimplementation of the classic
12767Xjump game, using SDL instead of Xlib.")
12768 (license license:gpl3)))
12769
12770(define-public xmoto
12771 (package
12772 (name "xmoto")
12773 (version "0.6.3")
12774 (source
12775 (origin
12776 (method git-fetch)
12777 (uri (git-reference
12778 (url "https://github.com/xmoto/xmoto")
12779 (commit (string-append "v" version))))
12780 (file-name (git-file-name name version))
12781 (sha256
12782 (base32 "08yi6sgz349s7wa07dyrlbhpkmi25arz0c849qgpsj65vr8n7n8c"))
12783 (modules '((guix build utils)
12784 (ice-9 ftw)
12785 (srfi srfi-1)))
12786 ;; XXX: Remove some bundled libraries. Guix provides Chipmunk, but
12787 ;; it appears to be incompatible with the (older) one bundled.
12788 (snippet
12789 `(begin
12790 (let ((keep '("chipmunk" "glad" "md5sum")))
12791 (with-directory-excursion "vendor"
12792 (for-each delete-file-recursively
12793 (lset-difference string=?
12794 (scandir ".")
12795 (cons* "." ".." keep))))
12796 (substitute* "src/CMakeLists.txt"
12797 (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
12798 (if (member library keep) line ""))))))))
12799 (build-system cmake-build-system)
12800 (arguments
12801 (list
12802 #:tests? #f ;no tests
12803 #:phases
12804 #~(modify-phases %standard-phases
12805 (add-after 'unpack 'fix-hard-coded-directory
12806 (lambda _
12807 (substitute* "src/common/VFileIO.cpp"
12808 (("/usr/share") (string-append #$output "/share")))))
12809 (add-before 'build 'set-SDL
12810 ;; Set correct environment for SDL.
12811 (lambda* (#:key inputs #:allow-other-keys)
12812 (setenv "CPATH"
12813 (string-append
12814 (search-input-directory inputs "/include/SDL2")
12815 ":"
12816 (or (getenv "CPATH") "")))))
12817 (add-after 'install 'unbundle-fonts
12818 ;; Unbundle DejaVuSans TTF files.
12819 (lambda* (#:key inputs #:allow-other-keys)
12820 (let ((font-dir (search-input-directory inputs
12821 "/share/fonts/truetype/"))
12822 (target-dir (string-append #$output
12823 "/share/xmoto/Textures/Fonts/")))
12824 (for-each (lambda (f)
12825 (let ((font (string-append font-dir f))
12826 (target (string-append target-dir f)))
12827 (delete-file target)
12828 (symlink font target)))
12829 '("DejaVuSans.ttf" "DejaVuSansMono.ttf"))))))))
12830 (native-inputs
12831 (list gettext-minimal pkg-config))
12832 (inputs
12833 (list bzip2
12834 curl
12835 font-dejavu
12836 glu
12837 libjpeg-turbo
12838 libpng
12839 libxdg-basedir
12840 libxml2
12841 lua
12842 ode
12843 (sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf))
12844 sqlite
12845 zlib))
12846 (home-page "https://xmoto.tuxfamily.org/")
12847 (synopsis "2D motocross platform game")
12848 (description
12849 "X-Moto is a challenging 2D motocross platform game, where
12850physics play an all important role in the gameplay. You need to
12851control your bike to its limit, if you want to have a chance finishing
12852the more difficult challenges.")
12853 (license (list license:gpl2+ ;whole project
12854 license:bsd-3 ;vendor/md5sum
12855 license:lgpl2.1+
12856 license:expat))))
12857
12858(define-public eboard
12859 (package
12860 (name "eboard")
12861 (version "1.1.3")
12862 (source
12863 (origin
12864 (method git-fetch)
12865 (uri (git-reference
12866 (url "https://github.com/fbergo/eboard")
12867 (commit (string-append "v" version))))
12868 (file-name (git-file-name name version))
12869 (sha256
12870 (base32 "1z4pwpqyvxhlda99h6arh2rjk90fbms9q29fqizjblrdn01dlxn1"))))
12871 (build-system gnu-build-system)
12872 (native-inputs
12873 (list perl pkg-config))
12874 (inputs
12875 (list gtk+-2 libpng gstreamer))
12876 (arguments
12877 `(#:tests? #f
12878 #:phases
12879 (modify-phases %standard-phases
12880 (replace 'configure
12881 (lambda* (#:key outputs #:allow-other-keys)
12882 (make-file-writable "eboard-config")
12883 (setenv "CC" "gcc")
12884 (invoke "./configure"
12885 (string-append "--prefix=" (assoc-ref outputs "out")))
12886 #t))
12887 (add-before 'install 'make-required-directories
12888 (lambda* (#:key outputs #:allow-other-keys)
12889 (mkdir-p (string-append (assoc-ref outputs "out")
12890 "/share/eboard"))
12891 #t)))))
12892 (synopsis "Graphical user interface to play chess")
12893 (description
12894 "Eboard is a chess board interface for ICS (Internet Chess Servers)
12895and chess engines.")
12896 (home-page "https://www.bergo.eng.br/eboard/")
12897 (license license:gpl2+)))
12898
12899(define-public chessx
12900 (package
12901 (name "chessx")
12902 (version "1.5.6")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (string-append "mirror://sourceforge/chessx/chessx/"
12907 version "/chessx-" version ".tgz"))
12908 (sha256
12909 (base32 "01fjchil2h6ry2ywr0dwjw2g7zd29580cr4c74d5z74h999lp6nh"))))
12910 (build-system qt-build-system)
12911 (native-inputs
12912 (list qttools-5))
12913 (inputs
12914 (list qtbase-5 qtmultimedia-5 qtspeech-5 qtsvg-5 qtwayland-5 zlib))
12915 (arguments
12916 (list
12917 #:tests? #f
12918 #:modules '((guix build qt-build-system)
12919 ((guix build gnu-build-system) #:prefix gnu:)
12920 (guix build utils))
12921 #:phases
12922 #~(modify-phases %standard-phases
12923 (add-after 'unpack 'fix-paths
12924 (lambda* (#:key inputs #:allow-other-keys)
12925 (substitute* "chessx.pro"
12926 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
12927 (search-input-file inputs "/bin/lrelease")))))
12928 (add-after 'fix-paths 'fix-library-paths
12929 (lambda _
12930 ;; Otherwise it won't find the wayland shell integration
12931 ;; or qt plugin for wayland-egl.
12932 (substitute* "src/gui/main.cpp"
12933 (("QApplication::setLibraryPaths\\(l\\);")
12934 "/* QApplication::setLibraryPaths(l); */"))))
12935 (add-after 'fix-library-paths 'make-qt-deterministic
12936 (lambda _
12937 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")))
12938 (add-after 'make-qt-deterministic 'disable-versioncheck
12939 (lambda _
12940 (substitute* "src/database/settings.cpp"
12941 (("\"/General/onlineVersionCheck\", true")
12942 "\"/General/onlineVersionCheck\", false"))))
12943 (replace 'configure
12944 (lambda _
12945 (invoke "qmake")))
12946 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12947 (replace 'install
12948 (lambda* (#:key outputs #:allow-other-keys)
12949 (let ((out (assoc-ref outputs "out")))
12950 (install-file "release/chessx" (string-append out "/bin"))
12951 (install-file "unix/chessx.desktop"
12952 (string-append out "/share/applications"))))))))
12953 (synopsis "Chess game database")
12954 (description
12955 "ChessX is a chess database. With ChessX you can operate on your
12956collection of chess games in many ways: browse, edit, add, organize, analyze,
12957etc. You can also play games on FICS or against an engine.")
12958 (home-page "https://chessx.sourceforge.net/")
12959 (license license:gpl2+)))
12960
12961(define-public stockfish
12962 (let ((big-network-revision "c288c895ea92")
12963 (small-network-revision "37f18f62d772")) ; also update hashes below
12964 (package
12965 (name "stockfish")
12966 (version "18")
12967 (source
12968 (origin
12969 (method git-fetch)
12970 (uri (git-reference
12971 (url "https://github.com/official-stockfish/Stockfish")
12972 (commit (string-append "sf_" version))))
12973 (file-name (git-file-name name version))
12974 (sha256
12975 (base32 "0smqw4xpyv3ffhvlgm0wl1g2cyb7wf9jf3v0sshn4ylljxy39l97"))))
12976 (build-system gnu-build-system)
12977 (inputs
12978 `(("neural-network-big"
12979 ,(origin
12980 (method url-fetch)
12981 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12982 big-network-revision ".nnue"))
12983 (sha256
12984 (base32
12985 "19z48cxrxrspgvzmkix4lgr007rw5dmz7qwjj3m2ji4jxaawi262"))))
12986 ("neural-network-small"
12987 ,(origin
12988 (method url-fetch)
12989 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12990 small-network-revision ".nnue"))
12991 (sha256
12992 (base32
12993 "17c9b9ij1jmvbxaycqxbya33q30kij4s7b3a3mz11wvjsxi8zw9p"))))))
12994 (arguments
12995 `(#:tests? #f
12996 #:make-flags (list "-C" "src"
12997 "build"
12998 (string-append "PREFIX="
12999 (assoc-ref %outputs "out"))
13000 ,@(if (target-ppc32?)
13001 `("EXTRALDFLAGS=-latomic")
13002 `())
13003 (string-append "ARCH="
13004 ,(match (%current-system)
13005 ("x86_64-linux" "x86-64")
13006 ("i686-linux" "x86-32")
13007 ("aarch64-linux" "armv8")
13008 ("armhf-linux" "armv7")
13009 ("powerpc-linux" "ppc-32")
13010 ("powerpc64le-linux" "ppc-64")
13011 ("riscv64-linux" "general-64")
13012 ("mips64el-linux" "general-64")
13013 (_ "general-32"))))
13014 #:phases (modify-phases %standard-phases
13015 (delete 'configure)
13016 ;; The official neural network files are needed for building
13017 ;; and are embedded in the resulting binary.
13018 (add-after 'unpack 'copy-net
13019 (lambda* (#:key inputs #:allow-other-keys)
13020 (copy-file (assoc-ref inputs "neural-network-big")
13021 (format #f "src/nn-~a.nnue"
13022 ,big-network-revision))
13023 (copy-file (assoc-ref inputs "neural-network-small")
13024 (format #f "src/nn-~a.nnue"
13025 ,small-network-revision))))
13026 (add-after 'unpack 'remove-m-flag-and-net-target
13027 (lambda _
13028 (substitute* "src/Makefile"
13029 ;; Guix doesn't use a multiarch gcc.
13030 (("-m\\$\\(bits\\)") "")
13031 ;; Dont depend on net target.
13032 ((": net") ": ")))))))
13033 (synopsis "Strong chess engine")
13034 (description
13035 "Stockfish is a very strong chess engine. It is much stronger than the
13036best human chess grandmasters. It can be used with UCI-compatible GUIs like
13037ChessX.")
13038 (home-page "https://stockfishchess.org/")
13039 (license license:gpl3+))))
13040
13041(define-public moonfish
13042 (package
13043 (name "moonfish")
13044 (version "1")
13045 (source
13046 (origin
13047 (method git-fetch)
13048 (uri (git-reference
13049 (url "https://git.sr.ht/~zamfofex/moonfish")
13050 (commit (string-append "v" version))))
13051 (sha256
13052 (base32 "0p5rdrqiip6n5wdxjvlsg7qnwdwrpl9g3j1mx7q0i9a8zmkj2ryv"))
13053 (file-name (git-file-name name version))
13054 (modules '((guix build utils)))
13055 (snippet #~(begin
13056 ;; Avoid relying on '/dev/stderr', which doesn't work at the
13057 ;; top-level of a Guix build, because it refers to a pipe
13058 ;; that the build user doesn't have permission to access.
13059 (substitute* "scripts/check.sh"
13060 (("\\btee /dev/stderr\\b")
13061 "tee"))))))
13062 (build-system gnu-build-system)
13063 (arguments
13064 (list
13065 #:make-flags #~(list (string-append "CC="
13066 #$(cc-for-target))
13067 (string-append "PREFIX=" %output))
13068 #:phases #~(modify-phases %standard-phases
13069 (delete 'configure)))) ;no configure script
13070 (inputs (list libressl cjson))
13071 (home-page "https://moonfish.neocities.org")
13072 (synopsis "Simple chess engine written in C")
13073 (description
13074 "moonfish is a toy UCI chess engine written in C. It has TUI/CLI tools
13075for using any UCI engine and also to connect UCI engines to Lichess and IRC.")
13076 (license license:agpl3+)))
13077
13078(define-public morris
13079 (package
13080 (name "morris")
13081 (version "0.3")
13082 (source
13083 (origin
13084 (method git-fetch)
13085 (uri (git-reference
13086 (url "https://github.com/farindk/morris")
13087 (commit (string-append "v" version))))
13088 (file-name (git-file-name name version))
13089 (sha256
13090 (base32 "1kkcnpkzgybm7rqg7nafd7sqd5m4alns6l4j5zcf3p41jdc9s3iv"))))
13091 (build-system glib-or-gtk-build-system)
13092 (inputs (list automake autoconf pkg-config intltool
13093 gettext-minimal libtool glib gtk+-2 boost))
13094 (arguments (list #:tests? #f)) ; No tests in source.
13095 (home-page "http://nine-mens-morris.net/downloads.html")
13096 (synopsis "Implementation of the board game Nine Men's Morris")
13097 (description "Morris is an implementation of the board game Nine Men's Morris.
13098It supports not only the standard game, but also several rule-variants and different
13099board layouts. You can play against the computer, or simply use the program to
13100present the board, but play against another human opponent.")
13101 (license license:gpl3)))
13102
13103(define-public barrage
13104 (package
13105 (name "barrage")
13106 (version "1.0.7")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (string-append "mirror://sourceforge/lgames/barrage/"
13111 "barrage-" version ".tar.gz"))
13112 (sha256
13113 (base32 "0j7j6n5h97xpw0h8zi5a8ziw1vjsbr5gk4dcsiwzh59qn0djnrkh"))))
13114 (build-system gnu-build-system)
13115 (inputs
13116 (list hicolor-icon-theme sdl sdl-mixer))
13117 (arguments
13118 `(#:configure-flags
13119 (list
13120 (string-append "CFLAGS="
13121 "-I" (assoc-ref %build-inputs "sdl-mixer")
13122 "/include/SDL"))))
13123 (home-page "https://lgames.sourceforge.net/Barrage/")
13124 (synopsis "Violent point-and-click shooting game with nice effects")
13125 (description
13126 "Barrage is a rather destructive action game that puts you on a shooting
13127range with the objective to hit as many dummy targets as possible within
131283 minutes. You control a gun that may either fire small or large grenades at
13129soldiers, jeeps and tanks. The gameplay is simple but it is not that easy to
13130get high scores.")
13131 (license license:gpl2+)))
13132
13133(define-public burgerspace
13134 (package
13135 (name "burgerspace")
13136 (version "1.10.0")
13137 (source
13138 (origin
13139 (method url-fetch)
13140 (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/"
13141 "burgerspace-" version ".tar.gz"))
13142 (sha256
13143 (base32 "18ydm3014y9vhma0ml7z66xa7ihiz3xr8izicfdd3xl9f4535f6c"))))
13144 (build-system gnu-build-system)
13145 (native-inputs
13146 (list pkg-config))
13147 (inputs
13148 (list flatzebra))
13149 (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html")
13150 (synopsis "Avoid evil foodstuffs and make burgers")
13151 (description
13152 "This is a clone of the classic game BurgerTime. In it, you play
13153the part of a chef who must create burgers by stepping repeatedly on
13154the ingredients until they fall into place. And to make things more
13155complicated, you also must avoid evil animate food items while
13156performing this task, with nothing but your trusty pepper shaker to
13157protect you.")
13158 (license license:gpl2+)))
13159
13160(define-public 7kaa
13161 (package
13162 (name "7kaa")
13163 (version "2.15.7")
13164 (source
13165 (origin
13166 (method git-fetch)
13167 (uri (git-reference
13168 (url "https://git.code.sf.net/p/skfans/7kaa")
13169 (commit (string-append "v" version))))
13170 (sha256
13171 (base32 "1gfmgqdmqfaxj4hlz8x7zh3s36inns1gqqb8dq0r58b26xk42x2y"))))
13172 (build-system gnu-build-system)
13173 (arguments
13174 (list
13175 #:phases
13176 #~(modify-phases %standard-phases
13177 (add-after 'unpack 'patch-configure-ac
13178 ;; gettext version mismatch forces us to patch configure.ac
13179 (lambda _
13180 (let ((gettext-version
13181 #$(package-version (this-package-native-input "gettext-minimal"))))
13182 (substitute* "configure.ac"
13183 (("AM_GNU_GETTEXT_VERSION.*")
13184 (string-append
13185 "AM_GNU_GETTEXT_VERSION([" gettext-version "])\n"
13186 "AM_GNU_GETTEXT_REQUIRE_VERSION([" gettext-version "])\n")))))))))
13187 (native-inputs
13188 (list autoconf
13189 autoconf-archive
13190 automake
13191 gettext-minimal
13192 pkg-config))
13193 (inputs
13194 (list curl
13195 enet
13196 openal
13197 sdl2))
13198 (synopsis "Seven Kingdoms Ancient Adversaries: real-time strategy game")
13199 (description
13200 "Seven Kingdoms, designed by Trevor Chan, brings a blend of Real-Time
13201Strategy with the addition of trade, diplomacy, and espionage. The game
13202enables players to compete against up to six other kingdoms allowing players
13203to conquer opponents by defeating them in war (with troops or machines),
13204capturing their buildings with spies, or offering opponents money for their
13205kingdom.")
13206 (home-page "https://7kfans.com/index.html")
13207 (license license:gpl2+)))
13208
13209(define-public neverball
13210 ;; Git version is 6-years younger than latest release.
13211 (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
13212 (revision "1"))
13213 (package
13214 (name "neverball")
13215 (version (git-version "1.6.0" revision commit))
13216 (source
13217 (origin
13218 (method git-fetch)
13219 (uri (git-reference
13220 (url "https://github.com/Neverball/neverball")
13221 (commit commit)))
13222 (sha256
13223 (base32
13224 "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
13225 (file-name (git-file-name name version))
13226 (modules '((guix build utils)))
13227 (snippet
13228 '(begin
13229 ;; Octocat seems to be non-free. Oddly, Debian doesn't strip it.
13230 (delete-file-recursively "data/ball/octocat")))))
13231 (build-system copy-build-system)
13232 (arguments
13233 `(#:install-plan
13234 '(("neverball" "bin/")
13235 ("neverputt" "bin/")
13236 ("mapc" "bin/")
13237 ("data" "share/games/neverball/")
13238 ("locale" "share/")
13239 ("dist/" "share/games/neverball" #:include ("neverball_replay.png"
13240 "neverlogos.svg"
13241 "svg readme.txt"))
13242 ("dist/" "share/applications" #:include ("neverball.desktop"
13243 "neverputt.desktop"))
13244 ("dist/neverball_16.png"
13245 "/share/icons/hicolor/16x16/apps/neverball.png")
13246 ("dist/neverball_24.png"
13247 "/share/icons/hicolor/24x24/apps/neverball.png")
13248 ("dist/neverball_32.png"
13249 "/share/icons/hicolor/32x32/apps/neverball.png")
13250 ("dist/neverball_48.png"
13251 "/share/icons/hicolor/48x48/apps/neverball.png")
13252 ("dist/neverball_64.png"
13253 "/share/icons/hicolor/64x64/apps/neverball.png")
13254 ("dist/neverball_128.png"
13255 "/share/icons/hicolor/128x128/apps/neverball.png")
13256 ("dist/neverball_256.png"
13257 "/share/icons/hicolor/256x256/apps/neverball.png")
13258 ("dist/neverball_512.png"
13259 "/share/icons/hicolor/512x512/apps/neverball.png")
13260 ("dist/neverputt_16.png"
13261 "/share/icons/hicolor/16x16/apps/neverputt.png")
13262 ("dist/neverputt_24.png"
13263 "/share/icons/hicolor/24x24/apps/neverputt.png")
13264 ("dist/neverputt_32.png"
13265 "/share/icons/hicolor/32x32/apps/neverputt.png")
13266 ("dist/neverputt_48.png"
13267 "/share/icons/hicolor/48x48/apps/neverputt.png")
13268 ("dist/neverputt_64.png"
13269 "/share/icons/hicolor/64x64/apps/neverputt.png")
13270 ("dist/neverputt_128.png"
13271 "/share/icons/hicolor/128x128/apps/neverputt.png")
13272 ("dist/neverputt_256.png"
13273 "/share/icons/hicolor/256x256/apps/neverputt.png")
13274 ("dist/neverputt_512.png"
13275 "/share/icons/hicolor/512x512/apps/neverputt.png")
13276 ("dist/" "share/man/man1" #:include ("mapc.1"))
13277 ("dist/" "share/man/man6" #:include ("neverball.6" "neverputt.6"))
13278 ("doc/" "share/doc/neverball")
13279 ("README.md" "share/doc/neverball/"))
13280 #:phases
13281 (modify-phases %standard-phases
13282 (add-before 'install 'build
13283 (lambda* (#:key inputs outputs #:allow-other-keys)
13284 (let* ((out (assoc-ref outputs "out"))
13285 (sdl (assoc-ref inputs "sdl")))
13286 (invoke "make" "-j" (number->string (parallel-job-count))
13287 "--environment-overrides"
13288 "CC=gcc" "BUILD=release"
13289 (string-append "DATADIR="
13290 out
13291 "/share/games/neverball/data")
13292 (string-append "LOCALEDIR=" out "/share/locale")
13293 (string-append "SDL_CPPFLAGS=-I"
13294 sdl
13295 "/include/SDL2/")))))
13296 (add-after 'install 'fix-some-broken-fonts
13297 (lambda* (#:key outputs #:allow-other-keys)
13298 (let* ((out (assoc-ref outputs "out")))
13299 (wrap-program (string-append out "/bin/neverball")
13300 `("LANG" = ("en_US.utf8")))
13301 (wrap-program (string-append out "/bin/neverputt")
13302 `("LANG" = ("en_US.utf8")))))))))
13303 (native-inputs
13304 `(("gettext" ,gettext-minimal))) ;for msgfmt
13305 (inputs
13306 `(("bash-minimal" ,bash-minimal)
13307 ("libjpeg" ,libjpeg-turbo)
13308 ("libpng" ,libpng)
13309 ("libvorbis" ,libvorbis)
13310 ("physfs" ,physfs)
13311 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))))
13312 (home-page "https://neverball.org/")
13313 (synopsis "3D floor-tilting game")
13314 (description
13315 "In the grand tradition of Marble Madness and Super Monkey Ball,
13316Neverball has you guide a rolling ball through dangerous territory. Balance
13317on narrow bridges, navigate mazes, ride moving platforms, and dodge pushers
13318and shovers to get to the goal. Race against the clock to collect coins to
13319earn extra balls. Also included is Neverputt, which is a 3D miniature golf
13320game.") ;thanks to Debian for description
13321 (license license:gpl2+))))
13322
13323;; TODO: We may wish to package the server and client separately.
13324(define-public pokerth
13325 (package
13326 (name "pokerth")
13327 (version "2.0.8")
13328 (source
13329 (origin
13330 (method git-fetch)
13331 (uri (git-reference
13332 (url "https://github.com/pokerth/pokerth")
13333 (commit (string-append "v" version))))
13334 (file-name (git-file-name name version))
13335 (sha256
13336 (base32 "1hwnywqq5c05j1qym5q82r9inyps3p1fsjd7c819575vvqcdwqx8"))
13337 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
13338 (snippet
13339 #~(begin
13340 ;; XXX: We must use the ancient bundled websocketpp because the new
13341 ;; one is not compatible with newer versions of boost asio:
13342 ;; https://github.com/zaphoyd/websocketpp/issues/721
13343 ;; One alternative is to use boost-1.83 as an input.
13344 ;; XXX: Can we copy the third party boost headers in from somewhere?
13345 (let ((keep '("boost" "websocketpp")))
13346 (with-directory-excursion "src/third_party"
13347 (for-each delete-file-recursively
13348 (lset-difference string=?
13349 (scandir ".")
13350 (cons* "." ".." keep)))))))))
13351 (build-system qt-build-system)
13352 (inputs
13353 (list boost
13354 openssl
13355 protobuf
13356 qtbase
13357 qtdeclarative
13358 qtmultimedia
13359 qtsvg
13360 qtwayland
13361 sqlite))
13362 (native-inputs (list qttools qtwebsockets))
13363 (arguments (list #:tests? #f)) ;TODO: 'bot client' must be built & run
13364 (home-page "https://www.pokerth.net")
13365 (synopsis "Texas holdem poker game")
13366 (description
13367 "With PokerTH you can play the Texas holdem poker game, either against
13368computer opponents or against real players online.")
13369 (license license:agpl3+)))
13370
13371(define-public xevil
13372 ;; This game is old. Use a maintained fork that builds with modern toolchains
13373 ;; on modern, 64-bit hardware.
13374 (let ((commit "9ca85059d5195be0eb15e107de3bb9d1b49e5f99")
13375 (revision "0"))
13376 (package
13377 (name "xevil")
13378 (version (git-version "2.02" revision commit))
13379 (source
13380 (origin
13381 (method git-fetch)
13382 (uri (git-reference
13383 (url "https://github.com/lvella/xevil")
13384 (commit commit)))
13385 (file-name (git-file-name name version))
13386 (sha256
13387 (base32 "14hsmw9ll2asnp1s0zvniyp31kjw8ynm7vnycg74lpqf28h2rric"))))
13388 (build-system gnu-build-system)
13389 (arguments
13390 (list
13391 #:modules `(,@%default-gnu-imported-modules
13392 (srfi srfi-26))
13393 #:make-flags
13394 #~(list "SHELL=sh"
13395 "DEBUG_OPT=-g -DNDEBUG")
13396 #:tests? #f ;no test suite
13397 #:phases
13398 #~(modify-phases %standard-phases
13399 (add-after 'unpack 'rename-licence-file
13400 (lambda _ (rename-file "gpl.txt" "COPYING")))
13401 (add-after 'unpack 'redefine
13402 (lambda* (#:key inputs #:allow-other-keys)
13403 (substitute* "cmn/game.cpp"
13404 (("(#define VERSION ).*" _ define)
13405 (string-append define "\"" #$version "\"\n")))
13406 (substitute* "cmn/utils.cpp"
13407 (("[^\"]*/(bin/uname)" _ command)
13408 (search-input-file inputs command)))
13409 (substitute* "x11/ui.cpp"
13410 ;; Neither DEFAULT_BIG_FONT_NAME nor BACKUP_FONT_NAME are
13411 ;; available from most Guix X11 servers, making the game
13412 ;; unplayable by default. Substitute the closest match.
13413 (("9x15") "6x13")
13414 ;; ‘For fast machines’ need no longer default to False in C21.
13415 (("(smoothScroll = )False" _ assign)
13416 (string-append assign "True")))))
13417 (delete 'configure) ;no configure script
13418 (replace 'install
13419 (lambda _
13420 (with-directory-excursion "x11/REDHAT_LINUX" ;yeah
13421 (for-each (cut install-file <>
13422 (string-append #$output "/bin"))
13423 (list "xevil" "serverping")))
13424 (let ((doc (string-append #$output "/share/doc/"
13425 #$name "-" #$version)))
13426 (mkdir-p doc)
13427 (for-each (lambda (file)
13428 (copy-recursively file
13429 (string-append
13430 doc "/" (basename file))))
13431 (list "instructions" "x11/app-defaults"))))))))
13432 (inputs
13433 (list coreutils-minimal ;for uname
13434 libx11 libxpm))
13435 ;; The current home page has been ‘subtly’ vandalised with spam and is
13436 ;; missing a lot of content from this older snapshot.
13437 (home-page (string-append "https://web.archive.org/web/20060410005819/"
13438 "http://www.xevil.com/"))
13439 (synopsis
13440 "Third-person, side-scrolling, fast-action, kill-everything game")
13441 (description
13442 "XEvil is a violent third-person, side-scrolling, fast-action deathmatch.
13443You run around a randomly generated two-dimensional map composed of walls,
13444floors, ladders, doors, and horizontal and vertical elevators. Your only object
13445is to explore this world to find weapons and items, killing everything in sight
13446before they kill you. You can fight against either computer-controlled enemies
13447or against other people.")
13448 (license license:gpl2+))))
13449
13450(define-public azimuth
13451 ;; 1.0.3 - May 29, 2019
13452 ;; Has build errors so build from latest source
13453 (let ((commit "050f838b35d19ffdc738f33178abaf9d69d834ec")
13454 (revision "0"))
13455 (package
13456 (name "azimuth")
13457 (version (git-version "1.0.3" revision commit))
13458 (source
13459 (origin
13460 (method git-fetch)
13461 (uri (git-reference
13462 (url "https://github.com/mdsteele/azimuth")
13463 (commit commit)))
13464 (file-name (git-file-name name version))
13465 (sha256
13466 (base32
13467 "1b5grp9ddhrj3n39j1j5vzm3052d4bd09fpz0b011h769vapwi0i"))))
13468 (build-system gnu-build-system)
13469 (arguments
13470 (list
13471 #:test-target "test"
13472 #:phases
13473 #~(modify-phases %standard-phases
13474 (delete 'configure) ; no configure script
13475 ;; Build release version instead of debug version.
13476 (add-after 'unpack 'set-release
13477 (lambda _
13478 (setenv "BUILDTYPE" "release")))
13479 (add-after 'unpack 'fix-build
13480 (lambda* (#:key outputs #:allow-other-keys)
13481 (substitute* "Makefile"
13482 (("-Werror") ""))))
13483 (add-after 'unpack 'fix-install ; set install directory
13484 (lambda* (#:key outputs #:allow-other-keys)
13485 (substitute* "Makefile"
13486 (("/usr")
13487 (assoc-ref outputs "out"))) #t)))))
13488 (inputs (list sdl2))
13489 (native-inputs (list pkg-config))
13490 (home-page "https://mdsteele.games/azimuth/")
13491 (synopsis "Metroidvania game with vector graphics")
13492 (description
13493 "Pilot your ship inside a planet to find and rescue the colonists
13494trapped inside the Zenith Colony.")
13495 (license license:gpl3+))))
13496
13497(define-public cgoban
13498 (package
13499 (name "cgoban")
13500 (version "1.9.14")
13501 (source
13502 (origin
13503 (method url-fetch)
13504 (uri (string-append "mirror://sourceforge/cgoban1/cgoban1/"
13505 version "/cgoban-" version ".tar.gz"))
13506 (sha256
13507 (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))))
13508 (build-system gnu-build-system)
13509 (inputs
13510 (list libx11 libxt xorgproto))
13511 (home-page "https://cgoban1.sourceforge.net/")
13512 (synopsis "Go client for X11")
13513 (description "Provides a large set of Go-related services for X11:
13514@itemize
13515@item Local games with precise implementation of the Chinese and Japanese rulesets
13516@item Edition and visualization of SGF files
13517@item Connection to the NNGS or IGS Go servers
13518@item Bridge to Go modem protocol, allowing to play against Go modem-capable AIs
13519such as GnuGo.
13520@end itemize")
13521 (license license:gpl2+)))
13522
13523(define-public parallel-overhead
13524 (package
13525 (name "parallel-overhead")
13526 (version "1.1.4")
13527 (source
13528 (origin
13529 (method git-fetch)
13530 (uri (git-reference
13531 (url "https://codeberg.org/Huitsi/ParallelOverhead")
13532 (commit version)))
13533 (file-name (git-file-name name version))
13534 (sha256
13535 (base32
13536 "17dbq6bwm0rk1jzb1q2y6h3dyvxpqfq3lc3jnpb6zy2y897was4d"))))
13537 (build-system gnu-build-system)
13538 (arguments
13539 (list
13540 #:tests? #f ;no tests
13541 #:make-flags
13542 #~(list
13543 (string-append "prefix=" #$output)
13544 (string-append "bindir=" #$output "/bin") ;nooo don't put it in /games
13545 (string-append "CC=" #$(cc-for-target)))
13546 #:phases
13547 #~(modify-phases %standard-phases
13548 (delete 'configure)
13549 (add-before 'build 'no-git-describe
13550 (lambda _
13551 (substitute* "Makefile"
13552 (("\\$\\(shell git.+\\)") #$version)))))))
13553 (inputs (list sdl2))
13554 (native-inputs (list desktop-file-utils
13555 help2man
13556 lmms
13557 sfxr-qt))
13558 (home-page "https://huitsi.net/ParallelOverhead")
13559 (synopsis "Endless runner game")
13560 (description "Parallel Overhead is a colorful endless runner game where you
13561take control of the ships Truth and Beauty on a groundbreaking trip through
13562hyperspace. A stable hyperspace tunnel has finally been achieved with the two
13563ships supporting it on opposite walls of the tunnel. Well, almost stable...
13564The goal is to keep the ships from falling through the cracks.")
13565 (license (list license:expat ;game
13566 license:cc0)))) ;sounds+music
13567
13568(define-public passage
13569 (package
13570 (name "passage")
13571 (version "4")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (string-append "mirror://sourceforge/hcsoftware/Passage/v"
13576 version "/Passage_v" version "_UnixSource.tar.gz"))
13577 (sha256
13578 (base32 "02ky4a4xdjvr71r58339jjrjyz76b5skcnbq4f8707mrln9vhby3"))))
13579 (build-system gnu-build-system)
13580 (arguments
13581 `(#:tests? #false ; there are none
13582 #:phases
13583 (modify-phases %standard-phases
13584 (add-after 'unpack 'chdir
13585 (lambda _
13586 (chdir "gamma256/gameSource")
13587 (system "cat Makefile.GnuLinux Makefile.all > Makefile")))
13588 (replace 'configure
13589 (lambda* (#:key outputs inputs #:allow-other-keys)
13590 (setenv "CPATH"
13591 (string-append
13592 (assoc-ref inputs "sdl") "/include/SDL:"
13593 (or (getenv "CPATH") "")))
13594 (let* ((out (assoc-ref outputs "out"))
13595 (assets (string-append out "/share/passage")))
13596 (substitute* "common.cpp"
13597 (("readTGA\\( \"graphics\"")
13598 (format #false "readTGA(\"~a/graphics\"" assets)))
13599 (substitute* "musicPlayer.cpp"
13600 (("readTGA\\( \"music\"")
13601 (format #false "readTGA(\"~a/music\"" assets))))))
13602 (replace 'install
13603 (lambda* (#:key outputs #:allow-other-keys)
13604 (let* ((out (assoc-ref outputs "out"))
13605 (bin (string-append out "/bin"))
13606 (assets (string-append out "/share/passage/")))
13607 (install-file "Passage" bin)
13608 (install-file "../documentation/Readme.txt" assets)
13609 (copy-recursively "graphics" (string-append assets "graphics"))
13610 (copy-recursively "music" (string-append assets "music"))
13611 (copy-recursively "settings" (string-append assets "settings"))))))))
13612 (inputs
13613 `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
13614 (native-inputs
13615 (list imagemagick))
13616 (home-page "https://hcsoftware.sourceforge.net/passage/")
13617 (synopsis "Memento mori game")
13618 (description
13619 "Passage is meant to be a memento mori game. It presents an entire life,
13620from young adulthood through old age and death, in the span of five minutes.
13621Of course, it's a game, not a painting or a film, so the choices that you make
13622as the player are crucial. There's no ``right'' way to play Passage, just as
13623there's no right way to interpret it.")
13624 (license license:public-domain)))
13625
13626(define-public paperview
13627 (let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6")
13628 (revision "1"))
13629 (package
13630 (name "paperview")
13631 (version (git-version "0.0.1" revision commit)) ;no upstream release
13632 (source (origin
13633 (method git-fetch)
13634 (uri (git-reference
13635 (url "https://github.com/glouw/paperview")
13636 (commit commit)))
13637 (file-name (git-file-name name version))
13638 (sha256
13639 (base32
13640 "09sb9sg44fvkgfdyycrm1ndpx7cnkrglxhci41y8f3gpagnvi7jk"))))
13641 (build-system gnu-build-system)
13642 (inputs
13643 (list sdl2))
13644 (arguments
13645 '(#:tests? #f ;no tests
13646 #:make-flags
13647 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
13648 #:phases
13649 (modify-phases %standard-phases
13650 (delete 'configure))))
13651 (home-page "https://github.com/glouw/paperview/")
13652 (synopsis "High performance X11 animated wallpaper setter")
13653 (description "High performance animated desktop background setter for
13654X11 that won't set your CPU on fire, drain your laptop battery, or lower video
13655game FPS.")
13656 (license license:unlicense))))
13657
13658(define-public curseofwar
13659 (package
13660 (name "curseofwar")
13661 (version "1.3.0")
13662 (source
13663 (origin
13664 (method git-fetch)
13665 (uri (git-reference
13666 (url "https://github.com/a-nikolaev/curseofwar")
13667 (commit (string-append "v" version))))
13668 (file-name (git-file-name name version))
13669 (sha256
13670 (base32 "1wd71wdnj9izg5d95m81yx3684g4zdi7fsy0j5wwnbd9j34ilz1i"))))
13671 (build-system gnu-build-system)
13672 (arguments
13673 `(#:tests? #f ; no tests
13674 #:make-flags
13675 (list (string-append "CC=" ,(cc-for-target))
13676 (string-append "PREFIX=" (assoc-ref %outputs "out")))
13677 #:phases
13678 (modify-phases %standard-phases
13679 (delete 'configure))))
13680 (inputs (list ncurses))
13681 (home-page "https://a-nikolaev.github.io/curseofwar/")
13682 (synopsis "Fast-paced action strategy game")
13683 (description "Curse of War is a fast-paced action strategy game originally
13684implemented using ncurses user interface. An SDL graphical version is also
13685available.")
13686 (license license:gpl3+)))
13687
13688(define-public devours
13689 (let ((commit "d50e745aa14aa48f7555ae12eb3d1000de1cc150")
13690 (revision "0"))
13691 (package
13692 (name "devours")
13693 (version (git-version "3" revision commit))
13694 (source
13695 (origin
13696 (method git-fetch)
13697 (uri (git-reference
13698 (url "https://jxself.org/git/devours.git")
13699 (commit commit)))
13700 (file-name (git-file-name name version))
13701 (sha256
13702 (base32 "1ksl6mh76jfx64rmasz2571f88ws45vby2977srhgkh355zp3lzn"))))
13703 (build-system gnu-build-system)
13704 (arguments
13705 (list
13706 #:tests? #f ; no tests
13707 #:phases
13708 #~(modify-phases %standard-phases
13709 (delete 'configure) ; no configure
13710 (replace 'build
13711 (lambda _
13712 (invoke "inform"
13713 (string-append "+include_path="
13714 #$(this-package-native-input "informlib")
13715 "/lib")
13716 "devours.inf")))
13717 (replace 'install
13718 (lambda* (#:key inputs #:allow-other-keys)
13719 ;; Create standalone executable.
13720 (let* ((bash (search-input-file inputs "/bin/bash"))
13721 (share (string-append #$output "/share"))
13722 (scummvm (search-input-file inputs "/bin/scummvm"))
13723 (bin (string-append #$output "/bin"))
13724 (executable (string-append bin "/devours")))
13725 (mkdir-p share)
13726 (copy-file "devours.z5" (string-append share "/devours.z5"))
13727 (mkdir-p bin)
13728 (with-output-to-file executable
13729 (lambda ()
13730 (format #t "#!~a~%" bash)
13731 (format #t
13732 "exec ~a --path=~a glk:zcode~%"
13733 scummvm share)))
13734 (chmod executable #o755))))
13735 (add-after 'install 'install-desktop-file
13736 (lambda _
13737 (let* ((apps (string-append #$output "/share/applications"))
13738 (share (string-append #$output "")))
13739 (mkdir-p apps)
13740 (make-desktop-entry-file
13741 (string-append apps "/devours.desktop")
13742 #:name "All Things Devours"
13743 #:generic-name "All Things Devours"
13744 #:exec (string-append #$output "/bin/devours")
13745 #:categories '("AdventureGame" "Game" "RolePlaying")
13746 #:keywords '("game" "adventure" "sci-fi")
13747 #:comment '((#f "Sci-fi text adventure game")))))))))
13748 (inputs
13749 (list bash scummvm))
13750 (native-inputs
13751 (list inform informlib))
13752 (synopsis "All Things Devours")
13753 (description
13754 "All Things Devours is a short piece of sci-fi interactive fiction,
13755leaning strongly towards the text-adventure end of the spectrum.
13756Any move you make may put things into an unwinnable state. You are therefore
13757encouraged to save frequently, and also to realise that you will probably have
13758to start over several times to find the most satisfactory ending.")
13759 (home-page "https://jxself.org/git/devours.git")
13760 (license license:agpl3+))))
13761
13762(define-public dustracing2d
13763 (package
13764 (name "dustracing2d")
13765 (version "2.2.0")
13766 (source
13767 (origin
13768 (method git-fetch)
13769 (uri (git-reference
13770 (url "https://github.com/juzzlin/DustRacing2D")
13771 (commit version)))
13772 (file-name (git-file-name name version))
13773 (sha256
13774 (base32 "1a6s7j9n6jmcabryd2959xpalz7d85h2fgakkrh41399xm40msnp"))
13775 (modules '((guix build utils)))
13776 ;; Unbundle argengine, simplelogger.
13777 (snippet #~(delete-file-recursively "src/contrib"))
13778 (patches (search-patches "dustracing2d-unbundle-libs.patch"))))
13779 (build-system qt-build-system)
13780 (arguments
13781 (list
13782 #:qtbase qtbase
13783 #:configure-flags #~(list "-DReleaseBuild=ON")))
13784 (inputs
13785 (list argengine
13786 libogg
13787 libvorbis
13788 mesa
13789 openal
13790 simplelogger))
13791 (native-inputs (list pkg-config qttools))
13792 (home-page "https://juzzlin.github.io/DustRacing2D/")
13793 (synopsis "Top-down car racing game")
13794 (description "Dust Racing 2D is a tile-based, cross-platform 2D racing
13795game supporting multiplayer play, different tracks, and gamemodes. It also
13796comes with a Qt-based level editor for easy level creation.")
13797 (license (list license:gpl3+ ;game
13798 license:cc-by-sa3.0)))) ;assets
13799
13800(define-public schiffbruch
13801 ;; There haven't been any releases for several years, so I've taken the most
13802 ;; recent commit from the master branch that didn't fail to build (the last
13803 ;; commit gave me a compile error).
13804 (let ((commit "e41916d15d87749c82c5005cbb42d1bb079b43d9"))
13805 (package
13806 (name "schiffbruch")
13807 (version (git-version "1.2.1" "0" commit))
13808 (source
13809 (origin
13810 (method git-fetch)
13811 (uri (git-reference
13812 (url "https://github.com/sandsmark/Schiffbruch")
13813 (commit commit)))
13814 (file-name (git-file-name name version))
13815 (sha256
13816 (base32 "0lg3rqacrapf6c4sxi12cm9bmg43mlbclway1zxcm848pi1xkzwv"))
13817 (patches (search-patches "schiffbruch-fix-build-for-gcc-13.patch"))))
13818 (build-system cmake-build-system)
13819 (arguments
13820 `(#:tests? #f ; no tests
13821 #:build-type "Release"))
13822 (inputs
13823 (list sfml-2))
13824 (home-page "https://github.com/sandsmark/Schiffbruch/")
13825 (synopsis "Pixelart survival game")
13826 (description
13827 "Schiffbruch is a mix of building, strategy and adventure and gets played
13828with a two-dimensional view. The game deals with the consequences of a ship
13829wreckage. You're stranded on a desert island and have to survive. In order to
13830do so you need to explore the island, find food, build a shelter and try to
13831get attention, so you get found.")
13832 (license license:cc-by4.0))))
13833
13834(define-public sdl-jstest
13835 (package
13836 (name "sdl-jstest")
13837 (version "0.2.2")
13838 (source (origin
13839 (method git-fetch)
13840 (uri (git-reference
13841 (url "https://github.com/Grumbel/sdl-jstest")
13842 (commit (string-append "v" version))))
13843 (file-name (git-file-name name version))
13844 (sha256
13845 (base32
13846 "11qp4gkbb11n3wx74128fj56radgsvkj7nxhbh55rd3xad1hckh3"))))
13847 (build-system cmake-build-system)
13848 (arguments
13849 (list
13850 ;; The test suite uses appstream-utils to validate the appdata.xml file,
13851 ;; fails with "url-not-found".
13852 #:tests? #f
13853 #:phases
13854 #~(modify-phases %standard-phases
13855 (add-after 'unpack 'copy-gamecontroller-db
13856 (lambda* (#:key native-inputs inputs #:allow-other-keys)
13857 (copy-file
13858 (search-input-file (or native-inputs inputs)
13859 "share/sdl2/gamecontrollerdb.txt")
13860 "external/sdl_gamecontrollerdb/gamecontrollerdb.txt"))))))
13861 (native-inputs
13862 (list pkg-config sdl2-gamecontrollerdb tinycmmc))
13863 (inputs (list ncurses sdl sdl2))
13864 (home-page "https://github.com/Grumbel/sdl-jstest")
13865 (synopsis "SDL Joystick Tester")
13866 (description "The @command{sdl-jstest} and @command{sdl2-jstest} commands
13867can list the available joystick controllers as found by the SDL or SDL2
13868libraries, respectively. It can show the available axes, buttons, hats and
13869balls of a chosen controller, and can display the controller actions in real
13870time in a visual fashion.")
13871 (license license:gpl3+)))
13872
13873(define-public sdlpop
13874 (package
13875 (name "sdlpop")
13876 (version "1.24-rc")
13877 (source
13878 (origin
13879 (method git-fetch)
13880 (uri (git-reference
13881 (url "https://github.com/NagyD/SDLPoP")
13882 (commit "v1.24-RC")))
13883 (file-name (git-file-name name version))
13884 (sha256
13885 (base32 "16idniqabzwf8kc30mqvkdfvr1kqy26bja3af2c105mhxw3jx77f"))))
13886 (build-system cmake-build-system)
13887 (arguments
13888 (list
13889 #:tests? #f ;no tests provided
13890 #:phases
13891 #~(modify-phases %standard-phases
13892 (add-after 'unpack 'fix-data-path
13893 (lambda _
13894 (chdir "src")
13895 (substitute* "config.h"
13896 (("(#define SHARE_PATH ).*" all first)
13897 (string-append first "\""
13898 #$output "/share\"\n")))))
13899 (replace 'install
13900 (lambda _
13901 (let* ((out #$output)
13902 (bin (string-append out "/bin"))
13903 (opt (string-append out "/share/SDLPoP"))
13904 (app (string-append out "/share/applications"))
13905 (template "src/SDLPoP.desktop.template"))
13906 (chdir "..")
13907 (for-each mkdir-p
13908 (list bin opt app))
13909 (install-file "prince" opt)
13910 (symlink (string-append opt "/prince")
13911 (string-append bin "/prince"))
13912 (substitute* template
13913 (("\\$ROOT")
13914 out)
13915 (("(Exec=).*" all first)
13916 (string-append first opt "/prince\n"))
13917 (("(Icon=).*" all first)
13918 (string-append first opt "/data/icon.png\n"))
13919 (("(Path=).*" all first)
13920 (string-append first opt "\n")))
13921 (copy-file template (string-append app "/SDLPoP.desktop"))
13922 (install-file "SDLPoP.ini" opt)
13923 (copy-recursively "data"
13924 (string-append opt "/data"))
13925 (copy-recursively "doc" opt)
13926 (copy-recursively "mods" opt)))))))
13927 (native-inputs (list pkg-config))
13928 (inputs (list (sdl-union (list sdl2 sdl2-image))))
13929 (synopsis "Port of Prince of Persia game")
13930 (description "This package provides port of Prince of Persia, based on the
13931disassembly of the DOS version, extended with new features.")
13932 (home-page "https://github.com/NagyD/SDLPoP")
13933 (license license:gpl3+)))
13934
13935(define-public fheroes2
13936 (package
13937 (name "fheroes2")
13938 (version "1.1.11")
13939 (source
13940 (origin
13941 (method git-fetch)
13942 (uri (git-reference
13943 (url "https://github.com/ihhub/fheroes2")
13944 (commit version)))
13945 (file-name (git-file-name name version))
13946 (sha256
13947 (base32 "0px9ibvkr6q2h6jbiqfy3mp46d1kl52zlqfsbj7p2c4v3c18kj2k"))))
13948 (build-system cmake-build-system)
13949 (arguments
13950 `(#:tests? #f ; no tests
13951 #:make-flags '("FHEROES2_STRICT_COMPILATION=1"
13952 "RELEASE=1")))
13953 (native-inputs
13954 (list gettext-minimal))
13955 (inputs
13956 (list libpng
13957 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
13958 zlib))
13959 (home-page "https://ihhub.github.io/fheroes2/")
13960 (synopsis "Turn-based strategy game engine")
13961 (description "@code{fheroes2} is an implementation of Heroes of Might and
13962Magic II (aka HOMM2) game engine. It requires assets and game resources to
13963play; it will look for them at @file{~/.local/share/fheroes2} folder.")
13964 (license license:gpl2)))
13965
13966(define-public vcmi
13967 (package
13968 (name "vcmi")
13969 (version "1.7.5")
13970 (source (origin
13971 (method git-fetch)
13972 (uri (git-reference
13973 (url "https://github.com/vcmi/vcmi")
13974 (commit version)))
13975 (file-name (git-file-name name version))
13976 (sha256
13977 (base32
13978 "1xqvb64fgsq8wahd5ffh8ykkn6sy6z50d4pa4y2s71ga82pvnfpa"))
13979 (modules '((guix build utils)))
13980 (snippet #~(delete-file-recursively "android")) ;.jar included
13981 (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
13982 (build-system qt-build-system)
13983 (arguments
13984 (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF"
13985 "-DENABLE_INNOEXTRACT=OFF"
13986 "-DENABLE_MMAI=OFF"
13987 "-DENABLE_DISCORD=OFF")
13988 #:qtbase qtbase
13989 ;; Test suites do not seem well supported upstream and are disabled by default.
13990 ;; Pass -DENABLE_TEST to configure to enable.
13991 #:tests? #f))
13992 (inputs
13993 (list boost
13994 ffmpeg
13995 fmt
13996 fuzzylite
13997 libsquish
13998 libxkbcommon
13999 luajit
14000 minizip
14001 onetbb
14002 qtsvg
14003 (sdl-union (list sdl2 sdl2-mixer sdl2-image sdl2-ttf))
14004 vulkan-headers
14005 zlib))
14006 (native-inputs
14007 (list gettext-minimal
14008 ;; googletest ; needed for tests, but tests are disabled
14009 pkg-config
14010 python-minimal
14011 qttools))
14012 (home-page "https://vcmi.eu/")
14013 (synopsis "Turn-based strategy game engine")
14014 (description
14015 "@code{vcmi} is an implementation of the Heroes of Might and
14016Magic III game engine. It requires assets and game resources to
14017play; it will look for them at @file{~/.local/share/vcmi} folder.")
14018 (license license:gpl2+)))
14019
14020(define-public apricots
14021 (package
14022 (name "apricots")
14023 (version "0.2.9")
14024 (source
14025 (origin
14026 (method git-fetch)
14027 (uri (git-reference
14028 (url "https://codeberg.org/moggers87/apricots")
14029 (commit (string-append "v" version))))
14030 (sha256
14031 (base32 "1xwdxiq0g2fb8scmcrjv29qnzrc3w3h0mmmhd6hw9wnfa5mv91lw"))
14032 (file-name (git-file-name name version))))
14033 (build-system gnu-build-system)
14034 (arguments
14035 ;; The test suite doesn't test the built game, but merely runs cppcheck &
14036 ;; clang-format. Useful for the maintainers; not for distributions.
14037 (list #:tests? #f))
14038 (native-inputs (list autoconf ;autom4te used in ./bootstrap
14039 automake)) ;aclocal used in ./bootstrap
14040 (inputs (list alure openal sdl2))
14041 (home-page "https://codeberg.org/moggers87/apricots")
14042 (synopsis "Arcade airplane game")
14043 (description "@code{apricots} is a game where you fly a little plane
14044around the screen and shoot things and drop bombs on enemy targets. It's
14045meant to be quick and fun.")
14046 (license license:gpl2+)))
14047
14048(define-public liquidwar6
14049 (package
14050 (name "liquidwar6")
14051 (version "0.6.3902")
14052 (source (origin
14053 (method url-fetch)
14054 (uri (string-append "mirror://gnu/liquidwar6/" "liquidwar6-"
14055 version ".tar.gz"))
14056 (sha256
14057 (base32
14058 "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn"))))
14059 (native-inputs (list doxygen))
14060 (inputs (list guile-2.0
14061 zlib
14062 expat
14063 sqlite
14064 ncurses
14065 readline
14066 curl
14067 python-2
14068 libxslt
14069 perl
14070 graphviz
14071 glu
14072 libcaca
14073 (sdl-union (list sdl sdl-image sdl-ttf sdl-mixer))))
14074 (build-system gnu-build-system)
14075 (arguments
14076 (list #:configure-flags
14077 #~(list "--enable-allinone" "CFLAGS=-Wno-error -O2 -g"
14078 (string-append "CPPFLAGS=" "-I"
14079 #$(this-package-input "sdl-union")
14080 "/include/SDL"))))
14081 (synopsis "Liquid War 6 is a unique multiplayer wargame")
14082 (description
14083 "Liquid War 6 is a unique multiplayer war game. Your army is a blob of
14084liquid and you have to try and eat your opponents. Rules are very simple yet
14085original, they have been invented by Thomas Colcombet.")
14086 (home-page "https://www.gnu.org/software/liquidwar6/")
14087 (license license:gpl3+)))
14088
14089(define-public plunder
14090 (let ((commit "026ded7083df5134bdf05b1ec7e5a0099ac9b9d2")
14091 (revision "1"))
14092 (package
14093 (name "plunder")
14094 (version (git-version "1.0.0" revision commit))
14095 (source (origin
14096 (method git-fetch)
14097 (uri (git-reference
14098 (url "https://github.com/jappeace/plunder")
14099 (commit commit)))
14100 (file-name (git-file-name name version))
14101 (sha256
14102 (base32
14103 "0m0v8x6q9iq4zihwmysbxjwkq18nar6xhq4g18p2g8c6azj2mgd6"))))
14104 (build-system haskell-build-system)
14105 (inputs (list ghc-monadrandom
14106 ghc-quickcheck
14107 ghc-file-embed
14108 ghc-generic-lens
14109 ghc-lens
14110 ghc-random
14111 ghc-reflex
14112 ghc-reflex-sdl2
14113 ghc-sdl2
14114 ghc-sdl2-gfx
14115 ghc-sdl2-image
14116 ghc-sdl2-ttf
14117 ghc-vector
14118 ghc-witherable))
14119 (native-inputs (list ghc-hspec ghc-hspec-core hspec-discover))
14120 (home-page "https://github.com/jappeace/plunder")
14121 (synopsis "Game about looting a hexagonal-tile world")
14122 (description
14123 "This package provides a work-in-progress game where you control a
14124Viking and your objective is to loot all of the occupied hexagonal tiles in
14125the map.")
14126 (license license:expat))))
14127
14128(define-public freerct
14129 (let ((commit "f85335dc98cdb28081b38cdf23409ac8a91d9a66")
14130 (revision "0"))
14131 (package
14132 (name "freerct")
14133 (version (git-version "0.1" revision commit))
14134 (source (origin
14135 (method git-fetch)
14136 (uri (git-reference
14137 (url "https://codeberg.org/FreeRCT/FreeRCT")
14138 (commit commit)))
14139 (file-name (git-file-name name version))
14140 (sha256
14141 (base32
14142 "1mimwgw487dxr2h1kxciwz34hk06g1lfgpicrav7khh19843a2fq"))))
14143 (build-system cmake-build-system)
14144 (arguments
14145 `(#:tests? #f))
14146 (native-inputs (list flex bison))
14147 (inputs (list libpng glfw glew freetype))
14148 (home-page "https://freerct.net/")
14149 (synopsis "Theme park management simulation game")
14150 (description
14151 "FreeRCT is a game that captures the look and feel of the popular games
14152RollerCoaster Tycoon 1 and 2, graphics- and gameplay-wise.
14153
14154In this game, you play as a manager of a theme park, allowing you to make a
14155park of your dreams. The list of responsibilities includes managing staff,
14156finances, landscaping, and most importantly: rides. Good managers follow the
14157principle of prioritizing the guests' happiness with a well-maintained park.
14158Should they go unwise, a theme park plunge into chaos with vandalizing guests
14159and unsafe rides. Which path will you take?")
14160 (license license:gpl2))))
14161
14162(define-public ultrastar-deluxe
14163 (package
14164 (name "ultrastar-deluxe")
14165 (version "2025.10.1")
14166 (source (origin
14167 (method git-fetch)
14168 (uri (git-reference
14169 (url "https://github.com/UltraStar-Deluxe/USDX.git")
14170 (commit (string-append "v" version))))
14171 (file-name (git-file-name name version))
14172 (sha256
14173 (base32
14174 "009fbxdv4qkc15y4lisi6d4phv3dk9mypl2hhzfhyjh0i04d2wwa"))
14175 (patches (search-patches "ultrastar-deluxe-no-freesans.patch"))
14176 (modules '((guix build utils)))
14177 (snippet
14178 #~(begin
14179 ;; Remove Windows binaries.
14180 (for-each delete-file (find-files "game" "\\.dll$"))
14181 ;; Remove font blobs.
14182 (let ((font-directories
14183 (list "DejaVu" "FreeSans" "NotoSans"
14184 "wqy-microhei")))
14185 (for-each
14186 (lambda (d) (delete-file-recursively
14187 (string-append "game/fonts/" d)))
14188 font-directories))))))
14189 (build-system gnu-build-system)
14190 (arguments
14191 (list
14192 #:tests? #f ; No tests.
14193 #:phases
14194 #~(modify-phases %standard-phases
14195 (add-after 'unpack 'fix-configure
14196 (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
14197 (define (where inputs file)
14198 (dirname (search-input-file inputs file)))
14199 ;; The configure script looks for lua$version, but we
14200 ;; provide lua-$version.
14201 (substitute* "configure.ac"
14202 (("lua\\$i") "lua-$i"))
14203 ;; fpc does not pass -lfoo to the linker, but uses its own
14204 ;; linker script, which references libs. Pass the libraries
14205 ;; listed in that linker script, so our custom linker adds
14206 ;; a correct rpath.
14207 (substitute* "src/Makefile.in"
14208 (("linkflags\\s+:= ")
14209 (string-append
14210 "linkflags := -lpthread -lsqlite3 -lSDL2"
14211 " -lSDL2_image -ldl "
14212 " -lfreetype -lportaudio -lavcodec"
14213 " -lavformat -lavutil -lswresample"
14214 " -lswscale -llua -ldl -lX11 -lportmidi"
14215 " -L" (where inputs "lib/libX11.so")
14216 " -L" (where inputs "lib/libportmidi.so"))))))
14217 (add-after 'install 'font-paths
14218 (lambda* (#:key outputs #:allow-other-keys)
14219 (substitute* (string-append
14220 (assoc-ref outputs "out")
14221 "/share/ultrastardx/fonts/fonts.ini")
14222 (("=NotoSans/") (string-append "=" #$font-google-noto:ttf
14223 "/share/fonts/truetype/"))
14224 (("=DejaVu/") (string-append "=" #$font-dejavu
14225 "/share/fonts/truetype/"))))))))
14226 (inputs (list ffmpeg
14227 font-dejavu
14228 (list font-google-noto "ttf")
14229 ; Not needed, since we don’t have freesans.
14230 ;font-wqy-microhei
14231 freetype
14232 libx11
14233 lua
14234 portaudio
14235 portmidi
14236 sdl2
14237 sdl2-image
14238 sqlite))
14239 (native-inputs (list pkg-config fpc autoconf automake))
14240 (synopsis "Karaoke game")
14241 (description
14242 "UltraStar Deluxe (USDX) is a karaoke game. It allows up to six players
14243to sing along with music using microphones in order to score points, depending
14244on the pitch of the voice and the rhythm of singing.")
14245 (home-page "https://usdx.eu/")
14246 (license license:gpl2+)))
14247
14248(define-public xmahjongg
14249 (package
14250 (name "xmahjongg")
14251 (version "3.7")
14252 (source
14253 (origin
14254 (method url-fetch)
14255 (uri (string-append "http://www.lcdf.org/xmahjongg/xmahjongg-"
14256 version ".tar.gz"))
14257 (sha256
14258 (base32 "1kzz8y34q7wibcrmfb3p9rrz88qriz4slxpf1yrrfny23il66g94"))))
14259 (build-system gnu-build-system)
14260 (inputs (list libx11))
14261 (home-page "http://www.lcdf.org/xmahjongg/")
14262 (synopsis "Solitaire Mah Jongg game")
14263 (description
14264 "Xmahjongg is a simple solitaire game. The object is to remove all Mah
14265Jongg tiles from the playing field by taking one matching pair at a time.")
14266 (license license:gpl2+)))
14267
14268(define-public sc-controller
14269 (package
14270 (name "sc-controller")
14271 (version "0.5.2")
14272 (source (origin
14273 (method git-fetch)
14274 (uri (git-reference
14275 (url "https://github.com/C0rn3j/sc-controller")
14276 (commit (string-append "v" version))))
14277 (file-name (git-file-name name version))
14278 (sha256
14279 (base32
14280 "1zczdaxf76n1h6v3daaml7zd2ga808sscfp4bhnagfvw8y3xbf63"))))
14281 (build-system pyproject-build-system)
14282 (arguments
14283 (list
14284 #:imported-modules `((guix build glib-or-gtk-build-system)
14285 ,@%pyproject-build-system-modules)
14286 #:modules '((guix build pyproject-build-system)
14287 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
14288 (guix build utils))
14289 #:phases #~(modify-phases %standard-phases
14290 (delete 'sanity-check)
14291 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
14292 (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file))
14293 (add-before 'build 'no-install-udev
14294 (lambda _
14295 ;; Installing udev rules errors out. Install them manually later
14296 (substitute* "setup.py"
14297 ((".*lib/udev.*") ""))))
14298 (add-after 'unpack 'remove-bundled-libraries
14299 (lambda _
14300 (delete-file "scc/lib/jsonencoder.py")
14301 (substitute* "scc/profile.py"
14302 (("from scc\\.lib\\.jsonencoder")
14303 "from simplejson"))))
14304 (add-after 'unpack 'fix-paths
14305 (lambda _
14306 (substitute* '("scc/lib/xwrappers.py"
14307 "scc/lib/eudevmonitor.py")
14308 (("libXfixes\\.so|libXext\\.so|libudev\\.so" library)
14309 (search-input-file %build-inputs (string-append "lib/" library))))
14310 (substitute* "scc/uinput.py"
14311 (("/usr/include")
14312 (string-append (assoc-ref %build-inputs
14313 "linux-libre-headers")
14314 "/include")))
14315 (substitute* '("scc/gui/app.py"
14316 "scc/osd/inputdisplay.py"
14317 "scc/paths.py")
14318 (("/usr/share/scc")
14319 (string-append #$output "/share/scc")))))
14320 (add-after 'install 'install-udev
14321 (lambda _
14322 (for-each
14323 (lambda (udev-rule)
14324 (install-file udev-rule
14325 (string-append
14326 #$output
14327 "/lib/udev/rules.d")))
14328 (find-files "./scripts" "\\.rules$"))))
14329 (add-after 'install 'glib-or-gtk-compile-schemas
14330 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
14331 (add-after 'wrap 'glib-or-gtk-wrap
14332 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
14333 (add-after 'glib-or-gtk-wrap 'gi-wrap
14334 (lambda _
14335 (let ((bin (string-append #$output "/bin")))
14336 (for-each (lambda (prog)
14337 (wrap-program prog
14338 `("GDK_PIXBUF_MODULE_FILE" =
14339 (,(getenv "GDK_PIXBUF_MODULE_FILE")))
14340 `("GI_TYPELIB_PATH" =
14341 (,(getenv "GI_TYPELIB_PATH")))))
14342 ;; Predicate regex so we don't wrap the existing wrappers
14343 (find-files bin "^[^.]"))))))))
14344 (inputs (list
14345 bash-minimal
14346 eudev
14347 gtk+
14348 gtk-layer-shell
14349 libxext
14350 libxfixes
14351 linux-libre-headers
14352 python-evdev
14353 python-ioctl-opt
14354 python-libusb1
14355 python-pycairo
14356 python-pygobject
14357 python-pylibacl
14358 python-simplejson
14359 python-vdf
14360 zlib))
14361 (native-inputs
14362 (list
14363 python-pytest
14364 python-setuptools
14365 python-setuptools-scm
14366 python-wheel))
14367 (home-page "https://github.com/Ryochan7/sc-controller")
14368 (synopsis "Driver and configuration tool for game controllers")
14369 (description
14370 "Driver and configuration tool for game controllers such as
14371the Steam Controller, Steam Deck, and Dual Shock 4. Install the included udev
14372rules to solve permissions issues.")
14373 (license (list
14374 license:cc0 ; images/*, default_profiles/*, profile_examples/*, default_menus/*
14375 license:zlib ; scripts/gamecontrollerdb.txt
14376 license:gpl2)))) ; everything else
14377
14378(define-public steam-devices-udev-rules
14379 ;; Last release from 2019-04-10
14380 (let ((commit "7dde9ecb3c386363ecd9bd0a3b77e4756d200704")
14381 (revision "2"))
14382 (package
14383 (name "steam-devices-udev-rules")
14384 (version (git-version "1.0.0.61" revision commit))
14385 (source (origin
14386 (method git-fetch)
14387 (uri (git-reference
14388 (url "https://github.com/ValveSoftware/steam-devices")
14389 (commit commit)))
14390 (file-name (git-file-name name version))
14391 (sha256
14392 (base32
14393 "0w0xkgi9fpvdbpl57f8fy2nwy2icm6iag39b8ifpkijlxgclx1p3"))))
14394 (build-system copy-build-system)
14395 (arguments
14396 '(#:install-plan '(("./" "lib/udev/rules.d"
14397 #:include-regexp ("rules$")))
14398 #:phases (modify-phases %standard-phases
14399 (add-after 'unpack 'patch-paths
14400 (lambda* (#:key inputs #:allow-other-keys)
14401 (substitute* "60-steam-input.rules"
14402 (("/bin/sh")
14403 (search-input-file inputs "/bin/sh"))
14404 (("udevadm")
14405 (search-input-file inputs "/bin/udevadm"))))))))
14406 (inputs (list eudev))
14407 (home-page "https://github.com/ValveSoftware/steam-devices")
14408 (synopsis "udev rules for game controllers and virtual reality devices")
14409 (description
14410 "This package provides a set of udev rules for game controllers and
14411virtual reality devices.")
14412 (license license:expat))))
14413
14414(define-public gemrb
14415 (package
14416 (name "gemrb")
14417 (version "0.9.4")
14418 (source
14419 (origin
14420 (method git-fetch)
14421 (uri (git-reference
14422 (url "https://github.com/gemrb/gemrb")
14423 (commit (string-append "v" version))))
14424 (file-name (git-file-name name version))
14425 (sha256
14426 (base32 "16pp9vw717pk9q8q3asxk4j64rmywbnpw91cr3qanwnmdi5p5gj4"))
14427 ;; Remove the patch in the next version, as commit cca8e71 fixes this
14428 (patches (search-patches
14429 "gemrb-remove-ifdef-and-externalize-path-setting-to-cmake.patch"))))
14430 (build-system cmake-build-system)
14431 (arguments
14432 (list
14433 #:configure-flags
14434 #~(list "-DUSE_TESTS=ON" "-DOPENGL_BACKEND=OpenGL")))
14435 (native-inputs (list python
14436 (libc-utf8-locales-for-target (%current-system))
14437 googletest))
14438 (inputs (list freetype
14439 libiconv
14440 libpng
14441 libvorbis
14442 openal
14443 sdl2
14444 sdl2-mixer
14445 vlc
14446 zlib))
14447 (home-page "https://gemrb.org/")
14448 (synopsis "Portable implementation of Bioware's Infinity Engine")
14449 (description
14450 "GemRB (Game Engine Made with preRendered Background) is a portable
14451reimplementation of the Infinity Engine that underpinned Baldur's Gate,
14452Icewind Dale and Planescape: Torment. It sports a cleaner design, greater
14453extensibility and several innovations.")
14454 (license license:gpl2+)))
14455
14456(define-public zeta
14457 (package
14458 (name "zeta")
14459 (version "1.1.4")
14460 (home-page "https://zeta.asie.pl/")
14461 (synopsis "ZZT and Super ZZT emulator")
14462 (description
14463 "An emulator implementing enough of @acronym{DOS, Disk Operating System}
14464to run ZZT and Super ZZT on modern systems.")
14465 (source
14466 (origin
14467 (method git-fetch)
14468 (uri (git-reference
14469 (url "https://github.com/asiekierka/zeta")
14470 (commit version)))
14471 (file-name (git-file-name name version))
14472 (sha256
14473 (base32 "0h7wnxn6rrlqbzgsbhhlx4lpb5apdr3bbxvp74y3axidkgs62bzf"))))
14474 (license (list license:expat))
14475
14476 (build-system gnu-build-system)
14477 (inputs
14478 (list
14479 libdecor
14480 libpng
14481 sdl3))
14482 (native-inputs
14483 (list
14484 autoconf
14485 automake
14486 pkg-config
14487 python
14488 python-pillow))
14489 (arguments
14490 '(#:configure-flags
14491 '("--with-frontend=sdl3"
14492 ;; Upstream requests c11, but the source uses strdup() /
14493 ;; strcasecmp(), which aren't in C11.
14494 "CFLAGS=-std=gnu11")))))
14495
14496;;;
14497;;; Avoid adding new packages to the end of this file. To reduce the chances
14498;;; of a merge conflict, place them above by existing packages with similar
14499;;; functionality or similar names.
14500;;;