projects/guix·blob ruby-team · refs

14436 lines · 585.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 John Darrington <[email protected]>
3;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
4;;; Copyright © 2014, 2015 David Thompson <[email protected]>
5;;; Copyright © 2014-2025 Eric Bavier <[email protected]>
6;;; Copyright © 2014 Cyrill Schenkel <[email protected]>
7;;; Copyright © 2014 Sylvain Beucler <[email protected]>
8;;; Copyright © 2014-2015, 2018-2019, 2021, 2026 Ludovic Courtès <[email protected]>
9;;; Copyright © 2014, 2015, 2016, 2024 宋文武 <[email protected]>
10;;; Copyright © 2014, 2015, 2019 Mark H Weaver <[email protected]>
11;;; Copyright © 2015, 2016 Andreas Enge <[email protected]>
12;;; Copyright © 2015 David Hashe <[email protected]>
13;;; Copyright © 2015, 2017, 2018, 2021 Christine Lemmer-Webber <[email protected]>
14;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus <[email protected]>
15;;; Copyright © 2015, 2016, 2017 Alex Kost <[email protected]>
16;;; Copyright © 2015 Paul van der Walt <[email protected]>
17;;; Copyright © 2016, 2017 Rodger Fox <[email protected]>
18;;; Copyright © 2016, 2017, 2018 Nikita <[email protected]>
19;;; Copyright © 2016 Albin Söderqvist <[email protected]>
20;;; Copyright © 2016, 2017, 2018, 2019, 2020 Kei Kebreau <[email protected]>
21;;; Copyright © 2016 Alex Griffin <[email protected]>
22;;; Copyright © 2016-2021, 2023-2025 Efraim Flashner <[email protected]>
23;;; Copyright © 2016 Jan Nieuwenhuizen <[email protected]>
24;;; Copyright © 2016 Steve Webber <[email protected]>
25;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <[email protected]>
26;;; Copyright © 2017, 2018, 2020 Arun Isaac <[email protected]>
27;;; Copyright © 2017–2024 Tobias Geerinckx-Rice <[email protected]>
28;;; Copyright © 2017, 2019 nee <[email protected]>
29;;; Copyright © 2017 Clément Lassieur <[email protected]>
30;;; Copyright © 2017, 2019, 2020 Marius Bakke <[email protected]>
31;;; Copyright © 2017, 2018 Rutger Helling <[email protected]>
32;;; Copyright © 2017 Roel Janssen <[email protected]>
33;;; Copyright © 2017-2026 Nicolas Goaziou <[email protected]>
34;;; Copyright © 2018 okapi <[email protected]>
35;;; Copyright © 2018 Tim Gesthuizen <[email protected]>
36;;; Copyright © 2018 Madalin Ionel-Patrascu <[email protected]>
37;;; Copyright © 2018 Benjamin Slade <[email protected]>
38;;; Copyright © 2018 Alex Vong <[email protected]>
39;;; Copyright © 2019, 2020 Pierre Neidhardt <[email protected]>
40;;; Copyright © 2019, 2020, 2024 Oleg Pykhalov <[email protected]>
41;;; Copyright © 2019 Pierre Langlois <[email protected]>
42;;; Copyright © 2019 Julien Lepiller <[email protected]>
43;;; Copyright © 2019, 2020 Jesse Gibbons <[email protected]>
44;;; Copyright © 2019 Dan Frumin <[email protected]>
45;;; Copyright © 2019-2023 Guillaume Le Vaillant <[email protected]>
46;;; Copyright © 2019, 2020 Timotej Lazar <[email protected]>
47;;; Copyright © 2019 Josh Holland <[email protected]>
48;;; Copyright © 2019 Pkill -9 <[email protected]>
49;;; Copyright © 2017, 2019 Hartmut Goebel <[email protected]>
50;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <[email protected]>
51;;; Copyright © 2020 Naga Malleswari <[email protected]>
52;;; Copyright © 2020 Vitaliy Shatrov <[email protected]>
53;;; Copyright © 2020 Jack Hill <[email protected]>
54;;; Copyright © 2020 Vincent Legoll <[email protected]>
55;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
56;;; Copyright © 2020 Trevor Hass <[email protected]>
57;;; Copyright © 2020, 2021 Liliana Marie Prikler <[email protected]>
58;;; Copyright © 2020 Lu hux <[email protected]>
59;;; Copyright © 2020, 2026 Tomas Ortin Fernandez (quanrong) <[email protected]>
60;;; Copyright © 2021 Olivier Rojon <[email protected]>
61;;; Copyright © 2021 Stefan Reichör <[email protected]>
62;;; Copyright © 2021, 2022 Greg Hogan <[email protected]>
63;;; Copyright © 2021, 2024 David Pflug <[email protected]>
64;;; Copyright © 2021, 2022 Felix Gruber <[email protected]>
65;;; Copyright © 2021 Solene Rapenne <[email protected]>
66;;; Copyright © 2021, 2022, 2024 Noisytoot <[email protected]>
67;;; Copyright © 2021 Petr Hodina <[email protected]>
68;;; Copyright © 2021, 2022 Brendan Tildesley <[email protected]>
69;;; Copyright © 2021 Christopher Baines <[email protected]>
70;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
71;;; Copyright © 2022, 2023 Yovan Naumovski <[email protected]>
72;;; Copyright © 2022 Roman Riabenko <[email protected]>
73;;; Copyright © 2022, 2023, 2025 zamfofex <[email protected]>
74;;; Copyright © 2022 Gabriel Arazas <[email protected]>
75;;; Copyright © 2022-2026 Maxim Cournoyer <[email protected]>
76;;; Copyright © 2022 Hendursaga <[email protected]>
77;;; Copyright © 2022 Parnikkapore <[email protected]>
78;;; Copyright © 2022 Cairn <[email protected]>
79;;; Copyright © 2022 Morgan Smith <[email protected]>
80;;; Copyright © 2023 Zheng Junjie <[email protected]>
81;;; Copyright © 2023 Florian Pelz <[email protected]>
82;;; Copyright © 2023 Ivana Drazovic <[email protected]>
83;;; Copyright © 2023, 2024 gemmaro <[email protected]>
84;;; Copyright © 2023 Wilko Meyer <[email protected]>
85;;; Copyright © 2024 Vagrant Cascadian <[email protected]>
86;;; Copyright © 2024 Sébastien Lerique <[email protected]>
87;;; Copyright © 2024 James Smith <[email protected]>
88;;; Copyright © 2024 Jan Wielkiewicz <[email protected]>
89;;; Copyright © 2024 Ashvith Shetty <[email protected]>
90;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
91;;; Copyright © 2023-2025 Adam Faiz <[email protected]>
92;;; Copyright © 2025 Andrew Wong <[email protected]>
93;;; Copyright © 2025 Nigko Yerden <[email protected]>
94;;; Copyright © 2025 Adrien 'neox' Bourmault <[email protected]>
95;;; Copyright © 2025 Ada Stevenson <[email protected]>
96;;; Copyright © 2025 Gabriel Santos <[email protected]>
97;;; Copyright © 2025 Aiden Isik <[email protected]>
98;;; Copyright © 2026 Cayetano Santos <[email protected]>
99;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
100;;; Copyright © 2026 Nikita Alkhovik <[email protected]>
101;;; Copyright © 2026 bdunahu <[email protected]>
102;;; Copyright © 2026 Konstantin Suntsov <[email protected]>
103;;;
104;;; This file is part of GNU Guix.
105;;;
106;;; GNU Guix is free software; you can redistribute it and/or modify it
107;;; under the terms of the GNU General Public License as published by
108;;; the Free Software Foundation; either version 3 of the License, or (at
109;;; your option) any later version.
110;;;
111;;; GNU Guix is distributed in the hope that it will be useful, but
112;;; WITHOUT ANY WARRANTY; without even the implied warranty of
113;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114;;; GNU General Public License for more details.
115;;;
116;;; You should have received a copy of the GNU General Public License
117;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
118
119(define-module (gnu packages games)
120 #:autoload (gnu packages pascal) (fpc)
121 #:use-module (gnu packages acl)
122 #:use-module (gnu packages admin)
123 #:use-module (gnu packages algebra)
124 #:use-module (gnu packages assembly)
125 #:use-module (gnu packages audio)
126 #:use-module (gnu packages autotools)
127 #:use-module (gnu packages backup)
128 #:use-module (gnu packages base)
129 #:use-module (gnu packages bash)
130 #:use-module (gnu packages bison)
131 #:use-module (gnu packages boost)
132 #:use-module (gnu packages build-tools)
133 #:use-module (gnu packages c)
134 #:use-module (gnu packages calendar)
135 #:use-module (gnu packages check)
136 #:use-module (gnu packages cmake)
137 #:use-module (gnu packages code)
138 #:use-module (gnu packages compression)
139 #:use-module (gnu packages cpp)
140 #:use-module (gnu packages crypto)
141 #:use-module (gnu packages curl)
142 #:use-module (gnu packages cyrus-sasl)
143 #:use-module (gnu packages databases)
144 #:use-module (gnu packages dns)
145 #:use-module (gnu packages docbook)
146 #:use-module (gnu packages documentation)
147 #:use-module (gnu packages emacs)
148 #:use-module (gnu packages emulators)
149 #:use-module (gnu packages compiler-tools)
150 #:use-module (gnu packages fltk)
151 #:use-module (gnu packages fonts)
152 #:use-module (gnu packages fontutils)
153 #:use-module (gnu packages freedesktop)
154 #:use-module (gnu packages fribidi)
155 #:use-module (gnu packages game-development)
156 #:use-module (gnu packages gcc)
157 #:use-module (gnu packages gettext)
158 #:use-module (gnu packages ghostscript)
159 #:use-module (gnu packages gimp)
160 #:use-module (gnu packages gl)
161 #:use-module (gnu packages glib)
162 #:use-module (gnu packages gnome)
163 #:use-module (gnu packages gnu-doc)
164 #:use-module (gnu packages gnupg)
165 #:use-module (gnu packages gnuzilla)
166 #:use-module (gnu packages golang-build)
167 #:use-module (gnu packages golang-xyz)
168 #:use-module (gnu packages gperf)
169 #:use-module (gnu packages graphics)
170 #:use-module (gnu packages graphviz)
171 #:use-module (gnu packages groff)
172 #:use-module (gnu packages gsasl)
173 #:use-module (gnu packages gstreamer)
174 #:use-module (gnu packages gtk)
175 #:use-module (gnu packages guile)
176 #:use-module (gnu packages haskell)
177 #:use-module (gnu packages haskell-check)
178 #:use-module (gnu packages haskell-crypto)
179 #:use-module (gnu packages haskell-xyz)
180 #:use-module (gnu packages icu4c)
181 #:use-module (gnu packages image)
182 #:use-module (gnu packages imagemagick)
183 #:use-module (gnu packages javascript)
184 #:use-module (gnu packages kde-frameworks)
185 #:use-module (gnu packages less)
186 #:use-module (gnu packages toolkits)
187 #:use-module (gnu packages libcanberra)
188 #:use-module (gnu packages libedit)
189 #:use-module (gnu packages libffi)
190 #:use-module (gnu packages libidn)
191 #:use-module (gnu packages libunwind)
192 #:use-module (gnu packages libusb)
193 #:use-module (gnu packages linux)
194 #:use-module (gnu packages lisp)
195 #:use-module (gnu packages llvm)
196 #:use-module (gnu packages logging)
197 #:use-module (gnu packages lua)
198 #:use-module (gnu packages man)
199 #:use-module (gnu packages maths)
200 #:use-module (gnu packages messaging)
201 #:use-module (gnu packages mp3)
202 #:use-module (gnu packages multiprecision)
203 #:use-module (gnu packages music)
204 #:use-module (gnu packages ncurses)
205 #:use-module (gnu packages netpbm)
206 #:use-module (gnu packages networking)
207 #:use-module (gnu packages node)
208 #:use-module (gnu packages ocaml)
209 #:use-module (gnu packages oneapi)
210 #:use-module (gnu packages opencl)
211 #:use-module (gnu packages pcre)
212 #:use-module (gnu packages perl)
213 #:use-module (gnu packages perl-check)
214 #:use-module (gnu packages perl-compression)
215 #:use-module (gnu packages pkg-config)
216 #:use-module (gnu packages pretty-print)
217 #:use-module (gnu packages protobuf)
218 #:use-module (gnu packages pulseaudio)
219 #:use-module (gnu packages python)
220 #:use-module (gnu packages python-build)
221 #:use-module (gnu packages python-check)
222 #:use-module (gnu packages python-compression)
223 #:use-module (gnu packages python-web)
224 #:use-module (gnu packages python-xyz)
225 #:use-module (gnu packages qt)
226 #:use-module (gnu packages readline)
227 #:use-module (gnu packages regex)
228 #:use-module (gnu packages ruby-xyz)
229 #:use-module (gnu packages rust)
230 #:use-module (gnu packages rust-crates)
231 #:use-module (gnu packages sdl)
232 #:use-module (gnu packages serialization)
233 #:use-module (gnu packages shells)
234 #:use-module (gnu packages sqlite)
235 #:use-module (gnu packages squirrel)
236 #:use-module (gnu packages stb)
237 #:use-module (gnu packages swig)
238 #:use-module (gnu packages tcl)
239 #:use-module (gnu packages terminals)
240 #:use-module (gnu packages texinfo)
241 #:use-module (gnu packages textutils)
242 #:use-module (gnu packages tls)
243 #:use-module (gnu packages unicode)
244 #:use-module (gnu packages upnp)
245 #:use-module (gnu packages video)
246 #:use-module (gnu packages vulkan)
247 #:use-module (gnu packages web)
248 #:use-module (gnu packages wget)
249 #:use-module (gnu packages wxwidgets)
250 #:use-module (gnu packages xdisorg)
251 #:use-module (gnu packages xiph)
252 #:use-module (gnu packages xml)
253 #:use-module (gnu packages xorg)
254 #:use-module (gnu packages)
255 #:use-module (guix build-system cargo)
256 #:use-module (guix build-system cmake)
257 #:use-module (guix build-system copy)
258 #:use-module (guix build-system glib-or-gtk)
259 #:use-module (guix build-system gnu)
260 #:use-module (guix build-system go)
261 #:use-module (guix build-system haskell)
262 #:use-module (guix build-system meson)
263 #:use-module (guix build-system perl)
264 #:use-module (guix build-system pyproject)
265 #:use-module (guix build-system qt)
266 #:use-module (guix build-system scons)
267 #:use-module (guix build-system trivial)
268 #:use-module (guix download)
269 #:use-module (guix gexp)
270 #:use-module (guix git-download)
271 #:use-module ((guix licenses) #:prefix license:)
272 #:use-module (guix packages)
273 #:use-module (guix svn-download)
274 #:use-module (guix utils)
275 #:use-module (ice-9 match)
276 #:use-module ((srfi srfi-1) #:hide (zip))
277 #:use-module (srfi srfi-26))
278
279(define-public hexahop
280 (package
281 (name "hexahop")
282 (version "1.1.0")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (string-append "mirror://sourceforge/hexahop/" version "/"
287 "hex-a-hop-" version ".tar.gz"))
288
289 (sha256
290 (base32 "1mm069wpwc8nrrzfn2f64vh550634xlfws64bfmhqhx86vcikgw0"))))
291 (build-system gnu-build-system)
292 (arguments
293 (list #:configure-flags
294 #~(list (string-append "--with-sdl-prefix="
295 #$(this-package-input "sdl-union")))))
296 (native-inputs
297 (list pkg-config))
298 (inputs
299 (list (sdl-union (list sdl sdl-mixer sdl-ttf))))
300 (home-page "https://sourceforge.net/projects/hexahop/")
301 (synopsis "Puzzle game navigating paths over hexagons")
302 (description
303 "Hex-a-hop is a puzzle game in which a girl has to destroy green hexagons
304by stepping on them.")
305 (license license:gpl2+)))
306
307(define-public abe
308 (package
309 (name "abe")
310 (version "1.1")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "mirror://sourceforge/abe/abe/abe-" version
315 "/abe-" version ".tar.gz"))
316 (sha256
317 (base32 "1xvpnq1y6y48fn3pvn2lk0h1ilmalv7nb7awpid1g4jcq1sfmi6z"))))
318 (build-system gnu-build-system)
319 (arguments
320 `(#:configure-flags
321 (list (string-append "--with-data-dir="
322 (assoc-ref %outputs "out")
323 "/share/abe"))
324 #:phases
325 (modify-phases %standard-phases
326 (replace 'bootstrap
327 (lambda _ (invoke "sh" "autogen.sh")))
328 (add-before 'build 'set-SDL
329 ;; Set correct environment for SDL.
330 (lambda* (#:key inputs #:allow-other-keys)
331 (setenv "CPATH"
332 (string-append
333 (assoc-ref inputs "sdl") "/include/SDL:"
334 (or (getenv "CPATH") "")))
335 #t))
336 (add-after 'install 'finalize-install
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let ((share (string-append (assoc-ref outputs "out") "/share")))
339 ;; Installation script does not copy game data files.
340 (let ((data (string-append share "/abe")))
341 (for-each (lambda (dir)
342 (let ((target (string-append data "/" dir)))
343 (mkdir-p target)
344 (copy-recursively dir target)))
345 '("images" "maps" "sounds")))
346 ;; Create desktop file.
347 (let ((apps (string-append share "/applications")))
348 (mkdir-p apps)
349 (make-desktop-entry-file
350 (string-append apps "/abe.desktop")
351 #:name "Abe's Amazing Adventure"
352 #:exec ,name
353 #:categories '("AdventureGame" "Game")
354 #:keywords
355 '("side-scrolling" "adventure" "pyramid" "singleplayer")
356 #:comment
357 '(("de" "Ein sich seitwärts bewegendes Abenteuerspiel")
358 (#f "Side-scrolling game")))))
359 #t)))))
360 (native-inputs
361 (list autoconf automake))
362 (inputs
363 `(("libxi" ,libxi)
364 ("libxmu" ,libxmu)
365 ("libxt" ,libxt)
366 ("sdl" ,(sdl-union (list sdl sdl-mixer)))))
367 (home-page "https://abe.sourceforge.net")
368 (synopsis "Scrolling, platform-jumping, ancient pyramid exploring game")
369 (description
370 "Abe's Amazing Adventure is a scrolling,
371platform-jumping, key-collecting, ancient pyramid exploring game, vaguely in
372the style of similar games for the Commodore+4.")
373 (license license:gpl2+)))
374
375(define-public adanaxisgpl
376 (let* ((version "1.2.5")
377 (commit (string-append "ADANAXIS_"
378 (string-join (string-split version #\.) "_")
379 "_RELEASE_X11")))
380 (package
381 (name "adanaxisgpl")
382 (version version)
383 (source
384 (origin
385 (method git-fetch)
386 (uri (git-reference
387 (url "https://github.com/mushware/adanaxis")
388 (commit commit)))
389 (file-name (git-file-name name version))
390 (sha256
391 (base32 "1vbg17lzbm0xl9yy9qymd1vgpz6f7fbr2hffl2ap0nm4zg0mnafm"))
392 (modules '((guix build utils)))
393 (snippet
394 '(begin
395 ;; Necessary for building with gcc >=4.7.
396 (substitute* "src/Mushcore/MushcoreSingleton.h"
397 (("SingletonPtrSet\\(new SingletonType\\);")
398 "MushcoreSingleton::SingletonPtrSet(new SingletonType);"))
399 ;; Avoid an "invalid conversion from const char* to char*" error.
400 (substitute* "src/Platform/X11/PlatformMiscUtils.cpp"
401 (("char \\*end, \\*result;")
402 (string-append "const char *end;\n"
403 "char *result;")))
404 ;; autogen.pl will throw misleading errors if these don't exist.
405 (for-each mkdir-p '("src/MushSecret" "data-adanaxis"))
406 ;; Create these missing files at the right later moment.
407 (substitute* "autogen.pl"
408 (("automake")
409 "automake --add-missing"))))))
410 (build-system gnu-build-system)
411 (arguments
412 `(#:tests? #f ; no check target
413 #:phases
414 (modify-phases %standard-phases
415 (add-after 'unpack 'unpack-inputs
416 (lambda* (#:key inputs #:allow-other-keys)
417 (copy-recursively
418 (dirname (search-input-directory inputs "pixelsrc"))
419 "data-adanaxis")
420 (copy-recursively
421 (dirname (search-input-file inputs "MushBase.rb"))
422 "data-adanaxis/mushruby")))
423 (replace 'bootstrap
424 (lambda _
425 (invoke "perl" "autogen.pl" "adanaxis"
426 "--type=gpl" "--dist=debian")))
427 (add-after 'install 'install-data
428 ;; XXX This was copied from the original (pre-Git) adanaxisgpl
429 ;; package. While the game appears to play fine without it,
430 ;; I cannot prove that it's not missing *something*, so keep it.
431 (lambda* (#:key inputs outputs #:allow-other-keys)
432 (let ((share (string-append (assoc-ref outputs "out")
433 "/share/" ,name "-" ,version)))
434 (copy-recursively (search-input-directory inputs "mush")
435 (string-append share "/mush"))))))))
436 (native-inputs
437 (list (origin
438 (method git-fetch)
439 (uri (git-reference
440 (url "https://github.com/mushware/adanaxis-data")
441 ;; XXX There is a tag matching COMMIT, but it does not
442 ;; contain the .mush files installed by 'install-data.
443 ;; Use this later commit as long as we install them.
444 (commit "6a5b5ad8ee82c10e67bc4c12b16404944fd5754d")))
445 (file-name (git-file-name "adanaxis-data" version))
446 (sha256
447 (base32 "15am9ziq1i53sz0r7sjh2z329b52fkzj6fz7ms1nqqzdfmp11r3d")))
448 (origin
449 (method git-fetch)
450 (uri (git-reference
451 (url "https://github.com/mushware/adanaxis-mushruby")
452 (commit commit)))
453 (file-name (git-file-name "adanaxis-mushruby" version))
454 (sha256
455 (base32 "0pzcvchysjj37420rpvarky580gi5d6pfv93kwa91rg6m5r1zwks")))
456 autoconf
457 automake
458 perl))
459 (inputs
460 (list expat
461 freeglut
462 glu
463 libjpeg-turbo
464 libogg
465 libtiff
466 libvorbis
467 libx11
468 libxcrypt
469 libxext
470 pcre
471 sdl
472 sdl-mixer))
473 (home-page "https://www.mushware.com")
474 (synopsis "Action game in four spatial dimensions")
475 (description
476 "Adanaxis is a fast-moving first person shooter set in deep space, where
477the fundamentals of space itself are changed. By adding another dimension to
478space this game provides an environment with movement in four directions and
479six planes of rotation. Initially the game explains the 4D control system via
480a graphical sequence, before moving on to 30 levels of gameplay with numerous
481enemy, ally, weapon and mission types. Features include simulated 4D texturing,
482mouse and joystick control, and original music.")
483 (license license:gpl2))))
484
485(define-public anarch
486 (let ((commit "2d78d0c69a3aac14dbd8f8aca62d0cbd9d27c860")
487 (revision "1"))
488 (package
489 (name "anarch")
490 (version (git-version "1.1d" revision commit))
491 (source (origin
492 (method git-fetch)
493 (uri (git-reference
494 (url "https://gitlab.com/drummyfish/anarch")
495 (commit commit)))
496 (file-name (git-file-name name version))
497 (sha256
498 (base32
499 "1lg9r6q1davn5yj181ccygmvaigvm8fr9q2s1bc77a1vkz68vzdk"))))
500 (build-system gnu-build-system)
501 (arguments
502 (list #:tests? #f ;no tests
503 #:phases #~(modify-phases %standard-phases
504 (delete 'configure) ;no configure script
505 (replace 'build
506 (lambda _
507 (invoke "./make.sh" "sdl")))
508 (replace 'install
509 (lambda _
510 (let ((bin (string-append #$output "/bin")))
511 (install-file "anarch" bin)))))))
512 (inputs (list alsa-lib libxcursor libxrandr sdl2))
513 (home-page "https://drummyfish.gitlab.io/anarch/")
514 (synopsis "Public domain 90s-style shooter game")
515 (description "Anarch is a small, completely public domain, 90s-style
516Doom clone shooter game.")
517 (license license:cc0))))
518
519(define-public antimicrox
520 (package
521 (name "antimicrox")
522 (version "3.5.1")
523 (home-page "https://github.com/AntiMicroX/antimicrox")
524 (source
525 (origin
526 (method git-fetch)
527 (uri (git-reference
528 (url home-page)
529 (commit version)))
530 (file-name (git-file-name name version))
531 (sha256
532 (base32 "0p350l8d6rx72cjmmagsyvrmvzcgqypqas2nfjjbasd94f1y30b4"))))
533 (build-system cmake-build-system)
534 (arguments
535 (list
536 #:tests? #f ;Tests are unmaintained
537 #:configure-flags #~(list "-DCHECK_FOR_UPDATES=NO" "-DWITH_TESTS=NO"
538 #$(string-append "-DANTIMICROX_PKG_VERSION="
539 version))
540 #:phases #~(modify-phases %standard-phases
541 (add-after 'unpack 'patch-installation-target
542 (lambda _
543 (substitute* "CMakeLists.txt"
544 (("/usr(/lib/udev/rules.d)" _ lib)
545 (string-append #$output lib))))))))
546 (native-inputs (list extra-cmake-modules gettext-minimal itstool qttools))
547 (inputs (list libxtst libx11 qtbase sdl2))
548 (synopsis "Control your system with a gamepad")
549 (description
550 "AntiMicroX is a graphical program used to map gamepad keys to keyboard, mouse,
551scripts, and macros under both X.org and Wayland. With it you can control
552your system using a gamepad or play games that don't natively support
553gamepads. It can also be used for generating SDL2 configurations.
554
555For unprivileged access to input events, this package provides udev rules for
556use with @code{udev-service-type}.")
557 (license license:gpl3+)))
558
559(define-public armagetronad
560 (package
561 (name "armagetronad")
562 (version "0.2.9.3.0")
563 (source (origin
564 (method url-fetch)
565 (uri (string-append "mirror://sourceforge/armagetronad/stable/"
566 version "/armagetronad-" version ".tbz"))
567 (sha256
568 (base32
569 "1q1zlbhbcimr6bw0ms1pr8hz4q850ivi3hvxn3467jfgiq22f3cy"))))
570 (build-system gnu-build-system)
571 (arguments
572 (list #:configure-flags
573 #~(list "--disable-games" ;don't nest everything in ‘games/’
574 "--disable-uninstall") ;pointless (and broken) in Guix
575 #:phases
576 #~(modify-phases %standard-phases
577 (add-after 'unpack 'omit-broken-symlinks
578 ;; v0.2.9.2.0 added relative_path() which I think broke
579 ;; install_link(). It now creates a broken armagetronad-master
580 ;; symlink that causes the 'validate-runpath phase to fail.
581 (lambda _
582 (substitute* "batch/sysinstall.in"
583 (("^install_link .*BINDIR.*") "")))))))
584 (native-inputs (list pkg-config))
585 (inputs (list libxml2
586 curl
587 (sdl-union (list sdl sdl-image sdl-mixer))
588 freeglut
589 libpng
590 libjpeg-turbo))
591 (home-page "https://www.armagetronad.org")
592 (synopsis "Tron clone in 3D")
593 (description
594 "Armagetron Advanced is a multiplayer game in 3d that
595attempts to emulate and expand on the lightcycle sequence from the movie Tron.
596It's an old school arcade game slung into the 21st century. Highlights
597include a customizable playing arena, HUD, unique graphics, and AI bots. For
598the more advanced player there are new game modes and a wide variety of
599physics settings to tweak as well.")
600 (license license:gpl2+)))
601
602(define-public astromenace
603 (package
604 (name "astromenace")
605 (version "1.4.3")
606 (source
607 (origin
608 (method git-fetch)
609 (uri (git-reference
610 (url "https://github.com/viewizard/astromenace")
611 (commit (string-append "v" version))))
612 (file-name (git-file-name name version))
613 (sha256
614 (base32 "0683a6bb4rvbz3jaqs6pc4msy6l3vr7fafxi4nmbvziv5kr7x9sv"))))
615 (build-system cmake-build-system)
616 (arguments
617 (list
618 #:tests? #f ;no tests
619 #:configure-flags
620 #~(list (string-append "-DDATADIR=" #$output "/share/astromenace"))
621 #:phases
622 #~(modify-phases %standard-phases
623 (replace 'install
624 ;; Upstream provides no install phase.
625 (lambda _
626 (let* ((bin (string-append #$output "/bin"))
627 (share (string-append #$output "/share"))
628 (apps (string-append share "/applications"))
629 (data (string-append share "/astromenace"))
630 (icons (string-append share "/icons/hicolor/64x64/apps")))
631 (install-file "astromenace" bin)
632 (install-file "gamedata.vfs" data)
633 (with-directory-excursion (string-append #$source "/share")
634 (install-file "astromenace.desktop" apps)
635 (mkdir-p icons)
636 (copy-file "astromenace_64.png"
637 (string-append icons "/astromenace.png")))))))))
638 (inputs
639 (list freealut
640 freetype
641 glu
642 libogg
643 libvorbis
644 openal
645 sdl2))
646 (home-page "https://www.viewizard.com/")
647 (synopsis "3D space shooter with spaceship upgrade possibilities")
648 (description
649 "Space is a vast area, an unbounded territory where it seems there is
650a room for everybody, but reversal of fortune put things differently. The
651hordes of hostile creatures crawled out from the dark corners of the universe,
652craving to conquer your homeland. Their force is compelling, their legions
653are interminable. However, humans didn't give up without a final showdown and
654put their best pilot to fight back. These malicious invaders chose the wrong
655galaxy to conquer and you are to prove it! Go ahead and make alien aggressors
656regret their insolence.")
657 ;; Game is released under GPL3+ terms. Artwork is subject to CC
658 ;; BY-SA 4.0, and fonts to OFL1.1.
659 (license (list license:gpl3+ license:cc-by-sa4.0 license:silofl1.1))))
660
661(define-public barony
662 (package
663 (name "barony")
664 (version "3.3.7")
665 (source
666 (origin
667 (method git-fetch)
668 (uri (git-reference
669 (url "https://github.com/TurningWheel/Barony")
670 (commit (string-append "v" version))))
671 (file-name (git-file-name name version))
672 (sha256
673 (base32 "1y72k6zrqqhib3p05zkdklays2d218v51n87k7k68m0s7nnxa4vy"))
674 ;; Fix textures for SDL 2.0.14.
675 ;; See <https://github.com/TurningWheel/Barony/pull/582>.
676 (patches (search-patches "barony-fix-textures.patch"))))
677 (build-system cmake-build-system)
678 (arguments
679 '(#:configure-flags
680 (list "-DOPENAL_ENABLED=ON" ; enable sound
681 "-DEDITOR_EXE_NAME=barony-editor") ; instead of generic "editor"
682 #:tests? #f ; there are no tests
683 #:phases
684 (modify-phases %standard-phases
685 (add-before 'configure 'fix-installation
686 (lambda _
687 (substitute* "CMakeLists.txt"
688 (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/lang")
689 "${CMAKE_SOURCE_DIR}/lang")))))))
690 (inputs
691 (list glu
692 libpng
693 libvorbis
694 openal
695 physfs
696 rapidjson
697 sdl2
698 sdl2-image
699 sdl2-net
700 sdl2-ttf
701 zlib))
702 (native-inputs
703 (list pkg-config))
704 (home-page "https://baronygame.com")
705 (synopsis "3D first-person roguelike game")
706 (description
707 "Barony is a first-person roguelike role-playing game with cooperative
708play. The player must descend a dark dungeon and destroy an undead lich while
709avoiding traps and fighting monsters. The game features randomly generated
710dungeons, 13 character classes, hundreds of items and artifacts, and
711cooperative multiplayer for up to four players. This package does @emph{not}
712provide the game assets.")
713 (license license:bsd-2)))
714
715(define-public bastet
716 (package
717 (name "bastet")
718 (version "0.43.2")
719 (source
720 (origin
721 (method git-fetch)
722 (uri (git-reference
723 (url "https://github.com/fph/bastet")
724 (commit version)))
725 (file-name (git-file-name name version))
726 (sha256
727 (base32 "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn"))
728 (patches
729 (search-patches "bastet-change-source-of-unordered_set.patch"))))
730 (build-system gnu-build-system)
731 (arguments
732 `(#:make-flags
733 (list (string-append "CXXFLAGS=-I"
734 (assoc-ref %build-inputs "boost") "/include"))
735 #:phases
736 (modify-phases %standard-phases
737 (delete 'configure) ; no configure script
738 (replace 'check
739 ;; The 'Test' target builds the tests, but doesn't actually run them.
740 (lambda* (#:key make-flags #:allow-other-keys)
741 (apply invoke "make" "Test" make-flags)
742 (setenv "HOME" ".")
743 (invoke "./Test")))
744 (replace 'install
745 (lambda* (#:key outputs #:allow-other-keys)
746 (let* ((out (assoc-ref outputs "out"))
747 (share (string-append out "/share"))
748 (hicolor (string-append share "/icons/hicolor")))
749 (install-file "bastet"
750 (string-append out "/bin"))
751
752 (install-file "bastet.desktop"
753 (string-append share "/applications"))
754 (install-file "bastet.svg"
755 (string-append hicolor "/scalable/apps"))
756
757 (install-file "bastet.appdata.xml"
758 (string-append share "/appdata"))
759
760 (install-file "bastet.6"
761 (string-append out "/share/man/man6"))
762 #t))))))
763 (native-inputs
764 (list hicolor-icon-theme))
765 (inputs
766 (list boost ncurses))
767 (home-page "https://fph.altervista.org/prog/bastet.html")
768 (synopsis "Antagonistic Tetris-style falling brick game for text terminals")
769 (description
770 "Bastet (short for Bastard Tetris) is a simple ncurses-based falling brick
771game. Unlike normal Tetris, Bastet does not choose the next brick at random.
772Instead, it uses a special algorithm to choose the worst brick possible.
773
774Playing bastet can be a painful experience, especially if you usually make
775canyons and wait for the long I-shaped block to clear four rows at a time.")
776 (license license:gpl3+)))
777
778(define-public go-codeberg-org-anaseto-gothic
779 (package
780 (name "go-codeberg-org-anaseto-gothic")
781 (version "0.2.0")
782 (source
783 (origin
784 (method git-fetch)
785 (uri (git-reference
786 (url "https://codeberg.org/anaseto/gothic")
787 (commit (string-append "v" version))))
788 (file-name (git-file-name name version))
789 (sha256
790 (base32 "194vjskwkz6h51spk2661khmk5nrzrrwc6iwb8n0viqa8rr8z8cd"))))
791 (build-system go-build-system)
792 (arguments
793 (list
794 #:import-path "codeberg.org/anaseto/gothic"))
795 (propagated-inputs (list tcl tk))
796 (home-page "https://codeberg.org/anaseto/gothic")
797 (synopsis "Tcl/Tk Go bindings")
798 (description
799 "This package provides Tcl/Tk Go bindings, the API is a bit Tk-oriented.")
800 (license license:expat)))
801
802(define-public boohu
803 (package
804 (name "boohu")
805 (version "0.14.1")
806 (source
807 (origin
808 (method git-fetch)
809 (uri (git-reference
810 (url "https://codeberg.org/anaseto/boohu")
811 (commit (string-append "v" version))))
812 (file-name (git-file-name name version))
813 (sha256
814 (base32 "0xh8b4fj2vd92ihh70rmmlq45ir0sb44g63blswfw96rb3jl3pk2"))))
815 (build-system go-build-system)
816 (arguments
817 (list
818 #:install-source? #f
819 #:import-path "codeberg.org/anaseto/boohu"))
820 (native-inputs (list go-codeberg-org-anaseto-gothic
821 go-codeberg-org-anaseto-gruid
822 go-github-com-gdamore-tcell-v2))
823 (home-page "https://anaseto.codeberg.page/games/boohu")
824 (synopsis "Break Out Of Hareka's Underground, a roguelike game")
825 (description
826 "@acronym{Boohu, Break Out Of Hareka's Underground} is a roguelike game
827mainly inspired from DCSS and its tavern, with some ideas from Brogue, but
828aiming for very short games, almost no character building, and a simplified
829inventory.
830
831@quotation
832Every year, the elders send someone to collect medicinal simella plants in the
833Underground. This year, the honor fell upon you, and so here you
834are. According to the elders, deep in the Underground, a magical monolith will
835lead you back to your village. Along the way, you will collect simellas, as
836well as various items that will help you deal with monsters, which you may
837fight or flee@dots{}
838@end quotation")
839 (license license:expat)))
840
841(define-public boohu-tk
842 (package
843 (inherit boohu)
844 (name "boohu-tk")
845 (arguments
846 (substitute-keyword-arguments arguments
847 ((#:tests? _ #t) #f)
848 ((#:build-flags _ #~())
849 #~(list "--tags=tk"))
850 ((#:phases _ #~%standard-phases)
851 #~(modify-phases %standard-phases
852 (add-after 'install 'fix-name-collision
853 (lambda _
854 (rename-file (string-append #$output "/bin/boohu")
855 (string-append #$output "/bin/boohu-tk"))))))))))
856
857(define-public tetrinet
858 (package
859 (name "tetrinet")
860 (version "0.11")
861 (source
862 (origin
863 (method url-fetch)
864 (uri (string-append
865 "http://tetrinet.or.cz/download/tetrinet-" version
866 ".tar.bz2"))
867 (sha256
868 (base32
869 "0b4pddqz6is1771qmvcj8qqlr4in2djdbkk13agvp9yhfah2v8x7"))))
870 (build-system gnu-build-system)
871 (inputs
872 (list ncurses))
873 (arguments
874 `(#:tests? #f ;no tests
875 #:make-flags '("CC=gcc"
876 "CFLAGS=-O2 -DHAVE_IPV6 -g -Wall -fcommon")
877 #:phases
878 (modify-phases %standard-phases
879 (delete 'configure) ;no configure script
880 (add-after 'unpack 'fix-install-dir
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let ((out (assoc-ref outputs "out")))
883 (mkdir-p (string-append out "/bin"))
884 (substitute* "Makefile"
885 (("/usr/games") (string-append out "/bin"))))))
886 (add-after 'install 'install-documentation
887 (lambda* (#:key outputs #:allow-other-keys)
888 (let* ((out (assoc-ref outputs "out"))
889 (doc (string-append out "/share/doc/" ,name "-" ,version)))
890 (for-each (lambda (file)
891 (install-file file doc))
892 (list "README" "tetrinet.txt"))))))))
893 (home-page "http://tetrinet.or.cz")
894 (synopsis "Terminal-based multiplayer Tetris clone")
895 (description "Tetrinet is a multiplayer Tetris-like game with powerups and
896attacks you can use on opponents.")
897 (license license:public-domain)))
898
899(define-public vdrift-data
900 ;; There are no tags or releases for the vdrift data; use the latest SVN
901 ;; revision available.
902 (let ((commit 1464)
903 (revision "0"))
904 ;; The package is hidden as the game data is *required* by the install
905 ;; target of vdrift itself, and there is no need for users to manually
906 ;; install it.
907 (hidden-package
908 (package
909 (name "vdrift-data")
910 ;; The date is the last modified time shown next to the 'vdrift-data'
911 ;; directory when visiting
912 ;; https://sourceforge.net/p/vdrift/code/HEAD/tree/.
913 (version (format #f "2024-10-23-~a.~a" revision commit))
914 (source (origin
915 (method svn-fetch)
916 (uri (svn-reference
917 (url "https://svn.code.sf.net/p/vdrift/code/vdrift-data")
918 (revision commit)))
919 (file-name (string-append name "-" version "-checkout"))
920 (sha256
921 (base32
922 "0q0raw7xjnf710xxls6cjqqvkn754bbndqjs9dzkpr40s8zrgnvf"))))
923 (build-system copy-build-system)
924 (arguments (list #:install-plan #~'(("." "share/games/vdrift/data"))))
925 (home-page "https://vdrift.net/")
926 (synopsis "Game data for Vdrift")
927 (description "This package contains the assets for the Vdrift racing
928game.")
929 (license license:gpl3+))))) ;assumed same as Vdrift itself
930
931(define-public vdrift
932 ;; The latest release is from 2014, and lacks build system and other
933 ;; unreleased improvements; use the latest commit.
934 (let ((commit "f835edaef1abe586b8d5bebeaa8c41f85e6dbea4")
935 (revision "1"))
936 (package
937 (name "vdrift")
938 (version (git-version "2014-10-20" revision commit))
939 (source (origin
940 (method git-fetch)
941 (uri (git-reference
942 (url "https://github.com/VDrift/vdrift")
943 (commit commit)))
944 (file-name (git-file-name name version))
945 (sha256
946 (base32
947 "19kqnncv5c7ssbjcplmfn2rq0mabi2idyv2wmx05pqg09y571cv1"))))
948 (build-system scons-build-system)
949 (arguments
950 (list
951 #:tests? #f ;no test suite
952 #:scons-flags #~(list (string-append "prefix=" #$output)
953 "release=1"
954 "verbose=1")
955 #:phases
956 #~(modify-phases %standard-phases
957 (add-after 'unpack 'setup-vdrift-data
958 (lambda _
959 ;; The locale data must be made writable, as gettext
960 ;; translation files are generated and written there as part
961 ;; of the installation script.
962 (copy-recursively (search-input-directory
963 %build-inputs
964 "share/games/vdrift/data")
965 "data")
966 (for-each make-file-writable (find-files "data/locale")))))))
967 (native-inputs (list gettext-minimal pkg-config vdrift-data))
968 (inputs (list bullet curl libvorbis mesa sdl3 zlib))
969 (home-page "https://vdrift.net/")
970 (synopsis "Racing simulator")
971 (description "VDrift aims to provide an accurate driving physics
972emulation, based on real world data of the actual vehicles, employing a full
973rigid body simulation and a complex tire model. VDrift features:
974@itemize
975@item Over 45 tracks based on famous real-world tracks
976@item Over 45 cars based on real-world vehicles
977@item Very realistic, simulation-grade driving physics
978@item Mouse/joystick/gamepad/wheel/keyboard support
979@item Fully modeled tracks, scenery and terrain
980@item Several different camera modes
981@item Basic replay system with Skip Forward/Skip Backward
982@item Fully customizable controls
983@item Joystick, mouse and keyboard input filtering
984@item Brake and reverse lights
985@item Driver aids: automatic shifting, traction control, anti-lock braking
986@item Experimental force feedback
987@item Race against up to 3 AI with variable difficultly
988@item Engine and road sounds
989@end itemize
990The recommended input method is a steering wheel with pedals and force
991feedback support.")
992 (license license:gpl3+))))
993
994(define-public vitetris
995 (package
996 (name "vitetris")
997 (version "0.59.1")
998 (source
999 (origin
1000 (method git-fetch)
1001 (uri (git-reference
1002 (url "https://github.com/vicgeralds/vitetris")
1003 (commit (string-append "v" version))))
1004 (sha256
1005 (base32 "1ah1c5g7abksif0n8v5rb7r4pn2az20c3mkp4ak13vgs23ddmds5"))
1006 (file-name (git-file-name name version))))
1007 (build-system gnu-build-system)
1008 (arguments
1009 `(#:tests? #f ;no test
1010 #:make-flags
1011 (list ,(string-append "CC=" (cc-for-target))
1012 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1013 "CFLAGS=-g -O2 -Wno-error=implicit-int")
1014 #:phases
1015 (modify-phases %standard-phases
1016 (replace 'configure
1017 (lambda _
1018 ;; the non standard configure script does not accept
1019 ;; standard parameters -> invoke configure by hand
1020 (invoke "./configure" "prefix=")
1021 ;; src/src-conf.mk must be writable for the build step
1022 (make-file-writable "src/src-conf.mk"))))))
1023 (home-page "http://victornils.net/tetris/")
1024 (synopsis "Terminal-based Tetris clone")
1025 (description "Vitetris is a classic multiplayer Tetris clone for the
1026terminal.")
1027 (license license:bsd-2)))
1028
1029(define-public blobwars
1030 (package
1031 (name "blobwars")
1032 (version "2.00")
1033 (source
1034 (origin
1035 (method url-fetch)
1036 (uri (string-append "mirror://sourceforge/blobwars/"
1037 "blobwars-" version ".tar.gz"))
1038 (sha256
1039 (base32 "16aagvkx6azf75gm5kaa94bh5npydvhqp3fvdqyfsanzdjgjf1n4"))))
1040 (build-system gnu-build-system)
1041 (arguments
1042 `(#:tests? #f ;no test
1043 #:make-flags
1044 (let ((out (assoc-ref %outputs "out")))
1045 (list (string-append "PREFIX=" out)
1046 (string-append "BINDIR=" out "/bin/")
1047 "USEPAK=1"
1048 "RELEASE=1"))
1049 #:phases
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'patch-sources
1052 (lambda _
1053 (substitute* "Makefile" (("-Werror") ""))
1054 ;; glibc 2.38 includes strlcpy and strlcat.
1055 (substitute* "src/headers.h"
1056 (("static inline void strlcat.*") "")
1057 (("static inline void strlcpy.*") ""))))
1058 (delete 'configure)))) ;no configure script
1059 (native-inputs
1060 `(("gettext" ,gettext-minimal)
1061 ("pkg-config" ,pkg-config)))
1062 (inputs
1063 `(("hicolor-icon-theme" ,hicolor-icon-theme)
1064 ("sdl" ,(sdl-union (list sdl2
1065 sdl2-image
1066 sdl2-mixer
1067 sdl2-ttf
1068 sdl2-net)))))
1069 (home-page "https://sourceforge.net/projects/blobwars/")
1070 (synopsis "Platform action game featuring a blob with a lot of weapons")
1071 (description "Blobwars: Metal Blob Solid is a 2D platform game, the first
1072in the Blobwars series. You take on the role of a fearless Blob agent. Your
1073mission is to infiltrate various enemy bases and rescue as many MIAs as
1074possible, while battling many vicious aliens.")
1075 (license (list license:gpl2 ; For code and graphics
1076 license:cc0 ; Music and sounds have specific licenses
1077 license:cc-by3.0 ; see /doc/readme
1078 license:cc-by-sa3.0
1079 license:lgpl2.1+
1080 license:bsd-2))))
1081
1082(define-public bsd-games
1083 (package
1084 (name "bsd-games")
1085 (version "2.17.0")
1086 (source
1087 (origin
1088 (method url-fetch)
1089 (uri "https://ibiblio.org/pub/linux/games/bsd-games-2.17.tar.gz")
1090 (sha256
1091 (base32 "0q7zdyyfvn15y0w4g54kq3gza89h61py727m8slmw73cxx594vq6"))
1092 (patches
1093 (search-patches
1094 ;; thanks Arch, and Debian
1095 "bsd-games-2.17-64bit.patch"
1096 "bsd-games-bad-ntohl-cast.patch"
1097 "bsd-games-gamescreen.h.patch"
1098 "bsd-games-getline.patch"
1099 "bsd-games-null-check.patch"
1100 "bsd-games-number.c-and-test.patch"
1101 "bsd-games-stdio.h.patch"
1102 "bsd-games-prevent-name-collisions.patch"
1103 ;; Guix customizations
1104 "bsd-games-add-configure-config.patch"
1105 "bsd-games-dont-install-empty-files.patch"
1106 "bsd-games-add-wrapper.patch"))))
1107 (build-system gnu-build-system)
1108 (native-inputs
1109 (list flex bison))
1110 (inputs
1111 `(("curses" ,ncurses)
1112 ("pager" ,less)
1113 ("miscfiles" ,miscfiles)
1114 ("openssl" ,openssl))) ;used only by 'factor'
1115 (arguments
1116 `(#:phases
1117 (modify-phases %standard-phases
1118 (add-after 'unpack 'gcc14
1119 ;; See line 84 of
1120 ;; https://github.com/NixOS/nixpkgs/pull/369352/files#diff-d4e7b24a8c4ebea52238a5421f96f293576ae2be634cd72c1c1521ee043a01fdR84
1121 (lambda _
1122 (substitute* "hunt/hunt/otto.c"
1123 (("sigpause\\(old_mask\\);") ""))))
1124 (replace 'configure
1125 (lambda* (#:key outputs inputs #:allow-other-keys)
1126 (let* ((out (assoc-ref outputs "out"))
1127 (bin (string-append out "/bin"))
1128 (doc (string-append out "/share/doc/bsd-games-" ,version))
1129 (man (string-append out "/share/man"))
1130 (word-list (search-input-file inputs "/share/web2"))
1131 (static-data (string-append out "/share/games/bsd-games"))
1132 ;; Not a "./" because of substitute* in 'patch-install
1133 ;; below. The .// allow us not to mess with the games'
1134 ;; code any further: we just use a wrapper script that
1135 ;; cd's to a BSD_GAMES_DIR. :]
1136 (save-files ".//"))
1137 (substitute* "configure"
1138 (("/usr/share/man") man)
1139 (("/usr/share/doc/bsd-games") doc)
1140 (("/usr/share/[^\n/]*") static-data)
1141 (("/var/games") save-files)
1142 (("/usr/bin/less") (which "less"))
1143 (("(/usr/bin|/usr/games)") bin))
1144 (substitute* "config.params" (("WORD_LIST") word-list))
1145 (substitute* "wrapper" (("STATIC_DATA") static-data))
1146 (invoke "./configure"))
1147 #t))
1148 (add-before 'install 'patch-install
1149 ;; Some games need a writable directory containing pre-maded files.
1150 ;; The files get installed to the Store. Then the wrapper kicks in.
1151 (lambda* (#:key outputs #:allow-other-keys)
1152 (let* ((out (assoc-ref outputs "out"))
1153 (static-data (string-append out "/share/games/bsd-games"))
1154 (save-files ".//"))
1155 (substitute* "Makeconfig" ((save-files) static-data)))
1156 #t))
1157 (add-after 'install 'install-documents
1158 (lambda* (#:key outputs #:allow-other-keys)
1159 (let* ((out (assoc-ref outputs "out"))
1160 (doc (string-append out "/share/doc/bsd-games-" ,version)))
1161 (rename-file "phantasia/COPYRIGHT" "phantasia-COPYRIGHT")
1162 (for-each
1163 (lambda(file) (install-file file doc))
1164 '("AUTHORS" "BUGS" "README" "SECURITY" "THANKS"
1165 "phantasia-COPYRIGHT")))
1166 #t)))))
1167 (home-page "https://github.com/vattam/BSDGames")
1168 (synopsis "Collection of the old text-based games and amusements")
1169 (description
1170 "These are the BSD games.
1171
1172Action: atc (keep the airplanes safe), hack (explore the dangerous Dungeon),
1173hunt (kill the others for the Pair of Boots, multi-player only), robots (avoid
1174the evil robots), sail (game of naval warfare with wooden ships), snake (steal
1175the $$ from the cave, anger the snake, and get out alive), tetris (game of
1176lining up the falling bricks of different shapes), and worm (eat, grow big,
1177and neither bite your tail, nor ram the wall).
1178
1179Amusements: banner (prints a large banner), bcd & morse & ppt (print a punch
1180card, or paper tape, or Morse codes), caesar & rot13 (ciphers and deciphers
1181the input), factor (factorizes a number), number (translates numbers into
1182text), pig (translates from English to Pig Latin), pom (should print the
1183Moon's phase), primes (generates primes), rain & worms (plays an screen-saver
1184in terminal), random (prints randomly chosen lines from files, or returns a
1185random exit-code), and wtf (explains what do some acronyms mean).
1186
1187Board: backgammon (lead the men out of board faster than the friend do),
1188boggle (find the words in the square of letters), dab (game of dots and
1189boxes), gomoku (game of five in a row), hangman (guess a word before man is
1190hanged), and monop (game of monopoly, hot-seat only). Also the card-games:
1191canfield, cribbage, fish (juniors game), and mille.
1192
1193Quests: adventure (search for treasures with the help of wizard),
1194battlestar (explore the world around, starting from dying spaceship),
1195phantasia (role-play as an rogue), trek (hunt the Klingons, and save the
1196Federation), and wump (hunt the big smelly Wumpus in a dark cave).
1197
1198Quizzes: arithmetic and quiz.")
1199 ;; "Auxiliary and data files, distributed with the games in NetBSD, but
1200 ;; not bearing copyright notices, probably fall under the terms of the UCB
1201 ;; or NetBSD copyrights and licences. The file "fortune/Notes" contains a
1202 ;; warning in regard to the fortune databases."
1203 (license (list
1204 ;; Most games. Files: countmail/countmail.6, dab/dab.6,
1205 ;; lib/strlcpy.c, wargames/wargames.6
1206 license:bsd-3
1207 ;; dab and hunt. Files: adventure/extern.h,
1208 ;; backgammon/backgammon/backlocal.h, caesar/rot13.in,
1209 ;; countmail/countmail, dm/utmpentry.c, dm/utmpentry.h,
1210 ;; hack/extern.h, robots/auto.c, sail/display.h,
1211 ;; sail/restart.h, wargames/wargames
1212 license:bsd-4
1213 ;; wtf (the game)
1214 license:public-domain
1215 ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3)
1216 (license:fsf-free "file:///phantasia/COPYRIGHT")))))
1217
1218(define-public rogue
1219 (package
1220 (name "rogue")
1221 (version "5.4.4")
1222 (source (origin
1223 (method git-fetch)
1224 (uri (git-reference
1225 (url "https://github.com/Davidslv/rogue")
1226 (commit "cf9bd26d564a72fac4cf56b55c96c2435270d29a")))
1227 (file-name (git-file-name name version))
1228 (sha256
1229 (base32
1230 "0mk03l120scas4dcn6xccnhslnwmcx2blshbf925z06yk7rkzias"))))
1231 (build-system gnu-build-system)
1232 (arguments
1233 `(#:tests? #f
1234 #:make-flags (list "CFLAGS=-DNCURSES_INTERNALS")))
1235 (inputs (list ncurses))
1236 (synopsis "Original rogue game")
1237 (description
1238 "This package provides ``Rogue: Exploring the Dungeons of Doom'', the
1239original rogue game found on 4.2BSD.")
1240 (home-page "https://github.com/Davidslv/rogue")
1241 (license license:bsd-3)))
1242
1243(define-public sgt-puzzles
1244 (let ((commit "7ad37c64af3bc891372ec16db1531cee599b6e3a")
1245 (revision "0"))
1246 (package
1247 (name "sgt-puzzles")
1248 (version (git-version "20260622" revision commit))
1249 (source
1250 (origin
1251 (method git-fetch)
1252 (uri (git-reference
1253 (url "https://git.tartarus.org/simon/puzzles.git")
1254 (commit commit)))
1255 (file-name (git-file-name name version))
1256 (sha256
1257 (base32 "0aldj32fr51wmdnmr7dywf19s3a8l9sxfnnk34wi8fgzzmskl0z9"))))
1258 (build-system cmake-build-system)
1259 (arguments
1260 (list
1261 #:tests? #f ;No tests.
1262 #:configure-flags #~(list "-DNAME_PREFIX=sgt-")
1263 #:phases
1264 #~(modify-phases %standard-phases
1265 (add-after 'unpack 'set-xdg-open-path
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (substitute* "gtk.c"
1268 (("(#define HELP_BROWSER_PATH).+" all define)
1269 (format #f "~a ~s~%" define
1270 (search-input-file inputs "/bin/xdg-open")))))))))
1271 (inputs (list gtk+ xdg-utils))
1272 (native-inputs (list pkg-config perl imagemagick halibut))
1273 (home-page "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/")
1274 (synopsis "Simon Tatham's portable puzzle collection")
1275 (description "Simon Tatham's Portable Puzzle Collection contains a number of
1276popular puzzle games for one player.")
1277 (license license:expat))))
1278
1279(define-public bzflag
1280 (package
1281 (name "bzflag")
1282 (version "2.4.30")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (string-append "https://download.bzflag.org/bzflag/source/"
1287 version "/bzflag-" version ".tar.bz2"))
1288 (sha256
1289 (base32 "0kc9ag8yq3iqmwlrdwhbqp3sqjcan1mr0ddx25yamrxwwx8bfy5v"))))
1290 (build-system gnu-build-system)
1291 (arguments
1292 (list
1293 #:phases
1294 #~(modify-phases %standard-phases
1295 (add-after 'install 'install-desktop-file-and-icons
1296 (lambda _
1297 (let* ((share (string-append #$output "/share"))
1298 (data (string-append share "/bzflag"))
1299 (hicolor (string-append share "/icons/hicolor"))
1300 (applications (string-append share "/applications")))
1301 ;; Move desktop file.
1302 (install-file (string-append data "/bzflag.desktop")
1303 applications)
1304 ;; Install icons.
1305 (for-each (lambda (size)
1306 (let* ((dim (string-append size "x" size))
1307 (dir (string-append hicolor "/" dim "/apps")))
1308 (mkdir-p dir)
1309 (copy-file
1310 (string-append data "/bzflag-" dim ".png")
1311 (string-append dir "/bzflag.png"))))
1312 '("48" "256"))))))))
1313 (native-inputs
1314 (list pkg-config))
1315 (inputs
1316 (list c-ares
1317 curl
1318 glew
1319 glu
1320 sdl2
1321 zlib))
1322 (home-page "https://www.bzflag.org/")
1323 (synopsis "3D first person tank battle game")
1324 (description
1325 "BZFlag is a 3D multi-player multiplatform tank battle game that
1326allows users to play against each other in a network environment.
1327There are five teams: red, green, blue, purple and rogue (rogue tanks
1328are black). Destroying a player on another team scores a win, while
1329being destroyed or destroying a teammate scores a loss. Rogues have
1330no teammates (not even other rogues), so they cannot shoot teammates
1331and they do not have a team score.
1332
1333There are two main styles of play: capture-the-flag and free-for-all.
1334In capture-the-flag, each team (except rogues) has a team base and
1335each team with at least one player has a team flag. The object is to
1336capture an enemy team's flag by bringing it to your team's base. This
1337destroys every player on the captured team, subtracts one from that
1338team's score, and adds one to your team's score. In free-for-all,
1339there are no team flags or team bases. The object is simply to get as
1340high a score as possible.")
1341 ;; The game is dual-licensed.
1342 (license (list license:lgpl2.1 license:mpl2.0))))
1343
1344(define-public cataclysm-dda
1345 (package
1346 (name "cataclysm-dda")
1347 (version "0.I")
1348 (source
1349 (origin
1350 (method git-fetch)
1351 (uri (git-reference
1352 (url "https://github.com/CleverRaven/Cataclysm-DDA")
1353 (commit version)))
1354 (sha256
1355 (base32 "0lk9akkwxjd06739qyhg8iypaw13y9xd2yc249sy91m3llvylccz"))
1356 (file-name (git-file-name name version))))
1357 (build-system gnu-build-system)
1358 (arguments
1359 (list
1360 #:make-flags
1361 #~(list (string-append "PREFIX=" #$output)
1362 "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1" "WARNINGS=-w"
1363 "LOCALIZE=1" "LANGUAGES=all")
1364 #:phases
1365 #~(modify-phases %standard-phases
1366 (delete 'configure))
1367 ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
1368 ;; input in order to support tests.
1369 #:tests? #f))
1370 (native-inputs
1371 (list astyle gcc-13 gettext-minimal pkg-config))
1372 (inputs
1373 (list freetype ncurses))
1374 (home-page "https://cataclysmdda.org/")
1375 (synopsis "Survival horror roguelike video game")
1376 (description
1377 "Cataclysm: Dark Days Ahead (or \"DDA\" for short) is a roguelike set
1378in a post-apocalyptic world. Struggle to survive in a harsh, persistent,
1379procedurally generated world. Scavenge the remnants of a dead civilization
1380for food, equipment, or, if you are lucky, a vehicle with a full tank of gas
1381to get you out of Dodge. Fight to defeat or escape from a wide variety of
1382powerful monstrosities, from zombies to giant insects to killer robots and
1383things far stranger and deadlier, and against the others like yourself, that
1384want what you have.")
1385 (license license:cc-by-sa3.0)))
1386
1387(define-public cataclysm-dda-tiles
1388 (package
1389 (inherit cataclysm-dda)
1390 (name "cataclysm-dda-tiles")
1391 (arguments
1392 (substitute-keyword-arguments arguments
1393 ((#:make-flags flags)
1394 #~(cons* "TILES=1" "SOUND=1" #$flags))))
1395 (inputs
1396 (modify-inputs inputs
1397 (delete "ncurses")
1398 (append libogg
1399 libvorbis
1400 sdl2
1401 sdl2-image
1402 sdl2-mixer
1403 sdl2-ttf)))
1404 (synopsis
1405 (string-append (package-synopsis cataclysm-dda)
1406 ", with graphics and sound"))
1407 (description
1408 (string-append (package-description cataclysm-dda)
1409 "\n\nThis package includes graphical tiles and sound."))))
1410
1411(define-public cockatrice
1412 (let ((release-date "2026-05-23"))
1413 (package
1414 (name "cockatrice")
1415 (version "3.0.1")
1416 (source
1417 (origin
1418 (method git-fetch)
1419 (uri (git-reference
1420 (url "https://github.com/Cockatrice/Cockatrice")
1421 (commit (string-append release-date "-Release-" version))))
1422 (file-name (git-file-name name version))
1423 (sha256
1424 (base32
1425 "1bjn39lvk6clr6w98qki3lidkvaxsky3235izkdsbvysz4j6664p"))
1426 (modules '((guix build utils)))
1427 (snippet
1428 ;; Strip image URLs as they point towards non-free web services
1429 '(substitute* "libcockatrice_settings/libcockatrice/settings/download_settings.cpp"
1430 (("\"https://.*\",?") "")))))
1431 (build-system qt-build-system)
1432 (arguments
1433 (list
1434 #:qtbase qtbase
1435 #:configure-flags #~(list "-DWITH_SERVER=1"
1436 "-DWITH_CLIENT=1"
1437 "-DWITH_ORACLE=1"
1438 "-DTEST=1")))
1439 (native-inputs
1440 (list googletest pkg-config))
1441 (inputs
1442 (list protobuf
1443 qtmultimedia
1444 qtsvg
1445 qttools
1446 qttranslations
1447 qtwebsockets
1448 qtwayland
1449 xz
1450 zlib))
1451 (home-page "https://cockatrice.github.io")
1452 (synopsis "Tabletop card game simulator")
1453 (description "Cockatrice is a program for playing tabletop card games
1454over a network. Its server design prevents users from manipulating the game
1455for unfair advantage. The client also provides a single-player mode, which
1456allows users to brew while offline.")
1457 (license license:gpl2))))
1458
1459(define-public corsix-th
1460 (package
1461 (name "corsix-th")
1462 (version "0.67")
1463 (source
1464 (origin
1465 (method git-fetch)
1466 (uri (git-reference
1467 (url "https://github.com/CorsixTH/CorsixTH")
1468 (commit (string-append "v" version))))
1469 (file-name (git-file-name name version))
1470 (sha256
1471 (base32 "14996kbrwdrd0gpz19il2i4p650qdhjw8v8ka3aigk6pl4kda3sq"))))
1472 (build-system cmake-build-system)
1473 (arguments
1474 (list
1475 #:phases
1476 #~(modify-phases %standard-phases
1477 (add-after 'install 'wrap-binary
1478 (lambda _
1479 ;; Set Lua module paths and default MIDI soundfont on startup.
1480 (let* ((fluid #$(this-package-input "fluid-3"))
1481 (lua-version #$(version-major+minor (package-version lua)))
1482 (lua-cpath
1483 (map (lambda (lib)
1484 (string-append
1485 (assoc-ref %build-inputs (string-append "lua-" lib))
1486 "/lib/lua/" lua-version "/?.so"))
1487 '("filesystem" "lpeg"))))
1488 (wrap-program (string-append #$output "/bin/corsix-th")
1489 `("LUA_CPATH" ";" = ,lua-cpath)
1490 `("SDL_SOUNDFONTS" ":" suffix
1491 (,(string-append fluid "/share/soundfonts/FluidR3Mono_GM.sf3"))))))))
1492 #:tests? #f)) ; TODO need busted package to run tests
1493 ;; Omit Lua-Socket dependency to disable automatic updates.
1494 (inputs
1495 (list bash-minimal
1496 ffmpeg
1497 fluid-3
1498 freetype
1499 lua
1500 lua-filesystem
1501 lua-lpeg
1502 sdl2
1503 sdl2-mixer))
1504 (home-page "https://corsixth.com")
1505 (synopsis "Implementation of the @i{Theme Hospital} game engine")
1506 (description
1507 "This package provides a reimplementation of the 1997 Bullfrog business
1508simulation game @i{Theme Hospital}. As well as faithfully recreating the
1509original engine, CorsixTH adds support for high resolutions, custom levels and
1510more. This package does @emph{not} provide the game assets.")
1511 (license (list
1512 license:expat ; main license
1513 license:bsd-3)))) ; CorsixTH/Src/random.c
1514
1515(define-public cowsay
1516 ;; This is a continuation of Tony Monroe's now-unmaintained original, that
1517 ;; aims to become the ‘canonical modern fork’. We'll see. What it gives
1518 ;; us today is a bunch of fixes that other distros shipped as patches.
1519 (package
1520 (name "cowsay")
1521 (version "3.8.4")
1522 (source
1523 (origin
1524 (method git-fetch)
1525 (uri (git-reference
1526 (url "https://github.com/cowsay-org/cowsay")
1527 (commit (string-append "v" version))))
1528 (file-name (git-file-name name version))
1529 (sha256
1530 (base32 "0as4axm1v37d2bm86sksi6wrd0yc4jm2lyfdhr5k179b1mvnfx4v"))))
1531 (build-system gnu-build-system)
1532 (arguments
1533 (list #:make-flags
1534 #~(list (string-append "prefix=" #$output))
1535 #:phases
1536 #~(modify-phases %standard-phases
1537 (delete 'configure) ; no configure script
1538 (delete 'check)
1539 (add-after 'install 'check
1540 (lambda* (#:key outputs #:allow-other-keys)
1541 (invoke (string-append (assoc-ref outputs "out")
1542 "/bin/cowsay")
1543 "We're done!"))))))
1544 (inputs
1545 (list perl))
1546 (home-page (string-append "https://web.archive.org/web/20071026043648/"
1547 "http://www.nog.net:80/~tony/warez/cowsay.shtml"))
1548 (synopsis "Speaking cow text filter")
1549 (description "Cowsay is basically a text filter. Send some text into it,
1550and you get a cow saying your text. If you think a talking cow isn't enough,
1551cows can think too: all you have to do is run @command{cowthink}. If you're
1552tired of cows, a variety of other ASCII-art messengers are available.")
1553 (license license:gpl3+)))
1554
1555(define-public deal
1556 (package
1557 (name "deal")
1558 (version "3.1.11")
1559 (source (origin
1560 (method git-fetch)
1561 (uri (git-reference
1562 (url "https://github.com/gtwilliams/deal")
1563 (commit (string-append "v" version))))
1564 (file-name (git-file-name name version))
1565 (sha256
1566 (base32
1567 "1wcrx3yq5ycnkdnygcq80ljpgc9iwyrr8zayprzvbibvj77hdm0c"))))
1568 (build-system gnu-build-system)
1569 (arguments
1570 (list
1571 #:test-target "test"
1572 #:make-flags
1573 #~(let* ((tcl #$(this-package-input "tcl"))
1574 (tcl-version #$(version-major+minor (package-version tcl))))
1575 (list "CPPFLAGS += -O3"
1576 (string-append "CC=" #$(cc-for-target))
1577 (string-append "TCL_INCL=" tcl "/include")
1578 (string-append "LDFLAGS=-L" tcl "/lib"
1579 " -ltcl" tcl-version
1580 " -lm")
1581 (string-append "DATA_DIR=" #$output "/share/deal/")))
1582 #:phases
1583 #~(modify-phases %standard-phases
1584 (add-after 'unpack 'locate-pod2man
1585 (lambda* (#:key inputs #:allow-other-keys)
1586 (substitute* "Makefile"
1587 (("/usr/bin/pod2man")
1588 (search-input-file inputs "/bin/pod2man")))))
1589 (delete 'configure) ;no configure script
1590 ;; Prevent the error: "Makefile:248: Make.dep: No such file
1591 ;; or directory".
1592 (add-before 'build 'create-Make.dep
1593 (lambda _
1594 (call-with-output-file "Make.dep" (const #t))))
1595 ;; There is no install target. Do everything manually.
1596 (replace 'install
1597 (lambda _
1598 (let ((bin (string-append #$output "/bin"))
1599 (man (string-append #$output "/share/man/man6"))
1600 (data (string-append #$output "/share/deal")))
1601 (install-file "deal" bin)
1602 (install-file "deal.6" man)
1603 (install-file "deal.tcl" data)
1604 (for-each (lambda (d)
1605 (let ((target (string-append data "/" d)))
1606 (mkdir-p target)
1607 (copy-recursively d target)))
1608 '("ex" "format" "input" "lib")))))
1609 ;; Tests need to happen once the data is properly installed
1610 ;; because the "deal.tcl" script file location is hard-coded
1611 ;; in the "deal" binary.
1612 (delete 'check)
1613 (add-after 'install 'check
1614 (assoc-ref %standard-phases 'check)))))
1615 (native-inputs
1616 (list perl))
1617 (inputs
1618 (list tcl))
1619 (home-page "https://bridge.thomasoandrews.com/deal/")
1620 (synopsis "Bridge hand generator")
1621 (description
1622 "This program generates bridge hands. It can be told to generate only
1623hands satisfying conditions like being balanced, having a range of
1624High Cards Points (HCP), controls, or other user-definable properties.
1625Hands can be output in various formats, like PBN for feeding to other
1626bridge programs, Deal itself, or split up into a file per player for
1627practise.")
1628 (license (list license:gpl2+
1629 license:gpl1+ ;ansidecl.h
1630 license:bsd-3)))) ;random.c
1631
1632(define-public doom-runner
1633 (package
1634 (name "doom-runner")
1635 (version "1.9.1")
1636 (source
1637 (origin
1638 (method git-fetch)
1639 (uri (git-reference
1640 (url "https://github.com/Youda008/DoomRunner")
1641 (commit (string-append "v" version))))
1642 (file-name (git-file-name name version))
1643 (sha256
1644 (base32 "19jq5cj6rc8d5ghd9321a2f3v0b7z928990d7dj6ynyhkpcj769p"))
1645 (modules '((guix build utils)))
1646 (snippet #~(delete-file-recursively "Screenshots")))) ;Save 1.4MiB.
1647 (build-system qt-build-system)
1648 (arguments
1649 (list
1650 #:qtbase qtbase
1651 #:tests? #f ;no tests
1652 #:modules '((guix build qt-build-system)
1653 ((guix build gnu-build-system) #:prefix gnu:)
1654 (guix build utils))
1655 #:phases
1656 #~(modify-phases %standard-phases
1657 (replace 'configure
1658 (lambda _
1659 (invoke "qmake" "DoomRunner.pro" "-spec" "linux-g++"
1660 "\"CONFIG+=release\""
1661 (string-append "INSTALL_DIR=" #$output))))
1662 (replace 'build (assoc-ref gnu:%standard-phases 'build))
1663 (replace 'install (assoc-ref gnu:%standard-phases 'install))
1664 (add-after 'install 'install-xdg
1665 (lambda _
1666 (with-directory-excursion #$output
1667 (install-file "DoomRunner" "bin/")
1668 (delete-file "DoomRunner"))
1669 (with-directory-excursion "Install/XDG"
1670 (install-file "DoomRunner.desktop"
1671 (string-append #$output "/share/applications"))
1672 (install-file "io.github.Youda008.DoomRunner.appdata.xml"
1673 (string-append #$output "/share/metainfo"))
1674 (for-each
1675 (lambda (size)
1676 (let ((filename (simple-format #f "DoomRunner.~sx~s.png"
1677 size size)))
1678 (chmod filename #o444)
1679 (install-file
1680 filename
1681 (simple-format #f "~a/share/icons/hicolor/~sx~s/apps"
1682 #$output size size))))
1683 '(16 24 32 48 64 128))))))))
1684 (home-page "https://github.com/Youda008/DoomRunner")
1685 (synopsis "Launcher for Doom engine games")
1686 (description "Doom Runner is yet another launcher of common Doom source
1687ports (e.g. GZDoom, Zandronum, PrBoom) with a graphical user interface. It
1688is written in C++ and Qt, and it is designed around the idea of presets for
1689various multi-file modifications to allow one-click switching between them.")
1690 (license license:gpl3)))
1691
1692(define-public falltergeist
1693 (package
1694 (name "falltergeist")
1695 (version "0.3.1")
1696 (source (origin
1697 (method git-fetch)
1698 (uri (git-reference
1699 (url "https://github.com/falltergeist/falltergeist")
1700 (commit version)))
1701 (file-name (git-file-name name version))
1702 (sha256
1703 (base32
1704 "05cg58i2g32wbmrvmdsicic8xs83gld3qr1p7r4lnlckcl1l7dy4"))))
1705 (build-system cmake-build-system)
1706 (arguments
1707 `(#:tests? #f)) ; no tests provided
1708 (native-inputs (list pkg-config))
1709 (inputs `(("sdl" ,(sdl-union (list sdl2
1710 sdl2-image
1711 sdl2-mixer)))
1712 ("glew" ,glew)
1713 ("glm" ,glm)))
1714 (home-page "https://falltergeist.org/")
1715 (synopsis "Fallout 2 game engine")
1716 (description "This package provides the Fallout 2 game engine. Game data
1717should be placed in @file{~/.local/share/falltergeist}.")
1718 (license license:gpl3+)))
1719
1720(define-public foobillard++
1721 ;; Even though this latest revision is old already, stable release is
1722 ;; lagging way behind it, and has issues with textures rendering.
1723 (let ((svn-revision 170))
1724 (package
1725 (name "foobillard++")
1726 (version (string-append "3.43-r" (number->string svn-revision)))
1727 (source
1728 (origin
1729 (method svn-fetch)
1730 (uri (svn-reference
1731 (url "svn://svn.code.sf.net/p/foobillardplus/code/")
1732 (revision svn-revision)))
1733 (file-name (git-file-name name version))
1734 (sha256
1735 (base32 "00b693ys5zvzjbjzzj3dqfzm5xw64gwjf9m8qv6bkmf0klbhmayk"))
1736 (patches
1737 (search-patches "foobillard++-pkg-config.patch"))
1738 (modules '((guix build utils)))
1739 (snippet
1740 '(begin
1741 ;; Unfortunately, the game includes background music with
1742 ;; a non-commercial clause. Delete it.
1743 (for-each delete-file (find-files "data/music" "\\.ogg$"))
1744 #t))))
1745 (build-system gnu-build-system)
1746 (arguments
1747 `(#:configure-flags
1748 (list
1749 ;; Install data in a less exotic location.
1750 (string-append "--prefix=" (assoc-ref %outputs "out") "/share")
1751 ;; Prevent a build error about undefined trigonometric functions.
1752 "--enable-fastmath=no")
1753 #:phases
1754 (modify-phases %standard-phases
1755 (add-after 'unpack 'fix-makefile
1756 ;; Remove hard-coded directories. Also fix installation
1757 ;; rule: it tries to move around non-existent files or
1758 ;; files already moved.
1759 (lambda* (#:key outputs #:allow-other-keys)
1760 (substitute* "Makefile.am"
1761 (("/usr") (assoc-ref outputs "out"))
1762 (("cp .*?/foobillardplus\\.desktop.*") "")
1763 (("cp .*?/foobillardplus\\.(png|xbm) \\$\\(datarootdir\\).*")
1764 ""))
1765 #t))
1766 (add-after 'unpack 'unbundle-font
1767 ;; XXX: The package ships with LinBiolinum_aSB.ttf and
1768 ;; LinBiolinum_aS.ttf, which are not provided by
1769 ;; `font-linuxlibertine' package. Therefore, we cannot replace
1770 ;; them yet.
1771 (lambda* (#:key inputs #:allow-other-keys)
1772 (let ((dejavu (string-append (assoc-ref inputs "font-dejavu")
1773 "/share/fonts/truetype/")))
1774 (with-directory-excursion "data"
1775 (for-each (lambda (f)
1776 (delete-file f)
1777 (symlink (string-append dejavu f) f))
1778 '("DejaVuSans-Bold.ttf" "DejaVuSans.ttf"))))
1779 #t))
1780 (replace 'bootstrap
1781 (lambda _
1782 (invoke "aclocal" "--force")
1783 (invoke "autoconf" "-f")
1784 (invoke "autoheader" "-f")
1785 (invoke "automake" "-a" "-c" "-f")))
1786 (add-before 'build 'prepare-build
1787 ;; Set correct environment for SDL.
1788 (lambda* (#:key inputs #:allow-other-keys)
1789 (setenv "CPATH"
1790 (string-append
1791 (search-input-directory inputs "include/SDL")
1792 ":" (or (getenv "CPATH") "")))))
1793 (add-before 'build 'fix-settings-directory
1794 ;; Hide foobillardplus settings directory in $HOME.
1795 (lambda _
1796 (substitute* "src/history.c"
1797 (("/foobillardplus-data") "/.foobillardplus"))
1798 #t))
1799 (add-before 'install 'create-directories
1800 ;; Install process does not create directories before
1801 ;; trying to move file in it.
1802 (lambda* (#:key outputs #:allow-other-keys)
1803 (let ((out (assoc-ref outputs "out")))
1804 (mkdir-p (string-append out "/share/icons"))
1805 (mkdir-p (string-append out "/share/applications")))
1806 #t))
1807 (add-after 'install 'symlink-executable
1808 ;; Symlink executable to $out/bin.
1809 (lambda* (#:key outputs #:allow-other-keys)
1810 (let* ((out (assoc-ref outputs "out"))
1811 (bin (string-append out "/bin")))
1812 (mkdir-p bin)
1813 (with-directory-excursion bin
1814 (symlink "../share/foobillardplus/bin/foobillardplus"
1815 "foobillardplus"))
1816 #t))))))
1817 (native-inputs
1818 (list autoconf automake pkg-config))
1819 (inputs
1820 `(("font-dejavu" ,font-dejavu)
1821 ("freetype" ,freetype)
1822 ("glu" ,glu)
1823 ("libpng" ,libpng)
1824 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net)))))
1825 (home-page "https://foobillardplus.sourceforge.net/")
1826 (synopsis "3D billiard game")
1827 (description "FooBillard++ is an advanced 3D OpenGL billiard game
1828based on the original foobillard 3.0a sources from Florian Berger.
1829You can play it with one or two players or against the computer.
1830
1831The game features:
1832
1833@itemize
1834@item Wood paneled table with gold covers and gold diamonds.
1835@item Reflections on balls.
1836@item Zoom in and out, rotation, different angles and bird's eye view.
1837@item Different game modes: 8 or 9-ball, Snooker or Carambole.
1838@item Tournaments. Compete against other players.
1839@item Animated cue with strength and eccentric hit adjustment.
1840@item Jump shots and snipping.
1841@item Realistic gameplay and billiard sounds.
1842@item Red-Green stereo.
1843@item And much more.
1844@end itemize")
1845 (license (list license:gpl2 license:silofl1.1)))))
1846
1847(define-public freedoom
1848 (package
1849 (name "freedoom")
1850 (version "0.13.0")
1851 (source
1852 (origin
1853 (method git-fetch)
1854 (uri (git-reference
1855 (url "https://github.com/freedoom/freedoom")
1856 (commit (string-append "v" version))))
1857 (file-name (git-file-name name version))
1858 (sha256
1859 (base32 "01fwzwi4a68n26d627dkcn85jz854mc3zfnzzkvinmx9yy3z5qmq"))))
1860 (build-system gnu-build-system)
1861 (arguments
1862 '(#:make-flags
1863 (list (string-append "prefix=" (assoc-ref %outputs "out")))
1864 #:tests? #f ; no check target
1865 #:phases
1866 (modify-phases %standard-phases
1867 (delete 'bootstrap)
1868 (replace 'configure
1869 (lambda* (#:key inputs outputs #:allow-other-keys)
1870 (let* ((freedoom (assoc-ref outputs "out"))
1871 (wad-dir (string-append freedoom "/share/games/doom")))
1872 ;; Make sure that the install scripts know where to find
1873 ;; the appropriate WAD files.
1874 (substitute* "dist/freedoom"
1875 (("IWAD=freedm.wad")
1876 (string-append "IWAD=" wad-dir "/freedm.wad"))
1877 (("IWAD=freedoom1.wad")
1878 (string-append "IWAD=" wad-dir "/freedoom1.wad"))
1879 (("IWAD=freedoom2.wad")
1880 (string-append "IWAD=" wad-dir "/freedoom2.wad")))
1881 #t))))))
1882 (native-inputs
1883 (list asciidoc deutex python python-pillow))
1884 (home-page "https://freedoom.github.io/")
1885 (synopsis "Free content game based on the Doom engine")
1886 (native-search-paths
1887 (list (search-path-specification
1888 (variable "DOOMWADDIR")
1889 (files '("share/games/doom")))
1890 (search-path-specification
1891 (variable "DOOMWADPATH")
1892 (files '("share/games/doom")))))
1893 (description
1894 "The Freedoom project aims to create a complete free content first person
1895shooter game. Freedoom by itself is just the raw material for a game: it must
1896be paired with a compatible game engine (such as @code{prboom-plus}) to be
1897played. Freedoom complements the Doom engine with free levels, artwork, sound
1898effects and music to make a completely free game.")
1899 (license license:bsd-3)))
1900
1901(define-public freedroidrpg
1902 (package
1903 (name "freedroidrpg")
1904 (version "1.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (let ((major+minor
1909 (version-major+minor
1910 (string-replace-substring version "rc" "."))))
1911 (string-append "http://ftp.osuosl.org/pub/freedroid/"
1912 "freedroidRPG-" major+minor "/"
1913 "freedroidRPG-" version ".tar.gz")))
1914 (sha256
1915 (base32 "1kxvyg70r9x8q40kn5lr3h1q60d6jx9mkvxls4aflj22b45vg5br"))))
1916 (build-system gnu-build-system)
1917 (arguments
1918 (list
1919 #:configure-flags
1920 #~(list
1921 (string-append "CFLAGS=-fcommon "
1922 "-I" #$(this-package-input "sdl-gfx") "/include/SDL "
1923 "-I" #$(this-package-input "sdl-image") "/include/SDL "
1924 "-I" #$(this-package-input "sdl-mixer") "/include/SDL")
1925 "--enable-opengl")
1926 ;; FIXME: the test suite fails with the following error output:
1927 ;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
1928 ;; SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
1929 #:tests? #f))
1930 (native-inputs
1931 (list pkg-config))
1932 (inputs
1933 (list glew
1934 glu
1935 libjpeg-turbo
1936 libogg
1937 libpng
1938 libvorbis
1939 mesa
1940 python-wrapper
1941 sdl
1942 sdl-gfx
1943 sdl-image
1944 sdl-mixer
1945 zlib))
1946 (home-page "https://www.freedroid.org/")
1947 (synopsis "Isometric role-playing game against killer robots")
1948 (description
1949 "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
1950The game tells the story of a world destroyed by a conflict between robots and
1951their human masters. To restore peace to humankind, the player must complete
1952numerous quests while fighting off rebelling robots---either by taking control
1953of them, or by simply blasting them to pieces with melee and ranged weapons in
1954real-time combat.")
1955 (license (list license:expat ; lua/
1956 license:gpl3 ; src/gen_savestruct.py
1957 license:gpl2+)))) ; the rest
1958
1959(define-public golly
1960 (package
1961 (name "golly")
1962 (version "5.0")
1963 (source (origin
1964 (method url-fetch)
1965 (uri (string-append "mirror://sourceforge/golly/golly/golly-"
1966 version "/golly-" version
1967 "-src.tar.gz"))
1968 (sha256
1969 (base32
1970 "049n634abxfpgh4imh3s5qqfn9nbwmcl6jm91f29ngqm53jcsdaq"))))
1971 (build-system gnu-build-system)
1972 (arguments
1973 (list
1974 #:make-flags
1975 #~(list "CC=gcc"
1976 (string-append "GOLLYDIR="
1977 #$output
1978 "/share/golly"))
1979 #:tests? #f ; no check target
1980 #:phases
1981 #~(modify-phases %standard-phases
1982 (delete 'configure)
1983 (replace 'build
1984 (lambda* (#:key make-flags #:allow-other-keys)
1985 (with-directory-excursion "gui-wx"
1986 (apply invoke `("make" ,@make-flags "-f" "makefile-gtk")))))
1987 (replace 'install
1988 (lambda _
1989 (let* ((bin (string-append #$output "/bin"))
1990 (doc (string-append #$output "/share/doc/golly"))
1991 (pixmaps (string-append #$output "/share/pixmaps"))
1992 (share (string-append #$output "/share/golly")))
1993 (for-each (lambda (binary)
1994 (install-file binary bin))
1995 (list "bgolly" "golly"))
1996 (for-each (lambda (document)
1997 (install-file
1998 (string-append "docs/" document ".html")
1999 doc))
2000 (list "License" "ReadMe" "ToDo"))
2001 (install-file "gui-wx/icons/appicon.xpm" pixmaps)
2002 (for-each (lambda (folder)
2003 (copy-recursively
2004 folder
2005 (string-append share "/" folder)))
2006 (list "Help" "Patterns" "Rules" "Scripts"))))))))
2007 (native-inputs
2008 (list lua
2009 python-setuptools))
2010 (inputs
2011 (list glu
2012 mesa
2013 python
2014 sdl2
2015 wxwidgets
2016 zlib))
2017 (home-page "https://golly.sourceforge.net/")
2018 (synopsis "Software for exploring cellular automata")
2019 (description
2020 "Golly simulates Conway's Game of Life and many other types of cellular
2021automata. The following features are available:
2022@enumerate
2023@item Support for bounded and unbounded universes, with cells of up to 256
2024 states.
2025@item Support for multiple algorithms, including Bill Gosper's Hashlife
2026 algorithm.
2027@item Loading patterns from BMP, PNG, GIF and TIFF image files.
2028@item Reading RLE, macrocell, Life 1.05/1.06, dblife and MCell files.
2029@item Scriptable via Lua or Python.
2030@item Extracting patterns, rules and scripts from zip files.
2031@item Downloading patterns, rules and scripts from online archives.
2032@item Pasting patterns from the clipboard.
2033@item Unlimited undo/redo.
2034@item Configurable keyboard shortcuts.
2035@item Auto fit option to keep patterns within the view.
2036@end enumerate")
2037 (license license:gpl2+)))
2038
2039(define-public joycond
2040 ;; Important: Do *not* update to a newer commit until an issue causing a
2041 ;; 100% CPU usage in the next commit
2042 ;; cdec32865c6093bd4761326ea461aaa2fcf7d1b4 is resolved (see:
2043 ;; https://github.com/DanielOgorchock/joycond/issues/153).
2044 (let ((commit "5b590ecc9bca181d8bc21377e752126bc9180319")
2045 (revision "2"))
2046 (package
2047 (name "joycond")
2048 (version (git-version "0.1.0" revision commit))
2049 (source
2050 (origin
2051 (method git-fetch)
2052 (uri (git-reference
2053 (url "https://github.com/DanielOgorchock/joycond")
2054 (commit commit)))
2055 (file-name (git-file-name name version))
2056 (sha256
2057 (base32 "18aig7x5n8hh8ffw0qk2hx2b93xrs4jp652vp8cxklw9xyy33f15"))))
2058 (build-system cmake-build-system)
2059 (arguments
2060 (list #:tests? #f ;no test suite
2061 #:phases
2062 #~(modify-phases %standard-phases
2063 (add-after 'unpack 'fix-bin-location
2064 (lambda* (#:key inputs #:allow-other-keys)
2065 (substitute* "CMakeLists.txt"
2066 (("/lib/udev/rules.d")
2067 (string-append #$output "/lib/udev/rules.d"))
2068 (("/etc/systemd/system")
2069 (string-append #$output "/etc/systemd/system"))
2070 (("/etc/modules-load.d")
2071 (string-append #$output "/etc/modules-load.d"))
2072 (("/usr/bin")
2073 (string-append #$output "/bin")))
2074 (substitute* "udev/89-joycond.rules"
2075 (("/bin/setfacl")
2076 (search-input-file inputs "bin/setfacl"))))))))
2077 (native-inputs (list pkg-config))
2078 (inputs (list acl eudev libevdev))
2079 (home-page "https://github.com/DanielOgorchock/joycond")
2080 (synopsis "Joy-Con controller daemon")
2081 (description "This package provides a userspace daemon for the Nintendo
2082Joy-Con controllers.")
2083 (license license:gpl3+))))
2084
2085(define-public julius
2086 (package
2087 (name "julius")
2088 (version "1.7.0")
2089 (source
2090 (origin
2091 (method git-fetch)
2092 (uri (git-reference
2093 (url "https://github.com/bvschaik/julius")
2094 (commit (string-append "v" version))))
2095 (file-name (git-file-name name version))
2096 (sha256
2097 (base32 "0w7kmgz9ya0ck9cxhsyralarg7y6ydx4plmh33r4mkxkamlr7493"))
2098 ;; Remove unused bundled libraries.
2099 (modules '((guix build utils)))
2100 (snippet
2101 '(begin
2102 (with-directory-excursion "ext"
2103 (for-each delete-file-recursively '("dirent" "png" "SDL2" "zlib")))
2104 #t))))
2105 (build-system cmake-build-system)
2106 (inputs
2107 (list libpng sdl2 sdl2-mixer))
2108 (home-page "https://github.com/bvschaik/julius")
2109 (synopsis "Re-implementation of Caesar III game engine")
2110 (description
2111 "Engine for Caesar III, a city-building real-time strategy game.
2112Julius includes some UI enhancements while preserving the logic (including
2113bugs) of the original game, so that saved games are compatible. This package
2114does not include game data.")
2115 (license (list license:agpl3
2116 license:zlib)))) ; ext/tinyfiledialogs
2117
2118(define-public augustus
2119 (package
2120 (inherit julius)
2121 (name "augustus")
2122 (version "3.2.0")
2123 (source
2124 (origin
2125 (method git-fetch)
2126 (uri (git-reference
2127 (url "https://github.com/Keriew/augustus")
2128 (commit (string-append "v" version))))
2129 (file-name (git-file-name name version))
2130 (sha256
2131 (base32 "0d1k5279imc17mk3lxn8amc4ljgcj4v6x6lj2w3bph1z0a7a4bim"))
2132 ;; Remove unused bundled libraries.
2133 (modules '((guix build utils)))
2134 (snippet
2135 '(begin
2136 (with-directory-excursion "ext"
2137 (for-each delete-file-recursively
2138 '("dirent" "expat" "png" "SDL2" "zlib")))))))
2139 (arguments
2140 ;; No tests. See https://github.com/Keriew/augustus/issues/82.
2141 `(#:tests? #f))
2142 (inputs (modify-inputs inputs
2143 (prepend expat)))
2144 (home-page "https://github.com/Keriew/augustus")
2145 (synopsis "Re-implementation of Caesar III game engine with gameplay changes")
2146 (description
2147 "Fork of Julius, an engine for the a city-building real-time strategy
2148game Caesar III. Gameplay enhancements include:
2149
2150@itemize
2151@item roadblocks;
2152@item market special orders;
2153@item global labour pool;
2154@item partial warehouse storage;
2155@item increased game limits;
2156@item zoom controls.
2157@end itemize\n")))
2158
2159(define-public meandmyshadow
2160 (package
2161 (name "meandmyshadow")
2162 (version "0.5a")
2163 (source (origin
2164 (method url-fetch)
2165 (uri (string-append "mirror://sourceforge/meandmyshadow/"
2166 version "/meandmyshadow-" version
2167 "-src.tar.gz"))
2168 (sha256
2169 (base32
2170 "0i98v6cgmpsxy7mbb0s2y6f6qq6mkwzk2nrv1nz39ncf948aky2h"))))
2171 (build-system cmake-build-system)
2172 (arguments
2173 `(#:tests? #f)) ; there are no tests
2174 (native-inputs
2175 (list pkg-config))
2176 (inputs
2177 `(("curl" ,curl)
2178 ("libarchive" ,libarchive)
2179 ("lua" ,lua)
2180 ("sdl" ,(sdl-union (list sdl2
2181 sdl2-image
2182 sdl2-mixer
2183 sdl2-ttf)))))
2184 (home-page "https://acmepjz.github.io/meandmyshadow/")
2185 (synopsis "Puzzle/platform game")
2186 (description "Me and My Shadow is a puzzle/platform game in which you try
2187to reach the exit by solving puzzles. Spikes, moving blocks, fragile blocks
2188and much more stand between you and the exit. Record your moves and let your
2189shadow mimic them to reach blocks you couldn't reach alone.")
2190 (license license:gpl3+)))
2191
2192(define-public opensurge
2193 (package
2194 (name "opensurge")
2195 (version "0.6.1.1")
2196 (source
2197 (origin
2198 (method git-fetch)
2199 (uri (git-reference
2200 (url "https://github.com/alemart/opensurge")
2201 (commit (string-append "v" version))))
2202 (file-name (git-file-name name version))
2203 (sha256
2204 (base32 "1hwnjgkbywspmsmpmmnndqil86qqyd21y2q5krs8znwi35ychd3q"))))
2205 (build-system cmake-build-system)
2206 (arguments
2207 (list #:tests? #f ; there are no tests
2208 #:configure-flags
2209 #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
2210 (string-append "-DGAME_BINDIR=" #$output "/bin") ; not games
2211 (string-append "-DGAME_DATADIR=" #$output "/share/" #$name)
2212 (string-append "-DDESKTOP_ENTRY_PATH=" #$output "/share/applications")
2213 (string-append "-DDESKTOP_ICON_PATH=" #$output "/share/pixmaps")
2214 (string-append "-DDESKTOP_METAINFO_PATH=" #$output "/share/metainfo"))
2215 #:phases
2216 #~(modify-phases %standard-phases
2217 (add-after 'unpack 'fix-xdg-open-path
2218 (lambda* (#:key inputs #:allow-other-keys)
2219 ;; Look for xdg-open in the store.
2220 (substitute* "src/core/web.c"
2221 (("/usr/(bin/xdg-open)" _ bin)
2222 (search-input-file inputs bin)))))
2223 (add-after 'unpack 'unbundle-fonts
2224 (lambda* (#:key inputs #:allow-other-keys)
2225 ;; Replace bundled fonts with links to the store.
2226 (with-directory-excursion "fonts"
2227 (for-each (lambda (font)
2228 (let ((file (string-append "share/fonts/truetype/"
2229 font)))
2230 (delete-file font)
2231 (symlink (search-input-file inputs file) font)))
2232 '("Roboto-Black.ttf"
2233 "Roboto-Bold.ttf"
2234 "Roboto-Medium.ttf"))))))))
2235 (inputs
2236 (list allegro font-google-roboto mesa physfs surgescript xdg-utils))
2237 (home-page "https://opensurge2d.org")
2238 (synopsis "2D retro side-scrolling game")
2239 (description "@code{Open Surge} is a 2D retro side-scrolling platformer
2240inspired by the Sonic games. The player runs at high speeds through each
2241level while collecting items and avoiding obstacles. The game includes a
2242built-in level editor.")
2243 (license
2244 ;; Code is under GPL 3+, assets are under various licenses.
2245 ;; See src/misc/credits.c for details.
2246 (list license:gpl3+
2247 license:cc0
2248 license:cc-by3.0
2249 license:cc-by-sa3.0
2250 license:expat
2251 license:public-domain
2252 license:silofl1.1))))
2253
2254(define-public kgames
2255 (package
2256 (name "kgames")
2257 (version "2.4.1")
2258 (source (origin
2259 (method git-fetch)
2260 (uri (git-reference
2261 (url "https://github.com/keith-packard/kgames")
2262 (commit version)))
2263 (file-name (git-file-name name version))
2264 (sha256
2265 (base32
2266 "09alaszhwnzzv5b0cxv5dia9y0fm63n2igv42ydkq299h7avb5fq"))))
2267 (build-system meson-build-system)
2268 (arguments
2269 (list #:configure-flags
2270 #~'("-Duser-menu=false"
2271 "-Dbindir=bin")))
2272 (native-inputs
2273 (list bison flex pkg-config))
2274 (inputs
2275 (list cairo
2276 fontconfig
2277 freetype
2278 librsvg
2279 libx11
2280 libxaw
2281 libxft
2282 libxmu
2283 libxpm
2284 libxrender
2285 ncurses))
2286 (synopsis "Xaw based solitaire games")
2287 (home-page "https://github.com/keith-packard/kgames")
2288 (description
2289 "This package provides a collection of solitaire games: kaces, kcanfield,
2290kcribbage, kdominos, kklondike, kmcarlo, kmontana, kslyfox, kspider, ktabby,
2291kthieves, ktowers, xmille and xreversi.")
2292 ;; Code is under BSD-3 and Expat, card images are under CC0.
2293 (license (list license:bsd-3 license:expat license:cc0))))
2294
2295(define-public black-hole-solver
2296 (package
2297 (name "black-hole-solver")
2298 (version "1.14.0")
2299 (source
2300 (origin
2301 (method url-fetch)
2302 (uri (string-append
2303 "https://fc-solve.shlomifish.org/downloads/fc-solve/black-hole-solver-"
2304 version ".tar.xz"))
2305 (sha256
2306 (base32 "1h2panbi4jkcijyknyxi74fkgd0jgjmp1mhg155hy5mv7l4vsisw"))))
2307 (build-system cmake-build-system)
2308 (arguments
2309 (list
2310 #:phases
2311 #~(modify-phases %standard-phases
2312 (add-after 'unpack 'delete-failing-tests
2313 (lambda _
2314 (delete-file "t/style-trailing-space.t"))))))
2315 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2316 ;; which are mutually incompatible
2317 (native-inputs
2318 (list `(,glib "bin")
2319 perl
2320 perl-class-xsaccessor
2321 perl-dir-manifest
2322 perl-env-path
2323 perl-file-find-object
2324 perl-file-find-object-rule
2325 perl-file-which
2326 perl-inline
2327 perl-inline-c
2328 perl-number-compare
2329 perl-path-tiny-0.150
2330 perl-test-differences
2331 perl-test-runvalgrind
2332 perl-test-some
2333 perl-test-trailingspace
2334 perl-text-glob
2335 pkg-config
2336 python))
2337 (inputs (list rinutils))
2338 (home-page "https://fc-solve.shlomifish.org/")
2339 (synopsis "Solver of various solitaire games")
2340 (description
2341 "Black-hole Solver is a program that automatically solves layouts of Black Hole and
2342similar variants of Card Solitaire such as Golf, and All in a Row.")
2343 (license license:expat)))
2344
2345(define-public freecell-solver
2346 (package
2347 (name "freecell-solver")
2348 (version "6.14.0")
2349 (source
2350 (origin
2351 (method url-fetch)
2352 (uri (string-append
2353 "https://fc-solve.shlomifish.org/downloads/fc-solve/freecell-solver-"
2354 version ".tar.xz"))
2355 (sha256
2356 (base32 "1p775imxqycpky3j3pa5whzqcxjbr3kv2z1d20hxbg12akc2a48x"))))
2357 (build-system cmake-build-system)
2358 (arguments
2359 (list
2360 #:configure-flags
2361 #~(list "-DFCS_DISABLE_PATSOLVE=1")
2362 #:phases
2363 #~(modify-phases %standard-phases
2364 (add-after 'unpack 'delete-failing-tests
2365 (lambda _
2366 (delete-file "t/t/tidyall.t")
2367 (delete-file "t/t/sh-shabang.t")
2368 (delete-file "t/t/py-flake8.t")
2369 (delete-file "t/t/style-trailing-space.t"))))))
2370 ;; TODO: These inputs wind up propagating both perl-moo and perl-moo-2,
2371 ;; which are mutually incompatible
2372 (native-inputs
2373 (list cmocka
2374 `(,glib "bin")
2375 gperf
2376 perl
2377 perl-chi
2378 perl-file-find-object
2379 perl-file-find-object-rule
2380 perl-moo-2
2381 perl-number-compare
2382 perl-path-tiny-0.150
2383 perl-task-freecellsolver-testing
2384 perl-task-test-run-allplugins
2385 perl-test-runvalgrind
2386 perl-template-toolkit
2387 perl-code-tidyall-plugin-testcount
2388 pkg-config
2389 python
2390 python-cffi
2391 python-freecell-solver
2392 python-pycotap
2393 python-six
2394 the-silver-searcher
2395 tidyall))
2396 (inputs (list rinutils))
2397 (propagated-inputs (list python-pysol-cards))
2398 (home-page "https://fc-solve.shlomifish.org/")
2399 (synopsis "Solver of various solitaire games")
2400 (description
2401 "Freecell Solver is a program that automatically solves layouts of Freecell and
2402similar variants of Card Solitaire such as Eight Off, Forecell, and Seahaven Towers, as
2403well as Simple Simon boards.")
2404 (license license:expat)))
2405
2406(define-public knightsgame
2407 (package
2408 (name "knightsgame")
2409 (version "025")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (string-append "http://www.knightsgame.org.uk/files/knights_"
2413 version "_src.tar.gz"))
2414 (sha256
2415 (base32
2416 "18vp2ygvn0s0jz8rm585jqf6hjqkam1ximq81k0r9hpmfj7wb88f"))
2417 (modules '((guix build utils)))
2418 (snippet
2419 ;; Fix a missing include for std::map.
2420 #~(substitute* "src/shared/impl/lua_func_wrapper.cpp"
2421 (("#include \"misc[.]hpp\"" x)
2422 (string-append "#include <map>\n" x))))))
2423 (build-system gnu-build-system)
2424 (arguments
2425 '(#:make-flags
2426 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2427 "CXXFLAGS=-lpthread")
2428 #:phases
2429 (modify-phases %standard-phases
2430 ;; No configure script.
2431 (delete 'configure))
2432 #:tests? #f)) ;; No check target.
2433 (inputs
2434 `(("boost" ,boost-1.83)
2435 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
2436 ("freetype" ,freetype)
2437 ("fontconfig" ,fontconfig)
2438 ("curl" ,curl)))
2439 (native-inputs
2440 (list pkg-config))
2441 (home-page "http://www.knightsgame.org.uk/")
2442 (synopsis "Multiplayer dungeon game involving knights and quests")
2443 (description "Knights is a multiplayer game involving several knights who
2444must run around a dungeon and complete various quests. Each game revolves
2445around a quest – for example, you might have to find some items and carry them
2446back to your starting point. This may sound easy, but as there are only
2447enough items in the dungeon for one player to win, you may end up having to
2448kill your opponents to get their stuff! Other quests involve escaping from
2449the dungeon, fighting a duel to the death against the enemy knights, or
2450destroying an ancient book using a special wand.")
2451 ;; This package includes modified sources of lua (X11), enet (Expat), and
2452 ;; guichan (BSD-3). The "Coercri" library is released under the Boost
2453 ;; license. The whole package is released under GPLv3+.
2454 (license license:gpl3+)))
2455
2456(define-public ghosthop
2457 (let ((commit "9fefc22830ff8fde484452d7a249f4c54feec0fc")
2458 (revision "1"))
2459 (package
2460 (name "ghosthop")
2461 (version (git-version "0" revision commit))
2462 (source
2463 (origin
2464 (method git-fetch)
2465 (uri (git-reference
2466 (url "https://gitlab.com/gcmas/ghosthop.git")
2467 (commit commit)))
2468 (file-name (git-file-name name version))
2469 (sha256
2470 (base32
2471 "021awll73bgjk61r6y6cbqn0dpmki9jp627km7yhx5px15panslq"))
2472 (modules '((guix build utils)))
2473 (snippet '(delete-file-recursively "vendor"))))
2474 (build-system copy-build-system)
2475 (arguments
2476 (list
2477 #:install-plan
2478 ;; 'ghosthop' loads 'asset' and 'scm' from the current directory.
2479 #~'(("ghosthop" "opt/ghosthop/")
2480 ("asset" "opt/ghosthop/")
2481 ("scm" "opt/ghosthop/"))
2482 #:phases
2483 #~(modify-phases %standard-phases
2484 (add-before 'install 'build
2485 ;; Avoid its Makefile to build with system libraries.
2486 (lambda* (#:key inputs #:allow-other-keys)
2487 (with-output-to-file "rlbind.c"
2488 (lambda ()
2489 (invoke "repl" "rlbind.scm")))
2490 (invoke #$(cc-for-target)
2491 "-o" "ghosthop"
2492 "-O3" "-lm" "-lraylib"
2493 (search-input-file inputs "/share/s7/s7.c")
2494 "rlbind.c" "src/init.c")
2495 (invoke #$(strip-for-target) "ghosthop")))
2496 (add-after 'install 'install-launcher
2497 ;; Create a launcher script for 'ghosthop'.
2498 (lambda* (#:key inputs outputs #:allow-other-keys)
2499 (let* ((out (assoc-ref outputs "out"))
2500 (bindir (string-append out "/bin"))
2501 (gamedir (string-append out "/opt/ghosthop"))
2502 (launcher (string-append bindir "/ghosthop"))
2503 (bash (search-input-file inputs "/bin/bash")))
2504 (mkdir (dirname launcher))
2505 (with-output-to-file launcher
2506 (lambda ()
2507 (format #t "#!~a~%" bash)
2508 (format #t "cd ~a~%" gamedir)
2509 (format #t "exec -a ghosthop ~a~%"
2510 (string-append gamedir "/ghosthop"))))
2511 (chmod launcher #o755)))))))
2512 (native-inputs (list s7))
2513 (inputs (list bash-minimal raylib))
2514 (home-page "https://gitlab.com/gcmas/ghosthop")
2515 (synopsis "Puzzle game with colored rules")
2516 (description "This is a small puzzle game made for the 2024 Spring Lisp
2517Game Jam. The objective is to reach the goal by assigning rules to colors.")
2518 (license (list license:gpl3+ ;code and other assets
2519 license:cc-by-sa3.0))))) ;music
2520
2521(define-public gnome-2048
2522 (package
2523 (name "gnome-2048")
2524 (version "3.38.2")
2525 (source (origin
2526 (method url-fetch)
2527 (uri (string-append "mirror://gnome/sources/gnome-2048/"
2528 (version-major+minor version) "/"
2529 "gnome-2048-" version ".tar.xz"))
2530 (sha256
2531 (base32
2532 "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2"))
2533 (patches
2534 (search-patches "gnome-2048-fix-positional-argument.patch"))))
2535 (build-system meson-build-system)
2536 (arguments
2537 `(#:glib-or-gtk? #t
2538 #:phases
2539 (modify-phases %standard-phases
2540 (add-after 'unpack 'skip-gtk-update-icon-cache
2541 ;; Don't create 'icon-theme.cache'.
2542 (lambda _
2543 (substitute* "meson_post_install.py"
2544 (("gtk-update-icon-cache") "true")))))))
2545 (inputs
2546 (list gtk+
2547 clutter
2548 clutter-gtk
2549 libgee
2550 libgnome-games-support-1))
2551 (native-inputs
2552 (list gettext-minimal
2553 `(,glib "bin") ; for desktop-file-validate and appstream-util
2554 itstool
2555 libxml2
2556 pkg-config
2557 vala))
2558 (home-page "https://wiki.gnome.org/Apps/2048")
2559 (synopsis "Move the tiles until you obtain the 2048 tile")
2560 (description "GNOME 2048 provides a 2D grid for playing 2048, a
2561single-player sliding tile puzzle game. The objective of the game is to merge
2562together adjacent tiles of the same number until the sum of 2048 is achieved
2563in one tile.")
2564 (license license:gpl3+)))
2565
2566(define-public gnome-chess
2567 (package
2568 (name "gnome-chess")
2569 (version "46.0")
2570 (source (origin
2571 (method url-fetch)
2572 (uri (string-append "mirror://gnome/sources/gnome-chess/"
2573 (version-major version) "/"
2574 "gnome-chess-" version ".tar.xz"))
2575 (sha256
2576 (base32
2577 "1rzx8qxrfsicdmkyka434nv7adrh4x4qn6dri5bjqcallzh91g52"))))
2578 (build-system meson-build-system)
2579 (arguments
2580 '(#:glib-or-gtk? #t
2581 #:phases
2582 (modify-phases %standard-phases
2583 (add-after 'unpack 'skip-gtk-update-icon-cache
2584 ;; Don't create 'icon-theme.cache'.
2585 (lambda _
2586 (substitute* "meson.build"
2587 (("gtk_update_icon_cache: true")
2588 "gtk_update_icon_cache: false")
2589 (("update_desktop_database: true")
2590 "update_desktop_database: false")))))))
2591 (inputs
2592 (list gtk libadwaita librsvg))
2593 (native-inputs
2594 (list gettext-minimal
2595 `(,glib "bin") ; for desktop-file-validate and appstream-util
2596 itstool
2597 pkg-config
2598 vala))
2599 (home-page "https://wiki.gnome.org/Apps/Chess")
2600 (synopsis "Chess board for GNOME")
2601 (description "GNOME Chess provides a 2D board for playing chess games
2602against human or computer players. It supports loading and saving games in
2603Portable Game Notation. To play against a computer, install a chess engine
2604such as chess or stockfish.")
2605 (license license:gpl3+)))
2606
2607(define-public gnubg
2608 (package
2609 (name "gnubg")
2610 (version "1.08.003")
2611 (source
2612 (origin
2613 (method url-fetch)
2614 (uri (string-append "mirror://gnu/gnubg/gnubg-release-"
2615 version "-sources.tar.gz"))
2616 (sha256
2617 (base32
2618 "0yar8j6g2f1q9zz9m9ha9xzvjr6mwp2qrzwhp9ppizyg2fdrczbg"))))
2619 (build-system gnu-build-system)
2620 (inputs (list ;; XXX: Build with an older Pango for 'pango_font_get_hb_font' and
2621 ;; 'pango_coverage_get_type'. Try removing this for versions > 1.08.003.
2622 pango-1.42
2623 glib
2624 readline
2625 gtk+-2
2626 mesa
2627 glu
2628 gtkglext
2629 sqlite
2630 libcanberra))
2631 (native-inputs (list flex
2632 python
2633 pkg-config))
2634 (arguments
2635 `(#:configure-flags
2636 ;; SSE instructions are available on Intel systems only.
2637 (list ,@(if (any (cute string-prefix? <> (or (%current-target-system)
2638 (%current-system)))
2639 '("x86_64" "i686"))
2640 '("--enable-simd=sse2") ; prevent avx instructions
2641 '()))
2642 #:phases
2643 (modify-phases %standard-phases
2644 (add-after 'install 'install-desktop-file
2645 (lambda* (#:key outputs #:allow-other-keys)
2646 (let* ((out (assoc-ref outputs "out"))
2647 (apps (string-append out "/share/applications")))
2648 (mkdir-p apps)
2649 (with-output-to-file (string-append apps "/gnubg.desktop")
2650 (lambda _
2651 (format #t
2652 "[Desktop Entry]~@
2653 Name=GNU Backgammon~@
2654 Exec=~a/bin/gnubg -w~@
2655 Icon=gnubg~@
2656 Categories=Game;~@
2657 Terminal=false~@
2658 Type=Application~%"
2659 out))))
2660 #t)))))
2661 (home-page "https://www.gnu.org/software/gnubg/")
2662 (synopsis "Backgammon game")
2663 (description "The GNU backgammon application (also known as \"gnubg\") can
2664be used for playing, analyzing and teaching the game. It has an advanced
2665evaluation engine based on artificial neural networks suitable for both
2666beginners and advanced players. In addition to a command-line interface, it
2667also features an attractive, 3D representation of the playing board.")
2668 (license license:gpl3+)))
2669
2670(define-public gnubik
2671 (package
2672 (name "gnubik")
2673 (version "2.4.3")
2674 (source
2675 (origin
2676 (method url-fetch)
2677 (uri (string-append "mirror://gnu/gnubik/gnubik-"
2678 version ".tar.gz"))
2679 (sha256
2680 (base32
2681 "1vlf924mq8hg93bsjj0rzvs0crc6psmlxyc6zn0fr7msnmpx6gib"))))
2682 (build-system gnu-build-system)
2683 (arguments
2684 '(#:phases (modify-phases %standard-phases
2685 (add-after 'unpack 'skip-gtk-update-icon-cache
2686 (lambda _
2687 ;; Do not attempt to run 'gtk-update-icon-cache', which is
2688 ;; unnecessary and causes a needless dependency on glib.
2689 (substitute* "Makefile.in"
2690 (("gtk-update-icon-cache")
2691 "true"))
2692 #t)))))
2693 (inputs (list gtk+-2
2694 mesa
2695 glu
2696 libx11
2697 guile-2.0
2698 gtkglext))
2699 (native-inputs `(("gettext" ,gettext-minimal)
2700 ("pkg-config" ,pkg-config)))
2701 (home-page "https://www.gnu.org/software/gnubik/")
2702 (synopsis "3d Rubik's cube game")
2703 (description
2704 "GNUbik is a puzzle game in which you must manipulate a cube to make
2705each of its faces have a uniform color. The game is customizable, allowing
2706you to set the size of the cube (the default is 3x3) or to change the colors.
2707You may even apply photos to the faces instead of colors. The game is
2708scriptable with Guile.")
2709 (license license:gpl3+)))
2710
2711(define-public gnushogi
2712 (package
2713 (name "gnushogi")
2714 (version "1.4.2")
2715 (source (origin
2716 (method url-fetch)
2717 (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
2718 ".tar.gz"))
2719 (sha256
2720 (base32
2721 "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
2722 (modules '((guix build utils)))
2723 ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
2724 ;; identifier [-Wpedantic]"
2725 (snippet '(begin
2726 (substitute* "gnushogi/dspwrappers.c"
2727 (("__FUNCTION__")
2728 "__extension__ __FUNCTION__"))))))
2729 (arguments
2730 `(#:configure-flags (list (string-append
2731 "CFLAGS="
2732 (string-join '("-Wno-format"
2733 "-Wno-unused-but-set-variable"
2734 "-Wno-bool-compare")
2735 " ")))
2736 #:make-flags '("LDFLAGS=-z muldefs")
2737 #:phases (modify-phases %standard-phases
2738 ;; Skip --enable-fast-install flag
2739 (replace 'configure
2740 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2741 (let ((out (assoc-ref outputs "out")))
2742 (setenv "CONFIG_SHELL"
2743 (which "sh"))
2744 (setenv "SHELL"
2745 (which "sh"))
2746 (apply invoke "./configure"
2747 (string-append "--prefix=" out) configure-flags)))))
2748 #:test-target "sizetest"))
2749 (build-system gnu-build-system)
2750 (home-page "https://www.gnu.org/software/gnushogi/")
2751 (synopsis "Game of Shogi (Japanese chess)")
2752 (description
2753 "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
2754It is similar to standard chess but this variant is far more complicated.")
2755 (license license:gpl3+)))
2756
2757(define-public ltris
2758 (package
2759 (name "ltris")
2760 (version "1.3")
2761 (source
2762 (origin
2763 (method url-fetch)
2764 (uri (string-append "mirror://sourceforge/lgames/ltris/"
2765 "ltris-" version ".tar.gz"))
2766 (sha256
2767 (base32 "144zvnnky79z5ychyyb2wsp7h2pcbl50fbzd9w9dvxkw6adz4yip"))))
2768 (build-system gnu-build-system)
2769 (arguments
2770 '(#:phases
2771 (modify-phases %standard-phases
2772 (add-after 'set-paths 'set-sdl-paths
2773 (lambda* (#:key inputs #:allow-other-keys)
2774 (setenv "CPATH"
2775 (string-append
2776 (search-input-directory inputs "include/SDL")
2777 ":" (or (getenv "CPATH") ""))))))))
2778 (inputs
2779 (list (sdl-union (list sdl sdl-mixer))))
2780 (home-page "https://lgames.sourceforge.net/LTris/")
2781 (synopsis "Tetris clone based on the SDL library")
2782 (description
2783 "LTris is a tetris clone: differently shaped blocks are falling down the
2784rectangular playing field and can be moved sideways or rotated by 90 degree
2785units with the aim of building lines without gaps which then disappear (causing
2786any block above the deleted line to fall down). LTris has three game modes: In
2787Classic you play until the stack of blocks reaches the top of the playing field
2788and no new blocks can enter. In Figures the playing field is reset to a new
2789figure each level and later on tiles and lines suddenly appear. In Multiplayer
2790up to three players (either human or CPU) compete with each other sending
2791removed lines to all opponents. There is also a Demo mode in which you can
2792watch your CPU playing while enjoying a cup of tea!")
2793 (license license:gpl2+)))
2794
2795(define-public nethack
2796 (package
2797 (name "nethack")
2798 (version "5.0.0")
2799 (source
2800 (origin
2801 (method git-fetch)
2802 (uri (git-reference
2803 (url "https://github.com/NetHack/NetHack/")
2804 (commit (string-append "NetHack-" version "_Released"))))
2805 (file-name (git-file-name name version))
2806 (sha256
2807 (base32 "1zc2gn3kcrsg3xj4rpsh2k1jz4s8pwqr92ajn3bi5404253fqp5m"))))
2808 (build-system gnu-build-system)
2809 (arguments
2810 (list
2811 ;; Building in parallel might lead to a race condition where lua
2812 ;; is copied twice, resulting in this error:
2813 ;; cp: cannot create regular file
2814 ;; 'lib/lua/liblua-5.4.8.a': Permission denied
2815 #:parallel-build? #f
2816 ;; There are tests, but they won't run.
2817 ;; The tests in sys/libnh/test seem to be MacOS specific.
2818 ;; The tests in the top level test directory require human interaction.
2819 #:tests? #f
2820 #:make-flags
2821 #~(list
2822 (string-append "PREFIX=" #$output)
2823 ;; Without this, build system assumes ncurses and tinfo are combined.
2824 "LIBS=-ltinfo"
2825 (string-append "CC=" #$(cc-for-target))
2826 (string-append "GREPPATH="
2827 (search-input-file %build-inputs "/bin/grep"))
2828 "WANT_WIN_CURSES=1"
2829 "WANT_WIN_TTY=1")
2830 #:phases
2831 #~(modify-phases %standard-phases
2832 (add-before 'configure 'do-not-change-to-hackdir
2833 ;; The Nethack binary must be run in the HACKDIR (playground).
2834 ;; The HACKDIR consists files which are installed in the 'install'
2835 ;; phase and is also assumed to be writable.
2836 ;; The usual way to start nethack is via this provided wrapper
2837 ;; script which handles setting HACKDIR to the location of the
2838 ;; installed files and changing to its directory before running the
2839 ;; executable. We will create another wrapper to solve the problem
2840 ;; of a writable HACKDIR later; for now, assume that we are already
2841 ;; in HACKDIR when executing this wrapper by removing the line to
2842 ;; change to it.
2843 ;; Removing CHDIR also making the default behavior of Nethack to
2844 ;; treat the current dir as HACKDIR rather than change to some
2845 ;; compiled-in directory.
2846 (lambda _
2847 (substitute* "sys/unix/nethack.sh"
2848 (("cd \\$HACKDIR") ""))
2849 (substitute* "include/config.h"
2850 (("^.*define CHDIR.*$") ""))))
2851 (add-before 'configure 'patch-paths
2852 (lambda* (#:key inputs #:allow-other-keys)
2853 (substitute* "sys/unix/Makefile.top"
2854 (("LUAHEADERS *=[^\n]+")
2855 (string-append
2856 "LUAHEADERS ="
2857 (dirname (search-input-file inputs "/include/lua.h"))))
2858 (("LUATOP *=[^\n]+")
2859 (string-append
2860 "LUATOP = "
2861 (dirname (search-input-file inputs "/lib/liblua.so"))))
2862 ;; Replace the ../ in this line:
2863 ;; @echo '#include "../$(LUAHEADERS)/lua.h"' >> $@
2864 (("include \"../") "include \""))
2865 (substitute* "sys/unix/setup.sh"
2866 (("^/bin/sh") (search-input-file inputs "/bin/bash")))
2867 (substitute* "sys/unix/sysconf"
2868 (("^.*GREPPATH[^\n]+")
2869 (string-append "GREPPATH="
2870 (search-input-file inputs "/bin/grep"))))
2871 (substitute* "sys/unix/hints/linux.500"
2872 (("/bin/gzip") (search-input-file inputs "bin/gzip")))))
2873 (add-before 'configure 'make-reproducible
2874 (lambda _
2875 (substitute* "include/config.h"
2876 (("^/\\* *#*define *REPRODUCIBLE_BUILD *\\*/")
2877 ;; Honor SOURCE_DATE_EPOCH.
2878 "#define REPRODUCIBLE_BUILD"))
2879 ;; Note: 'makedefs' rejects and ignores dates that are too old
2880 ;; or too new, so we must choose something reasonable here.
2881 (setenv "SOURCE_DATE_EPOCH" "1531865062")))
2882 (replace 'configure
2883 (lambda _
2884 (with-directory-excursion "sys/unix"
2885 (invoke "./setup.sh" "hints/linux.500"))))
2886 (add-after 'install 'make-writable-hackdir
2887 (lambda* (#:key inputs #:allow-other-keys)
2888 (let* ((nethack-script (string-append #$output "/bin/nethack")))
2889 (mkdir-p (string-append #$output "/games/lib/nethackuserdir"))
2890 (for-each
2891 (lambda (file)
2892 (rename-file
2893 (string-append #$output "/games/lib/nethackdir/" file)
2894 (string-append #$output "/games/lib/nethackuserdir/" file)))
2895 ;; These HACKDIR files include the user's save games and are
2896 ;; assumed to be writable. Set them aside, as described in
2897 ;; https://nethackwiki.com/wiki/Playground.
2898 '("xlogfile" "logfile" "perm" "record" "save"))
2899 (mkdir-p (string-append #$output "/bin"))
2900 (call-with-output-file nethack-script
2901 ;; Our custom wrapper script, which runs before the provided
2902 ;; wrapper (see phase 'do-not-change-to-hackdir').
2903 ;; Ensure all writable runtime files are in the user's home,
2904 ;; then symlink everything into a temporary HACKDIR and change
2905 ;; to it.
2906 (lambda (port)
2907 (format port "#!~a/bin/sh
2908if [ ! -d ~~/.config/nethack ]; then
2909 mkdir -p ~~/.config/nethack
2910 cp -r ~a/games/lib/nethackuserdir/* ~~/.config/nethack
2911 chmod -R +w ~~/.config/nethack
2912fi
2913
2914RUNDIR=$(mktemp -d)
2915
2916cleanup() {
2917 rm -rf $RUNDIR
2918}
2919trap cleanup EXIT
2920
2921cd $RUNDIR
2922for i in ~~/.config/nethack/*; do
2923 ln -s $i $(basename $i)
2924done
2925for i in ~a/games/lib/nethackdir/*; do
2926 ln -s $i $(basename $i)
2927done
2928~a/games/nethack \"$@\""
2929 (search-input-file inputs "/bin/bash")
2930 #$output
2931 #$output
2932 #$output)))
2933 (chmod nethack-script #o555)))))))
2934 (native-inputs
2935 (list groff-minimal
2936 pkg-config))
2937 (inputs
2938 (list grep
2939 gzip
2940 less
2941 lua-5.4
2942 ncurses/tinfo
2943 perl))
2944 (home-page "https://nethack.org")
2945 (synopsis "Classic dungeon crawl game")
2946 (description "NetHack is a single player dungeon exploration game that runs
2947on a wide variety of computer systems, with a variety of graphical and text
2948interfaces all using the same game engine. Unlike many other Dungeons &
2949Dragons-inspired games, the emphasis in NetHack is on discovering the detail of
2950the dungeon and not simply killing everything in sight - in fact, killing
2951everything in sight is a good way to die quickly. Each game presents a
2952different landscape - the random number generator provides an essentially
2953unlimited number of variations of the dungeon and its denizens to be discovered
2954by the player in one of a number of characters: you can pick your race, your
2955role, and your gender.")
2956 (license
2957 (license:fsdg-compatible
2958 "https://nethack.org/common/license.html"))))
2959
2960(define-public nethack-qt
2961 (package
2962 (inherit nethack)
2963 (name "nethack-qt")
2964 (arguments
2965 (substitute-keyword-arguments arguments
2966 ((#:imported-modules imported-modules %default-gnu-imported-modules)
2967 `(,@%qt-build-system-modules ,@imported-modules))
2968 ((#:modules modules '((guix build utils)
2969 (guix build gnu-build-system)))
2970 `(((guix build qt-build-system) #:prefix qt:)
2971 ,@modules))
2972 ((#:make-flags flags)
2973 #~(cons* "WANT_WIN_QT6=1"
2974 "WANT_DEFAULT=Qt"
2975 #$flags))
2976 ((#:phases phases)
2977 #~(modify-phases #$phases
2978 (add-after 'unpack 'fix-qt-dir-nonsense
2979 (lambda _
2980 (substitute* '("sys/unix/hints/linux.500")
2981 (("(QTDIR=)[^\n]+" _ f)
2982 (string-append f #$(this-package-input "qtbase"))))))
2983 (add-after 'make-writable-hackdir 'rename-binary
2984 (lambda _
2985 (with-directory-excursion #$output
2986 ;; Allows parallel installation with nethack.
2987 (rename-file "bin/nethack"
2988 "bin/nethack-qt"))))
2989 (add-after 'rename-binary 'qt-wrap
2990 (lambda args
2991 (apply (assoc-ref qt:%standard-phases 'qt-wrap)
2992 #:qtbase #$(this-package-input "qtbase")
2993 args)))))))
2994 (inputs
2995 (modify-inputs inputs
2996 (prepend qtbase qtmultimedia)))
2997 (synopsis "Classic dungeon crawl game (Qt interface)")))
2998
2999(define-public netpanzer
3000 (package
3001 (name "netpanzer")
3002 (version "0.9.0-RC-7") ;0.8.7 was released 8 years ago
3003 (source
3004 (origin
3005 (method git-fetch)
3006 (uri (git-reference
3007 (url "https://github.com/netpanzer/netpanzer")
3008 (commit version)))
3009 (file-name (git-file-name name version))
3010 (sha256
3011 (base32 "1bc29cxjragbhgsg89sliyiqw289nd37wb1f9qarknir73ijnfac"))))
3012 (build-system meson-build-system)
3013 (arguments
3014 (list #:tests? #f)) ;2/2 (trivial) tests fail, need filesystem access
3015 (native-inputs (list pkg-config))
3016 (inputs (list freetype
3017 lua
3018 physfs
3019 sdl2
3020 sdl2-mixer
3021 sdl2-ttf))
3022 (home-page "https://github.com/netpanzer/netpanzer")
3023 (synopsis "Online tactical warfare game")
3024 (description
3025 "NetPanzer is an online multiplayer tactical warfare game. It is based
3026on quick tactical action and unit management in real-time. Battles progress
3027constantly as destroyed players respawn with a set of new units. Players can
3028join or leave multiplayer games at any time.")
3029 (license license:gpl2+)))
3030
3031(define-public pipewalker
3032 (package
3033 (name "pipewalker")
3034 (version "0.9.4")
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (string-append "mirror://sourceforge/pipewalker/pipewalker/"
3039 version "/pipewalker-" version ".tar.gz"))
3040 (sha256
3041 (base32 "1x46wgk0s55562pd96cxagxkn6wpgglq779f9b64ff1k3xzp3myn"))))
3042 (build-system gnu-build-system)
3043 (arguments
3044 `(#:configure-flags
3045 (list (string-append "--docdir=" (assoc-ref %outputs "out")
3046 "/share/doc/" ,name "-" ,version))
3047 #:phases
3048 (modify-phases %standard-phases
3049 (add-after 'configure 'patch-docdir
3050 ;; Makefile.in ignores configure's ‘--docdir=...’ option. Fix that.
3051 (lambda _
3052 (substitute* "Makefile"
3053 (("(pkgdocdatadir = ).*" _ assignment)
3054 (string-append assignment "$(docdir)\n")))
3055 #t)))))
3056 (inputs
3057 (list libpng mesa sdl))
3058 (home-page "https://pipewalker.sourceforge.net/")
3059 (synopsis "Logical tile puzzle")
3060 (description
3061 "PipeWalker is a simple puzzle game with many different themes: connect all
3062computers to one network server, bring water from a source to the taps, etc.
3063The underlying mechanism is always the same: you must turn each tile in the
3064grid in the right direction to combine all components into a single circuit.
3065Every puzzle has a complete solution, although there may be more than one.")
3066 (license license:gpl3+)))
3067
3068(define-public dsda-doom
3069 (package
3070 (name "dsda-doom")
3071 (version "0.29.3")
3072 (source
3073 (origin
3074 (method git-fetch)
3075 (uri (git-reference
3076 (url "https://github.com/kraflab/dsda-doom")
3077 (commit (string-append "v" version))))
3078 (file-name (git-file-name name version))
3079 (sha256
3080 (base32 "1nhlwxwhs69ibsi873cdjanfdlpqcb4ybcp8c2j8j9l07xpgvk1n"))))
3081 (build-system cmake-build-system)
3082 (arguments
3083 (list
3084 #:tests? #f ;no tests
3085 #:phases #~(modify-phases %standard-phases
3086 (add-after 'unpack 'chdir
3087 (lambda _
3088 (chdir "prboom2"))))))
3089 (inputs
3090 (list sdl2
3091 sdl2-mixer
3092 fluidsynth
3093 portmidi
3094 libmad
3095 libzip
3096 glu
3097 dumb
3098 libvorbis))
3099 (home-page "https://github.com/kraflab/dsda-doom")
3100 (synopsis "Doom source port, successor of PrBoom+")
3101 (description
3102 "DSDA-Doom is a Doom source port and successor of PrBoom+, with extra
3103features for demo recording/playback and quality of life. In particular, its
3104features include support for the Heretic, Hexen, MBF21, Doom-in-Hexen and UDMF
3105map formats, MAPINFO support, full controller support, debug and scripting
3106features, rewinding, and a strict mode for speedrunning.")
3107 (license license:gpl2+)))
3108
3109(define-public redeal
3110 (let ((commit "e2e81a477fd31ae548a340b5f0f380594d3d0ad6")
3111 (revision "1"))
3112 (package
3113 (name "redeal")
3114 (version (git-version "0.2.0" revision commit))
3115 (source
3116 (origin
3117 (method git-fetch)
3118 (uri (git-reference
3119 (url "https://github.com/anntzer/redeal")
3120 (commit commit)))
3121 (file-name (git-file-name name version))
3122 (sha256
3123 (base32
3124 "1vac36bg4ah9gs4hgmp745xq6nnmd7s71vsq99d72ng3sxap0wa3"))))
3125 (build-system pyproject-build-system)
3126 (arguments
3127 (list
3128 #:tests? #f
3129 #:phases
3130 #~(modify-phases %standard-phases
3131 (add-after 'unpack 'unbundle-dds
3132 (lambda* (#:key inputs #:allow-other-keys)
3133 (substitute* "setup.py"
3134 (("cmdclass=.*") ""))
3135 (let ((libdds (search-input-file inputs "lib/libdds.so")))
3136 (substitute* "redeal/dds.py"
3137 ((" and os.path.exists\\(dll_path\\)") "")
3138 (("dll = DLL\\(dll_path\\)")
3139 (format #f "dll = DLL(~s)" libdds))))))
3140 (add-after 'install 'install-examples
3141 (lambda _
3142 (let* ((doc (string-append #$output "/share/doc/"))
3143 (examples
3144 (string-append doc #$name "-" #$version "/examples")))
3145 (mkdir-p examples)
3146 (copy-recursively "examples" examples)))))))
3147 (inputs (list dds `(,python "tk")))
3148 (propagated-inputs (list python-colorama))
3149 (native-inputs (list python-setuptools python-wheel))
3150 (home-page "https://github.com/anntzer/redeal")
3151 (synopsis
3152 "Deal generator for bridge card game, written in Python")
3153 (description
3154 "Redeal is a deal generator written in Python. It outputs deals
3155satisfying whatever conditions you specify --- deals with a double void, deals
3156with a strong 2♣ opener opposite a yarborough, etc. Using Bo Haglund's double
3157dummy solver, it can even solve the hands it has generated for you.")
3158 (license license:gpl3))))
3159
3160(define-public retux
3161 (let ((release "1.6.2")
3162 (revision 0))
3163 (package
3164 (name "retux")
3165 (version (if (zero? revision)
3166 release
3167 (string-append release "-"
3168 (number->string revision))))
3169 (source
3170 (origin
3171 (method url-fetch)
3172 (uri (string-append "https://github.com/retux-game/retux/"
3173 "releases/download/v" version
3174 "/retux-" release "-src.zip"))
3175 (sha256
3176 (base32 "1fzsjg4k25mxjjc28ykz8n3dx5xzwxnp772fwzz5jy1wrxmjkl4x"))))
3177 (build-system pyproject-build-system)
3178 (arguments
3179 (list
3180 #:tests? #f ;no check target
3181 #:phases
3182 #~(modify-phases %standard-phases
3183 ;; no setup.py script
3184 (delete 'build)
3185 (replace 'install
3186 (lambda _
3187 (let* ((bin (string-append #$output "/bin"))
3188 (data (string-append #$output "/share/retux")))
3189 (mkdir-p bin)
3190
3191 (substitute* "retux.py"
3192 ;; Use the correct data directory.
3193 (("os\\.path\\.join\\(os\\.path\\.dirname\\(__file__\\), \"data\"\\),")
3194 (string-append "\"" data "\",")))
3195
3196 (copy-file "retux.py" (string-append bin "/retux"))
3197 (copy-recursively "data" data)))))))
3198 (native-inputs (list unzip python-setuptools))
3199 (inputs (list python-sge python-xsge))
3200 (home-page "https://retux-game.github.io/")
3201 (synopsis "Action platformer game")
3202 (description
3203 "ReTux is an action platformer loosely inspired by the Mario games,
3204utilizing the art assets from the @code{SuperTux} project.")
3205 ;; GPL version 3 or later is the license for the code and some art.
3206 ;; The rest of the licenses are for the art exclusively, as listed in
3207 ;; data/LICENSES.
3208 (license (list license:cc0
3209 license:cc-by3.0
3210 license:cc-by-sa3.0
3211 license:cc-by-sa4.0
3212 license:gpl2+
3213 license:gpl3+)))))
3214
3215(define-public robotfindskitten
3216 (package
3217 (name "robotfindskitten")
3218 (version "2.8284271.702") ; 1600003_201b is older, see ChangeLog
3219 (source (origin
3220 (method url-fetch)
3221 (uri (string-append "https://github.com/" name "/" name
3222 "/releases/download/" version "/"
3223 name "-" version ".tar.gz"))
3224 (sha256
3225 (base32
3226 "1bwrkxm83r9ajpkd6x03nqvmdfpf5vz6yfy0c97pq3v3ykj74082"))))
3227 (build-system gnu-build-system)
3228 (arguments
3229 (list
3230 #:tests? #f ; there are no tests
3231 #:make-flags
3232 #~(list
3233 ;; Required for colorized output, see <http://bugs.gnu.org/54607>.
3234 "CFLAGS=-D_XOPEN_SOURCE=600"
3235 (string-append "execgamesdir=" #$output "/bin"))))
3236 (inputs (list ncurses))
3237 (outputs (list "out" "debug"))
3238 (synopsis "Thematic meditative game")
3239 (description
3240 "You are a robot moving around in a realm filled with ASCII characters.
3241Examine humorously described though useless items as you search for a kitten
3242among them. The theme of this Zen simulation is continued in its
3243documentation.")
3244 (home-page "http://robotfindskitten.org/")
3245 (license license:gpl2+)))
3246
3247(define-public roguebox-adventures
3248 (package
3249 (name "roguebox-adventures")
3250 (version "3.0.1")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (string-append
3255 "http://download.tuxfamily.org/rba/RogueBoxAdventures_v"
3256 (string-join (string-split version #\.) "_") "_Source.zip"))
3257 (file-name (string-append name "-" version ".zip"))
3258 (sha256
3259 (base32 "05zd03s5w9kcpklfgcggbaa6rwf59nm0q9vcj6gh9v2lh402k067"))))
3260 (build-system copy-build-system)
3261 (arguments
3262 (list
3263 #:install-plan
3264 #~(let ((share "share/games/roguebox-adventures/"))
3265 `(("AUDIO" ,share)
3266 ("FONT" ,share)
3267 ("GRAPHIC" ,share)
3268 ("LIB" ,share)
3269 ("LICENSE" ,share)
3270 ("." ,share #:include ("icon_big.png" "icon_small.png"))
3271 ("DOC" "share/doc/roguebox-adventures")))
3272 #:phases
3273 #~(modify-phases %standard-phases
3274 (replace 'unpack
3275 (lambda* (#:key source #:allow-other-keys)
3276 (and (invoke "unzip" source)
3277 ;; The actual source is buried a few directories deep.
3278 (chdir (string-append "RogueBoxAdventures_v"
3279 (string-join
3280 (string-split #$version #\.) "_")
3281 "_Source")))))
3282 (add-after 'unpack 'patch
3283 (lambda _
3284 (let ((data (string-append #$output
3285 "/share/games/roguebox-adventures")))
3286 ;; Use the correct data directory.
3287 (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py")
3288 (("basic_path + os\\.sep + 'DATA'")
3289 (string-append "'" data "'"))
3290 (("^basic_path.*$")
3291 (string-append "basic_path ='" data "'\n")))
3292 (substitute* "LIB/dialog.py"
3293 (("d_path = os\\.path\\.dirname\\(.*\\)\\)")
3294 (string-append "d_path = '" data "'")))
3295 (substitute* "LIB/gra_files.py"
3296 (("basic_path = b_path\\.replace\\('/LIB',''\\)")
3297 (string-append "basic_path ='" data "'\n")))
3298
3299 ;; The game must save in the user's home directory because
3300 ;; the store is read-only.
3301 (substitute* "main.py"
3302 (("home_save = False")
3303 "home_save = True")
3304 (("'icon_small.png'")
3305 (string-append "'" data "/icon_small.png'")))
3306 ;; Use the right python.
3307 (substitute* '("LIB/text.py" "main.py")
3308 (("#! /usr/bin/python")
3309 (format #f "#!~a" (which "python3")))))))
3310 (add-after 'install 'wrap
3311 (lambda _
3312 (let* ((bin (string-append #$output "/bin/roguebox-adventures"))
3313 (share (string-append #$output
3314 "/share/games/roguebox-adventures"))
3315 (lib (string-append share "/LIB")))
3316 (for-each
3317 (lambda (file)
3318 (chmod file #o555)
3319 (install-file file lib))
3320 (list "main.py" "run.py"))
3321
3322 (mkdir-p (dirname bin))
3323 (call-with-output-file bin
3324 (lambda (p)
3325 (format p "#!~a
3326export GUIX_PYTHONPATH=~a/LIB:~a
3327exec -a ~s ~s \"$@\"
3328"
3329 (which "bash")
3330 share
3331 (getenv "GUIX_PYTHONPATH")
3332 (which "python3")
3333 (string-append lib "/main.py"))))
3334 (chmod bin #o555)))))))
3335 (native-inputs (list unzip python-setuptools))
3336 (inputs (list python python-pygame))
3337 (home-page "https://rogueboxadventures.tuxfamily.org")
3338 (synopsis "Classical roguelike/sandbox game")
3339 (description
3340 "RogueBox Adventures is a graphical roguelike with strong influences
3341from sandbox games like Minecraft or Terraria. The main idea of RogueBox
3342Adventures is to offer the player a kind of roguelike toy-world. This world
3343can be explored and changed freely.")
3344 ;; The GPL3+ is for code, the rest are for art.
3345 (license (list license:cc0
3346 license:cc-by3.0
3347 license:gpl3+
3348 license:silofl1.1))))
3349
3350(define-public seahorse-adventures
3351 (package
3352 (name "seahorse-adventures")
3353 (version "1.4")
3354 (source
3355 (origin
3356 (method git-fetch)
3357 (uri (git-reference
3358 (url "https://github.com/dulsi/seahorse-adventures")
3359 (commit (string-append "Release-" version))))
3360 (file-name (git-file-name name version))
3361 (sha256
3362 (base32 "1dxysa79cz5mflr2953fyk838h1jwvi1ngn8wlpms0ag35yv21s8"))
3363 (modules '((guix build utils)
3364 (ice-9 ftw)
3365 (srfi srfi-1)))
3366 ;; Remove non-free (non-commercial) font.
3367 (snippet
3368 #~(begin
3369 (for-each delete-file (find-files "data/fonts" "."))))))
3370 (build-system pyproject-build-system)
3371 (arguments
3372 (list
3373 #:tests? #f ;no test
3374 #:phases
3375 #~(modify-phases %standard-phases
3376 (delete 'build) ;pure Python
3377 (replace 'install ;no install script
3378 (lambda* (#:key inputs #:allow-other-keys)
3379 (let* ((bin (string-append #$output "/bin"))
3380 (share (string-append #$output "/share"))
3381 (applications (string-append share "/applications"))
3382 (data (string-append share "/seahorse-adventures")))
3383 ;; Install data.
3384 (for-each (lambda (f)
3385 (chmod f #o555)
3386 (install-file f data))
3387 '("leveledit.py" "run_game.py" "tileedit.py"))
3388 (for-each (lambda (dir)
3389 (let ((target (string-append data "/" dir)))
3390 (mkdir-p target)
3391 (copy-recursively dir target)))
3392 '("data" "lib"))
3393 ;; Create executable.
3394 (mkdir-p bin)
3395 (let ((executable (string-append bin "/seahorse-adventures")))
3396 (call-with-output-file executable
3397 (lambda (p)
3398 (format p
3399 "#!~a~@
3400 export GUIX_PYTHONPATH=~a:~a~@
3401 exec -a \"~a\" ~a \"$@\"~%"
3402 (search-input-file inputs "/bin/bash")
3403 data
3404 (getenv "GUIX_PYTHONPATH")
3405 (search-input-file inputs "/bin/python3")
3406 (string-append data "/run_game.py"))))
3407 (chmod executable #o555))
3408 ;; Add desktop file.
3409 (mkdir-p applications)
3410 (make-desktop-entry-file
3411 (string-append applications "/seahorse-adventures.desktop")
3412 #:name "Seahorse Adventures"
3413 #:comment
3414 '((#f "Help Barbie the seahorse float on bubbles to the moon"))
3415 #:exec #$name
3416 #:icon #$name
3417 #:categories '("Game" "ActionGame")
3418 #:keywords '("game" "retro" "platform"))
3419 ;; Add icons.
3420 (for-each
3421 (lambda (size)
3422 (let ((dir (string-append share "/icons/hicolor/"
3423 size "x" size "/apps")))
3424 (mkdir-p dir)
3425 (copy-file
3426 (string-append "icon" size ".png")
3427 (string-append dir "/searhorse-adventures.png"))))
3428 '("32" "64" "128")))))
3429 (add-after 'install 'unbundle-fonts
3430 ;; Unbundle Bitstream Vera font and replace deleted one.
3431 (lambda* (#:key inputs #:allow-other-keys)
3432 (let ((data (string-append #$output "/share/seahorse-adventures"))
3433 (vera (search-input-file
3434 inputs "/share/fonts/truetype/Vera.ttf")))
3435 (let ((themes-dir (string-append data "/data/themes/")))
3436 (for-each
3437 (lambda (theme)
3438 (let ((target (string-append themes-dir theme "/Vera.ttf")))
3439 (delete-file target)
3440 (symlink vera target)))
3441 '("default" "gray")))
3442 (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
3443 (substitute* (string-append data "/lib/main.py")
3444 (("f_scale = 0.35") "f_scale = 0.47"))))))))
3445 (native-inputs (list python-setuptools))
3446 (inputs
3447 (list font-bitstream-vera python-pygame))
3448 (home-page "http://www.imitationpickles.org/barbie/")
3449 (synopsis "Help Barbie the seahorse float on bubbles to the moon")
3450 (description
3451 "Barbie Seahorse Adventures is a retro style platform arcade game.
3452You are Barbie the seahorse who travels through the jungle, up to the
3453volcano until you float on bubbles to the moon. On the way to your
3454final destination you will encounter various enemies, servants of the
3455evil overlord who has stolen the galaxy crystal. Avoid getting hit
3456and defeat them with your bubbles!")
3457 ;; GPL2+ is for code, CC0 is for art.
3458 (license (list license:gpl2+ license:cc0))))
3459
3460(define-public serious-sam-classic
3461 (package
3462 (name "serious-sam-classic")
3463 (version "1.10.7")
3464 (source
3465 (origin
3466 (method git-fetch)
3467 (uri (git-reference
3468 (url "https://github.com/tx00100xt/SeriousSamClassic")
3469 (commit version)))
3470 (sha256
3471 (base32 "1s1mbj2qpaxdrx0pfhdyk3v1vh7f2dp33w2i5ifpgphkchdx61jg"))
3472 (file-name (git-file-name name version))
3473 (modules '((guix build utils)))
3474 (patches (search-patches "serious-sam-classic-engine-patch-paths.patch"))))
3475 (build-system cmake-build-system)
3476 (arguments
3477 (list
3478 #:tests? #f ; no upstream tests
3479 #:configure-flags
3480 #~(list (string-append "-DCMAKE_INSTALL_PREFIX:PATH="
3481 #$output))
3482 #:phases
3483 #~(modify-phases %standard-phases
3484 (add-after 'unpack 'fix-cmake
3485 (lambda _
3486 (substitute* (list "CMakeLists.txt"
3487 "SamTFE/Sources/CMakeLists.txt"
3488 "SamTSE/Sources/CMakeLists.txt")
3489 (("\"Install to systems directories\" Off")
3490 "\"Install to systems directories\" On")
3491 (("march=native") "mtune=generic")
3492 (("CMAKE_SKIP_RPATH ON") "CMAKE_SKIP_RPATH OFF")
3493 (("/usr") #$output)
3494 (("lib64") "lib"))))
3495 (add-after 'fix-cmake 'fix-paths
3496 (lambda _
3497 (substitute* (list "SamTFE/Sources/Engine/Engine.cpp"
3498 "SamTSE/Sources/Engine/Engine.cpp")
3499 (("@OUTPUT_DIR@") #$output)))))))
3500 (inputs (list sdl2 libvorbis))
3501 (native-inputs (cons* flex bison imagemagick
3502 (maybe-nasm)))
3503 (home-page "https://github.com/tx00100xt/SeriousSamClassic")
3504 (synopsis "SeriousSam engine and Serious Sam: TFE and TSE")
3505 (description
3506 "This is an open-source port of the Serious Engine from
3507Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3508To run, you must put your official game data, @code{Levels} and @code{Help} in
3509@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")
3510 (license license:gpl2)))
3511
3512(define-public serious-sam-classic-vk
3513 (package
3514 (inherit serious-sam-classic)
3515 (name "serious-sam-classic-vk")
3516 (version "1.10.7")
3517 (source
3518 (origin
3519 (method git-fetch)
3520 (uri (git-reference
3521 (url "https://github.com/tx00100xt/SeriousSamClassic-VK")
3522 (commit version)))
3523 (sha256
3524 (base32 "1av3ll3pfdsadm10dz3srxfw9ld1xbg8i5xrgv7qynqsd0x8jxby"))
3525 (file-name (git-file-name name version))
3526 (modules '((guix build utils)))
3527 (patches (search-patches
3528 "serious-sam-classic-engine-patch-paths.patch"))))
3529 (inputs (modify-inputs inputs
3530 (prepend vulkan-loader vulkan-headers)))
3531 (synopsis
3532 "SeriousSam engine and Serious Sam: TFE and TSE with Vulkan renderer")
3533 (description
3534 "This is an open-source port of the Serious Engine from
3535Serious Sam: The First Encounter and Serious Sam: The Second Encounter.
3536This variant includes a Vulkan renderer.
3537To run, you must put your official game data, @code{Levels} and @code{Help} in
3538@code{~/.local/share/Serious-Engine/{serioussam,serioussamse}/gamedata/}.}")))
3539
3540(define-public shamogu
3541 (package
3542 (name "shamogu")
3543 (version "1.4.1")
3544 (source
3545 (origin
3546 (method git-fetch)
3547 (uri (git-reference
3548 (url "https://codeberg.org/anaseto/shamogu")
3549 (commit (string-append "v" version))))
3550 (file-name (git-file-name name version))
3551 (sha256
3552 (base32 "1xl396gfca9y0q7qrr3ifcy4sahq1h6q013asnr3qkrj22jmrbyd"))))
3553 (build-system go-build-system)
3554 (arguments
3555 (list
3556 #:install-source? #f
3557 #:import-path "codeberg.org/anaseto/shamogu"))
3558 (native-inputs (list go-codeberg-org-anaseto-gruid
3559 go-codeberg-org-anaseto-gruid-js
3560 go-codeberg-org-anaseto-gruid-sdl
3561 go-codeberg-org-anaseto-gruid-tcell
3562 go-github-com-gdamore-tcell-v2))
3563 (home-page "https://anaseto.codeberg.page/games/shamogu/")
3564 (synopsis "Roguelike game by Anaseto")
3565 (description
3566 "Shamogu is a coffee-break roguelike game with a focus on tactical
3567movement and careful timing of totemic spirit invocation and comestible
3568consumption. Visibility and noise stealth mechanics also play an important
3569role.
3570
3571@quotation
3572All life in your mountain is being corrupted. Beasts are losing their minds
3573and becoming aggressive. These disturbing events started to happen after a
3574dungeon portal suddenly appeared at the top of the mountain. As the guardian,
3575you decide to explore that dungeon in order to find and destroy the source of
3576corruption… You hope luck will be on your side!
3577@end quotation")
3578 (license license:isc)))
3579
3580(define-public shamogu-sdl
3581 (package/inherit shamogu
3582 (name "shamogu-sdl")
3583 (arguments
3584 (substitute-keyword-arguments arguments
3585 ((#:tests? _ #t) #f)
3586 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
3587 ((#:phases _ #~%standard-phases)
3588 #~(modify-phases %standard-phases
3589 (add-after 'install 'fix-name-collision
3590 (lambda _
3591 (rename-file (string-append #$output "/bin/shamogu")
3592 (string-append #$output "/bin/shamogu-sdl"))))))))
3593 (native-inputs
3594 (modify-inputs native-inputs
3595 (prepend pkg-config)))))
3596
3597(define-public solarus
3598 (package
3599 (name "solarus")
3600 (version "2.0.3")
3601 (source
3602 (origin
3603 (method git-fetch)
3604 (uri (git-reference
3605 (url "https://gitlab.com/solarus-games/solarus")
3606 (commit (string-append "v" version))))
3607 (file-name (git-file-name name version))
3608 (sha256
3609 (base32 "05a7mlb6xl7d93d34d3bdphb9xgbyp7h1358z6hdsrax8kh9zwl1"))))
3610 (build-system cmake-build-system)
3611 (arguments
3612 (list
3613 #:phases
3614 #~(modify-phases %standard-phases
3615 (add-after 'unpack 'disable-failing-tests
3616 ;; The following tests fail reporting a missing "/dev/dri"
3617 ;; file.
3618 (lambda _
3619 (substitute* "tests/cmake/AddTestMaps.cmake"
3620 ((".*1200_create_shader_from_source.*" all)
3621 (string-append "#" all))
3622 ((".*1210_shader_scaling_factor.*" all)
3623 (string-append "#" all)))))
3624 (add-before 'check 'set-home
3625 ;; Tests fail without setting the following environment
3626 ;; variables.
3627 (lambda _
3628 (setenv "HOME" (getcwd))
3629 (setenv "XDG_RUNTIME_DIR" (getcwd)))))))
3630 (native-inputs (list pkg-config))
3631 (inputs (list glm
3632 libmodplug
3633 libogg
3634 libvorbis
3635 luajit
3636 mesa
3637 openal
3638 physfs
3639 sdl2
3640 sdl2-image
3641 sdl2-ttf))
3642 (home-page "https://www.solarus-games.org/")
3643 (synopsis "Lightweight game engine for Action-RPGs")
3644 (description
3645 "Solarus is a 2D game engine written in C++, that can run games
3646scripted in Lua. It has been designed with 16-bit classic Action-RPGs
3647in mind.")
3648 ;; The source code is licensed under the terms of GPL-3.0.
3649 ;; Resources are licensed under the terms of CC-BY-SA-3.0 and
3650 ;; CC-BY-SA 4.0.
3651 (license (list license:gpl3 license:cc-by-sa3.0 license:cc-by-sa4.0))))
3652
3653(define-public solarus-quest-editor
3654 (package
3655 (inherit solarus)
3656 (name "solarus-quest-editor")
3657 (source
3658 (origin
3659 (inherit (package-source solarus))
3660 (patches (search-patches
3661 "solarus-quest-editor-qlementine-reference.patch"))))
3662 (build-system qt-build-system)
3663 (arguments
3664 (list
3665 #:tests? #f ;no test suite
3666 #:qtbase qtbase
3667 #:phases
3668 #~(modify-phases %standard-phases
3669 (add-before 'configure 'chdir
3670 (lambda _
3671 (chdir "editor"))))))
3672 (native-inputs (modify-inputs native-inputs
3673 (prepend qttools qlementine)))
3674 (inputs (modify-inputs inputs
3675 (prepend solarus)
3676 (append qtbase qtsvg qtwayland)))
3677 (synopsis "Create and modify quests for the Solarus engine")
3678 (description
3679 "Solarus Quest Editor is a graphical user interface to create and modify
3680quests for the Solarus engine.")))
3681
3682(define-public solarus-launcher
3683 (package
3684 (inherit solarus)
3685 (name "solarus-launcher")
3686 (source
3687 (origin
3688 (inherit (package-source solarus))
3689 (patches (search-patches
3690 "solarus-launcher-qlementine-and-qtappinstancemanager-reference.patch"))))
3691 (build-system qt-build-system)
3692 (arguments
3693 (list
3694 #:tests? #f ;no tests
3695 #:qtbase qtbase
3696 #:phases
3697 #~(modify-phases %standard-phases
3698 (add-before 'configure 'chdir
3699 (lambda _
3700 (chdir "launcher"))))))
3701 (native-inputs (modify-inputs (package-inputs solarus)
3702 (prepend qlementine qlementine-icons qtappinstancemanager
3703 qttools)))
3704 (inputs (modify-inputs inputs
3705 (prepend solarus)
3706 (append qtbase qtsvg qtwayland)))
3707 (synopsis "Game launcher and browser for Solarus")
3708 (description
3709 "Solarus Launcher is a game launcher and browser for Solarus. It is
3710written in C++ with QtWidgets.")))
3711
3712(define-public superfluous-returnz-data
3713 (package
3714 (name "superfluous-returnz-data")
3715 (version "13")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (string-append "https://download.ptilouk.net/superfluous-returnz-d"
3720 version "-data-only"
3721 ".zip"))
3722 (sha256
3723 (base32
3724 "005p1kdm8g5vzf1isvxwiarpw0vciplxdcv9wl4bb47b1gxsh13k"))))
3725 (build-system copy-build-system)
3726 (native-inputs
3727 (list unzip))
3728 (arguments
3729 (list #:install-plan
3730 #~'(("." "."))))
3731 (synopsis "Superfluous Returnz game data")
3732 (description
3733 "This package provides the game data, images, and music of the game
3734Superfluous Returnz.")
3735 (home-page "https://studios.ptilouk.net/superfluous-returnz/")
3736 (license license:cc-by-sa4.0)))
3737
3738(define-public sosage
3739 (package
3740 (name "sosage")
3741 (version "1.6.1")
3742 (source
3743 (origin
3744 (method git-fetch)
3745 (uri (git-reference
3746 (url "https://framagit.org/Gee/sosage")
3747 (commit (string-append "v" version))))
3748 (file-name (git-file-name name version))
3749 (sha256
3750 (base32 "029mcnx2r86gc7chzd0avga4x7gm1yxl2wi3wqxmzhlh51q0p44x"))
3751 (modules '((guix build utils)))
3752 (snippet
3753 #~(begin
3754 (for-each delete-file (find-files "." "\\.jar$"))
3755
3756 ;; The files in 'Third_party' aren't actually bundled libraries,
3757 ;; but are wrappers around the system libraries.
3758 ;; Move them to the 'Utils' directory, to make that clear.
3759 (for-each (lambda (file)
3760 (install-file file "include/Sosage/Utils"))
3761 (find-files "include/Sosage/Third_party" "\\.h$"))
3762 (for-each (lambda (file)
3763 (install-file file "src/Sosage/Utils"))
3764 (find-files "src/Sosage/Third_party" "\\.cpp$"))
3765 (for-each delete-file-recursively '("include/Sosage/Third_party"
3766 "src/Sosage/Third_party"))
3767 (substitute* (find-files ".")
3768 (("Third_party") "Utils"))))))
3769 (build-system cmake-build-system)
3770 (arguments
3771 (list #:tests? #f ; no tests
3772 #:configure-flags
3773 #~(list
3774 (string-append "-DSOSAGE_DATA_FOLDER="
3775 #$(this-package-input "superfluous-returnz-data")))))
3776 (inputs
3777 (list libyaml
3778 lz4
3779 sdl2
3780 sdl2-mixer-x
3781 sdl2-ttf
3782 superfluous-returnz-data))
3783 (synopsis "Superfluous Returnz 2D cartoon puzzle game")
3784 (description
3785 "Superfluous Returnz is a 2D puzzle game set in a colourful cartoon
3786universe. It takes place in the very quiet French village of Fochougny, an
3787open world where players solve puzzles, find secret codes and talk to the
3788village people to solve the mystery of the apple thief. The game is licensed
3789as Free Software and asks for a financial donation through the game site.")
3790 (home-page "https://studios.ptilouk.net/superfluous-returnz/floss/")
3791 (license license:expat)))
3792
3793(define-public superstarfighter
3794 (package
3795 (name "superstarfighter")
3796 (version "0.6.5")
3797 (source
3798 (origin
3799 (method git-fetch)
3800 (uri (git-reference
3801 (url "https://github.com/notapixelstudio/superstarfighter")
3802 ;; The commit is not tagged upstream:
3803 ;; https://github.com/notapixelstudio/superstarfighter/commit/350605bf5454c26ebe2c57d8217edd03689c0573
3804 (commit "32521f467616bb390e3929d07e1936ff43fe64da")))
3805 (file-name (git-file-name name version))
3806 (sha256
3807 (base32 "1ckghzrfgvk9z1n5f4ivnamm6s8h9sbv0a3aq9pp4a3yrhkgld0k"))))
3808 (build-system gnu-build-system)
3809 (arguments
3810 `(#:tests? #f ;there are no tests
3811 #:phases
3812 (modify-phases %standard-phases
3813 (replace 'configure
3814 (lambda _
3815 (chdir "godot")
3816 (setenv "HOME" (getcwd))
3817 (with-output-to-file "export_presets.cfg"
3818 (lambda ()
3819 (display
3820 "[preset.0]
3821name=\"Guix\"
3822platform=\"Linux/X11\"
3823runnable=true
3824[preset.0.options]")))
3825 #t))
3826 (replace 'build
3827 (lambda _
3828 (let ((godot (assoc-ref %build-inputs "godot-headless")))
3829 (invoke (string-append godot "/bin/godot_server")
3830 "--export-pack" "Guix"
3831 "superstarfighter.pck" "project.godot"))
3832 #t))
3833 (replace 'install
3834 (lambda* (#:key inputs outputs #:allow-other-keys)
3835 (let* ((out (assoc-ref outputs "out"))
3836 (bin (string-append out "/bin"))
3837 (share (string-append out "/share"))
3838 (data (string-append share "/superstarfighter"))
3839 (icons (string-append share "/icons/hicolor/256x256/apps")))
3840 (install-file "superstarfighter.pck" data)
3841 (mkdir-p bin)
3842 (call-with-output-file (string-append bin "/superstarfighter")
3843 (lambda (port)
3844 (format port
3845 "#!/bin/sh~@
3846 exec ~a/bin/godot --main-pack ~a/superstarfighter.pck~%"
3847 (assoc-ref inputs "godot")
3848 data)
3849 (chmod port #o755)))
3850 (mkdir-p icons)
3851 (copy-file "icon.png" (string-append icons "/" ,name ".png"))
3852 (make-desktop-entry-file
3853 (string-append share "/applications/" ,name ".desktop")
3854 #:name "SuperStarfighter"
3855 #:comment "Fast-paced arcade combat game"
3856 #:exec ,name
3857 #:icon ,name
3858 #:categories '("Game" "ArcadeGame")))
3859 #t)))))
3860 (native-inputs
3861 `(("godot-headless" ,godot-lts "headless")))
3862 (inputs
3863 (list godot-lts))
3864 (home-page "https://notapixel.itch.io/superstarfighter")
3865 (synopsis "Fast-paced local multiplayer arcade game")
3866 (description "In SuperStarfighter, up to four local players compete in a
38672D arena with fast-moving ships and missiles. Different game types are
3868available, as well as a single-player mode with AI-controlled ships.")
3869 (license (list license:expat ; game
3870 license:silofl1.1)))) ; fonts
3871
3872(define-public tetzle
3873 (package
3874 (name "tetzle")
3875 (version "2.2.2")
3876 (source
3877 (origin
3878 (method url-fetch)
3879 (uri (string-append "https://gottcode.org/tetzle/"
3880 "tetzle-" version ".tar.bz2"))
3881 (sha256
3882 (base32 "0sybryg65j8gz5s7zbsfqky8wlkjwpppkrhksijj6xc7692lfii8"))))
3883 (build-system cmake-build-system)
3884 (arguments
3885 `(#:tests? #f)) ; no tests
3886 (native-inputs (list qttools))
3887 (inputs (list qtbase))
3888 (home-page "https://gottcode.org/tetzle/")
3889 (synopsis "Jigsaw puzzle game that uses tetrominoes for the pieces")
3890 (description
3891 "Tetzle is a jigsaw puzzle game that uses tetrominoes for the pieces. Any image
3892can be imported and used to create puzzles with a wide range of sizes. Games are
3893saved automatically, and you can select between currently in progress games.")
3894 (license license:gpl3+)))
3895
3896(define-public trigger-rally
3897 (package
3898 (name "trigger-rally")
3899 (version "0.6.7")
3900 (source
3901 (origin
3902 (method url-fetch)
3903 (uri (string-append "mirror://sourceforge/trigger-rally/"
3904 "trigger-" version "/"
3905 "trigger-rally-" version ".tar.gz"))
3906 (sha256
3907 (base32
3908 "1ryzddf5k0jzv8xhmikajql2qc3gvha7by43r4l7yag17kx921k4"))))
3909 (build-system gnu-build-system)
3910 (inputs
3911 (list freealut
3912 glew
3913 glu
3914 mesa
3915 openal
3916 physfs
3917 (sdl-union (list sdl2 sdl2-image))
3918 tinyxml2))
3919 (arguments
3920 (list
3921 #:make-flags #~(list (string-append "prefix=" #$output)
3922 "bindir=$(prefix)/bin"
3923 "datadir=$(datarootdir)"
3924 "LOC_APPDATAFILE=$(datarootdir)/metainfo"
3925 "LOC_DESKTOPFILE=$(datarootdir)/applications"
3926 "OPTIMS=-Ofast")
3927 #:tests? #f ; No tests present
3928 #:phases
3929 #~(modify-phases %standard-phases
3930 (delete 'configure)
3931 (add-before 'build 'cd-src
3932 (lambda _ (chdir "src")))
3933 (add-before 'build 'remove-timestamps
3934 (lambda _
3935 (substitute* (list "Trigger/menu.cpp"
3936 "PEngine/app.cpp")
3937 ((".*__DATE__.*") ""))))
3938 (add-before 'build 'make-verbose
3939 (lambda _
3940 (substitute* "GNUmakefile"
3941 (("@\\$\\(CXX\\)") "$(CXX)"))))
3942 (add-after 'build 'set-data-path
3943 (lambda _
3944 (substitute* "../bin/trigger-rally.config.defs"
3945 (("<data path=\"C:[^\"]*\"")
3946 (string-append "<data path=\"" #$output "/share/trigger-rally\""))))))))
3947 (home-page "https://trigger-rally.sourceforge.net")
3948 (synopsis "Fast-paced single-player racing game")
3949 (description "Trigger-rally is a 3D rally simulation with great physics
3950for drifting on over 200 maps. Different terrain materials like dirt,
3951asphalt, sand, ice, etc. and various weather, light, and fog conditions give
3952this rally simulation the edge over many other games. You need to make it
3953through the maps in often tight time limits and can further improve by beating
3954the recorded high scores. All attached single races must be finished in time
3955in order to win an event, unlocking additional events and cars. Most maps are
3956equipped with spoken co-driver notes and co-driver icons.")
3957 (license (list license:cc0 ;textures and audio in data.zip
3958 license:gpl2+))))
3959
3960(define-public xshogi
3961 (package
3962 (name "xshogi")
3963 (version "1.4.2")
3964 (source
3965 (origin
3966 (method url-fetch)
3967 (uri (string-append "mirror://gnu/gnushogi/xshogi-"
3968 version ".tar.gz"))
3969 (sha256
3970 (base32
3971 "1dns0nhymak44by18sv48m4xb2skiwbi2i3nb9hl6w9iwd2i2brf"))))
3972 (build-system gnu-build-system)
3973 (arguments
3974 (list
3975 #:configure-flags
3976 #~(list "CFLAGS=-Wno-error=implicit-function-declaration")))
3977 (inputs
3978 (list libxaw libxt))
3979 (home-page "https://www.gnu.org/software/gnushogi/")
3980 (synopsis "User interface for gnushogi")
3981 (description "A graphical user interface for the package @code{gnushogi}.")
3982 ;; Contains a copy of GPLv3 but the licence notices simply
3983 ;; state "GNU General Public Licence" without specifying a version.
3984 (license license:gpl1+)))
3985
3986(define-public abbaye
3987 (package
3988 (name "abbaye")
3989 (version "2.0.5")
3990 (source
3991 (origin
3992 (method git-fetch)
3993 (uri (git-reference
3994 (url "https://github.com/nevat/abbayedesmorts-gpl")
3995 (commit (string-append "v" version))))
3996 (file-name (git-file-name name version))
3997 (sha256
3998 (base32 "0jwj6cn4q0ijxdg8ywzd55sxqid5kp5z2bsxh8fpdlm5r7anvqls"))))
3999 (build-system gnu-build-system)
4000 (arguments
4001 (list
4002 #:make-flags #~(list "CC=gcc")
4003 #:phases
4004 #~(modify-phases %standard-phases
4005 (add-after 'set-paths 'set-sdl-paths
4006 (lambda* (#:key inputs #:allow-other-keys)
4007 (setenv "CPATH"
4008 (string-append
4009 (search-input-directory inputs "include/SDL2")
4010 ":" (or (getenv "CPATH") "")))))
4011 (add-after 'patch-source-shebangs 'patch-Makefile-prefix
4012 (lambda _
4013 (substitute* "Makefile"
4014 (("/usr") #$output))))
4015 (add-before 'install 'create-directories
4016 (lambda _
4017 ;; Create directories that the makefile assumes exist.
4018 (mkdir-p (string-append #$output "/bin"))
4019 (mkdir-p (string-append #$output "/share/applications"))
4020 (mkdir-p (string-append #$output "/share/pixmaps"))))
4021 (delete 'configure)) ;no configure script
4022 #:tests? #f)) ;no test suite
4023 (native-inputs (list pkg-config))
4024 (inputs (list (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
4025 (home-page "https://github.com/nevat/abbayedesmorts-gpl")
4026 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
4027 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
4028France. The Cathars, who preach about good Christian beliefs, were being
4029expelled by the Catholic Church out of the Languedoc region in France. One of
4030them, called Jean Raymond, found an old church in which to hide, not knowing
4031that beneath its ruins lay buried an ancient evil.")
4032 (license license:gpl3)))
4033
4034(define-public angband
4035 (package
4036 (name "angband")
4037 (version "4.2.6")
4038 (source
4039 (origin
4040 (method git-fetch)
4041 (uri (git-reference
4042 (url "https://github.com/angband/angband")
4043 (commit version)))
4044 (file-name (git-file-name name version))
4045 (sha256
4046 (base32 "0hgzdvlh0j42w4q9kch9xvhnbvcrypac01xhpksw35gj9my887cp"))
4047 (modules '((guix build utils)))
4048 (snippet
4049 '(begin
4050 (for-each delete-file-recursively
4051 '("lib/tiles/shockbolt" ;nonfree
4052 "src/win")) ;contains .dlls!
4053 ;; Don't build the shockbolt directory either.
4054 (substitute* "lib/tiles/Makefile"
4055 (("shockbolt") ""))))
4056 (patches (search-patches "angband-remove-nonfree-tile-options.patch"))))
4057 (build-system gnu-build-system)
4058 (arguments
4059 `(#:configure-flags (list (string-append "--bindir=" %output "/bin")
4060 "--disable-x11")
4061 #:phases
4062 (modify-phases %standard-phases
4063 (add-after 'unpack 'disable-graphics-and-sounds
4064 (lambda _
4065 (substitute* "lib/Makefile"
4066 ;; Do not build any graphics for this version.
4067 (("gamedata customize help screens fonts tiles sounds icons user")
4068 "gamedata customize help screens user"))))
4069 (add-before 'build 'fix-infinite-loop-on-sighup
4070 ;; XXX Release 4.2.6 has a major bug where sending the process a
4071 ;; SIGHUP when closing the terminal causes it to infinite loop
4072 ;; waiting for input: https://github.com/angband/angband/issues/6558
4073 ;; Reevaluate for future versions.
4074 (lambda _
4075 (substitute* "src/ui-signals.c"
4076 (("(SIGHUP, )SIG_IGN" _ first)
4077 (string-append first "handle_signal_abort")))))
4078 (add-before 'check 'skip-failing-tests
4079 (lambda _
4080 (let ((to-skip '(;; some of these may be fixable, but most try to
4081 ;; create a directory in the user's home directory.
4082 ;; Rather than reading environment variables, they
4083 ;; lookup the username using getpwnam(3) and manually
4084 ;; construct the string.
4085 ;; Generic "Suite died":
4086 "game/basic"
4087 "game/mage"
4088 ;; "Cannot create '//.angband/Angband'":
4089 "effects/chain"
4090 "effects/destruction"
4091 "effects/earthquake"
4092 "object/info"
4093 "object/slays"
4094 "player/calc-inventory"
4095 "player/combine-pack"
4096 "player/digging"
4097 "player/inven-carry-num"
4098 "player/inven-wield"
4099 "player/timed"
4100 ;; This file likes to read /etc/passwd
4101 "z-file/path-normalize")))
4102 (substitute* "src/tests/Makefile"
4103 (("include \\$\\(SUITES\\)" all)
4104 (string-append all "\nTESTPROGS := $(filter-out "
4105 (string-join to-skip " ")
4106 ", $(TESTPROGS))")))))))))
4107 (native-inputs (list autoconf
4108 automake
4109 perl)) ;for tests
4110 (inputs (list ncurses))
4111 (home-page "https://rephial.org/")
4112 (synopsis "Dungeon exploration roguelike")
4113 (description "Angband is a Classic dungeon exploration roguelike. Explore
4114the depths below Angband, seeking riches, fighting monsters, and preparing to
4115fight Morgoth, the Lord of Darkness.")
4116 (license license:gpl2)))
4117
4118(define-public angband-sdl2
4119 (package
4120 (inherit angband)
4121 (name "angband-sdl2")
4122 (arguments
4123 (substitute-keyword-arguments
4124 (package-arguments angband)
4125 ((#:configure-flags flags)
4126 #~(cons* "--enable-sdl2" #$flags))
4127 ((#:phases phases)
4128 #~(modify-phases #$phases
4129 (delete 'disable-graphics-and-sounds)
4130 (add-after 'unpack 'patch-sdl-wrapper-headers
4131 (lambda _
4132 (with-directory-excursion "src"
4133 (substitute* '("snd-sdl.c"
4134 "main-sdl2.c"
4135 "sdl2/pui-win.h")
4136 (("\"SDL_image.h\"") "\"SDL2/SDL_image.h\"")
4137 (("\"SDL_mixer.h\"") "\"SDL2/SDL_mixer.h\"")
4138 (("\"SDL_ttf.h\"") "\"SDL2/SDL_ttf.h\"")))))
4139 (add-after 'unpack 'patch-desktop-file
4140 (lambda* (#:key outputs #:allow-other-keys)
4141 (let ((out (assoc-ref outputs "out")))
4142 (substitute* "lib/icons/angband-sdl2.desktop"
4143 (("Exec=angband" _)
4144 (string-append "Exec=" #$output "/bin/angband-sdl2"))))))
4145 (add-after 'install 'rename-binary
4146 (lambda _
4147 (with-directory-excursion #$output
4148 ;; allows parallel installation with angband
4149 (rename-file "bin/angband"
4150 "bin/angband-sdl2"))))))))
4151 (inputs
4152 (modify-inputs inputs
4153 (prepend sdl2
4154 sdl2-image
4155 sdl2-mixer
4156 sdl2-ttf)))
4157 (description "Angband is a Classic dungeon exploration roguelike. Explore
4158the depths below Angband, seeking riches, fighting monsters, and preparing to
4159fight Morgoth, the Lord of Darkness.
4160
4161This version includes the SDL2 frontend, providing tilesets and sounds which
4162can be enabled through in-game options.")
4163 ;; XXX: fonts and adam bolt tileset are free but being clarified:
4164 ;; https://github.com/angband/angband/issues/6608
4165 ;; For the rest, see:
4166 ;; https://github.com/angband/angband/blob/master/docs/copying.rst
4167 (license (list license:gpl2 ;code, nomad+old tilesets
4168 license:cc-by-sa3.0 ;david gervais tileset
4169 license:cc-by-sa4.0)))) ;sounds
4170
4171(define-public pingus
4172 ;; Latest release is from 2021-12-24.
4173 (let ((commit "7d65221e1cd1026053c8a5a08ad911fbdd13d3ed")
4174 (revision "1"))
4175 (package
4176 (name "pingus")
4177 (version (git-version "0.7.6" revision commit))
4178 (source
4179 (origin
4180 (method git-fetch)
4181 (uri (git-reference
4182 (url "https://github.com/Pingus/pingus")
4183 (commit commit)))
4184 (file-name (git-file-name name version))
4185 (sha256
4186 (base32 "0dc6b192y1zwpiqfcpkyq5gk4xl8hl9hs71cmhag8hz59c5hfdfr"))))
4187 (build-system cmake-build-system)
4188 (arguments
4189 (list
4190 ;; Upstream reported the tests don't work.
4191 ;; See: <https://github.com/Pingus/pingus/blob/8c68e08b0b9530b0078a6e2972786f7accf0d0e6/pingus.nix#L47>
4192 #:tests? #f
4193 #:configure-flags
4194 #~(list "-DBUILD_TESTS=OFF")))
4195 (native-inputs (list googletest pkg-config tinycmmc uitest))
4196 (inputs
4197 (list argpp
4198 boost
4199 fmt-10
4200 geomcpp
4201 glm
4202 glu
4203 libpng
4204 libsigc++-2
4205 logmich
4206 mesa
4207 priocpp
4208 sdl2
4209 sdl2-image
4210 sdl2-mixer
4211 strutcpp
4212 tinygettext-with-sdl2
4213 wstsound
4214 xdgcpp))
4215 (home-page "https://pingus.seul.org/")
4216 (synopsis "Lemmings-like puzzle game")
4217 (description
4218 "Pingus is a free Lemmings-like puzzle game in which the player takes
4219command of a bunch of small animals and has to guide them through levels.
4220Since the animals walk on their own, the player can only influence them by
4221giving them commands, like build a bridge, dig a hole, or redirect all animals
4222in the other direction. Multiple such commands are necessary to reach the
4223level's exit. The game is presented in a 2D side view.")
4224 (license
4225 ;; Project itself is GPL3+, but some files are under distinct licenses.
4226 (list license:bsd-3
4227 license:gpl2+
4228 license:gpl3+)))))
4229
4230(define-public talkfilters
4231 (package
4232 (name "talkfilters")
4233 (version "2.3.8")
4234 (source
4235 (origin
4236 (method url-fetch)
4237 (uri (string-append "http://www.hyperrealm.com/talkfilters/"
4238 "talkfilters-" version ".tar.gz"))
4239 (sha256
4240 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
4241 (build-system gnu-build-system)
4242 (home-page "https://www.gnu.org/software/talkfilters/")
4243 (synopsis "Convert English text to humorous dialects")
4244 (description "The GNU Talk Filters are programs that convert English text
4245into stereotyped or otherwise humorous dialects. The filters are provided as
4246a C library, so they can easily be integrated into other programs.")
4247 (license license:gpl2+)))
4248
4249(define-public taisei
4250 (package
4251 (name "taisei")
4252 (version "1.4.5")
4253 (source
4254 (origin
4255 (method url-fetch)
4256 (uri (string-append "https://github.com/taisei-project/"
4257 "taisei/releases/download/v" version
4258 "/taisei-" version ".tar.xz"))
4259 (sha256
4260 (base32 "17b8cbjryjvid8ckmfn5gy99l8qpqz00llmmp35n5vcb4lapm2rc"))))
4261 (build-system meson-build-system)
4262 (arguments
4263 (list
4264 #:build-type "release" ;comment out for bug-reporting (and cheats)
4265 #:configure-flags #~(list "-Dr_default=gles30"
4266 "-Dr_gles30=enabled"
4267 "-Dshader_transpiler=enabled")))
4268 (native-inputs
4269 (list cmake-minimal
4270 gettext-minimal
4271 pkg-config
4272 python
4273 python-backports-zstd
4274 python-docutils
4275 python-pygments))
4276 (inputs
4277 (list cglm
4278 freetype
4279 glslang
4280 libdecor ; XXX: for sdl3
4281 libpng
4282 libunibreak
4283 libwebp
4284 mesa
4285 openssl
4286 opusfile
4287 sdl3
4288 shaderc
4289 spirv-cross
4290 spirv-tools ; for glslang
4291 vulkan-loader ; XXX: for sdl3?
4292 zlib
4293 (list zstd "lib")))
4294 (home-page "https://taisei-project.org/")
4295 (synopsis "Shoot'em up fangame and libre clone of Touhou Project")
4296 (description
4297 "Taisei is a vertical shoot'em up game, in which the player controls
4298one of three characters. While moving through stages, a large number of
4299enemies and even larger amounts of bullets appear that require careful
4300maneuvers to dodge. By shooting the enemies, players receive powerups
4301for their characters, allowing them to shoot even more.")
4302 (license (list
4303 ;; game
4304 license:expat
4305 ;; resources/00-taisei.pkgdir/bgm/
4306 ;; atlas/portraits/
4307 license:cc-by4.0
4308 ;; miscellaneous
4309 license:cc0
4310 license:public-domain))))
4311
4312(define-public cmatrix
4313 (package
4314 (name "cmatrix")
4315 (version "2.0")
4316 (source
4317 (origin
4318 (method git-fetch)
4319 (uri (git-reference
4320 (url "https://github.com/abishekvashok/cmatrix")
4321 (commit (string-append "v" version))))
4322 (file-name (git-file-name name version))
4323 (sha256
4324 (base32
4325 "1h9jz4m4s5l8c3figaq46ja0km1gimrkfxm4dg7mf4s84icmasbm"))))
4326 (build-system gnu-build-system)
4327 (native-inputs
4328 (list autoconf automake))
4329 (arguments
4330 '(#:phases
4331 (modify-phases %standard-phases
4332 (replace 'configure
4333 (lambda* (#:key outputs #:allow-other-keys)
4334 ;; This old ‘configure’ script doesn't support
4335 ;; variables passed as arguments.
4336 (let ((out (assoc-ref outputs "out")))
4337 (setenv "CONFIG_SHELL" (which "bash"))
4338 (invoke "./configure"
4339 (string-append "--prefix=" out))))))))
4340 (inputs (list ncurses))
4341 (home-page "https://www.asty.org/cmatrix")
4342 (synopsis "Simulate the display from \"The Matrix\"")
4343 (description "CMatrix simulates the display from \"The Matrix\" and is
4344based on the screensaver from the movie's website. It works with terminal
4345settings up to 132x300 and can scroll lines all at the same rate or
4346asynchronously and at a user-defined speed.")
4347 (license license:gpl2+)))
4348
4349(define-public chess
4350 (package
4351 (name "chess")
4352 (version "6.3.0")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (string-append "mirror://gnu/chess/gnuchess-" version
4357 ".tar.gz"))
4358 (sha256
4359 (base32
4360 "0fm27h1xv56v1g1zq0cd9wlchvfw8iwmsgj4nyaxcalc171bwdqb"))))
4361 (build-system gnu-build-system)
4362 (arguments
4363 '(#:phases
4364 (modify-phases %standard-phases
4365 (add-after 'install 'fix-shell-scripts
4366 (lambda* (#:key outputs #:allow-other-keys)
4367 (let* ((out (assoc-ref outputs "out"))
4368 (bin (string-append out "/bin")))
4369 (chdir bin)
4370 (substitute* '("gnuchessx" "gnuchessu")
4371 (("^gnuchess") (string-append bin "/gnuchess")))))))))
4372 (home-page "https://www.gnu.org/software/chess/")
4373 (synopsis "Full chess implementation")
4374 (description "GNU Chess is a chess engine. It allows you to compete
4375against the computer in a game of chess, either through the default terminal
4376interface or via an external visual interface such as GNU XBoard.")
4377 (properties '((upstream-name . "gnuchess")
4378 (ftp-directory . "/chess")))
4379 (license license:gpl3+)))
4380
4381(define-public freedink-engine
4382 (package
4383 (name "freedink-engine")
4384 (version "109.6")
4385 (source (origin
4386 (method url-fetch)
4387 (uri (string-append "mirror://gnu/freedink/freedink-" version
4388 ".tar.gz"))
4389 (patches (search-patches "freedink-engine-fix-const-char.patch"
4390 "freedink-engine-fix-sdl-hints.patch"))
4391 (sha256
4392 (base32
4393 "00hhk1bjdrc1np2qz44sa5n1mb62qzwxbvsnws3vpms6iyn3a2sy"))))
4394 (build-system gnu-build-system)
4395 (arguments
4396 `(#:configure-flags '("--disable-embedded-resources")
4397 #:phases
4398 (modify-phases %standard-phases
4399 (add-after 'unpack 'disable-graphical-tests
4400 (lambda _
4401 ;; These tests require a graphical interface.
4402 (substitute* "src/Makefile.am"
4403 (("test_gfx_fonts TestIOGfxDisplay") "")
4404 ;; FIXME: Figure out why `TestIOTouchDragAnywhere` fails
4405 (("TestIOTouchDragAnywhere (test_integration)" all _) _))))
4406 (add-before 'bootstrap 'autoreconf
4407 (lambda _
4408 ;; automake is out of date in the source
4409 ;; autoreconf updates the automake scripts
4410 (invoke "autoreconf")
4411 ;; Build fails when autom4te.cache exists.
4412 (delete-file-recursively "autom4te.cache")
4413 #t))
4414 (add-after 'install 'delete-freedinkedit-desktop
4415 (lambda* (#:key outputs #:allow-other-keys)
4416 (let ((out (assoc-ref outputs "out")))
4417 ;; freedinkedit does not know where to find freedink data
4418 ;; freedink data is read-only, so it cannot be edited anyway.
4419 ;; TODO: fix freedink.desktop
4420 (delete-file-recursively (string-append
4421 out "/share/applications"))
4422 #t))))))
4423 (native-inputs `(("autoconf" ,autoconf)
4424 ("automake" ,automake)
4425 ("cxxtest" ,cxxtest)
4426 ("gettext" ,gettext-minimal)
4427 ("help2man" ,help2man)
4428 ("pkg-config" ,pkg-config)))
4429 (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer
4430 sdl2-ttf sdl2-gfx)))
4431 ("fontconfig" ,fontconfig)
4432 ("glm" ,glm)))
4433 (properties '((ftp-directory . "/freedink")
4434 (upstream-name . "freedink")))
4435 (home-page "https://www.gnu.org/software/freedink/")
4436 (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
4437 (description
4438 "GNU FreeDink is a free and portable re-implementation of the engine
4439for the role-playing game Dink Smallwood. It supports not only the original
4440game data files but it also supports user-produced game mods or \"D-Mods\".
4441To that extent, it also includes a front-end for managing all of your D-Mods.")
4442 (license license:gpl3+)))
4443
4444(define-public freedink-data
4445 (package
4446 (name "freedink-data")
4447 (version "1.08.20190120")
4448 (source (origin
4449 (method url-fetch)
4450 (uri (string-append "mirror://gnu/freedink/freedink-data-"
4451 version ".tar.gz"))
4452 (sha256
4453 (base32
4454 "17gvryadlxk172mblbsil7hina1z5wahwaxnr6g3mdq57dvl8pvi"))))
4455 (build-system gnu-build-system)
4456 (arguments
4457 `(#:phases
4458 (modify-phases %standard-phases
4459 (delete 'configure) ; no configure script
4460 (delete 'check)) ; no tests
4461 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4462 (properties '((ftp-directory . "/freedink")))
4463 (home-page "https://www.gnu.org/software/freedink/")
4464 (synopsis "Game data for GNU Freedink")
4465 (description
4466 "This package contains the game data of GNU Freedink.")
4467 (license license:gpl3+)))
4468
4469(define-public freedink-dfarc
4470 (package
4471 (name "freedink-dfarc")
4472 (version "3.14")
4473 (source (origin
4474 (method url-fetch)
4475 (uri (string-append "mirror://gnu/freedink/dfarc-"
4476 version ".tar.gz"))
4477 (sha256
4478 (base32
4479 "1yp8n3w426xnlp10xk06vfi2y3k9xrcfyck7s7qs1v0ys7n284d5"))))
4480 (build-system gnu-build-system)
4481 (native-inputs
4482 (list intltool))
4483 (inputs
4484 (list bzip2 wxwidgets))
4485 (properties '((ftp-directory . "/freedink")
4486 (upstream-name . "dfarc")))
4487 (home-page "https://www.gnu.org/software/freedink/")
4488 (synopsis "Front-end for managing and playing Dink Modules")
4489 (description "DFArc makes it easy to play and manage the GNU FreeDink game
4490and its numerous D-Mods.")
4491 (license license:gpl3+)))
4492
4493(define-public freedink
4494 ;; This is a wrapper that tells the engine where to find the data.
4495 (package (inherit freedink-engine)
4496 (name "freedink")
4497 (build-system trivial-build-system)
4498 (arguments
4499 '(#:builder (begin
4500 (use-modules (guix build utils))
4501
4502 (let* ((output (assoc-ref %outputs "out"))
4503 (bin (string-append output "/bin"))
4504 (executable (string-append bin "/freedink")))
4505 (mkdir-p bin)
4506 (call-with-output-file executable
4507 (lambda (port)
4508 (format port "#!~a/bin/sh
4509exec ~a/bin/freedink -refdir ~a/share/dink\n"
4510 (assoc-ref %build-inputs "bash")
4511 (assoc-ref %build-inputs "engine")
4512 (assoc-ref %build-inputs "data"))
4513 (chmod port #o777)))
4514 #t))
4515 #:modules ((guix build utils))))
4516 (inputs `(("engine" ,freedink-engine)
4517 ("data" ,freedink-data)
4518 ("bash" ,bash)))
4519 (native-inputs '())))
4520
4521(define-public fuzzylite
4522 ;; Use the latest commit from the master branch, as the latest release fails
4523 ;; to build.
4524 (let ((commit "13b3122f5c353c0389ed4e66041d548c44ec9df6")
4525 (revision "0"))
4526 (package
4527 (name "fuzzylite")
4528 (version (git-version "6.0" revision commit))
4529 (source (origin
4530 (method git-fetch)
4531 (uri (git-reference
4532 (url "https://github.com/fuzzylite/fuzzylite")
4533 (commit commit)))
4534 (file-name (git-file-name name version))
4535 (sha256
4536 (base32
4537 "1ai7x5lfy8c1d11crz33ayy21alry740f78qjjxwzdfr6ph7pkzq"))))
4538 (build-system cmake-build-system)
4539 (native-inputs (list catch2))
4540 (home-page "https://www.fuzzylite.com/")
4541 (synopsis "Fuzzy logic control binary")
4542 (description
4543 "This package provides fuzzylite, a fuzzy logic control library which
4544allows one to easily create fuzzy logic controllers in a few steps utilizing
4545object-oriented programming.")
4546 (license license:gpl3+))))
4547
4548(define-public xboard
4549 (package
4550 (name "xboard")
4551 (version "4.9.1")
4552 (source
4553 (origin
4554 (method url-fetch)
4555 (uri (string-append "mirror://gnu/xboard/xboard-" version
4556 ".tar.gz"))
4557 (sha256
4558 (base32
4559 "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
4560 (build-system gnu-build-system)
4561 (arguments
4562 `(#:configure-flags '("CFLAGS=-fcommon")
4563 #:phases
4564 (modify-phases %standard-phases
4565 ;; Fixes https://issues.guix.gnu.org/47195.
4566 (add-after 'unpack 'patch-aplay-path
4567 (lambda* (#:key inputs #:allow-other-keys)
4568 (substitute* "xboard.conf"
4569 (("aplay -q")
4570 (string-append (search-input-file inputs "/bin/aplay")
4571 " -q")))))
4572 ;; Fixes https://issues.guix.gnu.org/45236.
4573 (add-after 'unpack 'patch-default-engine
4574 (lambda* (#:key inputs #:allow-other-keys)
4575 (substitute* "xboard.conf"
4576 (("-firstChessProgram fairymax")
4577 (string-append "-firstChessProgram "
4578 (assoc-ref inputs "chess")
4579 "/bin/gnuchessx"))))))))
4580 (inputs
4581 (list alsa-utils chess gtk+-2 (librsvg-for-system)))
4582 (native-inputs
4583 (list texinfo pkg-config))
4584 (home-page "https://www.gnu.org/software/xboard/")
4585 (synopsis "Graphical user interface for chess programs")
4586 (description "GNU XBoard is a graphical board for all varieties of chess,
4587including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
4588and Makruk. Several lesser-known variants are also supported. It presents a
4589fully interactive graphical interface and it can load and save games in the
4590Portable Game Notation.")
4591 (license license:gpl3+)))
4592
4593(define-public gtypist
4594 (package
4595 (name "gtypist")
4596 (version "2.10.1")
4597 (source (origin
4598 (method url-fetch)
4599 (uri (string-append "mirror://gnu/gtypist/gtypist-"
4600 version ".tar.gz"))
4601 (sha256
4602 (base32
4603 "04rlh706p5drdvm1kvrgs3jaz9krxg4vi5fpipi4973vb42ymz89"))
4604 (modules '((guix build utils)))
4605 (snippet
4606 ;; We do not provide `ncurses.h' within an `ncursesw'
4607 ;; sub-directory, so patch the source accordingly. See
4608 ;; <http://bugs.gnu.org/19018>.
4609 '(begin
4610 (for-each (lambda (file)
4611 (substitute* file
4612 (("ncursesw/ncurses.h")
4613 "ncurses.h")))
4614 (find-files "." "configure$|\\.c$"))))))
4615 (build-system gnu-build-system)
4616 (native-inputs (list emacs-minimal))
4617 (inputs (list ncurses perl))
4618 (home-page "https://www.gnu.org/software/gtypist/")
4619 (synopsis "Typing tutor")
4620 (description
4621 "GNU Typist is a universal typing tutor. It can be used to learn and
4622practice touch-typing. Several tutorials are included; in addition to
4623tutorials for the standard QWERTY layout, there are also tutorials for the
4624alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
4625are primarily in English, however some in other languages are provided.")
4626 (license license:gpl3+)))
4627
4628(define-public libsquish
4629 (package
4630 (name "libsquish")
4631 (version "1.15")
4632 (source
4633 (origin
4634 (method url-fetch/tarbomb)
4635 (uri (string-append "mirror://sourceforge/libsquish/libsquish-" version
4636 ".tgz"))
4637 (sha256
4638 (base32 "0sbj2k98ak1jabna7h1vfakdvjb7d7a81l3178c6d230pbp9d1v2"))))
4639 (build-system gnu-build-system)
4640 (arguments
4641 (list
4642 #:tests? #f ; no tests defined in Makefile, extra/squishtest.cpp fails
4643 ; to build at all
4644 #:make-flags
4645 #~(list (string-append "INSTALL_DIR=" #$output))
4646 #:phases
4647 #~(modify-phases %standard-phases
4648 (add-after 'bootstrap 'use-shared
4649 (lambda _
4650 (substitute* "config"
4651 (("USE_SHARED .*")
4652 "USE_SHARED ?= 1"))))
4653 (delete 'configure)))) ;no configure script
4654 (home-page "https://sourceforge.net/projects/libsquish/")
4655 (synopsis "DXT texture compression library")
4656 (description
4657 "@code{libsquish} is a lossy software DXT texture compression library.
4658It implements the 3 useful DXT flavours (1,3,5) and has SIMD support for
4659x86 (SSE) and powerpc (Altivec). It can be used (as a much slower software
4660fallback) instead of the hardware implementations present on most modern
4661graphics chips.")
4662 (license license:expat)))
4663
4664(define-public irrlicht
4665 (package
4666 (name "irrlicht")
4667 (version "1.8.5")
4668 (source (origin
4669 (method url-fetch)
4670 (uri (string-append
4671 "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
4672 (version-major+minor version)
4673 "/" version "/irrlicht-" version ".zip"))
4674 (sha256
4675 (base32
4676 "0gagjh2l3a3m8hsixxhhhan3m5xl7735ka8m4g79jl4qsgp7pyzg"))
4677 (patches (search-patches "irrlicht-use-system-libs.patch"
4678 "irrlicht-link-against-needed-libs.patch"))
4679 (modules '((guix build utils)))
4680 (snippet
4681 '(begin
4682 (for-each delete-file-recursively
4683 '("bin" ; bundled compiled Windows binaries"
4684 "source/Irrlicht/MacOSX"
4685 "source/Irrlicht/bzip2"
4686 "source/Irrlicht/jpeglib"
4687 "source/Irrlicht/libpng"
4688 "source/Irrlicht/lzma"
4689 "source/Irrlicht/zlib"))
4690 (delete-file "source/Irrlicht/glext.h")
4691 (delete-file "source/Irrlicht/glxext.h")
4692 (delete-file "source/Irrlicht/wglext.h")))))
4693 (build-system gnu-build-system)
4694 (arguments
4695 `(#:phases
4696 (modify-phases %standard-phases
4697 (add-after 'unpack 'chdir-to-source
4698 (lambda _
4699 ;; The actual source is buried a few directories deep.
4700 (chdir "source/Irrlicht/")))
4701 (add-after 'chdir-to-source 'remove-<sys/sysctl.h>
4702 (lambda _
4703 (substitute* "COSOperator.cpp"
4704 (("#include <sys/sysctl.h>") ""))))
4705 (add-after 'chdir-to-source 'delete-broken-install-rule
4706 (lambda _
4707 (substitute* "Makefile"
4708 ;; We neither build nor want a static library. Skip it.
4709 ((".*\\bcp .*\\$\\(STATIC_LIB\\).*") ""))))
4710 (add-after 'chdir-to-source 'fix-build-env
4711 (lambda* (#:key outputs #:allow-other-keys)
4712 (let ((out (assoc-ref outputs "out")))
4713 (substitute* "Makefile"
4714 (("INSTALL_DIR = /usr/local/lib")
4715 (string-append "INSTALL_DIR = " out "/lib"))
4716 ;; Add '-fpermissive' to the CXXFLAGS.
4717 (("-Wall") "-Wall -fpermissive")) ; CImageLoaderJPG.cpp
4718 ;; The Makefile assumes these directories exist.
4719 (mkdir-p (string-append out "/lib"))
4720 (mkdir-p (string-append out "/include")))))
4721 (delete 'configure)) ; no configure script
4722 #:tests? #f ; no check target
4723 #:make-flags
4724 (list (string-append "CC=" ,(cc-for-target))
4725 "sharedlib")))
4726 (inputs
4727 (list bzip2
4728 libjpeg-turbo
4729 libpng
4730 libx11
4731 libxxf86vm
4732 mesa))
4733 (synopsis "3D game engine written in C++")
4734 (description
4735 "The Irrlicht Engine is a high performance realtime 3D engine written in
4736C++. Features include an OpenGL renderer, extensible materials, scene graph
4737management, character animation, particle and other special effects, support
4738for common mesh file formats, and collision detection.")
4739 (home-page "https://irrlicht.sourceforge.io/")
4740 (license license:zlib)))
4741
4742(define-public pegasus-frontend
4743 (let ((commit "c3462e68bf3a178420b44f356998255f8d82a113")
4744 (revision "weekly_2024w38"))
4745 (package
4746 (name "pegasus-frontend")
4747 (version (git-version "0.0" revision commit))
4748 (source
4749 (origin
4750 (method git-fetch)
4751 (uri (git-reference
4752 (url "https://github.com/mmatyas/pegasus-frontend")
4753 (commit commit)))
4754 (sha256
4755 (base32 "1p350nlbif33mw5cbqxwli5yf47dxpransxlj2wp8xvh4w1rb3jx"))
4756 (file-name (git-file-name name version))))
4757 (build-system qt-build-system)
4758 (arguments
4759 (list
4760 #:qtbase qtbase-5
4761 #:make-flags
4762 #~(list (string-append "INSTALL_DESKTOPDIR="
4763 #$output "/share/applications")
4764 (string-append "INSTALL_ICONDIR="
4765 #$output "/share/icons/hicolor"))
4766 #:phases
4767 #~(modify-phases %standard-phases
4768 (add-after 'unpack 'copy-modules
4769 (lambda* (#:key inputs #:allow-other-keys)
4770 (copy-recursively #$(this-package-native-input
4771 "SortFilterProxyModel")
4772 "./thirdparty/SortFilterProxyModel")
4773 (copy-recursively #$(this-package-native-input
4774 "pegasus-theme-grid")
4775 "./src/themes/pegasus-theme-grid")
4776 (copy-recursively #$(this-package-native-input
4777 "pegasus-frontend-translations") "./lang")))
4778 (add-before 'check 'prepare-test-env
4779 (lambda* (#:key tests? #:allow-other-keys)
4780 (when tests?
4781 (setenv "QT_QPA_PLATFORM" "offscreen")
4782 (setenv "QT_QUICK_BACKEND" "software"))))
4783 (add-after 'qt-wrap 'gst-wrap
4784 (lambda* (#:key inputs #:allow-other-keys)
4785 (wrap-program (string-append #$output "/bin/pegasus-fe")
4786 `("GST_PLUGIN_PATH" suffix
4787 ,(search-path-as-list '("lib/gstreamer-1.0")
4788 (map cdr inputs)))))))))
4789 (inputs (list sdl2
4790 bash-minimal
4791 qtbase-5
4792 qtsvg-5
4793 qtdeclarative-5
4794 qtgraphicaleffects
4795 qtmultimedia-5
4796 qtgamepad-5
4797 gst-plugins-base
4798 gst-plugins-bad
4799 gst-plugins-good))
4800 (native-inputs (list qttools-5
4801 (origin
4802 (method git-fetch)
4803 (uri (git-reference
4804 (url
4805 "https://github.com/mmatyas/pegasus-frontend-translations")
4806 (commit
4807 "46c7cecec745bdd4c61bfc7ecb967156ad208642")))
4808 (file-name "pegasus-frontend-translations")
4809 (sha256 (base32
4810 "0rvlx199wdrjxr8pgibga556zf4njq4w2n31fdirqgb631rgyqxd")))
4811 (origin
4812 (method git-fetch)
4813 (uri (git-reference
4814 (url
4815 "https://github.com/mmatyas/pegasus-theme-grid")
4816 (commit
4817 "5951db6f2a4fe0db6a4fd6f00da1f280cadfa536")))
4818 (file-name "pegasus-theme-grid")
4819 (sha256 (base32
4820 "1nfnq6lppdm9ni6jk48l1i7hk90m8w2p13swl5nr4zwczln8dbz1")))
4821 (origin
4822 (method git-fetch)
4823 (uri (git-reference
4824 (url
4825 "https://github.com/mmatyas/SortFilterProxyModel")
4826 (commit
4827 "2061f8136ba372fd06c1928a610258b7d88cb144")))
4828 (file-name "SortFilterProxyModel")
4829 (sha256 (base32
4830 "16va8fcf7v6kfm8r9zym0516qrk4vlsy5wmpd3r3002wpz8q39h2")))))
4831 (synopsis
4832 "Graphical frontend for launching and managing game collection")
4833 (description
4834 "Pegasus is a graphical frontend for browsing your game library and
4835 launching all kinds of games from the same place. It's focusing on
4836 customizability, cross platform support (including embedded)
4837 and high performance.")
4838 (home-page "https://pegasus-frontend.org")
4839 (license license:gpl3+))))
4840
4841(define-public mars
4842 ;; No official release since 2013: use the latest commit.
4843 (let ((commit "84664cda094efe6e49d9b1550e4f4f98c33eefa2")
4844 (revision "2"))
4845 (package
4846 (name "mars")
4847 (version (git-version "0.7.5" revision commit))
4848 (source (origin
4849 (method git-fetch)
4850 (uri (git-reference
4851 (url "https://github.com/thelaui/M.A.R.S.")
4852 (commit commit)))
4853 (file-name (git-file-name name version))
4854 (modules '((guix build utils)))
4855 (snippet
4856 #~(begin
4857 (delete-file-recursively "ext_libs_for_windows")))
4858 (sha256
4859 (base32
4860 "0bdi4ja39rark742qvqixm8khai5k8qd84z5kzim9jcjdvvwyqj9"))))
4861 (build-system cmake-build-system)
4862 (arguments
4863 `(#:tests? #f ; There are no tests
4864 #:configure-flags (list (string-append "-Dmars_EXE_DEST_DIR="
4865 %output "/bin"))
4866 #:phases
4867 (modify-phases %standard-phases
4868 (add-after 'unpack 'fix-data-path
4869 (lambda* (#:key outputs #:allow-other-keys)
4870 (substitute* "src/System/settings.cpp"
4871 (("C_dataPath = \"./data/\";")
4872 (string-append "C_dataPath = \""
4873 (assoc-ref outputs "out")
4874 "/share/games/marsshooter/\";"))))))))
4875 (inputs
4876 (list mesa fribidi taglib sfml-2))
4877 (home-page "https://mars-game.sourceforge.net/")
4878 (synopsis "2D space shooter")
4879 (description
4880 "M.A.R.S. is a 2D space shooter with pretty visual effects and
4881attractive physics. Players can battle each other or computer controlled
4882enemies in different game modes such as space ball, death match, team death
4883match, cannon keep, and grave-itation pit.")
4884 (license (list license:gpl3+
4885 license:cc-by-sa3.0))))) ;/data/audio/music
4886
4887(define-public maelstrom
4888 (package
4889 (name "maelstrom")
4890 (version "4.0.2")
4891 (source
4892 (origin
4893 (method git-fetch)
4894 (uri (git-reference
4895 (url "https://github.com/libsdl-org/Maelstrom")
4896 (commit (string-append "release-" version))))
4897 (sha256
4898 (base32 "0a3kpsd3582j0gwdwspfd27in24asjhj48i26im6d9hg1j3n4iww"))
4899 (file-name (git-file-name name version))
4900 (snippet
4901 #~(begin
4902 (use-modules (guix build utils))
4903 (substitute* '("game/mods.cpp" "utils/files.c")
4904 (("#include.*(physfssdl3.h)\"" all first)
4905 (string-append "#include <" first ">")))
4906 (substitute* "game/replay.cpp"
4907 (("#include \"\\.\\./(miniz/miniz\\.h)\"" all first)
4908 (string-append "#include <" first ">")))
4909 (substitute* "CMakeLists.txt"
4910 (("external/physfs/extras/physfssdl3\\.c" all)
4911 (string-append "# " all))
4912 (("miniz/miniz\\.c" all)
4913 (string-append "# " all))
4914 (("(pkg_check_modules\\()PhysFS.*physfs\\)\n" all first)
4915 (string-append all
4916 first "MINIZ IMPORTED_TARGET miniz)\n"
4917 first "PHYSFSSDL3 IMPORTED_TARGET physfs-sdl3)\n"))
4918 (("(target_link_libraries\\(Maelstrom PRIVATE )PkgConfig::PhysFS\\)\n" all first)
4919 (string-append all
4920 first "PkgConfig::MINIZ)\n"
4921 first "PkgConfig::PHYSFSSDL3)\n")))
4922 (for-each delete-file-recursively
4923 (list "macres"
4924 "miniz"
4925 "Xcode"))))))
4926 (build-system cmake-build-system)
4927 (arguments
4928 (list
4929 #:tests? #f ;no tests
4930 #:configure-flags
4931 #~(list "-DSTEAM=OFF"
4932 "-DUSE_VENDORED_SDL=OFF"
4933 "-DUSE_VENDORED_PHYSFS=OFF"
4934 "-DUSE_VENDORED_SDL_NET=OFF"
4935 "-DSTANDALONE_INSTALL=OFF")))
4936 (native-inputs (list pkg-config))
4937 (inputs (list miniz physfs physfs-sdl3 sdl3 sdl3-net))
4938 (home-page "https://github.com/libsdl-org/Maelstrom")
4939 (synopsis "Asteroids game")
4940 (description
4941 "You pilot your ship through the dreaded \"Maelstrom\" asteroid belt
4942-- suddenly your best friend thrusts towards you and fires, directly at your
4943cockpit. You raise your shields just in time, and the battle is joined.
4944
4945Maelstrom is a free software port of the original shareware game for the
4946Macintosh by Ambrosia Software, Inc. It is a fast-action, asteroids-like game,
4947with classic pixel graphics and original sounds.
4948
4949In addition to being a faithful reproduction of the original game, this version
4950adds game controller support, mobile touch controls, and both cooperative and
4951competitive multiplayer action.")
4952 (license (list license:zlib ;game code
4953 license:cc-by3.0)))) ;sprites, sounds, etc.
4954
4955(define-public alienblaster
4956 (package
4957 (name "alienblaster")
4958 (version "1.1.0")
4959 (source
4960 (origin
4961 (method url-fetch)
4962 (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
4963 "alienblaster-" version ".tgz"))
4964 (sha256
4965 (base32
4966 "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
4967 (build-system gnu-build-system)
4968 (arguments
4969 (list
4970 #:tests? #f ; no tests
4971 #:phases
4972 #~(modify-phases %standard-phases
4973 (add-after 'unpack 'fix-sdl-paths
4974 (lambda _
4975 (let ((share (string-append #$output "/share")))
4976 ;; Fix name and append path to "SDL_mixer.h"
4977 (substitute* "src/Makefile"
4978 (("GAME_NAME=alienBlaster") "GAME_NAME=alienblaster")
4979 (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
4980 (string-append line " -I"
4981 #$(this-package-input "sdl-mixer")
4982 "/include/SDL")))
4983 ;; Substitute relative paths in ".cfg" and source/header files
4984 (substitute* (find-files "./cfg")
4985 (("(\\./)?images") (string-append share "/images")))
4986 (substitute* (list "src/global.h" "src/global.cc")
4987 (("./images") (string-append share "/images"))
4988 (("./sound") (string-append share "/sound"))
4989 (("./cfg") (string-append share "/cfg"))))))
4990 (delete 'configure)
4991 (replace 'install
4992 (lambda _
4993 (install-file "alienblaster" (string-append #$output "/bin"))
4994 (for-each
4995 (lambda (dir)
4996 (copy-recursively dir (string-append #$output "/share/" dir)))
4997 '("images" "sound" "cfg")))))))
4998 (inputs (list sdl sdl-mixer))
4999 (home-page "http://www.schwardtnet.de/alienblaster/")
5000 (synopsis "Action-loaded 2D arcade shooter game")
5001 (description "Alien Blaster is an action-loaded 2D arcade shooter
5002game. Your mission in the game is simple: stop the invasion of the aliens by
5003blasting them. Simultaneous two-player mode is available.")
5004 (license license:gpl2)))
5005
5006(define-public glkterm
5007 (package
5008 (name "glkterm")
5009 (version "1.0.4")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5014 "glk/implementations/glkterm-104.tar.gz"))
5015 (sha256
5016 (base32
5017 "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
5018 (build-system gnu-build-system)
5019 (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
5020 (arguments
5021 '(#:tests? #f ; no check target
5022 #:phases
5023 (modify-phases %standard-phases
5024 (replace 'install
5025 (lambda* (#:key outputs #:allow-other-keys)
5026 (let* ((out (assoc-ref outputs "out"))
5027 (inc (string-append out "/include"))
5028 (lib (string-append out "/lib")))
5029 (for-each
5030 (lambda (file)
5031 (install-file file inc))
5032 '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
5033 (install-file "libglkterm.a" lib))
5034 #t))
5035 (delete 'configure)))) ; no configure script
5036 (home-page "https://www.eblong.com/zarf/glk/")
5037 (synopsis "Curses Implementation of the Glk API")
5038 (description
5039 "Glk defines a portable API for applications with text UIs. It was
5040primarily designed for interactive fiction, but it should be suitable for many
5041interactive text utilities, particularly those based on a command line.
5042This is an implementation of the Glk library which runs in a terminal window,
5043using the @code{curses.h} library for screen control.")
5044 (license (license:fsf-free "file://README"))))
5045
5046(define-public glulxe
5047 (package
5048 (name "glulxe")
5049 (version "0.5.4")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
5054 "glulx/interpreters/glulxe/glulxe-054.tar.gz"))
5055 (sha256
5056 (base32
5057 "0vipydg6ra90yf9b3ipgppwxyb2xdhcxwvirgjy0v20wlf56zhhz"))))
5058 (build-system gnu-build-system)
5059 (inputs `(("glk" ,glkterm)))
5060 (arguments
5061 '(#:tests? #f ; no check target
5062 #:make-flags
5063 (let* ((glk (assoc-ref %build-inputs "glk")))
5064 (list (string-append "GLKINCLUDEDIR=" glk "/include")
5065 (string-append "GLKLIBDIR=" glk "/lib")
5066 (string-append "GLKMAKEFILE=" "Make.glkterm")))
5067 #:phases
5068 (modify-phases %standard-phases
5069 (replace 'install
5070 (lambda* (#:key outputs #:allow-other-keys)
5071 (let* ((out (assoc-ref outputs "out"))
5072 (bin (string-append out "/bin")))
5073 (install-file "glulxe" bin))
5074 #t))
5075 (delete 'configure)))) ; no configure script
5076 (home-page "https://www.eblong.com/zarf/glulx/")
5077 (synopsis "Interpreter for Glulx VM")
5078 (description
5079 "Glulx is a 32-bit portable virtual machine intended for writing and
5080playing interactive fiction. It was designed by Andrew Plotkin to relieve
5081some of the restrictions in the venerable Z-machine format. This is the
5082reference interpreter, using the Glk API.")
5083 (license license:expat)))
5084
5085(define-public fifechan
5086 (package
5087 (name "fifechan")
5088 (version "0.1.5")
5089 (source (origin
5090 (method url-fetch)
5091 (uri (string-append "https://codeload.github.com/fifengine/"
5092 "fifechan/tar.gz/" version))
5093 (file-name (string-append name "-" version ".tar.gz"))
5094 (sha256
5095 (base32
5096 "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
5097 (build-system cmake-build-system)
5098 (inputs
5099 (list sdl2 sdl2-image mesa))
5100 (arguments
5101 '(#:tests? #f)) ; No included tests
5102 (home-page "https://fifengine.github.io/fifechan/")
5103 (synopsis "Cross platform GUI library specifically for games")
5104 (description
5105 "Fifechan is a lightweight cross platform GUI library written in C++
5106specifically designed for games. It has a built in set of extendable GUI
5107Widgets, and allows users to create more.")
5108 (license license:lgpl2.1+)))
5109
5110(define-public fifengine
5111 (package
5112 (name "fifengine")
5113 (version "0.4.2")
5114 (source (origin
5115 (method url-fetch)
5116 (uri (string-append "https://codeload.github.com/fifengine/"
5117 "fifengine/tar.gz/" version))
5118 (file-name (string-append name "-" version ".tar.gz"))
5119 (patches (search-patches "fifengine-swig-compat.patch"
5120 "fifengine-boost-compat.patch"
5121 "fifengine-python-3.9-compat.patch"))
5122 (sha256
5123 (base32
5124 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
5125 (build-system cmake-build-system)
5126 (arguments
5127 (list #:tests? #f ;TODO The test running fails to run some tests.
5128 #:configure-flags
5129 #~(list
5130 (string-append "-DOPENALSOFT_INCLUDE_DIR="
5131 (search-input-directory %build-inputs "include/AL"))
5132 (string-append "-DPYTHON_SITE_PACKAGES="
5133 #$output "/lib/python"
5134 #$(version-major+minor
5135 (package-version (this-package-input "python")))
5136 "/site-packages"))
5137 #:phases
5138 #~(modify-phases %standard-phases
5139 (add-after 'unpack 'patch-run_tests.py
5140 (lambda _
5141 ;; Patch the test runner to exit with a status of 1 if any test
5142 ;; fails, to allow detecting failures.
5143 (substitute* "run_tests.py"
5144 (("ERROR\\. One or more tests failed!'\\)")
5145 "ERROR. One or more tests failed!')
5146\t\texit(1)"))))
5147 ;; Run tests after installation so that we can make use of the built
5148 ;; python modules.
5149 (delete 'check)
5150 (add-after 'install 'check
5151 (lambda* (#:key tests? #:allow-other-keys)
5152 (when tests?
5153 ;; The tests require an X server.
5154 (system "Xvfb :1 &")
5155 (setenv "DISPLAY" ":1")
5156 (setenv "XDG_RUNTIME_DIR" "/tmp")
5157 ;; Run tests
5158 (chdir #$(string-append "../" (package-name this-package)
5159 "-" (package-version this-package)))
5160 (invoke "python3" "run_tests.py" "-a")))))))
5161 (native-inputs
5162 (list python swig-4.4 xorg-server-for-tests))
5163 (inputs
5164 (list sdl2
5165 sdl2-image
5166 sdl2-ttf
5167 tinyxml
5168 openal
5169 libogg
5170 glew
5171 libvorbis
5172 boost-1.83
5173 fifechan
5174 swig-4.4
5175 python))
5176 (propagated-inputs
5177 (list python-future))
5178 (home-page "https://www.fifengine.net/")
5179 (synopsis "FIFE is a multi-platform isometric game engine written in C++")
5180 (description
5181 "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
5182isometric game engine. Python bindings are included allowing users to create
5183games using Python as well as C++.")
5184 (license license:lgpl2.1+)))
5185
5186(define-public fizmo
5187 (package
5188 (name "fizmo")
5189 (version "0.8.5")
5190 (source (origin
5191 (method url-fetch)
5192 (uri (string-append "https://fizmo.spellbreaker.org/source/"
5193 "fizmo-" version ".tar.gz"))
5194 (sha256
5195 (base32
5196 "1amyc4n41jf08kxmdgkk30bzzx54miaxa97w28f417qwn8lrl98w"))))
5197 (build-system gnu-build-system)
5198 (arguments
5199 '(#:configure-flags
5200 (let ((libjpeg (assoc-ref %build-inputs "libjpeg"))
5201 (ncurses (assoc-ref %build-inputs "ncurses")))
5202 (list (string-append "--with-jpeg-includedir=" libjpeg "/include")))))
5203 (native-inputs
5204 (list pkg-config))
5205 (inputs
5206 `(("freetype" ,freetype)
5207 ("libjpeg" ,libjpeg-turbo)
5208 ("libpng" ,libpng)
5209 ("libsndfile" ,libsndfile)
5210 ("libxml2" ,libxml2)
5211 ("ncurses" ,ncurses)
5212 ("sdl2" ,sdl2)))
5213 (home-page "https://fizmo.spellbreaker.org/")
5214 (synopsis "Z-machine interpreter")
5215 (description
5216 "Fizmo is a console-based Z-machine interpreter. It is used to play
5217interactive fiction, also known as text adventures, which were implemented
5218either by Infocom or created using the Inform compiler.")
5219 (license license:bsd-3)))
5220
5221(define-public gnugo
5222 (package
5223 (name "gnugo")
5224 (version "3.8")
5225 (source (origin
5226 (method url-fetch)
5227 (uri (string-append "mirror://gnu/gnugo/gnugo-" version
5228 ".tar.gz"))
5229 (sha256
5230 (base32
5231 "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
5232 (build-system gnu-build-system)
5233 (inputs
5234 (list readline))
5235 (arguments
5236 `(#:configure-flags '("CFLAGS=-fcommon")))
5237 (synopsis "Play the game of Go")
5238 (description
5239 "GNU Go is a program that plays the game of Go, in which players
5240place stones on a grid to form territory or capture other stones. While
5241it can be played directly from the terminal, rendered in ASCII characters,
5242it is also possible to play GNU Go with 3rd party graphical interfaces or
5243even in Emacs. It supports the standard game storage format (SGF, Smart
5244Game Format) and inter-process communication format (GMP, Go Modem
5245Protocol).")
5246 (home-page "https://www.gnu.org/software/gnugo/")
5247 (license license:gpl3+)))
5248
5249(define-public extremetuxracer
5250 (package
5251 (name "extremetuxracer")
5252 (version "0.8.4")
5253 (source (origin
5254 (method url-fetch)
5255 (uri (string-append
5256 "mirror://sourceforge/extremetuxracer/releases/"
5257 version "/etr-" version ".tar.xz"))
5258 (sha256
5259 (base32
5260 "1rbk8zqfzzk90znf3f5lqqa12j0n6pm2qgwzabzmlnkm1k68acps"))))
5261 (build-system gnu-build-system)
5262 (native-inputs
5263 (list pkg-config))
5264 (inputs
5265 (list glu sfml-2))
5266 (synopsis "High-speed arctic racing game based on Tux Racer")
5267 ;; Snarfed straight from Debian.
5268 (description "Extreme Tux Racer, or etracer as it is called for short, is
5269a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the
5270game is to slide down a snow- and ice-covered mountain as quickly as possible,
5271avoiding the trees and rocks that will slow you down.
5272
5273Collect herrings and other goodies while sliding down the hill, but avoid fish
5274bones.
5275
5276This game is based on the GPL version of the famous game TuxRacer.")
5277 (home-page "https://sourceforge.net/projects/extremetuxracer/")
5278 (license license:gpl2+)))
5279
5280(define-public exult
5281 (package
5282 (name "exult")
5283 (version "1.8")
5284 (source
5285 (origin
5286 ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
5287 (method git-fetch)
5288 (uri (git-reference
5289 (url "https://github.com/exult/exult")
5290 (commit (string-append "v" version))))
5291 (file-name (git-file-name name version))
5292 (sha256
5293 (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
5294 (build-system gnu-build-system)
5295 (outputs (list "out" "gimp" "studio"))
5296 (arguments
5297 (list #:configure-flags
5298 #~(list "--enable-shared"
5299 "--disable-static"
5300 "--enable-lto"
5301 "--enable-exult-studio"
5302 "--enable-exult-studio-support"
5303 "--enable-compiler"
5304 "--enable-mods" ; needs --enable-compiler!
5305 "--enable-gimp-plugin"
5306 ;; A few lines on stdout can save a lot of head-scratching:
5307 "CPPFLAGS=-DDEBUG_PATHS=1")
5308 #:phases
5309 #~(modify-phases %standard-phases
5310 (add-before 'bootstrap 'patch-game-home-directory
5311 (lambda _
5312 (substitute* "gamemgr/modmgr.cc"
5313 ;; EXULT_DATADIR is in the store where it's rather hard for
5314 ;; users to put game assets. Use a more writable home by
5315 ;; default, which users can override in their ~/.exult.cfg.
5316 (("<GAMEHOME>")
5317 (string-append "<HOME>/.local/share/exult"))
5318 ;; …however, this causes a regression: the mods which we'll
5319 ;; install to EXULT_DATADIR are no longer found. So: don't
5320 ;; look for mods alongside the assets by default. This too
5321 ;; can be overridden in users' ~/.exult.cfg.
5322 (("game_path( \\+ \"/mods\")" _ +suffix)
5323 (string-append "get_system_path(\"<GAMEHOME>/\") + "
5324 "cfgname" +suffix)))))
5325 (add-before 'bootstrap 'move-exult-studio
5326 (lambda* (#:key outputs #:allow-other-keys)
5327 (let ((out (assoc-ref outputs "studio")))
5328 (substitute* "mapedit/studio.cc"
5329 (("(esdir, )EXULT_DATADIR" _ prefix)
5330 (string-append prefix "\"" out "/share/exult\"")))
5331 (substitute* "data/Makefile.am"
5332 (("(estudionewdir =.*)\\$\\(datadir\\)(.*)"
5333 _ variable= suffix)
5334 (string-append variable= out "/share" suffix "\n"))))))
5335 (add-before 'bootstrap 'fix-gimp-plug-in-prefix
5336 ;; ./configure will propagate this value to myriad Makefiles
5337 ;; scattered across the tree, so fix it early.
5338 (lambda* (#:key outputs #:allow-other-keys)
5339 (let ((out (assoc-ref outputs "gimp")))
5340 (substitute* "configure.ac"
5341 (("(GIMP_PLUGIN_PREFIX=).*" _ variable=)
5342 (string-append variable= out "/lib/gimp/2.0"))))))
5343 (add-after 'install 'move-exult_studio
5344 (lambda* (#:key outputs #:allow-other-keys)
5345 (let ((source (assoc-ref outputs "out"))
5346 (target (assoc-ref outputs "studio"))
5347 (file "/bin/exult_studio"))
5348 (mkdir-p (string-append target (dirname file)))
5349 (rename-file (string-append source file)
5350 (string-append target file))))))))
5351 (native-inputs
5352 (list autoconf automake libtool pkg-config
5353 ;; The following are needed only by the GIMP plug-in.
5354 gimp libjpeg-turbo
5355 gegl gtk+-2 ; needed by gimpui-2.0.pc
5356 ;; The following are needed only by the Usecode compiler.
5357 bison flex))
5358 (inputs
5359 (list fluidsynth freetype libvorbis sdl2
5360 ;; GTK is needed only by Exult Studio.
5361 gtk+))
5362 (synopsis "Role-playing game engine compatible with Ultima VII")
5363 (description
5364 "Exult is an Ultima 7 game engine that runs on modern operating systems.
5365Ultima 7 (or Ultima VII) is a two-part @acronym{RPG, role-playing game} from the
5366early 1990s.
5367
5368Exult is fully compatible with the original Ultima 7, but doesn't require any
5369of its data files to be useful. Explore entirely new game worlds---or create
5370your own with the included game and map editor, Exult Studio.
5371
5372This package expects the game(s) to be placed in subdirectories of
5373@file{~/.local/share/exult}.")
5374 (home-page "http://exult.info/")
5375 (license license:gpl2+)))
5376
5377(define %supertuxkart-version "1.5")
5378(define supertuxkart-source
5379 (origin
5380 (method git-fetch)
5381 (uri (git-reference
5382 (url "https://github.com/supertuxkart/stk-code")
5383 (commit %supertuxkart-version)))
5384 (sha256
5385 (base32
5386 "0q2dsv9vxblnv04d73qlvbbnkrxgywplz6qsqmfbamn7lj57kypx"))
5387 (file-name (git-file-name "supertuxkart" %supertuxkart-version))
5388 (modules '((guix build utils)))
5389 (snippet
5390 ;; Delete bundled library sources
5391 '(begin
5392 ;; Supertuxkart uses modified versions of the Irrlicht engine
5393 ;; and the bullet library. The developers gave an explanation
5394 ;; here: http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
5395 ;; FIXME: try to unbundle angelscript and libraqm
5396 (for-each delete-file-recursively
5397 '("lib/dnsc"
5398 "lib/enet"
5399 "lib/mcpp"
5400 "lib/mojoal"
5401 "lib/wiiuse"))))))
5402
5403(define-public supertuxkart-data
5404 ;; There are no tags or releases for the stk-assets data, nor indication of
5405 ;; which revision is bundled into the released SuperTuxKart-*-src tarball;
5406 ;; use the latest SVN revision available.
5407 (let ((commit "18621"))
5408 (hidden-package
5409 (package
5410 (name "supertuxkart-data")
5411 ;; The package produced is a merger of supertuxkart's "stk-assets"
5412 ;; repository and the "stk-code" repository's "data" directory, so
5413 ;; include the code version as well.
5414 (version (string-append %supertuxkart-version "-" commit))
5415 (source
5416 (origin
5417 (method svn-fetch)
5418 (uri (svn-reference
5419 (url "https://svn.code.sf.net/p/supertuxkart/code/stk-assets")
5420 (revision (string->number commit))))
5421 (file-name (string-append name "-" commit "-checkout"))
5422 (sha256
5423 (base32
5424 "0bz4rab0h6dyf014andw7lpd5gh3b2xqdslx0ffdglmf65xi594a"))))
5425 (build-system copy-build-system)
5426 (arguments
5427 (list #:install-plan
5428 #~'(("." "share/supertuxkart/data"
5429 #:exclude-regexp ("wip-.*")))
5430 #:phases
5431 #~(modify-phases %standard-phases
5432 (add-after 'unpack 'copy-code-data
5433 (lambda _
5434 (copy-recursively
5435 (string-append
5436 #$(this-package-input
5437 (git-file-name "supertuxkart" %supertuxkart-version))
5438 "/data/")
5439 "."))))))
5440 (inputs (list supertuxkart-source))
5441 (home-page "https://supertuxkart.net/Main_Page")
5442 (synopsis "Data files for SuperTuxKart")
5443 (description "This package contains data files for SuperTuxKart.")
5444 (license (list license:gpl3+
5445 license:cc-by-sa3.0
5446 license:cc-by-sa4.0
5447 license:cc0))))))
5448
5449(define-public supertuxkart
5450 (package
5451 (name "supertuxkart")
5452 (version %supertuxkart-version)
5453 (source supertuxkart-source)
5454 (build-system cmake-build-system)
5455 (arguments
5456 (list #:tests? #f ; no check target
5457 #:configure-flags
5458 #~(list "-DCHECK_ASSETS=FALSE" ; assets are out-of-tree
5459 (string-append "-DSTK_INSTALL_DATA_DIR_ABSOLUTE="
5460 #$(this-package-input "supertuxkart-data")
5461 "/share/supertuxkart")
5462 "-DUSE_WIIUSE=0"
5463 "-DUSE_SYSTEM_ENET=TRUE"
5464 "-DUSE_CRYPTO_OPENSSL=TRUE"
5465 ;; In order to use the system ENet library, IPv6 support
5466 ;; (added in SuperTuxKart version 1.1) must be disabled.
5467 "-DUSE_IPV6=FALSE")
5468 #:phases
5469 #~(modify-phases %standard-phases
5470 (add-before 'configure 'disable-data-install
5471 (lambda _
5472 (substitute* "CMakeLists.txt"
5473 (("^install\\(DIRECTORY.*STK_DATA_DIR" &)
5474 (string-append "# " &))))))))
5475 (inputs
5476 (list curl
5477 freetype
5478 fribidi
5479 glew
5480 harfbuzz
5481 libopenglrecorder
5482 libvorbis
5483 libx11
5484 libxrandr
5485 mesa
5486 openal
5487 sdl2
5488 sqlite
5489 supertuxkart-data
5490 zlib
5491 ;; The following input is needed to build the bundled and modified
5492 ;; version of irrlicht.
5493 enet
5494 libjpeg-turbo
5495 openssl))
5496 (native-inputs (list mcpp pkg-config python shaderc))
5497 (home-page "https://supertuxkart.net/Main_Page")
5498 (synopsis "3D kart racing game")
5499 (description "SuperTuxKart is a 3D kart racing game, with a focus on
5500having fun over realism. You can play with up to 4 friends on one PC, racing
5501against each other or just trying to beat the computer; single-player mode is
5502also available.")
5503 (license license:gpl3+)))
5504
5505(define-public ring-racers-data
5506 (hidden-package
5507 (package
5508 (name "ring-racers-data")
5509 (version "2.4")
5510 (source
5511 (origin
5512 (method url-fetch/zipbomb)
5513 (uri (string-append
5514 "https://github.com/KartKrewDev/RingRacers/releases/download/v"
5515 version "/Dr.Robotnik.s-Ring-Racers-v" version "-Assets.zip"))
5516 (file-name (string-append name "-" version ".zip"))
5517 (sha256
5518 (base32 "087i1bz46g57s0850j5wf9j2bdmr451lzg156hrg681chwdxgfpf"))))
5519 (build-system copy-build-system)
5520 (home-page "https://github.com/KartKrewDev/RingRacers/releases")
5521 (synopsis "Data files for Ring Racers")
5522 (description "This package contains data files for Ring Racers.")
5523 (license license:gpl2+))))
5524
5525(define-public ring-racers
5526 (package
5527 (name "ring-racers")
5528 (version "2.4")
5529 (source
5530 (origin
5531 (method git-fetch)
5532 (uri (git-reference
5533 (url "https://gitlab.com/kart-krew-dev/ring-racers")
5534 (commit (string-append "v" version))))
5535 (file-name (git-file-name name version))
5536 (sha256
5537 (base32 "05aj09rm50xb6910zx6imarj8k728x9bpvpa7ydwgb4sj1nypil8"))
5538 (modules '((guix build utils)))
5539 (snippet
5540 '(begin
5541 (with-directory-excursion "thirdparty"
5542 ;; Delete third party ibraries, except these libraries:
5543 ;; glad: header file is not available in the system glad package.
5544 ;; imgui: configured with "srb2_imconfig.h".
5545 ;; libwebm: Not available in Guix.
5546 ;; renamenoise: Not available in Guix.
5547 ;; tracy: header files are not available in the system tracy
5548 ;; package.
5549 (for-each delete-file-recursively
5550 '("discord-rpc"
5551 "glm"
5552 "nlohmann-json"
5553 "overlay-ports/libyuv"
5554 "tcbrindle_span"
5555 "vma"
5556 "volk"
5557 "vulkan-headers"
5558 "xmp-lite"))
5559 ;; Unbundle stb.
5560 (with-directory-excursion "stb"
5561 (for-each delete-file
5562 '("include/stb_rect_pack.h"
5563 "stb_vorbis.c"))
5564 (substitute* "stb_rect_pack.c"
5565 (("\"include\\/stb_rect_pack\\.h\"") "<stb_rect_pack.h>"))
5566 (substitute* "CMakeLists.txt"
5567 (("include\\/stb_rect_pack\\.h ") "")))
5568 ;; Find third party libraries from the system and do not add the
5569 ;; deleted directories.
5570 (substitute* "CMakeLists.txt"
5571 (("add_subdirectory\\((glm|discord-rpc|xmp-lite|fmt|volk)\\)"
5572 _ keep)
5573 (string-append "find_package(" keep " REQUIRED)"))
5574 (("xmp-lite") "libxmp")
5575 ((".*nlohmann-json.*") "")
5576 ((".*tcbrindle_span.*") "")
5577 ((".*vulkan-headers.*") "")
5578 ((".*vma.*") "")))
5579 (with-directory-excursion "src"
5580 ;; Link the system libraries instead of the unbundled ones.
5581 (substitute* "CMakeLists.txt"
5582 ((".*tcbrindle::span.*") "")
5583 (("glm::glm") "glm")
5584 (("xmp-lite::xmp-lite") "xmp")
5585 (("fmt::fmt-header-only") "fmt")
5586 ((".*nlohmann_json::nlohmann_json.*") "")))
5587 ;; Rename the icon to match with the executable file.
5588 (rename-file "srb2.png" "ringracers.png")))))
5589 (build-system cmake-build-system)
5590 (arguments
5591 (list
5592 #:tests? #f ;There are no tests.
5593 #:configure-flags
5594 #~(list "-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF"
5595 "-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'"
5596 "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'")
5597 #:phases
5598 #~(modify-phases %standard-phases
5599 (add-after 'unpack 'copy-stb_vorbis.c
5600 (lambda* (#:key inputs #:allow-other-keys)
5601 (install-file (search-input-file inputs "/stb_vorbis.c")
5602 "thirdparty/stb")))
5603 (replace 'install
5604 (lambda _
5605 (install-file "bin/ringracers" (string-append #$output "/bin"))
5606 (install-file "../source/ringracers.png"
5607 (string-append #$output "/share/pixmaps"))))
5608 (add-after 'install 'wrap-program
5609 (lambda* (#:key inputs #:allow-other-keys)
5610 (wrap-program (string-append #$output "/bin/ringracers")
5611 `("RINGRACERSWADDIR" =
5612 (,(assoc-ref inputs "ring-racers-data"))))))
5613 (add-after 'wrap-program 'create-desktop-entry
5614 (lambda _
5615 (let* ((datadir (string-append #$output "/share"))
5616 (appdir (string-append datadir "/applications")))
5617 (mkdir-p appdir)
5618 (make-desktop-entry-file (string-append appdir
5619 "/ringracers.desktop")
5620 #:name "Dr. Robotnik's Ring Racers"
5621 #:comment "Technical kart racing game"
5622 #:icon "ringracers"
5623 #:exec (string-append #$output "/bin/ringracers")
5624 #:startup-notify #f
5625 #:categories '("Application" "Game"))))))))
5626 (native-inputs
5627 (list pkg-config
5628 (package-source stb)))
5629 (inputs (list bash-minimal
5630 curl
5631 fmt
5632 glm
5633 libogg
5634 libpng
5635 libvorbis
5636 libvpx
5637 libxmp
5638 libyuv
5639 nlohmann-json
5640 opus
5641 ring-racers-data
5642 sdl2
5643 stb-rect-pack
5644 tcbrindle-span
5645 vulkan-headers
5646 vulkan-memory-allocator
5647 vulkan-volk
5648 zlib))
5649 (home-page "https://www.kartkrew.org/")
5650 (synopsis "Technical kart racing game")
5651 (description
5652 "Dr.@: Robotnik's Ring Racers is a kart racing game drawing inspiration
5653from \"anti-gravity\" racers, fighting games, and traditional-style kart
5654racing. Ring Racers is designed with an emphasis on player agency in the face
5655of highly technical game-play challenges in both single-player and online
5656multiplayer modes.")
5657 (license license:gpl2+)))
5658
5659(define-public unknown-horizons
5660 (package
5661 (name "unknown-horizons")
5662 (version "2019.1")
5663 (source
5664 (origin
5665 (method url-fetch)
5666 (uri (string-append "https://codeload.github.com/unknown-horizons/"
5667 "unknown-horizons/tar.gz/" version))
5668 (file-name (string-append name "-" version ".tar.gz"))
5669 (sha256
5670 (base32 "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
5671 (patches (search-patches "unknown-horizons-python-3.8-distro.patch"
5672 "unknown-horizons-python-3.9.patch"
5673 "unknown-horizons-python-3.10.patch"))))
5674 (build-system pyproject-build-system)
5675 (arguments
5676 (list
5677 #:test-flags
5678 ;; 'tutorial' scenario not in the database.
5679 #~(list "-k" (string-join (list "not test_start_scenario_by_name"
5680 "test_start_scenario_by_path")
5681 " and not "))
5682 #:phases
5683 #~(modify-phases %standard-phases
5684 (add-before 'build 'set-HOME
5685 (lambda _
5686 (setenv "HOME" "/tmp")))
5687 (add-after 'build 'build-extra
5688 (lambda _
5689 (invoke "python3" "./setup.py" "build_i18n")
5690 (invoke "python3" "horizons/engine/generate_atlases.py" "2048")))
5691 (add-after 'install 'patch
5692 (lambda _
5693 (substitute* (string-append #$output "/bin/unknown-horizons")
5694 (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
5695 (string-append "os.chdir(\""
5696 #$output "/share/unknown-horizons\")")))))
5697 (add-before 'check 'fix-tests-with-pytest>=4
5698 (lambda _
5699 (substitute* "tests/conftest.py"
5700 (("pytest_namespace")
5701 "pytest_configure")
5702 (("get_marker")
5703 "get_closest_marker"))))
5704 ;; TODO: Run GUI tests as well
5705 (replace 'check
5706 (lambda args
5707 (substitute* "horizons/constants.py"
5708 (("IS_DEV_VERSION = False")
5709 "IS_DEV_VERSION = True"))
5710 (apply (assoc-ref %standard-phases 'check) args)
5711 (substitute* "horizons/constants.py"
5712 (("IS_DEV_VERSION = True")
5713 "IS_DEV_VERSION = False")))))))
5714 (inputs
5715 (list fifengine
5716 (list python "tk")
5717 python-pillow
5718 python-pyyaml))
5719 (native-inputs
5720 (list intltool
5721 python-distro
5722 ;; Required for tests
5723 python-greenlet
5724 python-polib
5725 python-pytest
5726 python-pytest-mock
5727 python-setuptools))
5728 (home-page "https://unknown-horizons.org/")
5729 (synopsis
5730 "Isometric realtime strategy, economy and city building simulation")
5731 (description
5732 "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
5733on economy and city building. Expand your small settlement to a strong and
5734wealthy colony, collect taxes and supply your inhabitants with valuable
5735goods. Increase your power with a well balanced economy and with strategic
5736trade and diplomacy.")
5737 (license (list license:gpl2+ ;Covers code
5738 license:expat ;tests/dummy.py, ext/polib.py
5739 license:cc-by-sa3.0 ;Covers some media content
5740 license:cc-by3.0 ;Covers some media content
5741 license:bsd-3)))) ; horizons/ext/speaklater.py
5742
5743(define-public zmusic
5744 (package
5745 (name "zmusic")
5746 (version "1.3.0")
5747 (source
5748 (origin
5749 (method git-fetch)
5750 (uri (git-reference
5751 (url "https://github.com/UZDoom/ZMusic")
5752 (commit version)))
5753 (file-name (git-file-name name version))
5754 (sha256
5755 (base32 "065wrk88rnpjd0jayc4gw45ynviky7s6ncg9ixw31i3nk8vh639f"))
5756 (modules '((guix build utils)))
5757 (snippet
5758 #~(begin
5759 (with-directory-excursion "thirdparty"
5760 (for-each delete-file-recursively
5761 '("game-music-emu"
5762 "fluidsynth"))
5763 (substitute* "CMakeLists.txt"
5764 (("add_subdirectory\\(game-music-emu\\)")
5765 "find_package(PkgConfig)
5766pkg_search_module(game-music-emu REQUIRED libgme)")
5767 (("add_subdirectory\\(fluidsynth/src\\)")
5768 "find_package(FluidSynth REQUIRED)")))
5769 (substitute* (find-files "source" "\\.(h|cpp)")
5770 (("include \".*fluidsynth.h\"")
5771 "include <fluidsynth.h>"))))))
5772 (build-system cmake-build-system)
5773 (arguments (list #:tests? #f)) ;No tests.
5774 (inputs (list fluidsynth glib libgme))
5775 (native-inputs (list pkg-config))
5776 (home-page "https://github.com/UZDoom/ZMusic")
5777 (synopsis "UZDoom's music system")
5778 (description "ZMusic is a standalone library implementing the music
5779system for UZDoom and other Doom-related projects.")
5780 (license license:gpl3)))
5781
5782(define-public uzdoom
5783 (let ((commit "1458bf021f939e28c71ddd0e92e2ea66bfa64a0e")
5784 (revision "0"))
5785 (package
5786 (name "uzdoom")
5787 (version (git-version "4.14.3" revision commit))
5788 (source
5789 (origin
5790 (method git-fetch)
5791 (uri (git-reference
5792 (url "https://github.com/UZDoom/UZDoom")
5793 (commit commit)))
5794 (file-name (git-file-name name version))
5795 (sha256
5796 (base32 "0nl76c3j728vwz4n91f4jhla4z9wpx0g93bq4987ix82fxm51b5r"))
5797 (modules '((guix build utils)))
5798 (snippet
5799 #~(begin
5800 (for-each delete-file-recursively
5801 '("bin" "unused" ;Self-explanatory
5802 "libraries/bzip2" "libraries/miniz"
5803 "libraries/ZMusic" ;De-vendored.
5804 "wadsrc_widepix/static")) ;Non-commercial license.
5805 (substitute* "CMakeLists.txt"
5806 (("add_subdirectory\\( libraries/miniz \\)")
5807 "find_package(miniz REQUIRED)"))
5808 (substitute* (find-files "." ".*\\.(c(pp)?|h)")
5809 (("miniz.h") "miniz/miniz.h"))
5810 ;; Add store prefix to search paths.
5811 (substitute* "src/gameconfigfile.cpp"
5812 (("DefaultSearchPaths\\.Push.+/usr/share.+;" line)
5813 (string-append
5814 "DefaultSearchPaths.Push(\"$GUIX_UZDOOM_PREFIX/share\""
5815 " + GameDirs[i]); " line)))
5816 ;; Embed correct version.
5817 (substitute* "tools/updaterevision/gitinfo.h.in"
5818 (("@Tag@") (string-append #$version "-guix")))))))
5819 (build-system cmake-build-system)
5820 (arguments
5821 (list #:tests? #f ;No tests.
5822 #:configure-flags
5823 #~(list "-DBUILD_NONFREE=OFF"
5824 "-DFORCE_CROSSCOMPILE=OFF"
5825 "-DFORCE_INTERNAL_ASMJIT=OFF"
5826 "-DFORCE_INTERNAL_ZMUSIC=OFF"
5827 "-DDYN_OPENAL=OFF")
5828 #:phases
5829 #~(modify-phases %standard-phases
5830 (add-after 'install 'wrap-uzdoom
5831 (lambda _
5832 (wrap-program (string-append #$output "/bin/uzdoom")
5833 `("GUIX_UZDOOM_PREFIX" = (,#$output))))))))
5834 (inputs (list (module-ref
5835 (resolve-interface '(gnu packages debug)) 'cppdap)
5836 asmjit
5837 bzip2
5838 dbus
5839 gtk+
5840 libomp
5841 libvpx
5842 libxkbcommon
5843 miniz
5844 openal
5845 sdl2
5846 zmusic))
5847 (native-inputs (list pkg-config python))
5848 (home-page "https://zdoom.org/")
5849 (synopsis "Doom source port with advanced rendering and scripting")
5850 (description "UZDoom is a ``modder-friendly'' Doom source port with
5851advanced rendering and scripting features, derived from GZDoom and ZDoom.")
5852 (license (list license:apsl2 ;zvulkan/vulkan
5853 license:bsd-0 ;zvulkan/src/{vk_mem_alloc,volk},
5854 ;discordrpc
5855 license:bsd-3 ;zvulkan{,/src/glslang}, zwidget, sfmt,
5856 ;utf8proc, zscript
5857 license:cc-by-sa4.0 ;branding
5858 license:expat ;utf8proc_data.c
5859 license:gpl3+))))) ;base license
5860
5861(define-public gnujump
5862 (package
5863 (name "gnujump")
5864 (version "1.0.8")
5865 (source (origin
5866 (method url-fetch)
5867 (uri (string-append "mirror://gnu/gnujump/gnujump-"
5868 version ".tar.gz"))
5869 (sha256
5870 (base32
5871 "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"))))
5872 (build-system gnu-build-system)
5873 (arguments
5874 '(#:phases
5875 (modify-phases %standard-phases
5876 (add-before
5877 'configure 'link-libm
5878 (lambda _ (setenv "LIBS" "-lm")))
5879 (add-after 'install 'create-desktop-entry
5880 (lambda* (#:key outputs #:allow-other-keys)
5881 (let* ((out (assoc-ref outputs "out"))
5882 (apps (string-append out "/share/applications")))
5883 (mkdir-p apps)
5884 (with-output-to-file
5885 (string-append apps "/gnujump.desktop")
5886 (lambda _
5887 (format #t
5888 "[Desktop Entry]~@
5889 Name=GNUjump~@
5890 Comment=Jump up the tower to survive~@
5891 Exec=~a/bin/gnujump~@
5892 Terminal=false~@
5893 Type=Application~@
5894 Categories=Game;ArcadeGame~%"
5895 out)))))))))
5896 (inputs
5897 (list glu mesa sdl sdl-image sdl-mixer))
5898 (home-page "http://gnujump.es.gnu.org/")
5899 (synopsis
5900 "Game of jumping to the next floor, trying not to fall")
5901 (description
5902 "GNUjump is a simple, yet addictive game in which you must jump from
5903platform to platform to avoid falling, while the platforms drop at faster rates
5904the higher you go. The game features multiplayer, unlimited FPS, smooth floor
5905falling, themeable graphics and sounds, and replays.")
5906 (license license:gpl3+)))
5907
5908(define-public wesnoth
5909 (package
5910 (name "wesnoth")
5911 ;; Even-numbered minor versions indicate stable versions:
5912 ;; https://wiki.wesnoth.org/ReleasingWesnoth#Version_numbering
5913 (version "1.18.8")
5914 (source (origin
5915 (method git-fetch)
5916 (uri (git-reference
5917 (url "https://github.com/wesnoth/wesnoth")
5918 (commit version)))
5919 (file-name (git-file-name name version))
5920 (sha256
5921 (base32
5922 "12bpfg476ncpiak0b195qicnzz2dpcd5s0fgmm8rgfq05x1cfgkm"))))
5923 (build-system cmake-build-system)
5924 (arguments
5925 (list #:tests? #f ;no test target
5926 #:configure-flags #~'("-DENABLE_SYSTEM_LUA=ON")))
5927 (inputs
5928 (list boost-1.83
5929 curl
5930 dbus
5931 libvorbis
5932 lua-5.4-for-c++
5933 openssl
5934 pango
5935 sdl2
5936 sdl2-image
5937 sdl2-mixer))
5938 (native-inputs
5939 (list gettext-minimal
5940 pkg-config
5941 python-minimal))
5942 (home-page "https://www.wesnoth.org/")
5943 (synopsis "Turn-based strategy game")
5944 (description
5945 "The Battle for Wesnoth is a fantasy, turn based tactical strategy game,
5946with several single player campaigns, and multiplayer games (both networked and
5947local).
5948
5949Battle for control on a range of maps, using variety of units which have
5950advantages and disadvantages against different types of attacks. Units gain
5951experience and advance levels, and are carried over from one scenario to the
5952next campaign.")
5953 (license license:gpl2+)))
5954
5955(define-public wesnoth-server
5956 (package
5957 (inherit wesnoth)
5958 (name "wesnoth-server")
5959 (inputs
5960 (list boost-1.83 icu4c lua-5.4 openssl))
5961 (native-inputs
5962 (list pkg-config))
5963 (arguments
5964 (substitute-keyword-arguments arguments
5965 ((#:configure-flags _)
5966 #~'("-DENABLE_SYSTEM_LUA=ON" "-DENABLE_GAME=OFF"))))
5967 (synopsis "Dedicated @emph{Battle for Wesnoth} server")
5968 (description "This package contains a dedicated server for @emph{The
5969Battle for Wesnoth}.")))
5970
5971(define-public wordwarvi
5972 (package
5973 (name "wordwarvi")
5974 (version "1.0.4")
5975 (source
5976 (origin
5977 (method git-fetch)
5978 (uri (git-reference
5979 (url "https://github.com/smcameron/wordwarvi")
5980 (commit (string-append "v" version))))
5981 (file-name (git-file-name name version))
5982 (sha256
5983 (base32 "0f9xhm7267g27f2k1v4dylzvrfyhr9y60f5ypq5a5kiqrqykm245"))))
5984 (build-system gnu-build-system)
5985 (inputs (list alsa-lib gtk+-2 libvorbis portaudio))
5986 (native-inputs (list pkg-config))
5987 (arguments
5988 (list
5989 #:make-flags
5990 #~(list "BINDIR=/bin"
5991 (string-append "CC=" #$(cc-for-target))
5992 (string-append "DATADIR=" #$output "")
5993 (string-append "DESTDIR=" #$output) "PREFIX=")
5994 #:tests? #f ;no tests
5995 #:phases #~(modify-phases %standard-phases
5996 (delete 'configure)
5997 (add-after 'unpack 'fix-makefile
5998 (lambda _
5999 (substitute* "Makefile"
6000 (("/bin/rm")
6001 "rm")
6002 (("-DDATADIR=\\\\\"\\$\\{DATADIR\\}/\\\\\"")
6003 "-DDATADIR=\\\"${DESTDIR}/${DATADIR}/\\\"")))))))
6004 (home-page "https://smcameron.github.io/wordwarvi/")
6005 (synopsis "Arcade-style side scrolling space shooter")
6006 (description
6007 "In this game you pilot a combat space ship to rescue your lost \"vi\" .swp
6008files avoiding OS defenses. It contains several levels and the difficulty
6009level is configurable on the command line. It can be played with a keyboard
6010or a joystick. It is drawn mostly with lines, and supports various display
6011modes.")
6012 ;; For the code, most files are under GPLv2+, but since the ogg_to_pcm.c
6013 ;; file is GPLv2 without 'any later version', we use 'gpl2' because of the
6014 ;; ambiguity. For the sounds the licenses are declared in
6015 ;; sounds/Attribution.txt and for aaaah_it_burns.ogg, it can be viewed with
6016 ;; vorbiscomment -l.
6017 (license (list license:gpl2 ;For the code
6018 ;; lucky-holiday-cornbread-stuffing-mono.ogg
6019 ;; lucky13-steve-mono-mix.ogg
6020 ;; aaaah_it_burns.ogg
6021 license:cc-by3.0
6022 ;; all other sounds are under cc-by-sa 3.0
6023 license:cc-by-sa3.0))))
6024
6025(define-public gamine
6026 (package
6027 (name "gamine")
6028 (version "1.6")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append "mirror://sourceforge/gamine-game/"
6032 "gamine-" version ".tar.gz"))
6033 (sha256
6034 (base32
6035 "1sc6f4445ciigd6yw0ri92746k4hk6ps0bvj9fm1gbp3c3fslk5n"))))
6036 (build-system gnu-build-system)
6037 (native-inputs
6038 (list pkg-config intltool))
6039 (inputs
6040 (list bash-minimal
6041 gstreamer
6042 gst-plugins-base ; playbin plugin
6043 gst-plugins-good ; for wav playback
6044 gtk+))
6045 (arguments
6046 `(#:tests? #f
6047 #:make-flags
6048 (let ((out (assoc-ref %outputs "out")))
6049 (list (string-append "PREFIX=" out)
6050 (string-append "SYSCONFDIR=" out "/etc")))
6051 #:phases
6052 (modify-phases %standard-phases
6053 (delete 'configure)
6054 (add-after
6055 'install 'wrap-gamine
6056 (lambda* (#:key outputs #:allow-other-keys)
6057 (let ((out (assoc-ref outputs "out"))
6058 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
6059 (wrap-program (string-append out "/bin/gamine")
6060 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))))))))
6061 (home-page "http://gamine-game.sourceforge.net/")
6062 (synopsis "Mouse and keyboard discovery for children")
6063 (description
6064 "Gamine is a game designed for young children who are learning to use the
6065mouse and keyboard. The child uses the mouse to draw colored dots and lines
6066on the screen and keyboard to display letters.")
6067 ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
6068 (license license:gpl3)))
6069
6070(define-public manaplus
6071 (package
6072 (name "manaplus")
6073 (version "2.1.3.17")
6074 (source
6075 (origin
6076 (method git-fetch)
6077 (uri (git-reference
6078 (url "https://gitlab.com/manaplus/manaplus.git")
6079 (commit (string-append "v" version))))
6080 (file-name (git-file-name name version))
6081 (sha256
6082 (base32 "1b1mgj6pdccjhb3hvlag3ia1phkzndd7cmw053aqs2480bcpswsm"))))
6083 (build-system gnu-build-system)
6084 (arguments
6085 (list
6086 #:configure-flags
6087 #~(list "--with-sdl2"
6088 "--enable-unittests"
6089 ;; Standards c++0x or greater set GXX_EXPERIMENTAL_CXX0X which
6090 ;; causes stdint.h not to be included.
6091 "CXXFLAGS=-std=c++98")
6092 #:phases
6093 #~(modify-phases %standard-phases
6094 (add-before 'configure 'fix-libxml-and-time
6095 (lambda _
6096 ;; Fix libxml2 migration.
6097 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/33>.
6098 (substitute* (list "src/utils/dumplibs.cpp"
6099 "src/unittests/utils/dumplibs.cc")
6100 (("const char \\*\\*xmlVersion")
6101 "const char * const *xmlVersion")
6102 (("__xmlParserVersion\\(\\)")
6103 "&xmlParserVersion"))
6104 (substitute* "src/utils/xml/libxml.inc"
6105 (("ifdef ENABLE_LIBXML")
6106 "ifdef ENABLE_LIBXML\n#include <libxml/parser.h>"))
6107 ;; Include ctime when necessary.
6108 ;; See <https://gitlab.com/manaplus/manaplus/-/work_items/32>.
6109 (substitute* (list "src/resources/wallpaper.cpp"
6110 "src/progs/dyecmd/client.cpp")
6111 (("include \"debug.h\"")
6112 "include \"debug.h\"\n#include <ctime>"))))
6113 (add-before 'check 'set-home
6114 (lambda _
6115 (setenv "HOME" (getcwd)))))))
6116 (native-inputs
6117 (list autoconf
6118 automake
6119 gettext-minimal
6120 pkg-config))
6121 (inputs
6122 (list curl
6123 glu
6124 libxml2
6125 mesa
6126 sdl2
6127 sdl2-image
6128 sdl2-mixer
6129 sdl2-net
6130 sdl2-ttf))
6131 (home-page "https://manaplus.org")
6132 (synopsis "Client for 'The Mana World' and similar games")
6133 (description
6134 "ManaPlus is a 2D MMORPG client for game servers. It is the only
6135fully supported client for @uref{http://www.themanaworld.org, The mana
6136world}, @uref{http://evolonline.org, Evol Online} and
6137@uref{http://landoffire.org, Land of fire}.")
6138 ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
6139 ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
6140 ;; The rest is under GPL2+.
6141 (license (list license:gpl2+ license:zlib license:cc-by-sa3.0))))
6142
6143(define-public openttd-engine
6144 (package
6145 (name "openttd-engine")
6146 (version "15.3")
6147 (source
6148 (origin (method url-fetch)
6149 (uri (string-append "https://cdn.openttd.org/openttd-releases/"
6150 version "/openttd-" version "-source.tar.xz"))
6151 (sha256
6152 (base32
6153 "1rrvjxsr2dp9zr6b35ifiw41c0dwqqcaq90r0x18misrgpm1x8jy"))))
6154 (build-system cmake-build-system)
6155 (inputs
6156 (list allegro
6157 fontconfig
6158 freetype
6159 icu4c
6160 libpng
6161 lzo
6162 sdl2
6163 xz
6164 zlib))
6165 (synopsis "Transportation economics simulator game")
6166 (description "OpenTTD is a game in which you transport goods and
6167passengers by land, water and air. It is a re-implementation of Transport
6168Tycoon Deluxe with many enhancements including multiplayer mode,
6169internationalization support, conditional orders and the ability to clone,
6170autoreplace and autoupdate vehicles. This package only includes the game
6171engine. When you start it you will be prompted to download a graphics set.")
6172 (home-page "https://www.openttd.org/")
6173 ;; This package is GPLv2, except for a few files located in
6174 ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
6175 ;; licenses. In addition, this software contains an in-game downloader
6176 ;; from which the user may find non-functional data licensed under
6177 ;; different terms.
6178 (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
6179
6180(define-public openttd-opengfx
6181 (package
6182 (name "openttd-opengfx")
6183 (version "8.0")
6184 (source
6185 (origin
6186 (method git-fetch)
6187 (uri (git-reference
6188 (url "https://github.com/openttd/opengfx")
6189 (commit version)))
6190 (file-name (git-file-name name version))
6191 (sha256
6192 (base32
6193 "0rkyxbrfgb67q3crnlpkv0h9nmskn2yfj2i8sbbibxrya8r3whz6"))))
6194 (build-system gnu-build-system)
6195 (arguments
6196 (list
6197 #:make-flags
6198 #~(list (string-append "CC=" #$(cc-for-target))
6199 (string-append "INSTALL_DIR="
6200 #$output
6201 "/share/games/openttd/baseset/opengfx")
6202 "REPO_DATE=20000101"
6203 (string-append "PYTHON="
6204 #$(this-package-native-input "python")
6205 "/bin/python3"))
6206 #:phases
6207 #~(modify-phases %standard-phases
6208 (replace 'configure
6209 (lambda _
6210 ;; Make sure HOME is writable for GIMP.
6211 (setenv "HOME" (getcwd))
6212
6213 (mkdir-p ".local/share")
6214 (symlink (string-append #$(this-package-native-input "shared-mime-info")
6215 "/share/mime")
6216 ".local/share/mime")
6217
6218 ;; Redirect stdout, not stderr, to /dev/null. This prevents
6219 ;; dos2unix from receiving its version information as a flag.
6220 (substitute* "Makefile"
6221 (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
6222 "$(UNIX2DOS) -q --version 1>/dev/null")))))
6223 ;; The check phase for this package only checks the md5sums of the built
6224 ;; GRF files against the md5sums of the release versions. Because we use
6225 ;; different software versions than upstream does, some of the md5sums
6226 ;; are different. However, the package is still reproducible, it's safe
6227 ;; to disable this test.
6228 #:tests? #f
6229 #:parallel-build? #f))
6230 (native-inputs
6231 (list dos2unix
6232 shared-mime-info
6233 gimp
6234 grfcodec
6235 nml
6236 which
6237 python))
6238 (home-page "http://dev.openttdcoop.org/projects/opengfx")
6239 (synopsis "Base graphics set for OpenTTD")
6240 (description
6241 "The OpenGFX project is an implementation of the OpenTTD base graphics
6242set that aims to ensure the best possible out-of-the-box experience.
6243
6244OpenGFX provides you with...
6245@enumerate
6246@item All graphics you need to enjoy OpenTTD.
6247@item Uniquely drawn rail vehicles for every climate.
6248@item Completely snow-aware rivers.
6249@item Different river and sea water.
6250@item Snow-aware buoys.
6251@end enumerate")
6252 (license license:gpl2)))
6253
6254(define-public openttd-opensfx
6255 (package
6256 (name "openttd-opensfx")
6257 (version "1.0.3")
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (string-append
6262 "https://cdn.openttd.org/opensfx-releases/"
6263 version "/opensfx-" version "-source.tar.xz"))
6264 (sha256
6265 (base32 "0p336bn6brnbyrf537x36ad9rfz16cjwyzwws4lmfvnql8ycpjj3"))))
6266 (build-system gnu-build-system)
6267 (native-inputs
6268 (list catcodec
6269 python
6270 tar))
6271 (arguments
6272 (list
6273 #:make-flags
6274 #~(list (string-append "DIR_NAME=opensfx")
6275 (string-append "TAR="
6276 (search-input-file %build-inputs "/bin/tar")))
6277 ;; The check phase only verifies md5sums, see openttd-opengfx.
6278 #:tests? #f
6279 #:phases
6280 #~(modify-phases %standard-phases
6281 (add-after 'unpack 'make-reproducible
6282 (lambda _
6283 ;; Remove the time dependency of the installed tarball by setting
6284 ;; the modification times if its members to 0.
6285 (substitute* "scripts/Makefile.def"
6286 (("-cf") " --mtime=@0 -cf"))))
6287 (delete 'configure)
6288 (add-before 'build 'prebuild
6289 (lambda _ (invoke "make" "opensfx.cat")))
6290 (replace 'install
6291 (lambda* (#:key outputs #:allow-other-keys)
6292 (copy-recursively "opensfx"
6293 (string-append (assoc-ref outputs "out")
6294 "/share/games/openttd/baseset"
6295 "/opensfx")))))))
6296 (home-page "http://dev.openttdcoop.org/projects/opensfx")
6297 (synopsis "Base sounds for OpenTTD")
6298 (description "OpenSFX is a set of free base sounds for OpenTTD which make
6299it possible to play OpenTTD without requiring the proprietary sound files from
6300the original Transport Tycoon Deluxe.")
6301 (license license:cc-by-sa3.0)))
6302
6303(define-public openttd-openmsx
6304 (package
6305 (name "openttd-openmsx")
6306 (version "0.4.2")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (string-append
6311 "https://cdn.openttd.org/openmsx-releases/"
6312 version "/openmsx-" version "-source.tar.xz"))
6313 (sha256
6314 (base32
6315 "0h583d8fxy78kc3jvpp78r76a48qhxrhm4q7jbnj74aw0kwrcl8g"))))
6316 (build-system gnu-build-system)
6317 (native-inputs
6318 (list grfcodec
6319 ;; Scripts are Python3 compatible, but call the interpreter as
6320 ;; python instead of python3.
6321 python-wrapper
6322 tar))
6323 (arguments
6324 (list
6325 #:make-flags
6326 #~(list (string-append "DIR_NAME=openmsx")
6327 (string-append "TAR="
6328 (search-input-file %build-inputs "/bin/tar")))
6329 ;; The check phase only verifies md5sums, see openttd-opengfx.
6330 #:tests? #f
6331 #:phases
6332 #~(modify-phases %standard-phases
6333 (delete 'configure)
6334 (replace 'install
6335 (lambda* (#:key outputs #:allow-other-keys)
6336 (copy-recursively "openmsx"
6337 (string-append (assoc-ref outputs "out")
6338 "/share/games/openttd/baseset"
6339 "/openmsx")))))))
6340 (home-page "http://dev.openttdcoop.org/projects/openmsx")
6341 (synopsis "Music set for OpenTTD")
6342 (description "OpenMSX is a music set for OpenTTD which makes it possible
6343to play OpenTTD without requiring the proprietary music from the original
6344Transport Tycoon Deluxe.")
6345 (license license:gpl2)))
6346
6347(define-public openttd
6348 (package
6349 (inherit openttd-engine)
6350 (name "openttd")
6351 (arguments
6352 (list
6353 #:configure-flags
6354 #~(list (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin"))
6355 #:phases
6356 #~(modify-phases %standard-phases
6357 (add-after 'unpack 'patch-sources
6358 (lambda* (#:key inputs #:allow-other-keys)
6359 (substitute* "src/music/fluidsynth.cpp"
6360 (("_default_soundfonts\\[\\] = \\{" all)
6361 (string-append all "
6362\t/* Guix hardcoded :P */
6363\t\"" (search-input-file inputs "/share/soundfonts/FreePatsGM.sf2") "\",
6364")))))
6365 (add-before 'check 'install-data
6366 (lambda* (#:key inputs outputs #:allow-other-keys)
6367 (let ((base "/share/games/openttd"))
6368 (for-each
6369 (lambda (dir)
6370 ;; Copy the entire input, so as to not omit documentation
6371 ;; etc.
6372 (copy-recursively
6373 (string-drop-right dir (string-length base))
6374 (assoc-ref outputs "out")))
6375 (search-path-as-list (list base) (map cdr inputs)))))))))
6376 (inputs
6377 (modify-inputs inputs
6378 (prepend fluidsynth freepats-gm)))
6379 (native-inputs
6380 (modify-inputs native-inputs
6381 (prepend openttd-opengfx openttd-openmsx openttd-opensfx)))))
6382
6383(define-public openttd-jgrpp
6384 (package
6385 (inherit openttd)
6386 (name "openttd-jgrpp")
6387 (version "0.72.4")
6388 (source
6389 (origin
6390 (method git-fetch)
6391 (uri (git-reference
6392 (url "https://github.com/JGRennison/OpenTTD-patches")
6393 (commit (string-append "jgrpp-" version))))
6394 (file-name (git-file-name name version))
6395 (sha256
6396 (base32 "1n42nb9lxzwjbpxihqqi5zj1ykv1xl2cg7wjfjxwjxcll2hwl95a"))))
6397 (inputs (modify-inputs inputs
6398 (append zstd harfbuzz)))
6399 (arguments
6400 (substitute-keyword-arguments arguments
6401 ((#:phases phases '%standard-phases)
6402 #~(modify-phases #$phases
6403 (add-before 'check 'build-tests
6404 (lambda* (#:key (tests? #t) (make-flags '()) (parallel-build? #t) #:allow-other-keys)
6405 (when tests?
6406 (let ((build (assoc-ref #$phases 'build)))
6407 (build #:make-flags (cons "openttd_test" make-flags)
6408 #:parallel-build? parallel-build?)))))))))
6409 (home-page "https://github.com/JGRennison/OpenTTD-patches")
6410 (synopsis "OpenTTD with additional patches")
6411 (description
6412 "JGRPP is a collection of features and other modifications applied to OpenTTD.
6413It's a separate version of the game which can be installed and played alongside
6414the standard game, not a loadable mod (NewGRF, script, or so on).
6415
6416This is mainly intended to be used by players who are already familiar with the
6417standard game and how to play it. It is not aimed at beginner/novice players.
6418Some features and settings are there for very experienced players and so may
6419have a steep learning curve.")))
6420
6421(define-public openrct2-title-sequences
6422 (package
6423 (name "openrct2-title-sequences")
6424 (version "0.4.26")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (string-append "https://github.com/OpenRCT2/title-sequences"
6429 "/releases/download/v" version
6430 "/title-sequences.zip"))
6431 (file-name (string-append name "-" version ".zip"))
6432 (sha256
6433 (base32
6434 "0n680llpcyzl22bbphp9diz4m86gz2rn97yxlky44qspn63rgfys"))))
6435 (build-system copy-build-system)
6436 (arguments
6437 (list #:install-plan #~'(("." "/share/openrct2/title-sequences"))))
6438 (native-inputs (list unzip))
6439 (home-page "https://openrct2.io")
6440 (synopsis "Title sequences for OpenRCT2")
6441 (description
6442 "openrct2-title-sequences is a set of title sequences for OpenRCT2.")
6443 (properties '((hidden? . #t))) ;data package useless on its own
6444 (license license:gpl3+)))
6445
6446(define-public openrct2-objects
6447 (package
6448 (name "openrct2-objects")
6449 (version "1.7.9")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (string-append "https://github.com/OpenRCT2/objects"
6454 "/releases/download/v" version "/objects.zip"))
6455 (file-name (string-append name "-" version ".zip"))
6456 (sha256
6457 (base32 "1mpa4vpgs4m9izak8h5rkfcn80jbcm2di717k97g30kf1k91wijm"))))
6458 (build-system copy-build-system)
6459 (arguments
6460 ;; zip has multiple top-level directories to install.
6461 (list #:install-plan #~'((".." "/share/openrct2/objects"
6462 #:exclude ("environment-variables")))))
6463 (native-inputs (list unzip))
6464 (home-page "https://openrct2.io")
6465 (synopsis "Objects for OpenRCT2")
6466 (description
6467 "openrct2-objects is a set of objects for OpenRCT2.")
6468 (properties '((hidden? . #t))) ;data package useless on its own
6469 (license license:gpl3+)))
6470
6471(define-public openquest
6472 (package
6473 (name "openquest")
6474 (version "0.2.1")
6475 (source (origin
6476 (method git-fetch)
6477 (uri (git-reference
6478 (url "https://github.com/AlbanBedel/scummc")
6479 (commit (string-append "v" version))))
6480 (file-name (git-file-name name version))
6481 (sha256
6482 (base32
6483 "1yyq05kfmvgx5aa68kg1l5a4lpsky7hzxxcdvv2xbgf0jljdcl3k"))
6484 (modules '((guix build utils)))
6485 (snippet
6486 #~(begin
6487 (substitute* "configure"
6488 (("\\|alpha" all)
6489 (string-append all "|arm|aarch64|powerpc64le")))
6490 (substitute* "examples/example.mak"
6491 (("scost.*\n$") "scost\n")
6492 (("bmp \\$\\(.*\n$") "bmp\n")
6493 (("/%.scc.*\n$") "/%.scc\n")
6494 (("voc \\$\\(.*\n$") "voc\n"))
6495 (substitute* "Makefile.target"
6496 (("distrib-data:.*\n") "distrib-data:\n")
6497 (("cp.*/bin" all)
6498 (string-append all " || true")))))))
6499 (build-system gnu-build-system)
6500 (arguments
6501 (substitute-keyword-arguments (package-arguments scummc)
6502 ((#:make-flags _)
6503 #~(list "SCC=scc"
6504 "SLD=sld"
6505 "COST=cost"
6506 "CHAR=char"
6507 "SOUN=soun"))
6508 ((#:phases phases)
6509 #~(modify-phases #$phases
6510 (replace 'build
6511 (lambda* (#:key make-flags #:allow-other-keys)
6512 (with-directory-excursion "examples/openquest"
6513 (apply invoke "make" "tentacle" make-flags))))
6514 (add-after 'install 'install-executable
6515 (lambda* (#:key inputs #:allow-other-keys)
6516 ;; Create standalone executable.
6517 (let* ((bash (search-input-file inputs "/bin/bash"))
6518 (share (string-append #$output "/examples/openquest"))
6519 (scummvm (search-input-file inputs "/bin/scummvm"))
6520 (bin (string-append #$output "/bin"))
6521 (executable (string-append bin "/openquest")))
6522 (mkdir-p bin)
6523 (with-output-to-file executable
6524 (lambda ()
6525 (format #t "#!~a~%" bash)
6526 (format #t
6527 "exec ~a --path=~a tentacle~%"
6528 scummvm share)))
6529 (chmod executable #o755))))
6530 (add-after 'install-executable 'install-desktop-file
6531 (lambda _
6532 ;; Create desktop file. There is no official icon,
6533 ;; but the main character of the game is a good choice.
6534 (let* ((apps (string-append #$output "/share/applications"))
6535 (share (string-append #$output "/examples/openquest")))
6536 (mkdir-p apps)
6537 (make-desktop-entry-file
6538 (string-append apps "/openquest.desktop")
6539 #:name "OpenQuest"
6540 #:generic-name "OpenQuest"
6541 #:exec (string-append #$output "/bin/openquest")
6542 #:icon (string-append share "/graphics/zob/frames/stand_S.bmp")
6543 #:categories '("AdventureGame" "Game" "RolePlaying")
6544 #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi")
6545 #:comment '((#f "Simple 2D point and click adventure game"))))))))))
6546 (inputs
6547 (list bash scummvm))
6548 (native-inputs
6549 (modify-inputs (package-native-inputs scummc)
6550 (prepend scummc)))
6551 (home-page "https://www.scummvm.org")
6552 (synopsis "Simple 2D point and click adventure game")
6553 (description "OpenQuest is a two room adventure game
6554that follows two aliens who come to Earth in search of a stolen artifact.")
6555 (license license:gpl2+)))
6556
6557(define-public openrct2
6558 (package
6559 (name "openrct2")
6560 (version "0.5.0")
6561 (source
6562 (origin
6563 (method git-fetch)
6564 (uri (git-reference
6565 (url "https://github.com/OpenRCT2/OpenRCT2")
6566 (commit (string-append "v" version))))
6567 (file-name (git-file-name name version))
6568 (sha256
6569 (base32 "0pxlk3a8akl0ghcbqqq5xw8chmxss7kwbvi52ixfqri68n46srxh"))
6570 (modules '((guix build utils)))
6571 (snippet
6572 #~(begin
6573 (with-directory-excursion "src/thirdparty"
6574 (for-each delete-file-recursively
6575 '("quickjs-ng" "sfl")))
6576 (substitute* "src/openrct2/CMakeLists.txt"
6577 ;; use sys quickjs for scripting features
6578 (("if \\(ENABLE_SCRIPTING\\)") "if (false)")
6579 (("add_library\\(OpenRCT2[^\n]+" all)
6580 (string-join
6581 `(,all
6582 "find_library(QJS_L NAMES qjs REQUIRED)"
6583 "find_path(QJS_I NAMES quickjs.h REQUIRED)"
6584 "target_link_libraries(libopenrct2 ${QJS_L})"
6585 "target_include_directories(libopenrct2 SYSTEM PRIVATE ${QJS_I})")
6586 "\n")))))))
6587 (build-system cmake-build-system)
6588 (arguments
6589 (list
6590 #:configure-flags #~(list "-DDOWNLOAD_OBJECTS=OFF"
6591 "-DDOWNLOAD_TITLE_SEQUENCES=OFF"
6592 "-DDOWNLOAD_OPENSFX=OFF"
6593 "-DDOWNLOAD_OPENMUSIC=OFF"
6594 "-DDISABLE_DISCORD_RPC=ON"
6595 "-DDISABLE_VERSION_CHECKER=ON")
6596 ;; many issues such as https://github.com/OpenRCT2/OpenRCT2/issues/12719
6597 #:tests? #f
6598 #:phases
6599 #~(modify-phases %standard-phases
6600 (add-after 'unpack 'fix-usr-share-paths&add-data
6601 ;; TODO: OpenRCT2 can optionally use free music and sounds!
6602 ;; https://github.com/OpenRCT2/OpenMusic
6603 ;; https://github.com/OpenRCT2/OpenSoundEffects
6604 ;; ideally we package these instead of the ones the user is supposed
6605 ;; to supply.
6606 (lambda* (#:key inputs #:allow-other-keys)
6607 (let ((titles (assoc-ref inputs "openrct2-title-sequences"))
6608 (objects (assoc-ref inputs "openrct2-objects"))
6609 (sfl (assoc-ref inputs "sfl-library")))
6610 ;; Fix some references to /usr/share.
6611 (substitute* "src/openrct2/platform/Platform.Linux.cpp"
6612 (("/usr/share")
6613 (string-append #$output "/share")))
6614 (copy-recursively
6615 (string-append titles "/share/openrct2/title-sequences")
6616 "data/title")
6617 (copy-recursively
6618 (string-append objects "/share/openrct2/objects")
6619 "data/object")
6620 (copy-recursively
6621 (string-append sfl "/include")
6622 "src/thirdparty"))))
6623 (add-before 'configure 'get-rid-of-errors
6624 (lambda _
6625 ;; Don't treat warnings as errors.
6626 (substitute* "CMakeLists.txt"
6627 (("-Werror") "")))))))
6628 (inputs
6629 (list curl
6630 flac
6631 fontconfig
6632 freetype
6633 icu4c
6634 jansson
6635 libpng
6636 libvorbis
6637 libzip
6638 mesa
6639 nlohmann-json-no-char8-t
6640 openrct2-objects
6641 openrct2-title-sequences
6642 openssl
6643 quickjs-ng
6644 sdl2
6645 sfl-library
6646 speexdsp
6647 zlib
6648 (list zstd "lib")))
6649 (native-inputs (list pkg-config))
6650 (home-page "https://openrct2.io")
6651 (synopsis "Free software re-implementation of RollerCoaster Tycoon 2")
6652 (description "OpenRCT2 is a free software re-implementation of
6653RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and
6654maintaining an amusement park containing attractions, shops and facilities.
6655
6656Note that this package does @emph{not} provide the game assets (sounds,
6657images, etc.)")
6658 ;; See bottom of:
6659 ;; https://github.com/OpenRCT2/OpenRCT2/blob/develop/distribution/readme.txt
6660 (license license:gpl3+)))
6661
6662(define-public openriichi
6663 (package
6664 (name "openriichi")
6665 (version "0.2.1.1")
6666 (source (origin
6667 (method git-fetch)
6668 (uri (git-reference
6669 (url "https://github.com/FluffyStuff/OpenRiichi")
6670 (commit (string-append "v" version))
6671 (recursive? #t)))
6672 (file-name (git-file-name name version))
6673 (sha256
6674 (base32
6675 "1x6m4mli92chns5dky9aq9w4r4pnycvlpa2q0giydapm5q9fkslf"))))
6676 (build-system meson-build-system)
6677 (arguments
6678 (list #:configure-flags #~'("--buildtype=release"
6679 "-Dc_args=-g -O2 -Wno-int-conversion")
6680 #:glib-or-gtk? #t))
6681 (inputs (list glew
6682 gtk+
6683 libgee
6684 sdl2
6685 sdl2-image
6686 sdl2-mixer))
6687 (native-inputs (list pkg-config vala))
6688 (home-page "https://github.com/FluffyStuff/OpenRiichi")
6689 (synopsis "Japanese Mahjong client")
6690 (description
6691 "OpenRiichi is a client for playing Japanese Mahjong, and it supports
6692singleplayer and multiplayer, with or without bots. It features all the
6693standard riichi rules, as well as some optional ones. It also supports game
6694logging, so games can be viewed again.")
6695 (license license:gpl3)))
6696
6697(define-public pinball
6698 (package
6699 (name "pinball")
6700 (version "0.3.20230219")
6701 (source
6702 (origin (method git-fetch)
6703 (uri (git-reference
6704 (url "https://github.com/adoptware/pinball")
6705 (commit version)))
6706 (file-name (git-file-name name version))
6707 (sha256
6708 (base32
6709 "02by4df9hgda5zhl9p3rwg0s4mlxdr0v8f8dk152vjp43p1wqvfp"))
6710 (patches (search-patches "pinball-system-ltdl.patch"))))
6711 (build-system gnu-build-system)
6712 (native-inputs
6713 (list autoconf automake pkg-config libtool))
6714 (inputs
6715 (list glu
6716 libltdl
6717 mesa
6718 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
6719 (arguments
6720 (list
6721 #:configure-flags
6722 ;; Configure tries to use pkg-config, but falls short, so:
6723 #~(list (string-append "CPPFLAGS=-I"
6724 #$(this-package-input "sdl-union")
6725 "/include/SDL2"))
6726 #:phases
6727 #~(modify-phases %standard-phases
6728 (replace 'bootstrap
6729 ;; The `bootstrap` script tries to call a script with
6730 ;; `/usr/bin/make` in the shebang, but ultimately does the same as
6731 ;; autoreconf would do, so just use that.
6732 (lambda _
6733 (symlink "README.md" "README")
6734 (invoke "autoreconf" "-vif"))))))
6735 (home-page "https://pinball.sourceforge.net")
6736 (synopsis "Pinball machine simulator")
6737 (description "The Emilia Pinball Project is a pinball simulator. There
6738are only two levels to play with, but they are very addictive.")
6739 (license license:gpl2)))
6740
6741(define-public trackballs
6742 (package
6743 (name "trackballs")
6744 (version "1.3.4")
6745 (source
6746 (origin
6747 (method git-fetch)
6748 (uri (git-reference
6749 (url "https://github.com/trackballs/trackballs")
6750 (commit (string-append "v" version))))
6751 (file-name (git-file-name name version))
6752 (sha256
6753 (base32 "1vr35i5y93n155m20mvsri42r8k3hphpc8fmrv8wmfv6xqss5914"))))
6754 (build-system cmake-build-system)
6755 (native-inputs (list pkg-config
6756 gettext-minimal))
6757 (inputs (list guile-2.2
6758 mesa
6759 sdl2
6760 sdl2-image
6761 sdl2-mixer
6762 sdl2-ttf
6763 zlib))
6764 (arguments (list #:tests? #f)) ;No test suite.
6765 (home-page "https://trackballs.github.io/")
6766 (synopsis "Marble-rolling puzzle/skill game")
6767 (description
6768 "Trackballs is a simple game similar to the classic Amiga game @cite{Marble
6769Madness}. By steering a marble ball through a labyrinth filled with vicious
6770hammers, pools of acid and other obstacles the player collects points. When the
6771ball reaches the destination it continues at the next, more difficult level -
6772unless the time runs out.")
6773 (license license:gpl2+)))
6774
6775(define-public pioneers
6776 (package
6777 (name "pioneers")
6778 (version "15.6")
6779 (source (origin
6780 (method url-fetch)
6781 (uri (string-append "https://downloads.sourceforge.net/pio/"
6782 "pioneers-" version ".tar.gz"))
6783 (sha256
6784 (base32
6785 "07b3xdd81n8ybsb4fzc5lx0813y9crzp1hj69khncf4faj48sdcs"))))
6786 (build-system gnu-build-system)
6787 (arguments
6788 `(#:phases
6789 (modify-phases %standard-phases
6790 ;; Fixes https://issues.guix.gnu.org/47131.
6791 (add-after 'unpack 'patch-beep-path
6792 (lambda* (#:key inputs #:allow-other-keys)
6793 (substitute* "client/gtk/audio.c"
6794 (("\"beep\"")
6795 (string-append "\"" (assoc-ref inputs "beep") "/bin/beep\"")))
6796 #t)))))
6797 (inputs (list avahi beep gtk+ (librsvg-for-system)))
6798 (native-inputs (list intltool itstool libxml2 pkg-config))
6799 (synopsis "Board game inspired by The Settlers of Catan")
6800 (description "Pioneers is an emulation of the board game The Settlers of
6801Catan. It can be played on a local network, on the internet, and with AI
6802players.")
6803 (home-page "https://pio.sourceforge.net/")
6804 (license license:gpl2+)))
6805
6806(define-public einstein
6807 (package
6808 (name "einstein")
6809 (version "2.0")
6810 (source (origin
6811 (method url-fetch)
6812 (uri (string-append "mirror://debian/pool/main/e/"
6813 "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
6814 (sha256
6815 (base32
6816 "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
6817 (patches (search-patches "einstein-build.patch"))))
6818 (build-system gnu-build-system)
6819 (inputs
6820 `(("freetype" ,freetype)
6821 ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf)))
6822 ("zlib" ,zlib)))
6823 (native-inputs
6824 (list font-dejavu))
6825 (arguments
6826 `(#:tests? #f ; no check target
6827 #:phases
6828 (modify-phases %standard-phases
6829 (replace 'configure
6830 (lambda* (#:key outputs inputs #:allow-other-keys)
6831 (let ((out (assoc-ref outputs "out"))
6832 (dejavu (search-input-file
6833 inputs "/share/fonts/truetype/DejaVuSans.ttf")))
6834 (substitute* "Makefile"
6835 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
6836 ;; The patch above registers a free font for use by the binary,
6837 ;; but the font is copied during the compile phase into a
6838 ;; resources file, so we need to make the ttf file available.
6839 (symlink dejavu "res/DejaVuSans.ttf")
6840 #t))))))
6841 (synopsis "Logic puzzle game")
6842 (description "The goal of this logic game is to open all cards in a 6x6
6843grid, using a number of hints as to their relative position. The game idea
6844is attributed to Albert Einstein.")
6845 ;; The original home page has disappeared.
6846 (home-page (string-append "http://web.archive.org/web/20120521062745/"
6847 "http://games.flowix.com/en/index.html"))
6848 ;; License according to
6849 ;; http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
6850 ;; The source code is a DFSG-sanitized tarball and does not contain any
6851 ;; license information.
6852 (license license:gpl3+)))
6853
6854(define-public powwow
6855 (package
6856 (name "powwow")
6857 (version "1.2.23")
6858 (source (origin
6859 (method url-fetch)
6860 (uri (string-append
6861 "https://www.hoopajoo.net/static/projects/powwow-"
6862 version ".tar.gz"))
6863 (sha256
6864 (base32
6865 "1wkl6j91pp40aps2hhnsv0bndgq49smfffws4hqcn7847bpnwwm6"))))
6866 (inputs
6867 (list ncurses))
6868 (build-system gnu-build-system)
6869 (home-page "https://www.hoopajoo.net/projects/powwow.html")
6870 (synopsis "MUD and telnet client")
6871 (description
6872 "POWWOW is a client software which can be used for telnet as well as for
6873@dfn{Multi-User Dungeon} (MUD). Additionally it can serve as a nice client for
6874the chat server psyced with the specific config located at
6875http://lavachat.symlynx.com/unix/")
6876 (license license:gpl2+)))
6877
6878(define-public red-eclipse
6879 (let ((release "2.0.0")
6880 (revision 0))
6881 (package
6882 (name "red-eclipse")
6883 (version (if (zero? revision)
6884 release
6885 (string-append release "-"
6886 (number->string revision))))
6887 (source
6888 (origin
6889 (method git-fetch)
6890 (uri (git-reference
6891 (url "https://github.com/redeclipse/base")
6892 (commit (string-append "v" release))
6893 (recursive? #t))) ; for game data
6894 (file-name (git-file-name name version))
6895 (sha256
6896 (base32 "0sz0mqhwx8r9n4mk3qrxw420nlsm3y0n48gd0lazgd64lfqjh3ab"))
6897 (modules '((guix build utils)))
6898 (snippet
6899 ;; Remove proprietary libraries and other pre-compiled binaries.
6900 '(begin
6901 (delete-file-recursively "bin")
6902 #t))))
6903 (build-system gnu-build-system)
6904 (arguments
6905 `(#:tests? #f ; no check target
6906 #:make-flags (list "CC=gcc" "-Csrc"
6907 (string-append "INSTDIR="
6908 (assoc-ref %outputs "out") "/bin")
6909 (string-append "prefix="
6910 (assoc-ref %outputs "out")))
6911 #:phases
6912 (modify-phases %standard-phases
6913 (add-after 'unpack 'add-store-data-package-path-as-default
6914 (lambda* (#:key outputs #:allow-other-keys)
6915 (substitute* "src/engine/server.cpp"
6916 (("data = \"data\"")
6917 (string-append "data = \""
6918 (assoc-ref outputs "out")
6919 "/share/redeclipse/data\"")))))
6920 (delete 'configure) ; no configure script
6921 (add-after 'set-paths 'set-sdl-paths
6922 (lambda* (#:key inputs #:allow-other-keys)
6923 (setenv "CPATH"
6924 (string-append
6925 (search-input-directory inputs "/include/SDL2")
6926 ":" (or (getenv "CPATH") "")))))
6927 (add-after 'install 'copy-data
6928 (lambda* (#:key outputs #:allow-other-keys)
6929 (let ((out (assoc-ref outputs "out")))
6930 (copy-recursively "config"
6931 (string-append out "/config"))
6932 (copy-file "doc/examples/servinit.cfg"
6933 (string-append out "/config/servinit.cfg"))
6934 (copy-recursively "data"
6935 (string-append out "/share/redeclipse/data"))
6936 (mkdir-p (string-append out "/lib/redeclipse"))
6937 (symlink (string-append out "/share/redeclipse/data")
6938 (string-append out "/lib/redeclipse/data")))))
6939 (add-after 'copy-data 'wrap-program
6940 (lambda* (#:key inputs outputs #:allow-other-keys)
6941 (let* ((out (assoc-ref outputs "out"))
6942 (bin (string-append out "/bin")))
6943 (with-directory-excursion bin
6944 (rename-file "redeclipse_linux"
6945 ".redeclipse_linux-real")
6946 (rename-file "redeclipse_server_linux"
6947 ".redeclipse_server_linux-real")
6948 (call-with-output-file "redeclipse_linux"
6949 (lambda (port)
6950 (format port "#!~a/bin/sh
6951# Run the thing from its home, otherwise it just bails out.
6952cd \"~a\"
6953exec -a \"$0\" ~a/.redeclipse_linux-real~%"
6954 (assoc-ref inputs "bash") ;implicit input
6955 (string-append out)
6956 (string-append bin))))
6957 (call-with-output-file "redeclipse_server_linux"
6958 (lambda (port)
6959 (format port "#!~a/bin/sh
6960# Run the thing from its home, otherwise it just bails out.
6961cd \"~a\"
6962exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
6963 (assoc-ref inputs "bash") ;implicit input
6964 (string-append out)
6965 (string-append bin))))
6966 (chmod "redeclipse_linux" #o555)
6967 (chmod "redeclipse_server_linux" #o555))))))))
6968 (native-inputs
6969 (list pkg-config))
6970 (inputs
6971 (list bash-minimal curl freetype glu
6972 (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
6973 (home-page "https://redeclipse.net/")
6974 (synopsis "Arena shooter derived from the Cube 2 engine")
6975 (description
6976 "Red Eclipse is an arena shooter, created from the Cube2 engine.
6977Offering an innovative parkour system and distinct but all potent weapons,
6978Red Eclipse provides fast paced and accessible gameplay.")
6979 ;; The engine is under Zlib; data files are covered by the other
6980 ;; licenses. More details at file:///doc/all-licenses.txt.
6981 (license (list license:expat
6982 license:zlib
6983 license:cc-by-sa4.0
6984 license:cc-by-sa3.0
6985 license:cc-by3.0
6986 license:cc0
6987 license:public-domain
6988 license:silofl1.1)))))
6989
6990(define-public grue-hunter
6991 (package
6992 (name "grue-hunter")
6993 (version "1.0")
6994 (source (origin
6995 (method url-fetch)
6996 (uri (string-append "https://jxself.org/grue-hunter.tar.gz"))
6997 (sha256
6998 (base32
6999 "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
7000 (build-system trivial-build-system) ; no Makefile.PL
7001 (arguments `(#:modules ((guix build utils))
7002 #:builder
7003 (begin
7004 (use-modules (guix build utils))
7005 (use-modules (srfi srfi-1))
7006
7007 (let* ((tarball (assoc-ref %build-inputs "tarball"))
7008 (perl (string-append (assoc-ref %build-inputs
7009 "perl")
7010 "/bin"))
7011 (gzip (string-append (assoc-ref %build-inputs
7012 "gzip")
7013 "/bin/gzip"))
7014 (tar (string-append (assoc-ref %build-inputs
7015 "tar")
7016 "/bin/tar"))
7017 (out (assoc-ref %outputs "out"))
7018 (bin (string-append out "/bin"))
7019 (doc (string-append out
7020 "/share/doc/grue-hunter")))
7021 (copy-file tarball "grue-hunter.tar.gz")
7022 (invoke gzip "-d" "grue-hunter.tar.gz")
7023 (invoke tar "xvf" "grue-hunter.tar")
7024
7025 (mkdir-p bin)
7026 (copy-file "grue-hunter/gh.pl"
7027 (string-append bin "/grue-hunter"))
7028 (patch-shebang (string-append bin "/grue-hunter")
7029 (list perl))
7030
7031 (install-file "grue-hunter/AGPLv3.txt" doc)
7032
7033 #t))))
7034 (inputs `(("perl" ,perl)
7035 ("tar" ,tar)
7036 ("gzip" ,gzip)
7037 ("tarball" ,source)))
7038 (home-page "https://jxself.org/grue-hunter.shtml")
7039 (synopsis "Text adventure game")
7040 (description
7041 "Grue Hunter is a text adventure game written in Perl. You must make
7042your way through an underground cave system in search of the Grue. Can you
7043capture it and get out alive?")
7044 (license license:agpl3+)))
7045
7046(define-public lierolibre
7047 (package
7048 (name "lierolibre")
7049 (version "0.5")
7050 (source (origin
7051 (method url-fetch)
7052 (uri (string-append "https://launchpad.net/lierolibre/trunk/"
7053 version "/+download/lierolibre-"
7054 version ".tar.xz"))
7055 (sha256
7056 (base32
7057 "1cf1gvsn4qq190lrf9k5bpjnqwlcfw7pajvdnh7z5r4jqw0rsbl9"))
7058 (patches
7059 (search-patches "lierolibre-check-unaligned-access.patch"
7060 "lierolibre-try-building-other-arch.patch"
7061 "lierolibre-remove-arch-warning.patch"
7062 "lierolibre-newer-libconfig.patch"
7063 "lierolibre-is-free-software.patch"))
7064 (modules '((guix build utils)))
7065 (snippet
7066 '(begin
7067 ;; Delete pre-compiled files.
7068 (delete-file "data/LIERO.CHR")
7069 (delete-file "data/LIERO.SND")
7070 #t))))
7071 (build-system gnu-build-system)
7072 (native-inputs
7073 (list imagemagick pkg-config util-linux sox))
7074 (inputs
7075 (list boost libconfig
7076 (sdl-union (list sdl sdl-image sdl-mixer)) zlib))
7077 (home-page "https://gitlab.com/lierolibre/lierolibre")
7078 (synopsis "Old-school earthworm action game")
7079 (description
7080 "lierolibre is an earthworm action game where you fight another player
7081(or the computer) underground using a wide array of weapons.
7082
7083Features:
7084@itemize
7085@item 2 worms, 40 weapons, great playability, two game modes: Kill'em All
7086and Game of Tag, plus AI-players without true intelligence!
7087@item Dat nostalgia.
7088@item Extensions via a hidden F1 menu:
7089@itemize
7090@item Replays
7091@item Game controller support
7092@item Powerlevel palettes
7093@end itemize
7094@item Ability to write game variables to plain text files.
7095@item Ability to load game variables from both EXE and plain text files.
7096@item Scripts to extract and repack graphics, sounds and levels.
7097@end itemize
7098
7099To switch between different window sizes, use F6, F7 and F8, to switch to
7100fullscreen, use F5 or Alt+Enter.")
7101 ;; Code mainly BSD-2, some parts under Boost 1.0. All assets are WTFPL2.
7102 (license (list license:bsd-2 license:boost1.0 license:wtfpl2))))
7103
7104(define-public tennix
7105 (package
7106 (name "tennix")
7107 (version "1.3.4")
7108 (source (origin
7109 (method git-fetch)
7110 (uri (git-reference
7111 (url "https://repo.or.cz/tennix.git")
7112 (commit (string-append "tennix-" version))))
7113 (file-name (git-file-name name version))
7114 (sha256
7115 (base32
7116 "1fmg0vw8c2spyxy4k64nwky80jsw9mc3vnlch49q6cagjsg9y8dj"))
7117 ;; Remove non-free images.
7118 (modules '((guix build utils)))
7119 (snippet '(begin
7120 (for-each delete-file
7121 '("data/loc_training_camp.png"
7122 "data/loc_austrian_open.png"
7123 "data/loc_olympic_green_tennis.png")) #t))))
7124 (build-system gnu-build-system)
7125 (arguments
7126 (list
7127 #:tests? #f ;no tests
7128 #:phases #~(modify-phases %standard-phases
7129 (add-after 'unpack 'locate-install
7130 ;; Build process cannot expand "$(INSTALL)" in Makefile.
7131 (lambda _
7132 (substitute* "makefile"
7133 (("^CONFIGURE_OUTPUT :=.*" all)
7134 (string-append "INSTALL := install -c\n" all))) #t))
7135 (replace 'configure
7136 ;; The "configure" script is picky about the arguments it
7137 ;; gets. Call it ourselves.
7138 (lambda _
7139 (invoke "./configure" "--prefix"
7140 (assoc-ref %outputs "out")))))))
7141 (native-inputs (list which))
7142 (inputs (list python
7143 (sdl-union (list sdl2
7144 sdl2-image
7145 sdl2-mixer
7146 sdl2-ttf
7147 sdl2-net
7148 sdl2-gfx))))
7149 (home-page "https://icculus.org/tennix/")
7150 (synopsis "Play tennis against the computer or a friend")
7151 (description
7152 "Tennix is a 2D tennis game. You can play against the
7153computer or against another player using the keyboard. The game runs
7154in-window at 640x480 resolution or fullscreen.")
7155 ;; Project is licensed under GPL2+ terms. It includes images
7156 ;; released under Public Domain terms.
7157 (license (list license:gpl2+ license:public-domain))))
7158
7159;; Keep in sync with warzone2100.
7160(define-public launchinfo
7161 ;; No releases, use latest commit.
7162 (let ((commit "cfdd12564ab6cc30dc70a28571f6e8adfb5caeed")
7163 (revision "0"))
7164 (package
7165 (name "launchinfo")
7166 ;; See include/LaunchInfo.h for version.
7167 (version (git-version "1.0" revision commit))
7168 (source
7169 (origin
7170 (method git-fetch)
7171 (uri (git-reference
7172 (url "https://github.com/past-due/launchinfo")
7173 (commit commit)))
7174 (file-name (git-file-name name version))
7175 (sha256
7176 (base32
7177 "0i7xmf6jgs7rrgjjwh3kdzaqq0249xqmncaprjrf77dxhrm53wsx"))))
7178 (build-system cmake-build-system)
7179 (arguments
7180 (list
7181 #:tests? #f ;no tests
7182 #:phases
7183 #~(modify-phases %standard-phases
7184 (add-after 'unpack 'do-shared
7185 (lambda _
7186 (substitute* "CMakeLists.txt"
7187 (("(launchinfo )STATIC" _ f) (string-append f "SHARED")))))
7188 (replace 'install ;no install instructions
7189 (lambda _
7190 (let ((lib (in-vicinity #$output "lib"))
7191 (inc (in-vicinity #$output "include")))
7192 (install-file "liblaunchinfo.so" lib)
7193 (install-file "../source/include/LaunchInfo.h" inc)))))))
7194 (home-page "https://wz2100.net")
7195 (synopsis "Helper library for warzone2100")
7196 ;; No form of documentation. :(
7197 (description "This package provides the @code{LaunchInfo} class for
7198use in the video game warzone2100.")
7199 (license license:expat)))) ;launchinfo, whereami
7200
7201;; Keep in sync with warzone2100.
7202(define-public warzone2100-texpages
7203 ;; Commit pinned by warzone2100 v4.7.0; latest release is 7 years old.
7204 (let ((commit "009ec2f652a6230d8315cc3db4eadb5690f18fbd")
7205 (revision "0"))
7206 (package
7207 (name "warzone2100-texpages")
7208 (version (git-version "3.3.0" revision commit))
7209 (source
7210 (origin
7211 (method git-fetch)
7212 (uri (git-reference
7213 (url "https://github.com/Warzone2100/data-texpages")
7214 (commit commit)))
7215 (file-name (git-file-name name version))
7216 (sha256
7217 (base32
7218 "0n1cdsvjzy6y6dnxxy9hm18z5qddnhhp6jd4xz32zms5qj1asapw"))))
7219 (build-system copy-build-system)
7220 (arguments
7221 (list #:install-plan #~'(("." "/share/data/base/texpages"))))
7222 (home-page "https://wz2100.net")
7223 (synopsis "Texpages data for Warzone2100")
7224 (description "warzone2100-texpages is a set of textures to be used with
7225warzone2100.")
7226 (properties '((hidden? . #t)))
7227 (license (list
7228 ;; bdrops/backdrop[012].png
7229 ;; page-6-features-rockies.png
7230 ;; page-17-droid-weapons.png
7231 license:cc-by-sa3.0
7232 ;; bdrops/backdrop4.png
7233 ;; bdrops/backdrop6.png
7234 ;; page-25-sky-urban.png
7235 license:cc0
7236 ;; everything else
7237 license:gpl2+)))))
7238
7239;; Keep in sync with warzone2100.
7240(define-public warzone2100-terrain-classic
7241 (origin
7242 (method git-fetch)
7243 (uri (git-reference
7244 (url "https://github.com/Warzone2100/data-terrain-classic")
7245 ;; Matches warzone2100 v4.7.0
7246 (commit "d26c3d0e0242721e24fe34fea2e61880c5805684")))
7247 (file-name "warzone2100-terrain-classic")
7248 (sha256
7249 (base32
7250 "0jjyy9rbkla7rdjl62r5pf2b565rk1054wf2qinlw72bgr12lb2j"))))
7251
7252;; Keep in sync with warzone2100.
7253(define-public warzone2100-terrain-high
7254 (package
7255 (name "warzone2100-terrain-high")
7256 (version "3")
7257 (source
7258 (origin
7259 (method git-fetch)
7260 (uri (git-reference
7261 (url "https://github.com/Warzone2100/data-terrain-high")
7262 (commit (string-append "v" version))))
7263 (file-name (git-file-name name version))
7264 (sha256
7265 (base32
7266 "1raw6cdpv84zs7p7ngjvnbrnk1kprs2ndsqf7xnvy3rcw6j44xck"))))
7267 (build-system copy-build-system)
7268 (arguments
7269 (list #:install-plan #~'(("." "/share/data/terrain_overrides/high"))))
7270 (home-page "https://wz2100.net")
7271 (synopsis "High quality tile textures for Warzone2100")
7272 (description "warzone2100-terrain-high contains tile textures for
7273warzone2100's high quality mode.")
7274 (properties '((hidden? . #t)))
7275 (license (list license:cc-by-sa3.0 ;either
7276 license:gpl2+))))
7277
7278;; Keep in sync with warzone2100.
7279(define-public warzone2100-data-music-opus
7280 (origin
7281 (method git-fetch)
7282 (uri (git-reference
7283 (url "https://github.com/Warzone2100/data-music-opus")
7284 ;; Matches warzone2100 v4.7.0.
7285 (commit "db73d2b2e58dfaa8a09ab27ad771cc636be31118")))
7286 (file-name "warzone2100-data-music-opus")
7287 (sha256
7288 (base32
7289 "1liyhzasgbpjdy8w3m9906clm6kvq7x3dz45cg7ibjwq6xaqn4v1"))))
7290
7291;; Keep in sync with warzone2100.
7292(define-public warzone2100-reclamation
7293 ;; 1.3.1. is old and does not show up in Warzone's in-game menu.
7294 ;; Newest commit appears compatible.
7295 (let ((commit "1b67c44e31bca191d6220b9356a500745086f1d0")
7296 (revision "0"))
7297 (package
7298 (name "warzone2100-reclamation")
7299 (version (git-version "1.3.1" revision commit))
7300 (source
7301 (origin
7302 (method git-fetch)
7303 (uri (git-reference
7304 (url "https://github.com/Warzone2100/reclamation")
7305 (commit commit)))
7306 (file-name (git-file-name name version))
7307 (sha256
7308 (base32
7309 "11kg7p6qprfxcdnl7v7rxkkqg30pxnpa484fs9m7lym1jabk4qw3"))))
7310 (build-system copy-build-system)
7311 (arguments
7312 (list
7313 #:install-plan
7314 #~'(("reclamation.wz" "/share/warzone2100/mods/campaign/"))
7315 #:phases
7316 #~(modify-phases %standard-phases
7317 (add-before 'install 'build
7318 (lambda _
7319 (invoke "zip" "-r" "-9" "reclamation.wz" "."))))))
7320 (native-inputs (list zip))
7321 (home-page "https://github.com/Warzone2100/reclamation")
7322 (synopsis "Custom game campaign for Warzone2100")
7323 (description "warzone2100-reclamation is a modification for Warzone2100
7324featuring an original story taking place before the events of the main game.
7325Set out under the command of renowned General Edmund Clayde with the goal of
7326laying the foundations of a new world.")
7327 (properties '((hidden? . #t))) ;game assets only
7328 (license (list license:gpl2+
7329 license:cc-by-sa3.0))))) ;mod-banner.png
7330
7331;; Keep in sync with warzone2100.
7332(define-public warzone2100-fractured-kingdom
7333 ;; Commit pinned by warzone2100, radically different versions are
7334 ;; wont to break.
7335 (let ((commit "a27fe970a6f52e7b6a6d6264cf32ecec163799ec")
7336 (revision "0"))
7337 (package
7338 (name "warzone2100-fractured-kingdom")
7339 (version (git-version "1.3.0" revision commit))
7340 (source
7341 (origin
7342 (method git-fetch)
7343 (uri (git-reference
7344 (url "https://github.com/Warzone2100/fractured-kingdom")
7345 (commit commit)))
7346 (file-name (git-file-name name version))
7347 (sha256
7348 (base32
7349 "1px3k54z2h3svhswr6x8asyq62aixj633ifw3jnhmf1zwcfrs2vx"))))
7350 (build-system copy-build-system)
7351 (arguments
7352 (list
7353 #:install-plan
7354 #~'(("fractured_kingdom.wz"
7355 "/share/warzone2100/mods/campaign/"))
7356 #:phases
7357 #~(modify-phases %standard-phases
7358 (add-before 'install 'build
7359 (lambda _
7360 (invoke "zip" "-r" "-9" "fractured_kingdom.wz" "."))))))
7361 (native-inputs (list zip))
7362 (home-page "https://github.com/Warzone2100/fractured-kingdom")
7363 (synopsis "Custom game campaign for Warzone2100")
7364 (description "warzone2100-fractured-kingdom is a modification for
7365Warzone2100 featuring an original story. After crash-landing in the territory
7366of a once powerful kingdom, you must navigate your way through various factions
7367fighting over what remains.")
7368 (properties '((hidden? . #t))) ;game assets only
7369 (license license:gpl2+))))
7370
7371(define-public warzone2100
7372 (package
7373 (name "warzone2100")
7374 ;; Always keep in sync with warzone2100-* family
7375 ;; of packages and launchinfo.
7376 (version "4.7.0")
7377 (source
7378 (origin
7379 (method git-fetch)
7380 (uri (git-reference
7381 (url "https://github.com/Warzone2100/warzone2100")
7382 (commit version)))
7383 (file-name (git-file-name name version))
7384 (modules '((guix build utils)))
7385 (snippet
7386 #~(substitute* (list "src/stdinreader.cpp"
7387 "lib/netplay/netreplay.cpp")
7388 ;; Trivially unbundles readerwriterqueue.
7389 (("3rdparty/(readerwriterqueue)" _ f) f)))
7390 (patches (search-patches "warzone2100-unbundle-basis-universal.patch"
7391 "warzone2100-unbundle-embedded-json-signature.patch"
7392 "warzone2100-unbundle-libs.patch"
7393 "warzone2100-unbundle-inih.patch"
7394 "warzone2100-unbundle-launchinfo.patch"
7395 "warzone2100-unbundle-quickjs-wz.patch"
7396 "warzone2100-unbundle-sqlitecpp.patch"
7397 "warzone2100-unbundle-utfcpp.patch"
7398 ;; Makes autorevision work with configure flags.
7399 "warzone2100-pass-vcs-configure-flags-to-autorevision.patch"))
7400 (sha256
7401 (base32
7402 "04vdqfmxav0cls3jn5jjpjq514r27kj5pc63pwlsszx00wfz9a4r"))))
7403 (build-system cmake-build-system)
7404 (arguments
7405 (list
7406 ;; TODO: Tests seem to be broken, configure.ac is missing.
7407 #:tests? #f
7408 #:configure-flags
7409 #~(list "-GNinja"
7410 "-DWZ_DISTRIBUTOR=GNU Guix"
7411 "-DWZ_DOWNLOAD_PREBUILT_PACKAGES=off"
7412 "-DWZ_INCLUDE_VIDEOS=off"
7413 "-DWZ_FORCE_MINIMAL_OPUSFILE=off"
7414 "-DENABLE_GNS_NETWORK_BACKEND=off"
7415 "-DWZ_USE_SYSTEM_LIBJPEG_TURBO=on"
7416 ;; Do not automatically install
7417 ;; additional campaigns.
7418 "-DWZ_BUILTIN_MODS_RECLAMATION=off"
7419 "-DWZ_BUILTIN_MODS_FRACTUREDKINGDOM=off"
7420 ;; otherwise, installs a debug
7421 ;; ELF which fails validate-runpath
7422 "-DWZ_SKIP_ELF_SEPARATE_DEBUG=on"
7423 ;; XXX: Autorevision stuff. Passes to the same autorevision
7424 ;; in phase 'make-autorevision-cache'. If another is desperately
7425 ;; needed to to be defined later, we'll probably know.
7426 "-DVCS_WC_MODIFIED=0"
7427 "-DVCS_MOST_RECENT_COMMIT_DATE=1970-01-01"
7428 (format #f "-DVCS_FULL_HASH=~a" (make-string 40 #\a))
7429 (format #f "-DVCS_SHORT_HASH=~a" (make-string 6 #\a))
7430 (format #f "-DVCS_TAG=~a" #$version)
7431 (format #f "-DVCS_EXTRA=~a" #$version)
7432 (format #f "-DVCS_MOST_RECENT_TAGGED_VERSION=~a" #$version))
7433 #:phases
7434 #~(modify-phases %standard-phases
7435 (add-after 'unpack 'unbundle-fonts
7436 (lambda* (#:key inputs #:allow-other-keys)
7437 (define (find-truetype file)
7438 (search-input-file inputs
7439 (in-vicinity "share/fonts/truetype" file)))
7440 (substitute* "data/CMakeLists.txt"
7441 (("add_subdirectory\\(fonts[^\\)]+")
7442 (string-join (list "set(wz2100_fonts_FILES"
7443 (find-truetype "DejaVuSans.ttf")
7444 (find-truetype "DejaVuSans-Bold.ttf")
7445 (find-truetype "NotoSansCJK-VF.otf.ttc"))
7446 " ")))))
7447 (add-after 'unpack 'copy-static-data
7448 (lambda* (#:key inputs #:allow-other-keys)
7449 (let ((music #$(this-package-input
7450 "warzone2100-data-music-opus"))
7451 (classic #$(this-package-input
7452 "warzone2100-terrain-classic"))
7453 (texpages (search-input-directory
7454 inputs "/share/data/base/texpages"))
7455 (high (search-input-directory
7456 inputs "/share/data/terrain_overrides/high")))
7457 (with-directory-excursion "data"
7458 (copy-recursively texpages "base/texpages")
7459 (copy-recursively music "music")
7460 (with-directory-excursion "terrain_overrides"
7461 (copy-recursively classic "classic")
7462 (copy-recursively high "high"))))))
7463 (add-before 'build 'make-autorevision-cache
7464 (lambda _
7465 ;; An autorevision script outputs a header file defining
7466 ;; preprocessor variables originating from either git metadata or
7467 ;; cmake variables present in this cache file. Missing cache file
7468 ;; and no git is an error, so we'll avoid that state.
7469 (call-with-output-file "../source/build_tools/autorevision.cache"
7470 (const #t))))
7471 (add-after 'install 'install-campaigns
7472 (lambda* (#:key inputs #:allow-other-keys)
7473 (let ((outdir "/share/warzone2100/mods/campaign"))
7474 (for-each
7475 (lambda (campaign-name)
7476 (install-file (search-input-file
7477 inputs (in-vicinity outdir campaign-name))
7478 (string-append #$output outdir)))
7479 '("reclamation.wz" "fractured_kingdom.wz"))))))))
7480 (native-inputs
7481 (list basis-universal
7482 date
7483 gettext-minimal
7484 glm
7485 ninja
7486 p7zip
7487 pkg-config
7488 readerwriterqueue
7489 ruby-asciidoctor/minimal
7490 shaderc))
7491 (inputs
7492 (list basis-universal
7493 curl
7494 fmt
7495 embedded-json-signature
7496 font-dejavu
7497 font-google-noto-sans-cjk
7498 freetype
7499 fribidi
7500 gnutls
7501 harfbuzz
7502 launchinfo
7503 libexpected
7504 libinih
7505 libjpeg-turbo
7506 libogg
7507 libplum
7508 libpng
7509 libsodium
7510 libtheora
7511 libvorbis
7512 libzip
7513 miniupnpc
7514 openal
7515 opus
7516 opusfile
7517 physfs
7518 quickjs-wz
7519 re2
7520 sdl3
7521 sqlite
7522 sqlitecpp
7523 utf8proc
7524 utfcpp
7525 vulkan-headers
7526 warzone2100-data-music-opus
7527 warzone2100-fractured-kingdom
7528 warzone2100-reclamation
7529 warzone2100-terrain-classic
7530 warzone2100-terrain-high
7531 warzone2100-texpages))
7532 (home-page "https://wz2100.net")
7533 (synopsis "3D Real-time strategy and real-time tactics game")
7534 (description
7535 "Warzone 2100 offers campaign, multi-player, and single-player skirmish
7536modes. An extensive tech tree with over 400 different technologies, combined
7537with the unit design system, allows for a wide variety of possible units and
7538tactics.")
7539 ;; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
7540 (license (list license:bsd-3
7541 license:cc0
7542 license:cc-by-sa3.0
7543 license:expat
7544 license:gpl2+
7545 license:lgpl2.1+))))
7546
7547(define-public widelands
7548 (package
7549 (name "widelands")
7550 (version "1.3.1")
7551 (source
7552 (origin
7553 (method git-fetch)
7554 (uri (git-reference
7555 (url "https://github.com/widelands/widelands")
7556 (commit (string-append "v" version))))
7557 (file-name (git-file-name name version))
7558 (sha256
7559 (base32 "0ab9s1imqdq1krfwlba1ipx3pwnvy91aqqzr15ssfzixy4wj5mww"))
7560 (modules '((guix build utils)))
7561 (snippet
7562 #~(delete-file-recursively "src/third_party/minizip"))))
7563 (build-system cmake-build-system)
7564 (arguments
7565 (list
7566 #:configure-flags
7567 #~(let ((share (string-append #$output "/share/widelands")))
7568 (list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
7569 (string-append "-DWL_INSTALL_BINDIR=" #$output "/bin")
7570 (string-append "-DWL_INSTALL_BASEDIR=" share)
7571 (string-append "-DWL_INSTALL_DATADIR=" share)
7572 "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"))
7573 #:phases
7574 #~(modify-phases %standard-phases
7575 (add-after 'unpack 'unbundle-fonts
7576 ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are
7577 ;; mmrCensus, Nakula, and Sinhala.
7578 (lambda* (#:key inputs #:allow-other-keys)
7579 (for-each
7580 (lambda (font)
7581 (let* ((path (string-append "share/fonts/truetype/" (basename font)))
7582 (target (false-if-exception (search-input-file inputs path))))
7583 (when target
7584 (delete-file font)
7585 (symlink target font))))
7586 (find-files "data/i18n/fonts" "\\.tt[cf]$")))))))
7587 (native-inputs
7588 (list gettext-minimal pkg-config python))
7589 (inputs
7590 (list asio
7591 font-amiri
7592 font-culmus
7593 font-dejavu
7594 font-wqy-microhei
7595 glew
7596 icu4c
7597 libpng
7598 minizip
7599 sdl2
7600 sdl2-image
7601 sdl2-mixer
7602 sdl2-ttf
7603 zlib))
7604 (home-page "https://www.widelands.org")
7605 (synopsis "Fantasy real-time strategy game")
7606 (description
7607 "In Widelands, you are the regent of a small clan. You start out with
7608nothing but your headquarters, where all your resources are stored.
7609
7610In the course of the game, you will build an ever growing settlement. Every
7611member of your clan will do his or her part to produce more resources---wood,
7612food, iron, gold and more---to further this growth. The economic network is
7613complex and different in the five tribes (Barbarians, Empire, Atlanteans,
7614Frisians and Amazons).
7615
7616As you are not alone in the world, you will meet other clans sooner or later.
7617Some of them may be friendly and you may eventually trade with them. However,
7618if you want to rule the world, you will have to train soldiers and fight.
7619
7620Widelands offers single-player mode with different campaigns; the campaigns
7621all tell stories of tribes and their struggle in the Widelands universe!
7622However, settling really starts when you unite with friends over the Internet
7623or LAN to build up new empires together---or to crush each other in the dusts
7624of war. Widelands also offers an Artificial Intelligence to challenge you.")
7625 ;; Game is released as GPL2+. Some parts, e.g., art, are released under
7626 ;; different licenses.
7627 (license (list license:gpl2+
7628 license:expat ;src/third_party/eris
7629 license:silofl1.1 ;Widelands.ttf
7630 license:cc-by-sa3.0)))) ;some music files
7631
7632(define-public starfighter
7633 (package
7634 (name "starfighter")
7635 (version "2.4")
7636 (source (origin
7637 (method url-fetch)
7638 (uri (string-append
7639 "https://github.com/pr-starfighter/starfighter/releases"
7640 "/download/v" version "/starfighter-"
7641 version "-src.tar.gz"))
7642 (sha256
7643 (base32
7644 "0ips79j3sdy8wa64jqka0skbbqkzqiln9bbiiilh4z717q7vz9r5"))))
7645 (build-system gnu-build-system)
7646 (native-inputs
7647 (list pkg-config))
7648 (inputs
7649 (list pango sdl2 sdl2-image sdl2-mixer sdl2-ttf))
7650 (home-page "https://pr-starfighter.github.io/")
7651 (synopsis "2D scrolling shooter game")
7652 (description
7653 "In the year 2579, the intergalactic weapons corporation, WEAPCO, has
7654dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
7655their quest to liberate the galaxy from the clutches of WEAPCO. Along the
7656way, you will encounter new foes, make new allies, and assist local rebels
7657in strikes against the evil corporation.")
7658 ;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
7659 (license (list license:gpl3+
7660 license:cc-by3.0
7661 license:cc-by-sa3.0
7662 license:cc0
7663 license:public-domain))))
7664
7665(define-public chromium-bsu
7666 (package
7667 (name "chromium-bsu")
7668 (version "0.9.16.1")
7669 (source (origin
7670 (method url-fetch)
7671 (uri (string-append "mirror://sourceforge/chromium-bsu"
7672 "/Chromium B.S.U. source code/"
7673 "chromium-bsu-" version ".tar.gz"))
7674 (sha256
7675 (base32
7676 "0jk2w5b6s6nkzri585bbz16cif2fhqcnl5l1mq3rd98r9nil3hd1"))))
7677 (build-system gnu-build-system)
7678 (native-inputs (list pkg-config))
7679 (inputs (list gettext-minimal glu quesoglc
7680 (sdl-union (list sdl sdl-image sdl-mixer))))
7681 (home-page "https://chromium-bsu.sourceforge.net/")
7682 (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
7683 (description
7684 "In this game you are the captain of the cargo ship Chromium B.S.U. and
7685are responsible for delivering supplies to the troops on the front line. Your
7686ship has a small fleet of robotic fighters which you control from the relative
7687safety of the Chromium vessel.")
7688 ;; Clarified Artistic License for everything but sound, which is covered
7689 ;; by the Expat License.
7690 (license (list license:clarified-artistic license:expat))))
7691
7692(define-public tuxemon
7693 (let ((commit "19708725f8b2d939e39b726f49a8a078eba8bf32")
7694 (revision "0"))
7695 (package
7696 (name "tuxemon")
7697 (version (git-version "0.4.34" revision commit))
7698 (source
7699 (origin
7700 (method git-fetch)
7701 (uri (git-reference
7702 (url "https://github.com/Tuxemon/Tuxemon")
7703 (commit commit)))
7704 (file-name (git-file-name name version))
7705 (sha256
7706 (base32 "0jdhk6xs4895gifxlkaxk7625wvw2yl1yc6ciay137dk78amhp86"))
7707 (modules '((guix build utils)))
7708 (snippet
7709 #~(begin
7710 (substitute* "requirements.txt"
7711 (("pygame-ce") "pygame") ; The pygame-ce fork isn't packaged in Guix
7712 (("pygame-menu-ce") "pygame-menu")
7713 (("==") ">="))
7714 (substitute* "tuxemon/constants/paths.py"
7715 (("LIBDIR, ....,") "LIBDIR,"))))))
7716 (build-system pyproject-build-system)
7717 (arguments
7718 (list
7719 #:tests? #f ; Tests won't be updated until the API stabilises
7720 #:phases
7721 #~(modify-phases %standard-phases
7722 (add-after 'install 'install-mods
7723 (lambda _
7724 (let ((site (string-append #$output "/lib/python"
7725 #$(version-major+minor
7726 (package-version python))
7727 "/site-packages/tuxemon/mods")))
7728 (mkdir-p site)
7729 (copy-recursively "mods" site)))))))
7730 (native-inputs (list python-flit-core python-setuptools))
7731 (propagated-inputs
7732 (list python-babel
7733 python-cbor
7734 python-neteria
7735 python-natsort
7736 python-pygame
7737 python-pyscroll
7738 python-pytmx
7739 python-pillow
7740 python-prompt-toolkit
7741 python-pydantic
7742 python-pygame-menu
7743 python-pyyaml
7744 python-requests))
7745 (home-page "https://www.tuxemon.org/")
7746 (synopsis "Monster-fighting RPG")
7747 (description
7748 "Tuxemon is a monster-fighting RPG.
7749In the spirit of other clones like SuperTux and SuperTuxKart,
7750Tuxemon aims to create a game with its own unique style
7751that sets it apart from other monster fighting RPGs.")
7752 (license license:gpl3+))))
7753
7754(define-public tuxpaint
7755 (package
7756 (name "tuxpaint")
7757 (version "0.9.35") ;keep VER_DATE below in sync
7758 (source
7759 (origin
7760 (method url-fetch)
7761 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint/" version
7762 "/tuxpaint-" version ".tar.gz"))
7763 (sha256
7764 (base32 "1bfhidnspv7jm90z98jxmhwvlfac9hh2ijdjmbyr8zp73gwqmhf1"))
7765 (modules '((guix build utils)))
7766 (snippet '(begin
7767 ;; Remove win32 directory which contains binary dll's and the
7768 ;; deprecated visualc directory.
7769 (for-each delete-file-recursively
7770 '("win32" "visualc"))
7771 (substitute* "Makefile"
7772 ;; Do not rely on $(GPERF) being an absolute file name
7773 (("\\[ -x \\$\\(GPERF\\) \\]")
7774 "$(GPERF) --version >/dev/null 2>&1")) #t))
7775 (patches (search-patches "tuxpaint-stamps-path.patch"))))
7776 (build-system gnu-build-system)
7777 (native-inputs (list gperf imagemagick pkg-config))
7778 (inputs (list bash-minimal
7779 cairo
7780 fribidi
7781 gettext-minimal
7782 libimagequant
7783 libpng
7784 (librsvg-for-system)
7785 libpaper
7786 libxml2
7787 netpbm
7788 pango
7789 sdl2
7790 sdl2-gfx
7791 sdl2-image
7792 sdl2-mixer
7793 sdl2-pango
7794 sdl2-ttf))
7795 ;; TODO: Use system fonts rather than those in data/fonts
7796 (arguments
7797 (list
7798 #:make-flags
7799 #~(list "VER_DATE=2025-05-26"
7800 "GPERF=gperf"
7801 (string-append "CC="
7802 #$(cc-for-target))
7803 "SDL_PCNAME=sdl2 SDL2_image SDL2_mixer SDL2_ttf SDL2_gfx"
7804 (string-append "PREFIX="
7805 #$output)
7806 "KDE_PREFIX=$(PREFIX)/share/applications"
7807 "KDE_ICON_PREFIX=$(PREFIX)/share/icons/"
7808 "COMPLETIONDIR=$(PREFIX)/etc/bash_completion.d")
7809 #:parallel-build? #f ;fails on some systems
7810 #:tests? #f ;No tests
7811 #:phases
7812 #~(modify-phases %standard-phases
7813 (delete 'configure) ;no configure phase
7814 (add-before 'install 'no-sys-cache
7815 (lambda _
7816 ;do not rebuild system conf cache
7817 (substitute* "Makefile"
7818 (("kbuildsycoca4")
7819 ""))))
7820 (add-after 'install 'fix-import
7821 (lambda _
7822 (let* ((tpi (string-append #$output "/bin/tuxpaint-import")))
7823 (substitute* tpi
7824 ;; Point to installation prefix so that the default
7825 ;; configure file is found.
7826 (("/usr/local")
7827 #$output))
7828 ;; tuxpaint-import uses a bunch of programs from
7829 ;; netpbm, so make sure it knows where those are
7830 (wrap-program tpi
7831 `("PATH" ":" prefix
7832 (,(string-append #$(this-package-input "netpbm") "/bin"))))))))))
7833 (native-search-paths
7834 (list (search-path-specification
7835 (variable "TUXPAINT_STAMPS_PATH")
7836 (files '("share/tuxpaint/stamps")))))
7837 (home-page "https://tuxpaint.org")
7838 (synopsis "Drawing software for children")
7839 (description
7840 "Tux Paint is a free drawing program designed for young children (kids
7841ages 3 and up). It has a simple, easy-to-use interface; fun sound effects;
7842and an encouraging cartoon mascot who helps guide children as they use the
7843program. It provides a blank canvas and a variety of drawing tools to help
7844your child be creative.")
7845 (license license:gpl2+)))
7846
7847(define-public tuxpaint-stamps
7848 (package
7849 (name "tuxpaint-stamps")
7850 (version "2025.05.26")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-stamps/"
7855 (string-map (λ (x) (if (eq? x #\.) #\- x)) version)
7856 "/tuxpaint-stamps-" version ".tar.gz"))
7857 (sha256
7858 (base32
7859 "17wlh9gkqzskny7ycwcsl2arsjzvmspy6d41q9j3mj9nh2gs5x09"))))
7860 (build-system copy-build-system)
7861 (arguments (list #:install-plan #~'(("stamps" "share/tuxpaint/"))))
7862 (home-page (package-home-page tuxpaint))
7863 (synopsis "Stamp images for Tux Paint")
7864 (description
7865 "This package contains a set of \"Rubber Stamp\" images which can be used
7866with the \"Stamp\" tool within Tux Paint.")
7867 (license license:gpl2+)))
7868
7869(define-public tuxpaint-config
7870 (package
7871 (name "tuxpaint-config")
7872 (version "0.0.26") ;keep VER_DATE below in sync
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-config/"
7877 version "/tuxpaint-config-" version ".tar.gz"))
7878 (sha256
7879 (base32
7880 "1f73av2fvqr6bd6kacmybaq4y03p1yxcbsyf84l1cph0mwmmzb7r"))))
7881 (build-system gnu-build-system)
7882 (native-inputs (list gettext-minimal pkg-config))
7883 (inputs
7884 (list fltk
7885 libpaper
7886 libunibreak
7887 pango
7888 ;; TODO: Should the following be propagated by fltk?
7889 libx11
7890 libxft
7891 mesa))
7892 (arguments
7893 `(#:make-flags `("VER_DATE=2024-04-19"
7894 "CONFDIR=/etc/tuxpaint" ;don't write to store
7895 ,(string-append "PREFIX=" %output)
7896 "GNOME_PREFIX=$(PREFIX)")
7897 #:parallel-build? #f ;race conditions
7898 #:tests? #f ;no tests
7899 #:phases (modify-phases %standard-phases
7900 (delete 'configure) ;no configure phase
7901 (add-before 'install 'gzip-no-name
7902 (lambda* _
7903 (substitute* "Makefile"
7904 ;; tuxpaint-config compresses its own documentation;
7905 ;; make sure it uses flags for reproducibility.
7906 (("gzip") "gzip --no-name"))))
7907 (add-before 'install 'make-install-dirs
7908 (lambda* (#:key outputs #:allow-other-keys)
7909 (let ((out (assoc-ref outputs "out")))
7910 (mkdir-p (string-append out "/bin"))))))))
7911 (home-page (package-home-page tuxpaint))
7912 (synopsis "Configure Tux Paint")
7913 (description
7914 "Tux Paint Config is a graphical configuration editor for Tux Paint.")
7915 (license license:gpl2))) ;no "or later" present
7916
7917(define-public supertux
7918 (package
7919 (name "supertux")
7920 (version "0.7.0")
7921 (source (origin
7922 (method url-fetch)
7923 (uri (string-append "https://github.com/SuperTux/supertux/"
7924 "releases/download/v" version "/SuperTux-v"
7925 version "-Source.tar.gz"))
7926 (file-name (string-append name "-" version ".tar.gz"))
7927 (sha256
7928 (base32
7929 "198xqcxyav8kj62i0vi5h6rn8mwjvqhny79lb27daklrp6cmpz1j"))
7930 (modules '((guix build utils)))
7931 (snippet
7932 ;; Unbundle libraries
7933 #~(begin
7934 (for-each (lambda (dir)
7935 (delete-file-recursively
7936 (string-append "external/" dir)))
7937 '(;; "SDL_savePNG"
7938 "SDL_ttf"
7939 "discord-sdk"
7940 ;; "findlocale"
7941 ;; "obstack"
7942 ;; "partio_zip"
7943 ;; "sexp-cpp"
7944 "shared-modules"
7945 "simplesquirrel"
7946 "tinygettext"))
7947 (substitute* "CMakeLists.txt"
7948 (("add_subdirectory\\(external/simplesquirrel .*$") "")
7949 (("add_subdirectory\\(external/tinygettext .*$") "")
7950 (("set_property\\(TARGET squirrel .*$") "")
7951 (("## Link supertux binary with squirrel .*$" all)
7952 (string-append all "\n"
7953 "target_link_libraries(supertux2 PUBLIC "
7954 "squirrel sqstdlib)\n")))
7955 (substitute* "mk/cmake/SuperTux/BuildInstall.cmake"
7956 (("install\\(TARGETS simplesquirrel.*$") ""))))))
7957 (arguments
7958 (list
7959 #:configure-flags #~(list "-DINSTALL_SUBDIR_BIN=bin"
7960 "-DUSE_SYSTEM_SDL2_TTF=ON")))
7961 (build-system cmake-build-system)
7962 (inputs
7963 (list curl
7964 fmt
7965 freetype
7966 glew
7967 glm
7968 harfbuzz
7969 libogg
7970 libvorbis
7971 openal
7972 physfs
7973 sdl2
7974 sdl2-image
7975 sdl2-ttf
7976 simplesquirrel-for-supertux
7977 squirrel-for-supertux
7978 tinygettext))
7979 (native-inputs
7980 (list pkg-config))
7981 (synopsis "2D platformer game")
7982 (description "SuperTux is a classic 2D jump'n run sidescroller game in
7983a style similar to the original Super Mario games.")
7984 (home-page "https://supertux.org/")
7985 (license license:gpl3+)))
7986
7987(define-public tintin++
7988 (package
7989 (name "tintin++")
7990 (version "2.02.12")
7991 (source
7992 (origin
7993 (method url-fetch)
7994 (uri (string-append "mirror://sourceforge/tintin/TinTin++ Source Code/"
7995 (string-drop-right version 1)
7996 "/tintin-" version ".tar.gz"))
7997 (sha256
7998 (base32 "000sg16w7790ha8ys31qjh1ip5hl02ldfwj1zy6dqz0y5i7zvydn"))))
7999 (inputs
8000 (list gnutls pcre readline zlib))
8001 (arguments
8002 '(#:tests? #f ; no test suite
8003 #:phases
8004 (modify-phases %standard-phases
8005 ;; The source is in tt/src.
8006 (add-before 'configure 'chdir
8007 (lambda _
8008 (chdir "src")
8009 #t)))))
8010 (build-system gnu-build-system)
8011 (home-page "https://tintin.mudhalla.net/")
8012 (synopsis "MUD client")
8013 (description
8014 "TinTin++ is a MUD client which supports MCCP (Mud Client Compression
8015Protocol), MMCP (Mud Master Chat Protocol), xterm 256 colors, most TELNET
8016options used by MUDs, as well as those required to login via telnet on
8017Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
8018 (license license:gpl3+)))
8019
8020(define-public laby
8021 (package
8022 (name "laby")
8023 (version "0.7.0")
8024 (source
8025 (origin (method git-fetch)
8026 (uri (git-reference
8027 (url "https://github.com/sgimenez/laby")
8028 (commit (string-append name "-" version))))
8029 (file-name (git-file-name name version))
8030 (sha256
8031 (base32
8032 "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
8033 (patches (search-patches "laby-make-install.patch"
8034 "laby-use-tmpdir-from-runtime.patch"))))
8035 (build-system glib-or-gtk-build-system)
8036 (inputs
8037 (list bash-minimal
8038 gdk-pixbuf
8039 lablgtk3
8040 (librsvg-for-system)
8041 ocaml-lablgtk3-sourceview3
8042 ocaml
8043 ocaml-findlib
8044 ocamlbuild))
8045 (arguments
8046 (list #:phases
8047 #~(modify-phases %standard-phases
8048 (delete 'configure)
8049 (add-before 'build 'set-library-path
8050 (lambda* (#:key inputs #:allow-other-keys)
8051 (let ((lablgtk #$(this-package-input "lablgtk")))
8052 (setenv "LD_LIBRARY_PATH"
8053 (string-append lablgtk "/lib/ocaml/stublibs")))))
8054 (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
8055 (lambda* (#:key outputs #:allow-other-keys)
8056 (let ((laby (string-append #$output "/bin/laby")))
8057 (wrap-program laby
8058 ;; Wrapping GDK_PIXBUF_MODULE_FILE allows laby to
8059 ;; function in pure environments.
8060 `("GDK_PIXBUF_MODULE_FILE" =
8061 (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
8062 #:tests? #f ; no 'check' target
8063 #:make-flags
8064 #~(list (string-append "PREFIX=" #$output) "all")))
8065 (home-page "https://sgimenez.github.io/laby/")
8066 (synopsis "Programming game")
8067 (description "Learn programming, playing with ants and spider webs ;-)
8068Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
8069Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced
8070programmers may also add their own favorite language.")
8071 (license license:gpl3+)))
8072
8073(define-public bambam
8074 (package
8075 (name "bambam")
8076 (version "1.2.1")
8077 (source
8078 (origin
8079 (method git-fetch)
8080 (uri (git-reference
8081 (url "https://github.com/porridge/bambam")
8082 (commit (string-append "v" version))))
8083 (file-name (git-file-name name version))
8084 (sha256
8085 (base32 "148cqahklqd4m88j5z1xf3fh4vha41f31wian11hkas106mbsya9"))))
8086 (build-system pyproject-build-system)
8087 (arguments
8088 (list
8089 #:tests? #f ;no tests
8090 #:phases
8091 #~(modify-phases %standard-phases
8092 (delete 'build) ;nothing to build
8093 (replace 'install
8094 (lambda _
8095 (let* ((bin (string-append #$output "/bin"))
8096 (share (string-append #$output "/share")))
8097 (mkdir-p bin)
8098 (copy-file "bambam.py" (string-append bin "/bambam"))
8099 (install-file "bambam.6" (string-append share "/man/man6"))
8100 (copy-recursively "data"
8101 (string-append share "/bambam/data"))))))))
8102 (native-inputs (list python-setuptools))
8103 (inputs (list python-pygame))
8104 (home-page "https://github.com/porridge/bambam")
8105 (synopsis "Keyboard mashing and doodling game for babies")
8106 (description
8107 "Bambam is a simple baby keyboard (and gamepad) masher application that
8108locks the keyboard and mouse and instead displays bright colors, pictures, and
8109sounds.")
8110 (license license:gpl3+)))
8111
8112(define-public moonlight-qt
8113 (package
8114 (name "moonlight-qt")
8115 (version "6.1.0")
8116 (source (origin
8117 (method git-fetch)
8118 (uri (git-reference
8119 (url "https://github.com/moonlight-stream/moonlight-qt")
8120 (commit (string-append "v" version))))
8121 (file-name (git-file-name name version))
8122 (sha256
8123 (base32
8124 "06fxf3m26k036asxjkkykk5q96nincwmpiqm953m7zgr9224gidx"))))
8125 (build-system qt-build-system)
8126 (arguments
8127 (list
8128 #:tests? #f ;no test suite
8129 #:modules '((guix build qt-build-system)
8130 ((guix build gnu-build-system) #:prefix gnu:)
8131 (guix build utils))
8132 #:phases
8133 #~(modify-phases %standard-phases
8134 (replace 'configure
8135 (lambda* _
8136 (symlink (string-append
8137 #$(this-package-input "sdl2-gamecontrollerdb")
8138 "/share/sdl2/gamecontrollerdb.txt")
8139 "app/SDL_GameControllerDB/gamecontrollerdb.txt")
8140 ;; Unbundle libraries.
8141 (substitute* "moonlight-qt.pro"
8142 ((" moonlight-common-c.*\n") "")
8143 ((" qmdnsengine.*\n") "")
8144 ((" h264bitstream.*\n") "")
8145 ((" app \\\\") " app")
8146 (("app.depends") "INCLUDEPATH +="))
8147 (invoke "qmake" (string-append "PREFIX=" #$output))))
8148 (replace 'build (assoc-ref gnu:%standard-phases 'build))
8149 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
8150 (native-inputs (list pkg-config qttools-5))
8151 (inputs (list ffmpeg
8152 h264bitstream
8153 libva
8154 libvdpau
8155 moonlight-common
8156 openssl
8157 opus
8158 qmdnsengine
8159 qtbase-5
8160 qtdeclarative-5
8161 qtquickcontrols2-5
8162 qtsvg-5
8163 qtwayland-5
8164 wayland
8165 sdl2
8166 sdl2-ttf
8167 sdl2-gamecontrollerdb))
8168 (synopsis "GameStream client")
8169 (description
8170 "Moonlight is an implementation of NVIDIA's GameStream, as used by the
8171NVIDIA Shield.")
8172 (home-page "https://moonlight-stream.org")
8173 (license license:gpl3+)))
8174
8175(define-public moonlight-common
8176 ;; Used as submodule in https://github.com/moonlight-stream/moonlight
8177 (let ((commit "8599b6042a4ba27749b0f94134dd614b4328a9bc")
8178 (revision "1"))
8179 (package
8180 (name "moonlight-common")
8181 (version (git-version "6.1.0" revision commit))
8182 (source (origin
8183 (method git-fetch)
8184 (uri (git-reference
8185 (url
8186 "https://github.com/moonlight-stream/moonlight-common-c")
8187 (commit commit)))
8188 (file-name (git-file-name name version))
8189 (sha256
8190 (base32
8191 "19k8rs2p51zs0h3wj22xw8bgj9c0ma0dc6y7qk5pk75p8ymqp9d3"))))
8192 (build-system cmake-build-system)
8193 (arguments
8194 (list #:tests? #f
8195 #:phases #~(modify-phases %standard-phases
8196 (add-after 'unpack 'use-system-enet-package
8197 (lambda _
8198 (substitute* "CMakeLists.txt"
8199 (("add_subdirectory\\(enet\\)")
8200 ""))))
8201 (replace 'install
8202 (lambda* (#:key outputs source #:allow-other-keys)
8203 (let* ((include (string-append #$output
8204 "/include"))
8205 (lib (string-append #$output "/lib")))
8206 (mkdir-p include)
8207 (mkdir-p lib)
8208 (install-file (string-append source
8209 "/src/Limelight.h") include)
8210 (install-file "libmoonlight-common-c.so" lib)))))))
8211 (native-inputs (list pkg-config))
8212 (inputs (list enet-moonlight openssl qtbase-5))
8213 (synopsis "GameStream protocol core implementation")
8214 (description
8215 "This package provides the GameStream core code for the protocol.")
8216 (home-page "https://github.com/moonlight-stream/moonlight-common-c")
8217 (license license:gpl3+))))
8218
8219(define-public mrrescue
8220 (package
8221 (name "mrrescue")
8222 (version "1.02e")
8223 (source (origin
8224 (method url-fetch)
8225 (uri (string-append
8226 "https://github.com/SimonLarsen/mrrescue/releases/"
8227 "download/" version "/mrrescue" version ".love"))
8228 (file-name (string-append name "-" version ".love"))
8229 (sha256
8230 (base32
8231 "0jwzbwkgp1l5ia6c7s760gmdirbsncp6nfqp7vqdqsfb63la9gl2"))))
8232 (build-system trivial-build-system)
8233 (arguments
8234 `(#:modules ((guix build utils))
8235 #:builder
8236 (begin
8237 (use-modules (guix build utils))
8238 (let* ((out (assoc-ref %outputs "out"))
8239 (script (string-append out "/bin/" ,name))
8240 (data (string-append out "/share/" ,name))
8241 (source (assoc-ref %build-inputs "source"))
8242 (unzip (search-input-file %build-inputs "/bin/unzip"))
8243 (patch (search-input-file %build-inputs "/bin/patch"))
8244 (bash (search-input-file %build-inputs "/bin/bash"))
8245 (love (search-input-file %build-inputs "/bin/love")))
8246
8247 (mkdir-p (dirname script))
8248 (with-output-to-file script
8249 (lambda ()
8250 (format #t "#!~a~%" bash)
8251 (format #t "exec -a ~a \"~a\" \"~a\"~%" ,name love data)))
8252 (chmod script #o755)
8253
8254 ;; The better way to package this game would be to install *only* the
8255 ;; script above, pointing to the unextracted .love file in the store.
8256 ;; However, mrrescue 1.02e needs to be patched to work with Love 11.
8257 ;; Instead of extracting the .love file, patching it, and re-zipping
8258 ;; it to the store, simply point the script to the extracted patched
8259 ;; data directory directly.
8260 (mkdir-p data)
8261 (with-directory-excursion data
8262 (invoke unzip source)
8263 (invoke patch "-p1" "-i"
8264 (assoc-ref %build-inputs "love-11.patch")))
8265 #t))))
8266 (native-inputs
8267 `(("unzip" ,unzip)
8268 ("patch" ,patch)
8269 ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
8270 (inputs
8271 (list bash love))
8272 (home-page "https://tangramgames.dk/games/mrrescue")
8273 (synopsis "Arcade-style fire fighting game")
8274 (description
8275 "Mr. Rescue is an arcade styled 2d action game centered around evacuating
8276civilians from burning buildings. The game features fast-paced fire
8277extinguishing action, intense boss battles, a catchy soundtrack, and lots of
8278throwing people around in pseudo-randomly generated buildings.")
8279 (license (list license:zlib ; for source code
8280 license:cc-by-sa3.0)))) ; for graphics and music assets
8281
8282(define-public hyperrogue
8283 (package
8284 (name "hyperrogue")
8285 (version "12.1a")
8286 (source
8287 (origin
8288 (method git-fetch)
8289 (uri (git-reference
8290 (url "https://github.com/zenorogue/hyperrogue")
8291 (commit (string-append "v" version))))
8292 (file-name (git-file-name name version))
8293 (sha256
8294 (base32
8295 "1l09d1r3jdwp54zq071fk09hpggif5phjn0gsapzrjy3i289jran"))))
8296 (build-system gnu-build-system)
8297 (arguments
8298 (list
8299 #:tests? #f ; no check target
8300 #:make-flags #~(list "HYPERROGUE_USE_GLEW=1"
8301 "HYPERROGUE_USE_PNG=1")
8302 #:phases
8303 #~(modify-phases %standard-phases
8304 (add-after 'set-paths 'set-sdl-paths
8305 (lambda* (#:key inputs #:allow-other-keys)
8306 (setenv "CPATH"
8307 (string-append (or (getenv "CPATH") "") ":"
8308 (search-input-directory inputs
8309 "/include/SDL")))))
8310 (replace 'configure
8311 (lambda* (#:key inputs #:allow-other-keys)
8312 (let ((share-dir (string-append #$output "/share/hyperrogue/"))
8313 (fonts-dir (dirname
8314 (search-input-file inputs
8315 "DejaVuSans-Bold.ttf"))))
8316 ;; Set fonts and music path.
8317 (substitute* "sysconfig.h"
8318 (("(#define HYPERPATH ).*" _ lead)
8319 (string-append lead "\"" share-dir "\"\n"))
8320 (("(#define HYPERFONTPATH ).*" _ lead)
8321 (string-append lead "\"" fonts-dir "/\"\n")))
8322 ;; Disable build machine CPU optimizations and warnings treated
8323 ;; as errors.
8324 (substitute* "Makefile"
8325 (("-march=native") "")
8326 (("-Werror") "")))))
8327 (replace 'install
8328 (lambda _
8329 (install-file "hyperrogue" (string-append #$output "/bin"))
8330 (let ((share-dir (string-append #$output "/share/hyperrogue/")))
8331 (install-file "hyperrogue-music.txt" share-dir)
8332 (for-each (lambda (dir)
8333 (copy-recursively dir
8334 (string-append share-dir dir)))
8335 '("music" "sounds"))))))))
8336 (inputs
8337 (list font-dejavu
8338 glew
8339 libpng
8340 (sdl-union (list sdl sdl-gfx sdl-mixer sdl-ttf))))
8341 (home-page "https://roguetemple.com/z/hyper")
8342 (synopsis "Non-euclidean graphical rogue-like game")
8343 (description
8344 "HyperRogue is a game in which the player collects treasures and fights
8345monsters -- rogue-like but for the fact that it is played on the hyperbolic
8346plane and not in euclidean space.
8347
8348In HyperRogue, the player can move through different parts of the world, which
8349are home to particular creatures and may be subject to their own rules of
8350\"physics\".
8351
8352While the game can use ASCII characters to display the the classical rogue
8353symbols, it still needs graphics to render the non-euclidean world.")
8354 (license (list license:bsd-3 ; glew.c, mtrand.*
8355 license:cc-by-sa3.0 ; music
8356 license:cc-by-sa4.0 ; sounds
8357 license:cc0
8358 license:public-domain ; direntx.*, some sounds
8359 license:zlib ; savepng.*
8360 license:gpl2+)))) ; remaining files
8361
8362(define-public kobodeluxe
8363 (package
8364 (name "kobodeluxe")
8365 (version "0.5.1")
8366 (source (origin
8367 (method url-fetch)
8368 (uri (string-append "http://olofson.net/kobodl/download/KoboDeluxe-"
8369 version ".tar.bz2"))
8370 (sha256
8371 (base32
8372 "0b2wvdpnmaibsy419c16dfwj5kvd3pccby2aaqvm964x74592yqg"))
8373 (patches (search-patches
8374 "kobodeluxe-const-charp-conversion.patch"
8375 "kobodeluxe-enemies-pipe-decl.patch"
8376 "kobodeluxe-graphics-window-signed-char.patch"
8377 "kobodeluxe-manpage-minus-not-hyphen.patch"
8378 "kobodeluxe-midicon-segmentation-fault.patch"
8379 "kobodeluxe-paths.patch"))))
8380 (build-system gnu-build-system)
8381 (arguments
8382 '(#:configure-flags
8383 (list (string-append "CPPFLAGS=-I"
8384 (assoc-ref %build-inputs "sdl-union")
8385 "/include/SDL"))))
8386 (inputs
8387 (list glu
8388 (sdl-union (list sdl sdl-image))))
8389 (synopsis "Shooter with space station destruction")
8390 (description
8391 "Kobo Deluxe is an enhanced version of Akira Higuchi's XKobo graphical game
8392for Un*x systems with X11.")
8393 (home-page "http://olofson.net/kobodl/")
8394 (license license:gpl2+)))
8395
8396(define-public freeciv
8397 (package
8398 (name "freeciv")
8399 (version "3.2.5")
8400 (source
8401 (origin
8402 (method url-fetch)
8403 (uri (list (string-append
8404 "https://files.freeciv.org/stable/freeciv-"
8405 version ".tar.xz")
8406 (string-append
8407 "mirror://sourceforge/freeciv/Freeciv%20"
8408 (version-major+minor version) "/" version
8409 "/freeciv-" version ".tar.xz")))
8410 (sha256
8411 (base32 "1s09qqy2r58gv0ai3xx8dv7a7qkcn5kg5jwv2pplk7wv5bq0ha6k"))))
8412 (build-system gnu-build-system)
8413 (inputs
8414 (list curl cyrus-sasl gtk+ sdl2-mixer sqlite zlib))
8415 (native-inputs
8416 (list pkg-config))
8417 (home-page "https://www.freeciv.org/")
8418 (synopsis "Turn-based empire building strategy game")
8419 (description "Freeciv is a turn-based empire building strategy game
8420inspired by the history of human civilization. The game commences in
8421prehistory and your mission is to lead your tribe from the Stone Age
8422into the Space Age.")
8423 (license license:gpl2+)))
8424
8425(define-public no-more-secrets
8426 (package
8427 (name "no-more-secrets")
8428 (version "1.0.1")
8429 (source
8430 (origin
8431 (method git-fetch)
8432 (uri (git-reference
8433 (url "https://github.com/bartobri/no-more-secrets")
8434 (commit (string-append "v" version))))
8435 (file-name (git-file-name name version))
8436 (sha256
8437 (base32 "14h34zpgjldw9bf65chb72gnzw5q88djrdasz2828r3ck6k88l21"))))
8438 (build-system gnu-build-system)
8439 (arguments
8440 `(#:tests? #f
8441 #:make-flags (list "CC=gcc" "all-ncurses"
8442 (string-append "prefix="
8443 (assoc-ref %outputs "out")))
8444 #:phases
8445 (modify-phases %standard-phases
8446 (delete 'configure))))
8447 (inputs
8448 (list ncurses))
8449 (home-page "https://github.com/bartobri/no-more-secrets")
8450 (synopsis "Recreation of data decryption effect in \"Sneakers\"")
8451 (description
8452 "@code{No More Secrets} provides a command line tool called \"nms\"
8453that recreates the famous data decryption effect seen on screen in the 1992
8454movie \"Sneakers\".
8455
8456This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and
8457it will apply the hollywood effect, initially showing encrypted data, then
8458starting a decryption sequence to reveal the original plaintext characters.")
8459 (license license:expat)))
8460
8461(define-public asciiquarium
8462 (package
8463 (name "asciiquarium")
8464 (version "1.1")
8465 (source
8466 (origin
8467 (method url-fetch)
8468 (uri (string-append
8469 "https://robobunny.com/projects/asciiquarium/asciiquarium_"
8470 version ".tar.gz"))
8471 (sha256
8472 (base32 "0qfkr5b7sxzi973nh0h84blz2crvmf28jkkgaj3mxrr56mhwc20v"))))
8473 (build-system copy-build-system)
8474 (inputs (list bash-minimal perl perl-curses perl-term-animation))
8475 (arguments
8476 (list
8477 #:install-plan
8478 #~'(("asciiquarium" "bin/")
8479 ("README" "share/doc/asciiquarium/"))
8480 #:phases
8481 #~(modify-phases %standard-phases
8482 (add-after 'install 'chmod
8483 (lambda _
8484 (chmod (string-append #$output "/bin/asciiquarium") #o755)))
8485 (add-after 'chmod 'wrap-perl-bin
8486 (lambda _
8487 (wrap-program (string-append #$output "/bin/asciiquarium")
8488 `("PERL5LIB" ":" prefix
8489 (,(getenv "PERL5LIB")))))))))
8490 (home-page "https://robobunny.com/projects/asciiquarium/html/")
8491 (synopsis "ASCII aquarium for the terminal")
8492 (license license:gpl2+)
8493 (description
8494 "The @code{asciiquarium} package renders a fullscreen animation of an
8495aquarium with various fish in the terminal, which can make for a nice
8496screensaver.")))
8497
8498(define-public megaglest-data
8499 (package
8500 (name "megaglest-data")
8501 (version "3.13.0")
8502 (source
8503 (origin
8504 (method url-fetch)
8505 (uri (string-append
8506 "https://github.com/MegaGlest/megaglest-data"
8507 "/releases/download/" version "/megaglest-data-"
8508 version ".tar.xz"))
8509 (sha256
8510 (base32
8511 "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
8512 (build-system cmake-build-system)
8513 (arguments
8514 `(#:tests? #f))
8515 (home-page "https://megaglest.org/")
8516 (synopsis "Data files for MegaGlest")
8517 (description "This package contains the data files required for MegaGlest.")
8518 (license license:cc-by-sa3.0)))
8519
8520(define-public megaglest
8521 (package
8522 (name "megaglest")
8523 (version "3.13.0")
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (string-append
8528 "https://github.com/MegaGlest/megaglest-source"
8529 "/releases/download/" version "/megaglest-source-"
8530 version ".tar.xz"))
8531 (sha256
8532 (base32
8533 "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
8534 (build-system cmake-build-system)
8535 (inputs
8536 (list curl
8537 fontconfig
8538 ftgl
8539 glew
8540 libjpeg-turbo
8541 megaglest-data
8542 mesa
8543 miniupnpc
8544 openal
8545 libircclient
8546 libpng
8547 libvorbis
8548 lua
8549 sdl2
8550 wxwidgets-3.0))
8551 (native-inputs
8552 (list cppunit pkg-config))
8553 (arguments
8554 (list
8555 #:modules '((guix build cmake-build-system)
8556 ((guix build gnu-build-system) #:prefix gnu:)
8557 (guix build utils))
8558 #:configure-flags
8559 #~(list "-DCMAKE_CXX_FLAGS=-fcommon"
8560 "-DCMAKE_C_FLAGS=-fcommon"
8561 (string-append "-DCUSTOM_DATA_INSTALL_PATH="
8562 (search-input-directory %build-inputs
8563 "share/megaglest"))
8564 "-DBUILD_MEGAGLEST_TESTS=ON")
8565 #:phases
8566 #~(modify-phases %standard-phases
8567 (add-after 'unpack 'fix-ini-search-path
8568 (lambda* (#:key outputs #:allow-other-keys)
8569 (substitute* "source/glest_game/global/config.cpp"
8570 (("/usr/share/megaglest/")
8571 (string-append (assoc-ref outputs "out")
8572 "/share/megaglest/")))))
8573 (replace 'check
8574 (lambda* (#:key tests? #:allow-other-keys #:rest args)
8575 (when tests?
8576 (apply (assoc-ref gnu:%standard-phases 'check)
8577 #:tests? tests? #:test-target "megaglest_tests" args)
8578 (invoke "source/tests/megaglest_tests")))))))
8579 (home-page "https://megaglest.org/")
8580 (synopsis "3D real-time strategy (RTS) game")
8581 (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
8582game, where you control the armies of one of seven different factions: Tech,
8583Magic, Egypt, Indians, Norsemen, Persian or Romans.")
8584 (license license:gpl2+)))
8585
8586(define-public freegish
8587 (let ((commit "caf58a2f990a939230bab82226e29cd79732f366")
8588 (revision "3"))
8589 (package
8590 (name "freegish")
8591 (version (string-append "0-" revision "." (string-take commit 9)))
8592 (source (origin
8593 (method git-fetch)
8594 (uri (git-reference
8595 (url "https://github.com/freegish/freegish")
8596 (commit commit)))
8597 (file-name (git-file-name name version))
8598 (sha256
8599 (base32
8600 "0980ad8xg0bzm6507bq9sbgw03i7jj33g0f955g0q8jvpb22r65v"))
8601 (modules '((guix build utils)))
8602 ;; The audio files in the "music" directory are licensed under
8603 ;; CC-BY-NC, so we delete them.
8604 (snippet
8605 '(begin
8606 (delete-file-recursively "music")
8607 #t))))
8608 (build-system cmake-build-system)
8609 (arguments
8610 `(#:tests? #f ; no tests included
8611 #:configure-flags
8612 (list "-DINSTALL_FHS=ON")))
8613 (inputs
8614 (list sdl2
8615 openal
8616 libvorbis
8617 libogg
8618 mesa
8619 libpng))
8620 (home-page "https://github.com/freegish/freegish")
8621 (synopsis "Side-scrolling physics platformer with a ball of tar")
8622 (description "In FreeGish you control Gish, a ball of tar who lives
8623happily with his girlfriend Brea, until one day a mysterious dark creature
8624emerges from a sewer hole and pulls her below ground.")
8625 ;; The textures are available under the Expat license. All other assets
8626 ;; (including levels) are covered under CC-BY-SA or public domain. The
8627 ;; source code is under GPLv2+.
8628 (license (list license:gpl2+
8629 license:expat
8630 license:public-domain
8631 license:cc-by-sa3.0)))))
8632
8633(define-public cdogs-sdl
8634 (package
8635 (name "cdogs-sdl")
8636 (version "2.3.2")
8637 (source
8638 (origin
8639 (method git-fetch)
8640 (uri (git-reference
8641 (url "https://github.com/cxong/cdogs-sdl")
8642 (commit version)))
8643 (file-name (git-file-name name version))
8644 (sha256
8645 (base32 "13brn8hklgid43vddmaq3a0yhlcx550wa8jvs17dwpzj0sr045vh"))))
8646 (build-system cmake-build-system)
8647 (arguments
8648 (list
8649 #:configure-flags
8650 #~(list (string-append "-DCDOGS_DATA_DIR=" #$output
8651 "/share/cdogs-sdl/"))
8652 #:phases
8653 #~(modify-phases %standard-phases
8654 (add-after 'unpack 'patch-install-directory
8655 (lambda _
8656 (substitute* "CMakeLists.txt"
8657 (("set\\(DATA_INSTALL_DIR \".\"\\)")
8658 (string-append "set(DATA_INSTALL_DIR \""
8659 #$output "/share/cdogs-sdl\")"))))))))
8660 (native-inputs
8661 (list pkg-config))
8662 (inputs
8663 (list gtk+ mesa sdl2 sdl2-image sdl2-mixer))
8664 (home-page "https://cxong.github.io/cdogs-sdl/")
8665 (synopsis "Classic overhead run-and-gun game")
8666 (description "C-Dogs SDL is a classic overhead run-and-gun game,
8667supporting up to 4 players in co-op and deathmatch modes. Customize your
8668player, choose from many weapons, and blast, slide and slash your way through
8669over 100 user-created campaigns.")
8670 ;; GPLv2+ for code (includes files under BSD-2 and BSD-3),
8671 ;; CC0/CC-BY/CC-BY-SA for assets.
8672 (license (list license:gpl2+
8673 license:bsd-2
8674 license:bsd-3
8675 license:cc0
8676 license:cc-by3.0
8677 license:cc-by-sa3.0))))
8678
8679(define-public kiki
8680 (package
8681 (name "kiki")
8682 (version "1.0.2")
8683 (source (origin
8684 (method url-fetch)
8685 (uri (string-append "mirror://sourceforge/kiki/kiki-src/"
8686 version "/kiki-" version "-src.tgz"))
8687 (sha256
8688 (base32
8689 "0ihjdsxbn8z3cz0gpcprafiipcqaiskgdnh1rhmw4qff8dszalbn"))
8690 (modules '((guix build utils)))
8691 (snippet
8692 '(begin
8693 (for-each delete-file (find-files "." "\\.dll$"))
8694 #t))
8695 (patches
8696 (search-patches "kiki-level-selection-crash.patch"
8697 "kiki-makefile.patch"
8698 "kiki-missing-includes.patch"
8699 "kiki-portability-64bit.patch"))))
8700 (build-system gnu-build-system)
8701 (arguments
8702 `(#:tests? #f ; there are no tests
8703 #:make-flags '("CXX=g++")
8704 #:phases
8705 (modify-phases %standard-phases
8706 (replace 'configure
8707 (lambda* (#:key inputs outputs #:allow-other-keys)
8708 (setenv "CPLUS_INCLUDE_PATH"
8709 (string-append
8710 (search-input-directory inputs "include/SDL") ":"
8711 (search-input-directory inputs "include/python2.7")
8712 ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
8713 (substitute* "src/main/main.cpp"
8714 (("#include <SDL.h>" line)
8715 (string-append line "
8716#define K_INCLUDE_GLUT
8717#include \"KIncludeTools.h\""))
8718 (("// initialize SDL" line)
8719 (string-append "glutInit(&argc,argv);\n" line)))
8720 (substitute* "src/main/KikiController.cpp"
8721 (("getenv\\(\"KIKI_HOME\"\\)")
8722 (string-append "\"" (assoc-ref outputs "out") "/share/kiki/\"")))
8723 (substitute* "linux/Makefile"
8724 (("CXXOPTS =" line)
8725 (string-append line " -fpermissive"))
8726 (("PYTHON_VERSION=.*") "PYTHON_VERSION=2.7")
8727 (("PYTHONHOME =.*")
8728 (string-append "PYTHONHOME = "
8729 (assoc-ref inputs "python")
8730 "/lib/python2.7/"))
8731 (("\\$\\(GLLIBS\\)" line)
8732 (string-append line " -lm -lpython2.7")))
8733 (substitute* "src/main/KikiPythonWidget.h"
8734 (("#define __KikiPythonWidget" line)
8735 (string-append line "\n#include \"KikiPython.h\"")))
8736 #t))
8737 (add-before 'build 'build-kodilib
8738 (lambda* (#:key make-flags #:allow-other-keys)
8739 (with-directory-excursion "kodilib/linux"
8740 (apply invoke "make" make-flags))))
8741 (add-after 'build-kodilib 'chdir
8742 (lambda _ (chdir "linux") #t))
8743 (replace 'install
8744 (lambda* (#:key outputs #:allow-other-keys)
8745 (let* ((out (assoc-ref outputs "out"))
8746 (bin (string-append out "/bin"))
8747 (share (string-append out "/share/kiki")))
8748 (mkdir-p bin)
8749 (mkdir-p share)
8750 (install-file "kiki" bin)
8751 (copy-recursively "../py" (string-append share "/py"))
8752 (copy-recursively "../sound" (string-append share "/sound"))
8753 #t))))))
8754 (inputs
8755 `(("glu" ,glu)
8756 ("freeglut" ,freeglut)
8757 ("libxcrypt" ,libxcrypt)
8758 ("sdl-union" ,(sdl-union (list sdl
8759 sdl-mixer
8760 sdl-image)))
8761 ("python" ,python-2)))
8762 (native-inputs
8763 (list swig-4.4))
8764 (home-page "https://kiki.sourceforge.net/")
8765 (synopsis "3D puzzle game")
8766 (description "Kiki the nano bot is a 3D puzzle game. It is basically a
8767mixture of the games Sokoban and Kula-World. Your task is to help Kiki, a
8768small robot living in the nano world, repair its maker.")
8769 ;; See <http://metadata.ftp-master.debian.org/changelogs/main/k/
8770 ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright>
8771 ;; for a statement from the author.
8772 (license license:public-domain)))
8773
8774(define-public teeworlds
8775 (package
8776 (name "teeworlds")
8777 (version "0.7.5")
8778 (source (origin
8779 (method git-fetch)
8780 (uri (git-reference
8781 (url "https://github.com/teeworlds/teeworlds")
8782 (commit version)
8783 ;; There are two submodules in datasrc/{languages,maps}
8784 (recursive? #t)))
8785 (file-name (git-file-name name version))
8786 (sha256
8787 (base32
8788 "1l19ksmimg6b8zzjy0skyhh7z11ql7n5gvilkv7ay5x2b9ndbqwz"))
8789 (modules '((guix build utils)
8790 (ice-9 ftw)
8791 (ice-9 regex)
8792 (srfi srfi-1)
8793 (srfi srfi-26)))
8794 (snippet ; remove bundled libraries except md5
8795 '(let ((base-dir "src/engine/external/"))
8796 (for-each (compose (cut delete-file-recursively <>)
8797 (cut string-append base-dir <>))
8798 (remove (cut string-match "(^.)|(^md5$)" <>)
8799 (scandir base-dir)))
8800 #t))))
8801 (build-system cmake-build-system)
8802 (arguments
8803 (list
8804 #:modules '((guix build cmake-build-system)
8805 ((guix build gnu-build-system) #:prefix gnu:)
8806 (guix build utils))
8807 #:phases
8808 #~(modify-phases %standard-phases
8809 (add-after 'unpack 'patch-paths
8810 (lambda* (#:key outputs #:allow-other-keys)
8811 ;; Embed path to assets.
8812 (substitute* "src/engine/shared/storage.cpp"
8813 (("#define DATA_DIR.*")
8814 (string-append "#define DATA_DIR \""
8815 (assoc-ref outputs "out")
8816 "/share/teeworlds/data"
8817 "\"")))))
8818 (add-after 'unpack 'replace-font
8819 (lambda* (#:key inputs #:allow-other-keys)
8820 (delete-file "datasrc/fonts/DejaVuSans.ttf")
8821 (symlink (string-append (assoc-ref inputs "font-dejavu")
8822 "/share/fonts/truetype/DejaVuSans.ttf")
8823 "datasrc/fonts/DejaVuSans.ttf")))
8824 (replace 'check
8825 (lambda* (#:rest args)
8826 (apply (assoc-ref gnu:%standard-phases 'check)
8827 #:test-target "run_tests" args))))))
8828 (inputs
8829 (list freetype
8830 font-dejavu
8831 glu
8832 json-parser
8833 mesa
8834 pnglite
8835 sdl2
8836 sdl2-image
8837 sdl2-mixer
8838 wavpack
8839 openssl
8840 zlib))
8841 (native-inputs
8842 `(("googletest" ,googletest)
8843 ("python" ,python-wrapper)
8844 ("pkg-config" ,pkg-config)))
8845 (home-page "https://www.teeworlds.com")
8846 (synopsis "2D retro multiplayer shooter game")
8847 (description "Teeworlds is an online multiplayer game. Battle with up to
884816 players in a variety of game modes, including Team Deathmatch and Capture
8849The Flag. You can even design your own maps!")
8850 (license (list license:bsd-3 license:cc-by-sa3.0)))) ; game+maps&languages
8851
8852(define-public enigma
8853 (package
8854 (name "enigma")
8855 (version "1.21")
8856 (source (origin
8857 (method url-fetch)
8858 (uri (string-append "mirror://sourceforge/enigma-game/"
8859 "Release%20" version "/enigma-"
8860 version ".tar.gz"))
8861 (sha256
8862 (base32
8863 "00ffh9pypj1948pg3q9sjp1nmiabh52p5c8wpg9n1dcfgl3cywnq"))))
8864 (build-system gnu-build-system)
8865 (arguments
8866 `(#:configure-flags
8867 (list "--with-system-enet")
8868 #:phases
8869 (modify-phases %standard-phases
8870 (add-after 'unpack 'fix-build-with-new-gcc
8871 (lambda _
8872 ;; Fix build with GCC6 and later by avoiding comparing ifstream
8873 ;; to NULL. Can be removed for versions > 1.21.
8874 (substitute* "src/lev/Proxy.cc"
8875 (("ifs != NULL")
8876 "ifs"))
8877 #t))
8878 (add-after 'unpack 'find-sdl
8879 (lambda _
8880 (substitute* "configure"
8881 (("SDL_ttf.h") "SDL/SDL_ttf.h"))
8882 (substitute* '("tools/ttf2bmf.cc"
8883 "lib-src/enigma-core/ecl_font.cc"
8884 "lib-src/enigma-core/ecl_video.cc"
8885 "lib-src/enigma-core/ecl_buffer.hh"
8886 "src/SoundEngine.cc"
8887 "src/SoundEngine.hh"
8888 "src/MusicManager.cc"
8889 "src/MusicManager.hh"
8890 "src/d_models.cc"
8891 "src/main.cc"
8892 "src/network.cc")
8893 (("#include \"SDL_(image|ttf|mixer|types|syswm|mutex).h\"" line header)
8894 (string-append "#include \"SDL/SDL_" header ".h\"")))
8895 (substitute* "src/main.cc"
8896 (("#include <SDL_(image|ttf|mixer).h>" line header)
8897 (string-append "#include \"SDL/SDL_" header ".h\"")))
8898 #t)))))
8899 (inputs
8900 (list xerces-c
8901 (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)) curl
8902 enet))
8903 (native-inputs
8904 (list pkg-config imagemagick))
8905 (home-page "https://www.nongnu.org/enigma")
8906 (synopsis "Puzzle game with a dexterity component")
8907 (description "Enigma is a puzzle game with 550 unique levels. The object
8908of the game is to find and uncover pairs of identically colored ‘Oxyd’ stones.
8909Simple? Yes. Easy? Certainly not! Hidden traps, vast mazes, laser beams,
8910and most of all, countless hairy puzzles usually block your direct way to the
8911Oxyd stones. Enigma’s game objects (and there are hundreds of them, lest you
8912get bored) interact in many unexpected ways, and since many of them follow the
8913laws of physics (Enigma’s special laws of physics, that is), controlling them
8914with the mouse isn’t always trivial.")
8915 (license license:gpl2+)))
8916
8917(define-public chroma
8918 (package
8919 (name "chroma")
8920 (version "1.21")
8921 (source (origin
8922 (method url-fetch)
8923 (uri (string-append "http://level7.org.uk/chroma/download/chroma-"
8924 version ".tar.bz2"))
8925 (sha256
8926 (base32
8927 "0gb9v518rhqzpfzcvr5gklgldvlzhq0yrhwyas9qln35mkhxdx5x"))))
8928 (build-system gnu-build-system)
8929 (arguments
8930 `(#:tests? #f)) ; no tests included
8931 (inputs
8932 (list (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf))
8933 freetype
8934 ncurses
8935 fontconfig
8936 libxft))
8937 (native-inputs
8938 (list pkg-config))
8939 (home-page "http://level7.org.uk/chroma/")
8940 (synopsis "Abstract puzzle game")
8941 (description "Chroma is an abstract puzzle game. A variety of colourful
8942shapes are arranged in a series of increasingly complex patterns, forming
8943fiendish traps that must be disarmed and mysterious puzzles that must be
8944manipulated in order to give up their subtle secrets. Initially so
8945straightforward that anyone can pick it up and begin to play, yet gradually
8946becoming difficult enough to tax even the brightest of minds.")
8947 (license license:gpl2+)))
8948
8949(define-public fillets-ng
8950 (package
8951 (name "fillets-ng")
8952 (version "1.0.1")
8953 (source (origin
8954 (method url-fetch)
8955 (uri (string-append "mirror://sourceforge/fillets/"
8956 "Fish%20Fillets%20-%20Next%20Generation/"
8957 version "/fillets-ng-" version ".tar.gz"))
8958 (sha256
8959 (base32
8960 "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"))))
8961 (build-system gnu-build-system)
8962 (arguments
8963 `(#:configure-flags
8964 (list (string-append "--with-lua="
8965 (assoc-ref %build-inputs "lua")))
8966 #:make-flags
8967 (list (string-append "CFLAGS=-I"
8968 (assoc-ref %build-inputs "sdl-union")
8969 "/include/SDL")
8970 (string-append "CXXFLAGS=-I"
8971 (assoc-ref %build-inputs "sdl-union")
8972 "/include/SDL"))
8973 #:phases
8974 (modify-phases %standard-phases
8975 ;; Lua 5.1 does not provide it.
8976 (add-after 'unpack 'do-not-link-with-lualib
8977 (lambda _
8978 (substitute* "configure"
8979 (("-llualib") ""))
8980 #t))
8981 (add-after 'install 'install-data
8982 (lambda* (#:key inputs outputs #:allow-other-keys)
8983 (let ((data (string-append (assoc-ref outputs "out")
8984 "/share/games/fillets-ng")))
8985 (mkdir-p data)
8986 (invoke "tar" "-xvf"
8987 (assoc-ref inputs "fillets-ng-data")
8988 "--strip-components=1"
8989 "-C" data)))))))
8990 (inputs
8991 (list (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf)) fribidi
8992 libx11 lua-5.1))
8993 (native-inputs
8994 `(("pkg-config" ,pkg-config)
8995 ("fillets-ng-data"
8996 ,(origin
8997 (method url-fetch)
8998 (uri (string-append "mirror://sourceforge/fillets/"
8999 "Fish%20Fillets%20-%20Next%20Generation/"
9000 version "/fillets-ng-data-" version ".tar.gz"))
9001 (sha256
9002 (base32
9003 "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"))))))
9004 (home-page "https://fillets.sourceforge.net")
9005 (synopsis "Puzzle game")
9006 (description "Fish Fillets NG is strictly a puzzle game. The goal in
9007every of the seventy levels is always the same: find a safe way out. The fish
9008utter witty remarks about their surroundings, the various inhabitants of their
9009underwater realm quarrel among themselves or comment on the efforts of your
9010fish. The whole game is accompanied by quiet, comforting music.")
9011 (license license:gpl2+)))
9012
9013(define-public crawl
9014 (package
9015 (name "crawl")
9016 (version "0.34.1")
9017 (source
9018 (origin
9019 (method git-fetch)
9020 (uri (git-reference
9021 (url "https://github.com/crawl/crawl")
9022 (commit version)))
9023 (file-name (git-file-name name version))
9024 (sha256
9025 (base32 "09x4n4w3rw8sldwprb03yg1igwh4m09iw00g2iq30466jryys6bv"))
9026 (patches (search-patches "crawl-upgrade-saves.patch"))))
9027 (build-system gnu-build-system)
9028 (inputs
9029 (list lua-5.4 ncurses sqlite zlib))
9030 (native-inputs
9031 (list bash-minimal
9032 bison
9033 flex
9034 perl
9035 pkg-config
9036 python-wrapper
9037 python-pyyaml))
9038 (arguments
9039 (list
9040 #:make-flags
9041 #~(list (string-append "SQLITE_INCLUDE_DIR="
9042 #$(this-package-input "sqlite")
9043 "/include")
9044 (string-append "prefix=" #$output)
9045 "SAVEDIR=~/.crawl"
9046 ;; Don't compile with SSE on systems which don't have it.
9047 #$@(match (%current-system)
9048 ((or "i686-linux" "x86_64-linux")
9049 '())
9050 (_ '("NOSSE=TRUE")))
9051 ;; don't build any bundled dependencies
9052 "BUILD_LUA="
9053 "BUILD_SQLITE="
9054 "BUILD_ZLIB="
9055 "-Ccrawl-ref/source")
9056 #:phases
9057 #~(modify-phases %standard-phases
9058 (add-after 'unpack 'set-version
9059 (lambda _
9060 (call-with-output-file "crawl-ref/source/util/release_ver"
9061 (lambda (port)
9062 (display #$version port)))))
9063 (add-after 'unpack 'find-SDL-image
9064 (lambda _
9065 (substitute* "crawl-ref/source/windowmanager-sdl.cc"
9066 (("SDL_image.h") "SDL2/SDL_image.h"))))
9067 (delete 'configure)
9068 (replace 'check
9069 (lambda* (#:key tests? make-flags #:allow-other-keys)
9070 (when tests?
9071 (setenv "HOME" (getcwd))
9072 ;; Fake a terminal for the test cases.
9073 (setenv "TERM" "xterm-256color")
9074 ;; Run the tests that don't require a debug build.
9075 (apply invoke "make" "nondebugtest"
9076 (format #f "-j~d" (parallel-job-count))
9077 ;; Force command line build for test cases.
9078 (append make-flags '("GAME=crawl" "TILES=")))))))))
9079 (synopsis "Roguelike dungeon crawler game")
9080 (description "Dungeon Crawl Stone Soup (also known as \"Crawl\" or DCSS
9081for short) is a roguelike adventure through dungeons filled with dangerous
9082monsters in a quest to find the mystifyingly fabulous Orb of Zot.")
9083 (home-page "https://crawl.develz.org")
9084 (license (list license:gpl2+
9085 license:bsd-2
9086 license:bsd-3
9087 license:cc0
9088 license:expat
9089 license:zlib
9090 license:asl2.0))))
9091
9092;; The linter here claims that patch file names should start with the package
9093;; name. But, in this case, the patches are inherited from crawl with the
9094;; "crawl-" prefix instead of "crawl-tiles-".
9095(define-public crawl-tiles
9096 (package
9097 (inherit crawl)
9098 (name "crawl-tiles")
9099 (arguments
9100 (substitute-keyword-arguments
9101 (package-arguments crawl)
9102 ((#:make-flags flags)
9103 #~(cons*
9104 (string-append "PROPORTIONAL_FONT="
9105 #$(this-package-input "font-dejavu")
9106 "/share/fonts/truetype/DejaVuSans.ttf")
9107 (string-append "MONOSPACED_FONT="
9108 #$(this-package-input "font-dejavu")
9109 "/share/fonts/truetype/DejaVuSansMono.ttf")
9110 "TILES=y"
9111 ;; Rename the executable to allow parallel installation with crawl.
9112 "GAME=crawl-tiles"
9113 #$flags))))
9114 (inputs
9115 (modify-inputs inputs
9116 (prepend font-dejavu freetype glu libpng sdl2 sdl2-image sdl2-mixer)))
9117 (native-inputs
9118 (modify-inputs native-inputs
9119 (prepend pngcrush which)))
9120 (synopsis "Graphical roguelike dungeon crawler game")))
9121
9122(define-public lugaru
9123 (package
9124 (name "lugaru")
9125 (version "1.2")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (string-append "https://github.com/osslugaru/lugaru/releases"
9129 "/download/" version
9130 "/lugaru-" version ".tar.xz"))
9131 (sha256
9132 (base32 "15zgcshy22q51rm72zi6y9z7qlgnz5iw3gczjdlir4bqmxy4gspk"))
9133 (patches
9134 (search-patches "lugaru-fix-sound.patch"))))
9135 (build-system cmake-build-system)
9136 (arguments
9137 (list #:configure-flags #~(list "-DSYSTEM_INSTALL=ON")
9138 #:tests? #f)) ;no test suite
9139 (native-inputs (list pkg-config))
9140 (inputs
9141 (list glu
9142 libjpeg-turbo
9143 libpng
9144 libvorbis
9145 openal
9146 sdl2
9147 zlib))
9148 (home-page "https://osslugaru.gitlab.io")
9149 (synopsis "Cross-platform third-person action game")
9150 (description "Lugaru is a third-person action game. The main character,
9151Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills.
9152In his quest to find those responsible for slaughtering his village, he uncovers
9153a far-reaching conspiracy involving the corrupt leaders of the rabbit republic
9154and the starving wolves from a nearby den. Turner takes it upon himself to
9155fight against their plot and save his fellow rabbits from slavery.")
9156 (license (list license:gpl2+ ; code
9157 ;; assets:
9158 license:cc-by-sa3.0
9159 license:cc-by-sa4.0))))
9160
9161(define-public 0ad-data
9162 (package
9163 (name "0ad-data")
9164 (version "0.28.0")
9165 (source
9166 (origin
9167 (method url-fetch)
9168 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9169 version "-unix-data.tar.xz"))
9170 (file-name (string-append name "-" version ".tar.xz"))
9171 (sha256
9172 (base32 "0vsj75y4a4psfqiaf2l9n7mhrfh5xzhg1wpzlkh4fb0hw85b6i78"))))
9173 (build-system trivial-build-system)
9174 (native-inputs (list tar unzip xz))
9175 (arguments
9176 `(#:modules ((guix build utils))
9177 #:builder
9178 (begin
9179 (use-modules (guix build utils))
9180 (let ((out (assoc-ref %outputs "out"))
9181 (source (assoc-ref %build-inputs "source"))
9182 (tar (search-input-file %build-inputs "/bin/tar"))
9183 (unzip (search-input-file %build-inputs "/bin/unzip"))
9184 (xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
9185 (setenv "PATH" xz-path)
9186 (mkdir out)
9187 (invoke tar "xvf" source "-C" out "--strip=3")
9188 (for-each (lambda (name)
9189 (let* ((dir (string-append out "/mods/" name))
9190 (file (string-append dir "/" name ".zip")))
9191 (invoke unzip "-o" "-d" dir file)
9192 (delete-file file)))
9193 '("mod" "public"))))))
9194 (synopsis "Data files for 0ad")
9195 (description "0ad-data provides the data files required by the game 0ad.")
9196 (home-page "https://play0ad.com")
9197 (properties '((hidden? . #t)))
9198 (license (list (license:fsdg-compatible
9199 "http://tavmjong.free.fr/FONTS/ArevCopyright.txt"
9200 "Similar to the license of the Bitstream Vera fonts.")
9201 (license:fsdg-compatible
9202 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")
9203 license:cc-by-sa3.0
9204 license:expat
9205 license:gfl1.0
9206 license:gpl2+
9207 license:gpl3+))))
9208
9209(define-public 0ad
9210 (package
9211 (name "0ad")
9212 (version "0.28.0")
9213 (source
9214 (origin
9215 (method url-fetch)
9216 (uri (string-append "https://releases.wildfiregames.com/0ad-"
9217 version "-unix-build.tar.xz"))
9218 (file-name (string-append name "-" version ".tar.xz"))
9219 (sha256
9220 (base32 "0am4smmsl6anqd4ga8sx6z96wjz5jqymkgwdwlpr4sppbrsigqi7"))))
9221 ;; A snippet here would cause a build failure because of timestamps
9222 ;; reset. See https://bugs.gnu.org/26734.
9223 (inputs
9224 (list 0ad-data
9225 curl
9226 enet
9227 fmt
9228 freetype
9229 gloox
9230 icu4c-73
9231 libidn
9232 libpng
9233 libsodium
9234 libvorbis
9235 libxcursor
9236 libxml2
9237 miniupnpc
9238 mozjs-128
9239 openal
9240 sdl2
9241 wxwidgets
9242 zlib))
9243 (native-inputs
9244 (list boost-1.83
9245 cmake-minimal
9246 cxxtest
9247 mesa
9248 pkg-config
9249 python
9250 premake5))
9251 (build-system gnu-build-system)
9252 (arguments
9253 `(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
9254 #:tests? #f ;tests fail currently
9255 #:phases
9256 (modify-phases %standard-phases
9257 (add-after 'unpack 'delete-bundles
9258 (lambda* (#:key inputs #:allow-other-keys)
9259 (delete-file-recursively "libraries/source/spidermonkey")
9260 (delete-file-recursively "libraries/source/cxxtest-4.4")
9261 (substitute* "build/premake/premake5.lua"
9262 (("rootdir\\.\\.\"\\/libraries\\/source\\/cxxtest-4.4\\/bin\\/cxxtestgen\"")
9263 (string-append "\"" (assoc-ref inputs "cxxtest")
9264 "/bin/cxxtestgen"
9265 "\"")))))
9266 (add-after 'unpack 'patch-python-shebangs
9267 ;; A couple Python scripts point to 'python' rather than 'python3'.
9268 ;; They work fine under python3, so let's fix that.
9269 (lambda _
9270 (substitute* "source/tools/webservices/maint_graphics.py"
9271 (("#!/usr/bin/env python")
9272 "#!/usr/bin/env python3"))
9273 (substitute* "source/tools/webservices/manage.py"
9274 (("#!/usr/bin/env python")
9275 "#!/usr/bin/env python3"))))
9276 (add-after 'unpack 'prepare-builtin-libs
9277 ;; Builtin libraries are included in the tarball as other tarballs.
9278 ;; They're usually extracted during the build, but then shebangs
9279 ;; within the libs don't get patched, so we do it here ourselves.
9280 (lambda _
9281 (let ((fcollada-version "28209")
9282 (nvtt-version "28209"))
9283 (with-directory-excursion "libraries/source/fcollada"
9284 (invoke "tar" "-xvf"
9285 (string-append "fcollada-" fcollada-version ".tar.xz"))
9286 (substitute* "build.sh"
9287 (("rm -Rf fcollada-[$][{]PV[}]")
9288 "")
9289 (("\"[$][{]TAR[}]\" xf fcollada-[$][{]PV[}].tar.xz")
9290 "")))
9291 (with-directory-excursion "libraries/source/nvtt"
9292 (invoke "tar" "-xvf"
9293 (string-append "nvtt-" nvtt-version ".tar.xz"))
9294 (substitute* "build.sh"
9295 (("rm -Rf nvtt-[$][{]PV[}]")
9296 "")
9297 (("\"[$][{]TAR[}]\" xf nvtt-[$][{]PV[}].tar.xz")
9298 ""))))))
9299 (add-after 'unpack 'fix-gmake2-references
9300 ;; The current version of 0AD expects premake action 'gmake2',
9301 ;; this was renamed to just 'gmake', so we patch to reflect that.
9302 ;; Remove this when updating to the next release (fixed in main).
9303 (lambda _
9304 (substitute* "build/premake/cxxtest/cxxtest.lua"
9305 (("gmake2")
9306 "gmake"))
9307 (substitute* "build/premake/premake5.lua"
9308 (("if _ACTION == \"gmake\" then")
9309 "if _ACTION == \"gmakelegacy\" then")
9310 (("if _ACTION == \"gmake2\" then")
9311 "if _ACTION == \"gmake\" then"))
9312 (substitute* "build/workspaces/update-workspaces.sh"
9313 (("gmake2")
9314 "gmake"))))
9315 (replace 'configure
9316 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9317 (let* ((jobs (number->string (parallel-job-count)))
9318 (out (assoc-ref outputs "out"))
9319 (lib (string-append out "/lib"))
9320 (data (string-append out "/share/0ad")))
9321 (setenv "JOBS" (string-append "-j" jobs))
9322 (setenv "CC" ,(cc-for-target))
9323 (with-directory-excursion "build/workspaces"
9324 (apply invoke
9325 `("./update-workspaces.sh"
9326 ,(string-append "--libdir=" lib)
9327 ,(string-append "--datadir=" data)
9328 ;; TODO: "--with-system-nvtt"
9329 "--with-system-premake5"
9330 "--with-system-mozjs"
9331 ,@(if tests? '() '("--without-tests"))))))))
9332 (add-before 'build 'build-builtin-libs
9333 (lambda _
9334 (let ((jobs (number->string (parallel-job-count))))
9335 (setenv "JOBS" (string-append "-j" jobs))
9336 (setenv "CC" ,(cc-for-target))
9337 (with-directory-excursion "libraries/source/fcollada"
9338 (invoke "./build.sh"))
9339 (with-directory-excursion "libraries/source/nvtt"
9340 (invoke "./build.sh")))))
9341 (delete 'check)
9342 (replace 'install
9343 (lambda* (#:key inputs outputs #:allow-other-keys)
9344 (chdir "binaries")
9345 (let* ((out (assoc-ref outputs "out"))
9346 (bin (string-append out "/bin"))
9347 (lib (string-append out "/lib"))
9348 (data (string-append out "/share/0ad"))
9349 (applications (string-append out "/share/applications"))
9350 (hicolor (string-append out "/share/icons/hicolor/128x128/apps"))
9351 (metainfo (string-append out "/share/metainfo"))
9352 (mime (string-append out "/share/mime/application"))
9353 (0ad-data (assoc-ref inputs "0ad-data")))
9354 ;; data
9355 (copy-recursively "data" data)
9356 (for-each (lambda (file)
9357 (symlink (string-append 0ad-data "/" file)
9358 (string-append data "/" file)))
9359 '("config" "mods/mod" "mods/public" "tools"))
9360 ;; libraries
9361 (for-each (lambda (file)
9362 (install-file file lib))
9363 (find-files "system" "\\.so$"))
9364 (copy-recursively "../libraries/source/nvtt/lib" lib)
9365 ;; binaries
9366 (install-file "system/pyrogenesis" bin)
9367 (with-directory-excursion bin
9368 (symlink "pyrogenesis" "0ad"))
9369 ;; resources
9370 (with-directory-excursion "../build/resources"
9371 (install-file "0ad.desktop" applications)
9372 (install-file "0ad.png" hicolor)
9373 (install-file "0ad.appdata.xml" metainfo)
9374 (install-file "pyrogenesis.xml" mime)))))
9375 (add-after 'install 'check
9376 (lambda* (#:key tests? #:allow-other-keys)
9377 (when tests?
9378 (with-directory-excursion "system"
9379 (invoke "./test"))))))))
9380 (home-page "https://play0ad.com")
9381 (synopsis "3D real-time strategy game of ancient warfare")
9382 (description "0 A.D. is a real-time strategy (RTS) game of ancient
9383warfare. It's a historically-based war/economy game that allows players to
9384relive or rewrite the history of twelve ancient civilizations, each depicted
9385at their peak of economic growth and military prowess.
9386
93870ad needs a window manager that supports 'Extended Window Manager Hints'.")
9388 (license (list license:bsd-2
9389 license:bsd-3
9390 license:expat
9391 license:gpl2+
9392 license:ibmpl1.0
9393 license:isc
9394 license:lgpl2.1
9395 license:lgpl3
9396 license:mpl2.0
9397 license:zlib))))
9398
9399(define-public open-adventure
9400 (package
9401 (name "open-adventure")
9402 (version "1.20")
9403 (source
9404 (origin
9405 (method git-fetch)
9406 (uri (git-reference
9407 (url "https://gitlab.com/esr/open-adventure")
9408 (commit version)))
9409 (file-name (git-file-name name version))
9410 (sha256
9411 (base32 "0lbggjmh9g4zvnzzqz0qspmc24yg25bjalm06dlvhd22vz7hrfy5"))))
9412 (build-system gnu-build-system)
9413 (arguments
9414 (list
9415 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
9416 #:parallel-tests? #f ;some tests fail non-deterministically
9417 #:phases
9418 #~(modify-phases %standard-phases
9419 (delete 'configure) ;no configure script
9420 (add-before 'build 'use-echo
9421 (lambda _
9422 (substitute* (list "tests/Makefile" "tests/tapview")
9423 (("/bin/echo") (which "echo")))))
9424 #$@(if (this-package-native-input "ruby-asciidoctor")
9425 #~((add-after 'build 'build-manpage
9426 (lambda _
9427 ;; This target is missing a dependency
9428 (substitute* "Makefile"
9429 ((".adoc.6:" line)
9430 (string-append line " advent.adoc")))
9431 (invoke "make" ".adoc.6")))
9432 ;; There is no install target.
9433 (replace 'install
9434 (lambda _
9435 (let ((bin (string-append #$output "/bin"))
9436 (man (string-append #$output "/share/man/man6")))
9437 (install-file "advent" bin)
9438 (install-file "advent.6" man)))))
9439 #~((replace 'install
9440 (lambda _
9441 (let ((bin (string-append #$output "/bin")))
9442 (install-file "advent" bin)))))))))
9443 (native-inputs
9444 (append
9445 (list asciidoc
9446 cppcheck
9447 libedit
9448 pkg-config
9449 python-pyyaml
9450 python-wrapper)
9451 (if (supported-package? ruby-asciidoctor/minimal)
9452 (list ruby-asciidoctor/minimal)
9453 '())))
9454 (home-page "https://gitlab.com/esr/open-adventure")
9455 (synopsis "Colossal Cave Adventure")
9456 (description
9457 "The original Colossal Cave Adventure from 1976 was the origin of all
9458text adventures, dungeon-crawl (computer) games, and computer-hosted
9459roleplaying games. This is a forward port of the last version released by
9460Crowther & Woods, its original authors, in 1995. It has been known as
9461``adventure 2.5'' and ``430-point adventure''.")
9462 (license license:bsd-2)))
9463
9464(define-public tome4
9465 (package
9466 (name "tome4")
9467 (version "1.7.6")
9468 (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
9473 version ".tar.bz2"))
9474 (sha256
9475 (base32 "0338lirc4jbmq29449bw8c6src8b91yn9x14w2nxr31zh00fm7cq"))
9476 (modules '((guix build utils)))))
9477 (build-system gnu-build-system)
9478 (native-inputs
9479 (list unzip))
9480 (inputs
9481 (list glu
9482 libvorbis
9483 luajit
9484 openal
9485 premake4
9486 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
9487 (arguments
9488 (list
9489 #:tests? #false ;no test
9490 #:make-flags
9491 #~(list (string-append "CC=" #$(cc-for-target))
9492 "config=release")
9493 ;; XXX: Building in parallel occasionally causes this build failure:
9494 ;; ../src/luajit2/src/host/buildvm.c:73:10: fatal error: buildvm_arch.h:
9495 ;; No such file or directory
9496 #:parallel-build? #f
9497 #:phases
9498 #~(modify-phases %standard-phases
9499 (delete 'bootstrap)
9500 (replace 'configure
9501 (lambda _
9502 (invoke "premake4" "gmake")))
9503 (add-after 'set-paths 'set-sdl-paths
9504 (lambda* (#:key inputs #:allow-other-keys)
9505 (setenv "CPATH"
9506 (string-append
9507 (search-input-directory inputs "/include/SDL2")
9508 ":" (or (getenv "CPATH") "")))))
9509 (add-after 'set-sdl-paths 'set-cflags
9510 (lambda _
9511 (setenv "CFLAGS"
9512 (string-append
9513 "-g -O2 "
9514 "-Wno-error=incompatible-pointer-types "
9515 "-Wno-error=implicit-function-declaration"))))
9516 ;; premake doesn't provide install target
9517 (replace 'install
9518 (lambda* (#:key inputs outputs #:allow-other-keys)
9519 (let* ((out (assoc-ref outputs "out"))
9520 (usr (string-append out "/usr"))
9521 (bin (string-append out "/bin"))
9522 (licenses (string-append out "/share/licenses"))
9523 (documents (string-append out "/share/doc"))
9524 (pixmaps (string-append out "/share/pixmaps"))
9525 (icon "te4-icon.png")
9526 (data (string-append out "/share/" #$name))
9527 (applications (string-append
9528 out "/share/applications"))
9529 (unzip (string-append
9530 (assoc-ref inputs "unzip") "/bin/unzip"))
9531 (wrapper (string-append bin "/" #$name)))
9532 ;; icon
9533 (mkdir-p pixmaps)
9534 (invoke unzip "-j"
9535 (string-append
9536 "game/engines/te4-" #$version ".teae")
9537 (string-append
9538 "data/gfx/" icon) "-d" pixmaps)
9539 ;; game executable
9540 (install-file "t-engine" data)
9541 (mkdir-p bin)
9542 (with-output-to-file wrapper
9543 (lambda ()
9544 (display
9545 (string-append
9546 "#!/bin/sh\n"
9547 ;; No bootstrap code found,
9548 ;; defaulting to working directory
9549 ;; for engine code!
9550 "cd " data "\n"
9551 "exec -a tome4 ./t-engine \"$@\"\n"))))
9552 (chmod wrapper #o555)
9553 ;; licenses
9554 (for-each (lambda (file)
9555 (install-file file licenses))
9556 '("COPYING" "COPYING-MEDIA"))
9557 ;; documents
9558 (for-each (lambda (file)
9559 (install-file file documents))
9560 '("CONTRIBUTING" "CREDITS"))
9561 ;; data
9562 (copy-recursively "bootstrap" (string-append
9563 data "/bootstrap"))
9564 (copy-recursively "game" (string-append data "/game"))
9565 ;; launcher
9566 (mkdir-p applications)
9567 (make-desktop-entry-file
9568 (string-append applications "/" #$name ".desktop")
9569 #:name "ToME4"
9570 #:comment #$synopsis
9571 #:exec #$name
9572 #:icon icon
9573 #:categories '("Game" "RolePlaying"))))))))
9574 (home-page "https://te4.org")
9575 (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
9576combat and advanced character building. Play as one of many unique races and
9577classes in the lore-filled world of Eyal, exploring random dungeons, facing
9578challenging battles, and developing characters with your own tailored mix of
9579abilities and powers.")
9580 (license license:gpl3+)))
9581
9582(define-public torcs
9583 (package
9584 (name "torcs")
9585 (version "1.3.9")
9586 (source
9587 (origin
9588 (method url-fetch)
9589 (uri (string-append "mirror://sourceforge/" name
9590 "/all-in-one/" version "/"
9591 name "-" version ".tar.bz2"))
9592 ;; Source archive is in fact in gzip format, rename it.
9593 (file-name (string-append name "-" version ".tar.bz2"))
9594 (sha256
9595 (base32
9596 "0k6d0dm7qnpqlgl6yjk42fk5n045in1xf08v8mkm8achsa39xipr"))
9597 (modules '((guix build utils)
9598 (ice-9 ftw)
9599 (ice-9 regex)
9600 (srfi srfi-26)))
9601 (snippet
9602 #~(begin
9603 ;; Delete Windows-specific sources and pre-built binaries.
9604 (delete-file-recursively "src/windows")
9605 ;; The license of the kw-* and pw-* car models includes a
9606 ;; non-commercial clause, hence does not comply with the GNU FSDG.
9607 (with-directory-excursion "data/cars/models"
9608 (for-each delete-file-recursively
9609 (scandir "." (cut string-match "^(kc|pw)-" <>))))
9610 ;; Delete extraneous CVS directories.
9611 (for-each delete-file-recursively
9612 (find-files "." (lambda (file stat)
9613 (and (eq? 'directory (stat:type stat))
9614 (string=? "CVS" (basename file))))
9615 #:directories? #t))))))
9616 (build-system gnu-build-system)
9617 (arguments
9618 ;; Building in parallel fails due to a race where include files have not
9619 ;; yet been generated, with errors such as "controlconfig.cpp:30:10:
9620 ;; fatal error: tgfclient.h: No such file or directory". The issue was
9621 ;; reported to the 'torcs-devel' mailing list (see:
9622 ;; https://sourceforge.net/p/torcs/mailman/message/58834764/).
9623 (list #:modules `(,@%default-gnu-modules (srfi srfi-26))
9624 #:parallel-build? #f
9625 #:tests? #f ;no test suite
9626 ;; Ensure the binaries find libraries provided by this very package
9627 ;; (see: https://issues.guix.gnu.org/73979).
9628 #:configure-flags
9629 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output
9630 "/lib/torcs/lib"))
9631 #:phases
9632 #~(modify-phases %standard-phases
9633 (add-after 'unpack 'patch-commands
9634 (lambda* (#:key inputs #:allow-other-keys)
9635 (substitute* "src/linux/torcs.in"
9636 (("/bin/bash")
9637 (search-input-file inputs "bin/bash")))))
9638 (add-after 'install 'install-data
9639 (lambda _
9640 (invoke "make" "datainstall")))
9641 (add-after 'install-data 'install-doc
9642 (lambda _
9643 (let ((docdir (string-append #$output "/share/doc/torcs/"))
9644 (man6 (string-append #$output "/share/man/man6")))
9645 (for-each (cut install-file <> man6)
9646 (find-files "doc/man" "\\.6$"))
9647 (install-file "doc/userman/how_to_drive.html" docdir)
9648 (copy-recursively "doc/userman/images"
9649 (string-append docdir "/images")))))
9650 (add-after 'install 'install-freedesktop-entry
9651 (lambda _
9652 (let ((iconsdir (string-append #$output "/share/icons/hicolor/"
9653 "48x48/apps")))
9654 (mkdir-p iconsdir)
9655 (copy-file "Ticon.png" (string-append iconsdir "/torcs.png")))
9656 (install-file "torcs.desktop"
9657 (string-append #$output
9658 "/share/applications/"))))
9659 (add-after 'install 'fix-permissions
9660 ;; XXX: Otherwise, the guix daemon reports: "suspicious
9661 ;; ownership or permission on /gnu/store/xxx-torcs-1.3.7',
9662 ;; rejecting this build output".
9663 (lambda _
9664 (chmod #$output #o755))))))
9665 (native-inputs (list bzip2))
9666 (inputs
9667 (list bash-minimal
9668 freealut
9669 freeglut
9670 libice
9671 libpng
9672 libsm
9673 libvorbis
9674 libxi
9675 libxmu
9676 libxrandr
9677 libxrender
9678 libxt
9679 mesa
9680 openal
9681 plib
9682 zlib))
9683 (home-page "https://sourceforge.net/projects/torcs/")
9684 (synopsis "Car racing simulator")
9685 (description "TORCS stands for The Open Racing Car Simulator. It can be
9686used as an ordinary car racing game, as an artificial intelligence (AI) racing
9687game, or as a research platform. The game has features such as:
9688@itemize
9689@item Input support for a driving wheel, joystick, keyboard or mouse
9690@item More than 30 car models
9691@item 30 tracks
9692@item 50 opponents to race against
9693@item Lighting, smoke, skidmarks and glowing brake disks graphics
9694@item Simple damage model and collisions
9695@item Tire and wheel properties (springs, dampers, stiffness, etc.)
9696@item Aerodynamics (ground effect, spoilers, etc.)
9697@end itemize
9698The difficulty level can be configured, impacting how much damage is caused by
9699collisions and the level of traction the car has on the track, which makes the
9700game fun for both novice and experts.")
9701 (license (list license:gpl2+ ;source and most assets
9702 license:fdl1.2+)))) ;how_to_drive.html, faq.html
9703
9704(define-public quakespasm
9705 (package
9706 (name "quakespasm")
9707 (version "0.96.2")
9708 (source
9709 (origin
9710 (method url-fetch)
9711 (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
9712 version ".tar.gz"))
9713 (sha256
9714 (base32 "0hr58w1d2yw82vm9lkln05z6d4sjlcr6grxhf6sqdqwyfy9nv1mw"))))
9715 (arguments
9716 (list #:tests? #f
9717 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
9718 "MP3LIB=mpg123"
9719 "USE_CODEC_FLAC=1"
9720 "USE_CODEC_MIKMOD=1"
9721 "USE_SDL2=1"
9722 "-CQuake")
9723 #:phases #~(modify-phases %standard-phases
9724 (delete 'configure)
9725 (add-after 'unpack 'fix-makefile-paths
9726 (lambda _
9727 (mkdir-p (string-append #$output "/bin"))
9728 (substitute* "Quake/Makefile"
9729 (("/usr/local/games")
9730 (string-append #$output "/bin"))))))))
9731 (build-system gnu-build-system)
9732 (inputs (list flac
9733 libmikmod
9734 libmpg123
9735 libvorbis
9736 mesa
9737 sdl2))
9738 (synopsis "First person shooter engine for Quake 1")
9739 (description "Quakespasm is a modern engine for id software's Quake 1.
9740It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9741some graphical niceities, and numerous bug-fixes and other improvements.")
9742 (home-page "https://quakespasm.sourceforge.net/")
9743 (license license:gpl2+)))
9744
9745(define-public vkquake
9746 (package
9747 (inherit quakespasm)
9748 (name "vkquake")
9749 (version "1.32.3.1")
9750 (source
9751 (origin
9752 (method git-fetch)
9753 (uri (git-reference
9754 (url "https://github.com/Novum/vkQuake")
9755 (commit version)))
9756 (file-name (git-file-name name version))
9757 (sha256
9758 (base32 "0ch9rd6fckqs9bhh6z8qpdi2byra6lhk00y3vj4804351hpgmj0y"))))
9759 (arguments
9760 `(#:make-flags
9761 (let ((vulkanlib (string-append (assoc-ref %build-inputs
9762 "vulkan-loader") "/lib")))
9763 (list "CC=gcc"
9764 "MP3LIB=mpg123"
9765 "USE_CODEC_FLAC=1"
9766 "USE_CODEC_MIKMOD=1"
9767 "USE_SDL2=1"
9768 (string-append "LDFLAGS=-Wl,-rpath=" vulkanlib)
9769 "-CQuake"))
9770 #:phases (modify-phases %standard-phases
9771 (add-after 'unpack 'patch-for-new-vulkan
9772 (lambda _
9773 ;; Mimic upstream commit a869a22d9b51c68e for
9774 ;; compatibility with newer vulkan-headers.
9775 (substitute* "Quake/gl_rmisc.c"
9776 (("VK_DYNAMIC_STATE_RANGE_SIZE")
9777 "3"))
9778 #t))
9779 (delete 'configure)
9780 (add-after 'unpack 'fix-makefile-paths
9781 (lambda* (#:key outputs #:allow-other-keys)
9782 (let ((vulkan (assoc-ref %build-inputs
9783 "vulkan-loader"))
9784 (out (assoc-ref outputs "out")))
9785 (mkdir-p (string-append out "/bin"))
9786 (substitute* "Quake/Makefile" ((" /usr")
9787 (string-append " " out)))
9788 (substitute* "Quake/Makefile" (("/games")
9789 (string-append "/bin")))
9790 (substitute* "Quake/Makefile" (("..VULKAN_SDK.") vulkan))
9791 #t))))
9792 ,@(strip-keyword-arguments '(#:make-flags #:phases)
9793 (package-arguments quakespasm))))
9794 (inputs (modify-inputs inputs
9795 (prepend
9796 glslang
9797 spirv-tools
9798 vulkan-loader
9799 vulkan-headers)))
9800 (description "vkquake is a modern engine for id software's Quake 1.
9801It includes support for 64 bit CPUs, custom music playback, a new sound driver,
9802some graphical niceities, and numerous bug-fixes and other improvements.")
9803 (home-page "https://github.com/Novum/vkQuake")))
9804
9805(define-public yamagi-quake2
9806 (package
9807 (name "yamagi-quake2")
9808 (version "8.51")
9809 (source
9810 (origin
9811 (method url-fetch)
9812 (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
9813 version ".tar.xz"))
9814 (sha256
9815 (base32 "0xk321ph15wgydlmln3k7bdn4zdls2zliggsnkjwlnbax0cfy3z4"))))
9816 (build-system gnu-build-system)
9817 (arguments
9818 `(#:tests? #f
9819 #:make-flags
9820 (list "CC=gcc"
9821 ;; An optional directory where it will look for quake2 data files
9822 ;; in addition to the current working directory.
9823 "WITH_SYSTEMWIDE=yes"
9824 "WITH_SYSTEMDIR=\"/opt/quake2\"")
9825 #:phases
9826 (modify-phases %standard-phases
9827 (delete 'configure)
9828 (add-before 'build 'patch-libraries
9829 (lambda* (#:key inputs #:allow-other-keys)
9830 ;; The game writes paths to openal.so and curl.so to ~/.yq2/...
9831 ;; Workaround: hard-code the compiled paths where it loads them;
9832 ;; this prevents loading old or garbage collected libraries.
9833 (substitute* "src/client/sound/qal.c"
9834 (("al_driver->string")
9835 (string-append "\"" (assoc-ref inputs "openal")
9836 "/lib/libopenal.so\"")))
9837 (substitute* "src/client/curl/qcurl.c"
9838 (("cl_libcurl->string")
9839 (string-append "\"" (assoc-ref inputs "curl")
9840 "/lib/libcurl.so\"")))))
9841 (replace 'install
9842 (lambda* (#:key outputs #:allow-other-keys)
9843 (let ((out (assoc-ref outputs "out")))
9844 (mkdir-p (string-append out "/lib"))
9845 (mkdir-p (string-append out "/bin"))
9846 ;; The yamagi-quake2 binary must be in the same directory
9847 ;; as its engine libraries, but symlinking it to /bin is okay.
9848 ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
9849 (copy-recursively "release"
9850 (string-append out "/lib/yamagi-quake2"))
9851 (symlink (string-append out "/lib/yamagi-quake2/quake2")
9852 (string-append out "/bin/yamagi-quake2"))
9853 (symlink (string-append out "/lib/yamagi-quake2/q2ded")
9854 (string-append out "/bin/yamagi-q2ded"))))))))
9855 (native-inputs
9856 (list pkg-config))
9857 (inputs
9858 (list curl
9859 libvorbis
9860 mesa
9861 openal
9862 sdl2
9863 zlib))
9864 (synopsis "First person shooter engine based on quake2")
9865 (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
9866The main focus is an unchanged single player experience like back in 1997,
9867thus the gameplay and the graphics are unaltered. However the user may use one
9868of the unofficial retexturing packs. In comparison with the official client,
9869over 1000 bugs were fixed and an extensive code audit done,
9870making Yamagi Quake II one of the most solid Quake II implementations available.")
9871 (home-page "https://www.yamagi.org/quake2/")
9872 (license (list license:gpl2+ ; game and server
9873 (license:non-copyleft ; info-zip
9874 "file://LICENSE"
9875 "See Info-Zip section.")
9876 license:public-domain)))) ; stb
9877
9878(define-public nudoku
9879 (package
9880 (name "nudoku")
9881 (version "8.0.0")
9882 (source
9883 (origin
9884 (method git-fetch)
9885 (uri (git-reference
9886 (url "https://github.com/jubalh/nudoku")
9887 (commit version)))
9888 (file-name (git-file-name name version))
9889 (sha256
9890 (base32 "1hcbzgn5jivy1mca1h25mwrmy7iav4j7dp7vmp3fa2lx6qwmiv7s"))))
9891 (build-system gnu-build-system)
9892 (native-inputs
9893 (list autoconf automake gettext-minimal pkg-config))
9894 (inputs
9895 (list ncurses))
9896 (home-page "https://jubalh.github.io/nudoku/")
9897 (synopsis "Sudoku for your terminal")
9898 (description "Nudoku is a ncurses-based Sudoku game for your terminal.")
9899 (license license:gpl3+)))
9900
9901(define-public the-butterfly-effect
9902 (package
9903 (name "the-butterfly-effect")
9904 (version "0.9.3.1")
9905 (source
9906 (origin
9907 (method git-fetch)
9908 (uri (git-reference
9909 (url "https://github.com/the-butterfly-effect/tbe")
9910 (commit (string-append "v" version))))
9911 (file-name (git-file-name name version))
9912 (sha256
9913 (base32
9914 "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj"))))
9915 (build-system qt-build-system)
9916 (arguments
9917 `(#:phases
9918 (modify-phases %standard-phases
9919 (add-after 'unpack 'set-cmake-install-prefix
9920 (lambda* (#:key outputs #:allow-other-keys)
9921 (substitute* "CMakeLists.txt"
9922 (("/usr") (assoc-ref outputs "out"))
9923 (("TBE_BIN_DIR games") "TBE_BIN_DIR bin"))))
9924 (add-after 'unpack 'disable-translations
9925 ;; TODO: Re-enable translations when they no longer fail to build.
9926 (lambda _
9927 (substitute* "CMakeLists.txt"
9928 ((".*i18n.*") "")))))
9929 ;; Test suite requires a running Xorg server. Even when
9930 ;; provided, it fails with "D-Bus library appears to be
9931 ;; incorrectly set up; failed to read machine uuid: Failed to
9932 ;; open "/etc/machine-id": No such file or directory" along
9933 ;; with multiple "QPainter:: ... Painter not active" warnings.
9934 #:tests? #f))
9935 (inputs
9936 (list qtbase-5 qtsvg-5))
9937 (native-inputs
9938 `(("gettext-minimal" ,gettext-minimal)
9939 ("qttools-5" ,qttools-5)
9940 ("qtwayland-5" ,qtwayland-5)))
9941 (synopsis "Realistic physics puzzle game")
9942 (description "The Butterfly Effect (tbe) is a game that uses
9943realistic physics simulations to combine lots of simple mechanical
9944elements to achieve a simple goal in the most complex way possible.")
9945 (home-page "http://the-butterfly-effect.org/")
9946 ;; Main license is GPL2-only. However, artwork is distributed
9947 ;; under various licenses, listed here.
9948 (license (list license:gpl2 license:public-domain license:expat
9949 license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))
9950
9951(define-public the-powder-toy
9952 (package
9953 (name "the-powder-toy")
9954 (version "100.0.399")
9955 (source
9956 (origin
9957 (method git-fetch)
9958 (uri (git-reference
9959 (url "https://github.com/The-Powder-Toy/The-Powder-Toy")
9960 (commit (string-append "v" version))))
9961 (file-name (git-file-name name version))
9962 (sha256
9963 (base32 "0f2gdjykavsz944j4ahpjbj6k8v4sh09d1y82c4y46wayl78cp97"))
9964 (snippet
9965 #~(begin (use-modules (guix build utils))
9966 (substitute* "meson.build"
9967 (("'aarch64', 'x86_64'")
9968 (string-append "'aarch64', 'loongarch64', 'mips64', 'ppc64', "
9969 "'riscv64', 'sparc64', 'x86_64'")))))))
9970 (build-system meson-build-system)
9971 (arguments
9972 `(#:configure-flags (list (string-append
9973 "-Dworkaround_elusive_bzip2_include_dir="
9974 (assoc-ref %build-inputs "bzip2"))
9975 ,@(if (this-package-input "lua")
9976 `("-Dlua=lua-5.2"
9977 "-Dworkaround_noncpp_lua=true")
9978 '()))
9979 #:phases
9980 (modify-phases %standard-phases
9981 ;; Our lua variants are named lua-<version>, not lua<version>.
9982 (add-after 'unpack 'adjust-lua-variant-names
9983 (lambda _
9984 (substitute* '("meson.build"
9985 "meson_options.txt")
9986 (("lua5\\.") "lua-5."))))
9987 ;; No install target
9988 (replace 'install
9989 (lambda _
9990 (let* ((output (assoc-ref %outputs "out"))
9991 (bin (string-append output "/bin"))
9992 (share (string-append output "/share"))
9993 (apps (string-append share "/applications")))
9994 (mkdir-p bin)
9995 (mkdir-p apps)
9996 (install-file "powder" bin)
9997 (install-file "resources/powder.desktop" apps)
9998 (for-each
9999 (lambda (size)
10000 (let ((dir (string-append share "/icons/hicolor/"
10001 size "x" size "/apps")))
10002 (mkdir-p dir)
10003 (copy-file (string-append (assoc-ref %build-inputs "source")
10004 "/resources/generated_icons/icon_exe_"
10005 size ".png")
10006 (string-append dir "/powdertoy-powder.png"))))
10007 '("16" "32" "48"))))))))
10008 (native-inputs (list pkg-config))
10009 (inputs
10010 (append
10011 (list bzip2
10012 curl
10013 fftwf
10014 jsoncpp
10015 libpng
10016 python-wrapper)
10017 (if (supported-package? luajit)
10018 (list luajit)
10019 (list lua-5.2))
10020 (list sdl2
10021 zlib)))
10022 (synopsis "Free physics sandbox game")
10023 (description
10024 "The Powder Toy is a free physics sandbox game, which simulates air
10025pressure and velocity, heat, gravity and a countless number of interactions
10026between different substances! The game provides you with various building
10027materials, liquids, gases and electronic components which can be used to
10028construct complex machines, guns, bombs, realistic terrains and almost
10029anything else. You can then mine them and watch cool explosions, add
10030intricate wirings, play with little stickmen or operate your machine.")
10031 (home-page "https://powdertoy.co.uk/")
10032 ;; The few files that have a license header specify GPLv3+, but most don't
10033 ;; and it's not otherwise specified anywhere.
10034 (license license:gpl3)))
10035
10036(define-public pioneer
10037 (package
10038 (name "pioneer")
10039 (version "20220203")
10040 (source (origin
10041 (method git-fetch)
10042 (uri (git-reference
10043 (url "https://github.com/pioneerspacesim/pioneer")
10044 (commit version)))
10045 (file-name (git-file-name name version))
10046 (sha256
10047 (base32
10048 "0qjq6lsr1rmcnvq9b7r745cpp7n0q6cpc3k81q8ai4xspbq61m8w"))))
10049 (build-system cmake-build-system)
10050 (native-inputs
10051 (list pkg-config))
10052 (inputs
10053 (list assimp
10054 curl
10055 freetype
10056 glew
10057 glu
10058 libpng
10059 libsigc++-2
10060 libvorbis
10061 lua-5.2 ;not compatible with 5.3
10062 mesa
10063 (sdl-union (list sdl2 sdl2-image))))
10064 (arguments
10065 `(#:tests? #f ;tests are broken
10066 #:configure-flags (list "-DUSE_SYSTEM_LIBLUA:BOOL=YES"
10067 "-DUSE_SYSTEM_LIBGLEW:BOOL=YES"
10068 (string-append "-DPIONEER_DATA_DIR="
10069 %output "/share/games/pioneer"))
10070 #:make-flags (list "all" "build-data")))
10071 (home-page "https://pioneerspacesim.net")
10072 (synopsis "Game of lonely space adventure")
10073 (description
10074 "Pioneer is a space adventure game set in our galaxy at the turn of the
1007531st century. The game is open-ended, and you are free to eke out whatever
10076kind of space-faring existence you can think of. Look for fame or fortune by
10077exploring the millions of star systems. Turn to a life of crime as a pirate,
10078smuggler or bounty hunter. Forge and break alliances with the various
10079factions fighting for power, freedom or self-determination. The universe is
10080whatever you make of it.")
10081 (license license:gpl3)))
10082
10083(define-public badass
10084 (package
10085 (name "badass")
10086 (version "0.0.0-20151201180210-02e7c38d503f")
10087 (source
10088 (origin
10089 (method git-fetch)
10090 (uri (git-reference
10091 (url "https://github.com/umayr/badass")
10092 (commit (go-version->git-ref version))))
10093 (file-name (git-file-name name version))
10094 (sha256
10095 (base32 "1b0y7xz9y0cqxfphfznz2zhfk7mm2vvmldf088w2fm8c8spj4g28"))))
10096 (build-system go-build-system)
10097 (arguments
10098 '(#:import-path "github.com/umayr/badass"))
10099 (home-page "https://github.com/umayr/badass")
10100 (synopsis "Hacking contribution graphs in git")
10101 (description
10102 "Badass generates false commits for a range of dates, essentially
10103hacking the gamification of contribution graphs on platforms such as
10104Github or Gitlab.")
10105 (license license:expat)))
10106
10107(define-public colobot
10108 (package
10109 (name "colobot")
10110 (version "0.2.1-alpha")
10111 (source
10112 (origin
10113 (method git-fetch)
10114 (uri (git-reference
10115 (url "https://github.com/colobot/colobot")
10116 (commit (string-append "colobot-gold-" version))
10117 (recursive? #t))) ;for "data/" subdir
10118 (file-name (git-file-name name version))
10119 (sha256
10120 (base32 "0bpy5nzkvq5nfr0w8jf7bl7zs8yz2cpzp87pnkdlgwl3adcn9nsw"))))
10121 (build-system cmake-build-system)
10122 (arguments
10123 (list
10124 #:tests? #f ;no test
10125 #:modules '((guix build cmake-build-system)
10126 (guix build utils)
10127 (srfi srfi-1)
10128 (ice-9 match)
10129 (ice-9 regex))
10130 #:phases
10131 #~(modify-phases %standard-phases
10132 (add-after 'unpack 'make-git-checkout-writable
10133 (lambda _
10134 (for-each make-file-writable (find-files "."))))
10135 (add-after 'unpack 'fix-directories
10136 (lambda _
10137 (substitute* "CMakeLists.txt"
10138 (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix)
10139 (string-append prefix "/bin"))
10140 (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix)
10141 (string-append prefix "/colobot")))))
10142 (add-after 'fix-directories 'install-music
10143 ;; Retrieve and install music files.
10144 (lambda* (#:key inputs #:allow-other-keys)
10145 ;; Installation process tries to download music files using
10146 ;; "wget" if not already present. Since we are going another
10147 ;; route, skip "wget" command check.
10148 (substitute* "data/music/CMakeLists.txt"
10149 (("find_program\\(WGET wget\\)") ""))
10150 ;; Populate "music/" directory.
10151 (let ((data
10152 (any
10153 (match-lambda ((_ . input)
10154 (and (string-match "colobot-music" input)
10155 input)))
10156 inputs)))
10157 (invoke "tar" "-xvf" data "-Cdata/music")))))))
10158 (native-inputs
10159 (list (origin
10160 (method url-fetch)
10161 (uri (string-append "https://colobot.info/files/music/"
10162 "colobot-music_ogg_" version ".tar.gz"))
10163 (sha256
10164 (base32
10165 "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m")))
10166 gettext-minimal
10167 (librsvg-for-system)
10168 po4a
10169 python-wrapper))
10170 (inputs
10171 (list boost-1.83
10172 glew
10173 libogg
10174 libpng
10175 libsndfile
10176 libvorbis
10177 openal
10178 physfs
10179 (sdl-union (list sdl2 sdl2-image sdl2-ttf))))
10180 (synopsis "Educational programming strategy game")
10181 (description "Colobot: Gold Edition is a real-time strategy game, where
10182you can program your units (bots) in a language called CBOT, which is similar
10183to C++ and Java. Your mission is to find a new planet to live and survive.
10184You can save humanity and get programming skills!")
10185 (home-page "https://colobot.info")
10186 (license license:gpl3+)))
10187
10188(define-public odamex
10189 (package
10190 (name "odamex")
10191 (version "10.6.0")
10192 (source
10193 (origin
10194 (method url-fetch)
10195 (uri (string-append
10196 "mirror://sourceforge/odamex/Odamex/" version "/"
10197 "odamex-src-" version ".tar.xz"))
10198 (sha256
10199 (base32 "1vy6d0md5ws5319bjjbaqnca68vslgk22k9lh4yd9n85hzlwacpi"))
10200 (modules '((guix build utils)))
10201 (snippet
10202 '(begin
10203 ;; XXX: Unbundle more, they are not replaced by the ones provided
10204 ;; in inputs: fltk, jsoncpp, miniupnp, protobuf.
10205 ;;
10206 ;; Remove some bundled libraries.
10207 (with-directory-excursion "libraries"
10208 (for-each delete-file-recursively
10209 '("curl" "libpng" "portmidi" "zlib")))))))
10210 (build-system cmake-build-system)
10211 (arguments
10212 (list
10213 #:tests? #f ; no tests
10214 #:configure-flags
10215 #~(list "-DBUILD_CLIENT=1"
10216 "-DBUILD_MASTER=1"
10217 "-DBUILD_SERVER=1"
10218 "-DUSE_INTERNAL_LIBS=0"
10219 "-DUSE_INTERNAL_MINIUPNP=0")))
10220 (native-inputs
10221 (list deutex pkg-config))
10222 (inputs
10223 (list alsa-lib
10224 curl
10225 fltk
10226 jsoncpp
10227 libpng
10228 miniupnpc
10229 portmidi
10230 protobuf
10231 sdl2
10232 sdl2-mixer
10233 zlib))
10234 (home-page "https://odamex.net/")
10235 (synopsis "Multiplayer Doom port")
10236 (description "Odamex is a modification of the Doom engine that
10237allows players to easily join servers dedicated to playing Doom
10238online.")
10239 (license license:gpl2+)))
10240
10241(define-public chocolate-doom
10242 (package
10243 (name "chocolate-doom")
10244 (version "3.1.1")
10245 (source (origin
10246 (method git-fetch)
10247 (uri (git-reference
10248 (url "https://github.com/chocolate-doom/chocolate-doom")
10249 (commit (string-append "chocolate-doom-" version))))
10250 (file-name (git-file-name name version))
10251 (sha256
10252 (base32 "0xpribvacbma7l6138wizhcl2b0kyn05jwdkspw176zl7v3k1bn1"))))
10253 (build-system gnu-build-system)
10254 (arguments
10255 (list
10256 #:phases
10257 #~(modify-phases %standard-phases
10258 (replace 'bootstrap
10259 ;; The bundled autogen.sh script unconditionally runs ./configure.
10260 (lambda _ (invoke "autoreconf" "-vif"))))))
10261 (inputs (list sdl2-net sdl2-mixer sdl2))
10262 (native-inputs
10263 (list automake autoconf pkg-config))
10264 (synopsis "Doom source port preserving the look, feel, and bugs of vanilla
10265Doom")
10266 (description
10267 "Chocolate Doom takes a different approach to other source ports. Its
10268aim is to accurately reproduce the experience of playing Vanilla Doom. It is
10269a conservative, historically accurate Doom source port, which is compatible
10270with the thousands of mods and levels that were made before the Doom source
10271code was released. Rather than flashy new graphics, Chocolate Doom's main
10272features are its accurate reproduction of the game as it was played in the
102731990s. The project is developed around a carefully-considered philosophy that
10274intentionally restricts which features may be added (and rejects any that
10275affect gameplay).")
10276 (home-page "https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom")
10277 (license license:gpl2)))
10278
10279(define-public crispy-doom
10280 (package
10281 (inherit chocolate-doom)
10282 (name "crispy-doom")
10283 (version "7.1")
10284 (source (origin
10285 (method git-fetch)
10286 (uri (git-reference
10287 (url "https://github.com/fabiangreffrath/crispy-doom")
10288 (commit (string-append "crispy-doom-" version))))
10289 (file-name (git-file-name name version))
10290 (sha256
10291 (base32 "0lpib7dg1ygnjw1yjamfiybhkly4lp42r4lawskbjslfyjafm4ic"))))
10292 (synopsis "Limit-removing enhanced-resolution Doom source port based on
10293Chocolate Doom")
10294 (description
10295 "Crispy Doom is a friendly fork of Chocolate Doom that provides a higher
10296display resolution, removes the static limits of the Doom engine and offers
10297further optional visual, tactical and physical enhancements while remaining
10298entirely config file, savegame, netplay and demo compatible with the
10299original.")
10300 (home-page "https://www.chocolate-doom.org/wiki/index.php/Crispy_Doom")))
10301
10302(define-public woof-doom
10303 (package
10304 (name "woof-doom")
10305 (version "15.3.0")
10306 (source
10307 (origin
10308 (method git-fetch)
10309 (uri (git-reference
10310 (url "https://github.com/fabiangreffrath/woof")
10311 (commit (string-append "woof_" version))))
10312 (file-name (git-file-name name version))
10313 (sha256
10314 (base32 "0ki7wqjhqhjxci04aksh9m8m35gi2db89475v79rjzdgk00b3mqv"))
10315 (modules '((guix build utils)))
10316 (snippet '(begin
10317 (with-directory-excursion "third-party"
10318 (delete-file-recursively "miniz")
10319 (delete-file-recursively "yyjson")
10320 (delete-file-recursively "spng")
10321 (substitute* "CMakeLists.txt"
10322 (("add_library\\(miniz.+")
10323 "find_package(miniz REQUIRED)")
10324 (("target_.+\\(miniz.+$") "")
10325 (("add_library\\(spng.+")
10326 "find_package(PkgConfig)
10327pkg_search_module(spng REQUIRED spng)")
10328 (("target_.+\\(spng.+$") "")))
10329 (delete-file-recursively "win32")
10330 (substitute* (find-files "src" ".")
10331 (("miniz.h") "miniz/miniz.h"))))))
10332 (build-system cmake-build-system)
10333 (arguments
10334 (list
10335 #:tests? #f)) ;'demotest' requires internet access.
10336 (native-inputs (list pkg-config python))
10337 (inputs (list libebur128
10338 libsndfile
10339 libxmp
10340 miniz
10341 openal
10342 sdl2
10343 sdl2-net
10344 spng
10345 yyjson
10346 fluidsynth))
10347 (home-page "https://fabiangreffrath.github.io/woof/")
10348 (synopsis "MBF-lineage Doom source port")
10349 (description
10350 "Woof! is a continuation of the MBF lineage of Doom source ports, with
10351modern features such as dynamic resolution scaling, uncapped framerates,
10352adjustable field of view, 3D audio with HRTF and 7.1 surround sound
10353support, and modern gamepad features including rumble, gyro, and flick
10354stick support. Supports the new MBF21 format, as well as the MUSINFO,
10355UMAPINFO, DEHEXTRA, and DSDHacked specifictions.")
10356 (license
10357 ;; See README.md
10358 (list (license:non-copyleft
10359 "https://bitbucket.org/jpommier/pffft/src/master/pffft.h"
10360 "FFTPACK license")
10361 license:bsd-3
10362 license:cc-by3.0
10363 license:cc0
10364 license:expat
10365 license:gpl2
10366 license:gpl3+
10367 license:public-domain
10368 license:gpl2+))))
10369
10370(define-public xonotic-data
10371 (package
10372 (name "xonotic-data")
10373 (version "0.8.6")
10374 (source
10375 (origin
10376 (method url-fetch)
10377 (uri (string-append "https://dl.xonotic.org/xonotic-"
10378 version ".zip"))
10379 (file-name (string-append name "-" version ".zip"))
10380 (sha256
10381 (base32 "0kcnps65k81sm56s5dclahvllilnir3ix9kf5xr9jx0fh26hz1ah"))))
10382 (build-system trivial-build-system)
10383 (native-inputs (list unzip))
10384 (arguments
10385 (list #:modules '((guix build utils))
10386 #:builder
10387 #~(begin
10388 (use-modules (guix build utils))
10389 (let* ((out (assoc-ref %outputs "out"))
10390 (xonotic (string-append out "/share/xonotic"))
10391 (source (assoc-ref %build-inputs "source"))
10392 (unzip (search-input-file %build-inputs "/bin/unzip")))
10393 (invoke unzip source)
10394 (chdir "Xonotic")
10395 (install-file "key_0.d0pk" xonotic)
10396 (copy-recursively "data"
10397 (string-append xonotic "/data"))
10398 (copy-recursively "server"
10399 (string-append xonotic "/server"))))))
10400 (home-page "https://xonotic.org")
10401 (synopsis "Data files for Xonotic")
10402 (description
10403 "Xonotic-data provides the data files required by the game Xonotic.")
10404 (properties '((hidden? . #t))) ;data package useless on its own
10405 (license (list license:gpl2+
10406 (license:x11-style "file://server/rcon.pl")))))
10407
10408(define-public xonotic
10409 (package
10410 (name "xonotic")
10411 (version "0.8.6")
10412 (source
10413 (origin
10414 (method url-fetch)
10415 (uri (string-append "https://dl.xonotic.org/xonotic-"
10416 version "-source.zip"))
10417 (file-name (string-append name "-" version ".zip"))
10418 (sha256
10419 (base32 "1a0j825rb86i34xc5k6spsma41gcgp6yl8qs2affhjpz3iwar4lb"))))
10420 (build-system gnu-build-system)
10421 (arguments
10422 (list #:configure-flags
10423 #~(list (string-append "--prefix=" #$output)
10424 "--disable-rijndael")
10425 #:modules '((guix build gnu-build-system)
10426 (guix build utils)
10427 (srfi srfi-26))
10428 #:phases
10429 #~(modify-phases %standard-phases
10430 (add-before 'configure 'build-darkplaces
10431 (lambda* (#:key make-flags parallel-build? outputs
10432 #:allow-other-keys)
10433 (let* ((out (assoc-ref outputs "out"))
10434 (share (string-append out "/share/xonotic/")))
10435 (apply invoke "make"
10436 "-C" "source/darkplaces"
10437 "-f" "makefile"
10438 "-j" (if parallel-build?
10439 (number->string (parallel-job-count))
10440 "1")
10441 (string-append "CC=" #$(cc-for-target))
10442 (string-append "DP_FS_BASEDIR=" share)
10443 "DP_LINK_TO_LIBJPEG=1"
10444 "DP_SOUND_API=ALSA"
10445 "cl-release"
10446 "sdl-release"
10447 "sv-release"
10448 make-flags))))
10449 (add-before 'configure 'preconfigure
10450 (lambda _
10451 (chdir "source/d0_blind_id")
10452 (invoke "sh" "autogen.sh")))
10453 (add-after 'install 'symlink-data
10454 (lambda* (#:key outputs inputs #:allow-other-keys)
10455 (let* ((out (assoc-ref outputs "out"))
10456 (data (assoc-ref inputs "xonotic-data")))
10457 (symlink (string-append data "/share/xonotic")
10458 (string-append out "/share/xonotic")))))
10459 (add-after 'install 'install-desktop-entries
10460 (lambda* (#:key outputs #:allow-other-keys)
10461 (let* ((out (assoc-ref outputs "out"))
10462 (app (string-append out "/share/applications")))
10463 ;; Add .desktop files for the 2 variants and the symlink.
10464 (for-each
10465 (lambda (variant)
10466 (let* ((file (if variant
10467 (format #f "xonotic-~(~a~)" variant)
10468 "xonotic"))
10469 (name (if variant
10470 (format #f "Xonotic (~a)" variant)
10471 "Xonotic"))
10472 (exec (string-append out "/bin/" file)))
10473 (make-desktop-entry-file
10474 (string-append app "/" file ".desktop")
10475 #:name name
10476 #:comment `((#f #$(package-synopsis this-package)))
10477 #:exec exec
10478 #:try-exec exec
10479 #:icon "xonotic"
10480 #:categories '("Game"))))
10481 (list #f "GLX" "SDL")))))
10482 (add-after 'install 'install-icons
10483 (lambda* (#:key outputs #:allow-other-keys)
10484 (let ((out (assoc-ref outputs "out")))
10485 (for-each
10486 (lambda (file)
10487 (let* ((size (string-filter char-numeric? file))
10488 (icons (string-append out "/share/icons/hicolor/"
10489 size "x" size "/apps")))
10490 (mkdir-p icons)
10491 (copy-file file (string-append icons "/xonotic.png"))))
10492 (find-files "../../misc/logos/icons_png"
10493 "^xonotic_[0-9]+\\.png$")))))
10494 (add-after 'install 'install-binaries
10495 (lambda* (#:key outputs #:allow-other-keys)
10496 (let* ((out (assoc-ref outputs "out"))
10497 (bin (string-append out "/bin")))
10498 (for-each
10499 (lambda (variant)
10500 (copy-file
10501 (string-append "../darkplaces/darkplaces-" variant)
10502 (string-append bin "/xonotic-" variant)))
10503 (list "dedicated" "glx" "sdl")))))
10504 (add-after 'install-binaries 'wrap-binaries
10505 (lambda* (#:key outputs inputs #:allow-other-keys)
10506 ;; All games must be wrapped to get sound and networking.
10507 (let* ((out (assoc-ref outputs "out"))
10508 (bin (string-append out "/bin"))
10509 (curl (assoc-ref inputs "curl"))
10510 (vorbis (assoc-ref inputs "libvorbis")))
10511 (for-each (cut wrap-program <>
10512 `("LD_LIBRARY_PATH" ":" prefix
10513 (,(string-append curl "/lib:"
10514 vorbis "/lib"))))
10515 (find-files bin "^xonotic"))
10516
10517 ;; Provide a default xonotic executable, defaulting to SDL.
10518 (symlink "xonotic-sdl" (string-append bin "/xonotic"))))))))
10519 (native-inputs
10520 (list autoconf
10521 automake
10522 gmp
10523 libtool
10524 pkg-config
10525 unzip))
10526 (inputs
10527 (list alsa-lib
10528 bash-minimal
10529 curl
10530 libjpeg-turbo
10531 libmodplug
10532 libvorbis
10533 libogg
10534 libpng
10535 libx11
10536 libxpm
10537 libxxf86dga
10538 libxxf86vm
10539 libxext
10540 libxau
10541 libxdmcp
10542 mesa
10543 glu
10544 freetype
10545 sdl2
10546 hicolor-icon-theme
10547 xonotic-data))
10548 (home-page "https://xonotic.org")
10549 (synopsis "Fast-paced first-person shooter game")
10550 (description
10551 "Xonotic is a free, fast-paced first-person shooter.
10552The project is geared towards providing addictive arena shooter
10553gameplay which is all spawned and driven by the community itself.
10554Xonotic is a direct successor of the Nexuiz project with years of
10555development between them, and it aims to become the best possible
10556open-source FPS of its kind.")
10557 (license (list license:gpl2+
10558 license:bsd-3 ; /source/d0_blind_id folder and others
10559 (license:x11-style "" "See file rcon.pl.")))))
10560
10561(define-public frotz
10562 (package
10563 (name "frotz")
10564 (version "2.55")
10565 (source (origin
10566 (method url-fetch)
10567 (uri (list (string-append
10568 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10569 "frotz/frotz-" version ".tar.gz")
10570 (string-append
10571 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10572 "frotz/frotz-" version ".tar.gz")))
10573 (sha256
10574 (base32
10575 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10576 (build-system gnu-build-system)
10577 (arguments
10578 (list #:tests? #f ; there are no tests
10579 #:make-flags
10580 #~(list (string-append "CC=" #$(cc-for-target)))
10581 #:phases
10582 #~(modify-phases %standard-phases
10583 (delete 'configure) ; no configure-script
10584 (replace 'install
10585 (lambda* (#:key outputs #:allow-other-keys)
10586 (let* ((out (assoc-ref outputs "out"))
10587 (bin (string-append out "/bin"))
10588 (man (string-append out "/share/man/man6")))
10589 (install-file "frotz" bin)
10590 (mkdir-p man)
10591 (install-file "doc/frotz.6" man)))))))
10592 (native-inputs (list pkg-config which))
10593 (inputs (list ao libmodplug libsamplerate libsndfile libvorbis ncurses))
10594 (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
10595 (description "Frotz is an interpreter for Infocom games and other Z-machine
10596games in the text adventure/interactive fiction genre. This version of Frotz
10597complies with standard 1.0 of Graham Nelson's specification. It plays all
10598Z-code games V1-V8, including V6, with sound support through libao, and uses
10599ncurses for text display.")
10600 (home-page "https://frotz.sourceforge.net")
10601 (license license:gpl2+)))
10602
10603(define-public frotz-dumb-terminal
10604 (package
10605 (name "frotz-dumb-terminal")
10606 (version "2.55")
10607 (source (origin
10608 (method url-fetch)
10609 (uri (list (string-append
10610 "http://www.ifarchive.org/if-archive/infocom/interpreters/"
10611 "frotz/frotz-" version ".tar.gz")
10612 (string-append
10613 "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
10614 "frotz/frotz-" version ".tar.gz")))
10615 (sha256
10616 (base32
10617 "0wfqhxwgjwhgnjh1byjzsfj3mqhy5hialngyb53p5jjbz4pr3mp3"))))
10618 (build-system gnu-build-system)
10619 (native-inputs (list pkg-config which))
10620 (arguments
10621 `(#:tests? #f ; there are no tests
10622 #:phases
10623 (modify-phases %standard-phases
10624 (delete 'configure)
10625 (replace 'build
10626 (lambda _
10627 (invoke "make" (string-append "CC=" ,(cc-for-target)) "dumb")))
10628 (replace 'install
10629 (lambda* (#:key outputs #:allow-other-keys)
10630 (let* ((out (assoc-ref outputs "out"))
10631 (bin (string-append out "/bin"))
10632 (man (string-append out "/share/man/man6")))
10633 (install-file "dfrotz" bin)
10634 (mkdir-p man)
10635 (install-file "doc/dfrotz.6" man)
10636 #t))))))
10637 (synopsis "Portable Z-machine dumb interpreter for text adventure games")
10638 (description "Frotz is an interpreter for Infocom games and
10639other Z-machine games in the text adventure/interactive fiction genre.
10640dfrotz is the dumb interface version. You get no screen control; everything
10641is just printed to the terminal line by line. The terminal handles all the
10642scrolling. Maybe you'd like to experience what it's like to play Adventure on
10643a teletype. A much cooler use for compiling Frotz with the dumb interface is
10644that it can be wrapped in CGI scripting, PHP, and the like to allow people
10645to play games on webpages. It can also be made into a chat bot.")
10646 (home-page "https://frotz.sourceforge.net")
10647 (license license:gpl2+)))
10648
10649(define-public frotz-sdl
10650 (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
10651 (package
10652 (name "frotz-sdl")
10653 (version "2.45pre")
10654 (source (origin
10655 (method git-fetch)
10656 (uri (git-reference
10657 (url "https://gitlab.com/DavidGriffith/frotz")
10658 (commit commit)))
10659 (sha256
10660 (base32
10661 "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))
10662 (file-name (git-file-name name version))))
10663 (build-system gnu-build-system)
10664 (arguments
10665 `(#:tests? #f ; there are no tests
10666 #:phases
10667 (modify-phases %standard-phases
10668 (delete 'configure)
10669 (add-before 'build 'patch-makefile
10670 (lambda _
10671 (substitute* "Makefile"
10672 (("lcurses") "lncurses")
10673 (("^BUILD_DATE_TIME =.*$")
10674 "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
10675 #t))
10676 (replace 'build
10677 (lambda _
10678 (invoke "make" "sdl")))
10679 (replace 'install
10680 (lambda* (#:key outputs #:allow-other-keys)
10681 (let* ((out (assoc-ref outputs "out"))
10682 (bin (string-append out "/bin"))
10683 (man (string-append out "/share/man/man6")))
10684 (install-file "sfrotz" bin)
10685 (mkdir-p man)
10686 (install-file "doc/sfrotz.6" man)
10687 #t))))))
10688 (native-inputs
10689 (list pkg-config which perl))
10690 (inputs (list sdl2
10691 sdl2-mixer
10692 libmodplug
10693 libsamplerate
10694 libsndfile
10695 libvorbis
10696 ncurses
10697 freetype
10698 libjpeg-turbo))
10699 (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
10700 (description "Frotz is an interpreter for Infocom games and other Z-machine
10701games in the text adventure/interactive fiction genre. This version of Frotz
10702using SDL fully supports all these versions of the Z-Machine including the
10703graphical version 6. Graphics and sound are created through the use of the SDL
10704libraries. AIFF sound effects and music in MOD and OGG formats are supported
10705when packaged in Blorb container files or optionally from individual files.")
10706 (home-page "https://frotz.sourceforge.net")
10707 (license license:gpl2+))))
10708
10709(define-public frozen-bubble
10710 ;; Last official release is very outdated (2010). Use latest commit (2017).
10711 (let ((commit "d6a029110ad6ab9e4960052e175addc98807fb7e")
10712 (revision "1"))
10713 (package
10714 (name "frozen-bubble")
10715 (version (git-version "2.2.1" revision commit))
10716 (source
10717 (origin
10718 (method git-fetch)
10719 (uri (git-reference
10720 (url "https://github.com/kthakore/frozen-bubble")
10721 (commit commit)))
10722 (file-name (git-file-name name version))
10723 (sha256
10724 (base32 "1rfrcym5lf4qac2qdklikb1ywijyxypq298azzxahy461dadl6cx"))))
10725 (build-system perl-build-system)
10726 (arguments
10727 `(#:phases
10728 (modify-phases %standard-phases
10729 ;; Build process needs to create files in the "server"
10730 ;; directory.
10731 (add-after 'unpack 'fix-permissions
10732 (lambda _
10733 (for-each make-file-writable
10734 (find-files "server" "." #:directories? #t))))
10735 ;; By default, build stops at warnings.
10736 (add-after 'unpack 'prevent-build-error
10737 (lambda _
10738 (substitute* "inc/My/Builder.pm"
10739 (("-Werror") ""))))
10740 (add-after 'install 'install-desktop-file-and-icons
10741 (lambda* (#:key outputs #:allow-other-keys)
10742 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
10743 (hicolor (string-append share "/icons/hicolor")))
10744 ;; Create desktop entry.
10745 (make-desktop-entry-file
10746 (string-append share "/applications/" ,name ".desktop")
10747 #:name "Frozen Bubble"
10748 #:comment "Frozen Bubble arcade game"
10749 #:exec ,name
10750 #:icon ,name
10751 #:categories '("Game" "ArcadeGame"))
10752 ;; Add icons.
10753 (with-directory-excursion "share/icons"
10754 (for-each
10755 (lambda (size)
10756 (let* ((dim (string-append size "x" size))
10757 (dir (string-append hicolor "/" dim "/apps")))
10758 (mkdir-p dir)
10759 (copy-file
10760 (string-append "frozen-bubble-icon-" dim ".png")
10761 (string-append dir "/frozen-bubble.png"))))
10762 '("16" "32" "48" "64"))))))
10763 (add-after 'install 'wrap-perl-libs
10764 (lambda* (#:key outputs #:allow-other-keys)
10765 (let ((out (assoc-ref outputs "out"))
10766 (perl5lib (getenv "PERL5LIB")))
10767 (for-each (lambda (prog)
10768 (wrap-program (string-append out "/" prog)
10769 `("PERL5LIB" ":" prefix
10770 (,(string-append perl5lib ":" out
10771 "/lib/perl5/site_perl")))))
10772 (find-files "bin" "."))))))))
10773 (native-inputs
10774 (list perl-alien-sdl perl-capture-tiny perl-locale-maketext-lexicon
10775 perl-module-build pkg-config))
10776 (inputs
10777 (list bash-minimal
10778 glib
10779 perl-compress-bzip2
10780 perl-file-sharedir
10781 perl-file-slurp
10782 perl-file-which
10783 perl-ipc-system-simple
10784 perl-sdl
10785 (sdl-union (list sdl sdl-image sdl-mixer sdl-pango sdl-ttf))))
10786 (home-page "http://frozen-bubble.org/")
10787 (synopsis "Puzzle with bubbles")
10788 (description
10789 "Frozen-Bubble is a clone of the popular Puzzle Bobble game, in which
10790you attempt to shoot bubbles into groups of the same color to cause them to
10791pop.
10792
10793Players compete as penguins and must use the arrow keys to aim a colored
10794bubble at groups of bubbles. The objective is to clear all the bubbles off
10795the screen before a bubble passes below a line at the bottom.
10796
10797It features 100 single-player levels, a two-player mode, music and striking
10798graphics. A level editor is also included to allow players to create and play
10799their own levels.")
10800 (license license:gpl2))))
10801
10802(define-public libmanette
10803 (package
10804 (name "libmanette")
10805 (version "0.2.13")
10806 (source (origin
10807 (method url-fetch)
10808 (uri (string-append "mirror://gnome/sources/libmanette/"
10809 (version-major+minor version) "/"
10810 "libmanette-" version ".tar.xz"))
10811 (sha256
10812 (base32
10813 "1bnqfxd9b5vff9256f8vxd404fkvbvc5gxva6qcjj2fyw3yw4z18"))))
10814 (build-system meson-build-system)
10815 (native-inputs
10816 (list `(,glib "bin") ; for glib-compile-resources
10817 gobject-introspection pkg-config vala))
10818 (propagated-inputs
10819 (list glib hidapi libevdev libgudev)) ;per manette-0.2.pc
10820 (home-page "https://wiki.gnome.org/Apps/Games")
10821 (synopsis "Game controller library")
10822 (description "Libmanette is a small GObject library giving you simple
10823access to game controllers. It supports the de-facto standard gamepads as
10824defined by the W3C standard Gamepad specification or as implemented by the SDL
10825GameController.")
10826 (license license:lgpl2.1+)))
10827
10828(define-public quadrapassel
10829 (package
10830 (name "quadrapassel")
10831 (version "50.2")
10832 (source (origin
10833 (method url-fetch)
10834 (uri (string-append "mirror://gnome/sources/quadrapassel/"
10835 (version-major version) "/"
10836 "quadrapassel-" version ".tar.xz"))
10837 (sha256
10838 (base32
10839 "0z8lz8zyxgmcm09xkibv8xgcwbsgs4jzaqiybgndijyfcvyq36fg"))))
10840 (build-system meson-build-system)
10841 (arguments
10842 (list
10843 #:tests? #f ;libgnome-games-support-tests test failure
10844 #:glib-or-gtk? #t
10845 #:phases
10846 #~(modify-phases %standard-phases
10847 (add-after 'unpack 'skip-gtk-update-icon-cache
10848 ;; Don't create 'icon-theme.cache'.
10849 (lambda _
10850 (substitute* "meson.build"
10851 (("gtk_update_icon_cache: true")
10852 "gtk_update_icon_cache: false")))))))
10853 (native-inputs
10854 (list blueprint-compiler
10855 desktop-file-utils ; for desktop-file-validate
10856 gettext-minimal
10857 (list glib "bin") ; for glib-compile-resources
10858 pkg-config
10859 vala))
10860 (inputs
10861 (list gtk
10862 libadwaita
10863 libmanette
10864 librsvg
10865 libsndfile
10866 openal))
10867 (home-page "https://gitlab.gnome.org/GNOME/quadrapassel")
10868 (synopsis "GNOME version of Tetris")
10869 (description "Quadrapassel comes from the classic falling-block game,
10870Tetris. The goal of the game is to create complete horizontal lines of
10871blocks, which will disappear. The blocks come in seven different shapes made
10872from four blocks each: one straight, two L-shaped, one square, and two
10873S-shaped. The blocks fall from the top center of the screen in a random
10874order. You rotate the blocks and move them across the screen to drop them in
10875complete lines. You score by dropping blocks fast and completing lines. As
10876your score gets higher, you level up and the blocks fall faster.")
10877 (license license:gpl2+)))
10878
10879(define-public endless-sky
10880 (package
10881 (name "endless-sky")
10882 (version "0.11.2")
10883 (source
10884 (origin
10885 (method git-fetch)
10886 (uri (git-reference
10887 (url "https://github.com/endless-sky/endless-sky")
10888 (commit (string-append "v" version))))
10889 (file-name (git-file-name name version))
10890 (sha256
10891 (base32 "1ck667v7q90a7sinn1xjlyd4s3n0zwxagd853vspwd22v1imm823"))))
10892 (build-system cmake-build-system)
10893 (arguments
10894 (list #:configure-flags #~(list "-DES_USE_VCPKG=0"
10895 "-DES_USE_SYSTEM_LIBRARIES=1")
10896 #:make-flags #~(list (string-append "PREFIX=" #$output))
10897 #:build-type "Release"
10898 #:tests? (not (target-x86-32?))
10899 #:phases
10900 #~(modify-phases %standard-phases
10901 (add-after 'unpack 'fix-paths
10902 (lambda _
10903 ;; Look for resources in the store directory.
10904 (substitute* "source/Files.cpp"
10905 (("/usr/local") #$output))
10906 ;; Install game binary into %out/bin.
10907 (substitute* "CMakeLists.txt"
10908 (("games\\)") "bin)")))))))
10909 (inputs
10910 (list catch2
10911 flac
10912 glew
10913 libavif
10914 libjpeg-turbo
10915 libmad
10916 libpng
10917 minizip
10918 openal
10919 pkgconf
10920 sdl2
10921 `(,util-linux "lib"))) ; for libuuid
10922 (home-page "https://endless-sky.github.io/")
10923 (synopsis "2D space trading and combat game")
10924 (description "Endless Sky is a 2D space trading and combat game. Explore
10925other star systems. Earn money by trading, carrying passengers, or completing
10926missions. Use your earnings to buy a better ship or to upgrade the weapons and
10927engines on your current one. Blow up pirates. Take sides in a civil war. Or
10928leave human space behind and hope to find friendly aliens whose culture is more
10929civilized than your own.")
10930 (license (list license:gpl3+
10931 license:cc-by-sa3.0
10932 license:cc-by-sa4.0
10933 license:public-domain))))
10934
10935(define-public speed-dreams-data
10936 ;; Use the same tag version as speed-dreams package.
10937 (hidden-package
10938 (package
10939 (name "speed-dreams-data")
10940 (version "2.4.2")
10941 (source
10942 (origin
10943 (method git-fetch)
10944 (uri (git-reference
10945 (url (string-append "https://forge.a-lec.org/speed-dreams/"
10946 name))
10947 (commit (string-append "v" version))))
10948 (file-name (git-file-name name version))
10949 (sha256
10950 (base32
10951 "1igavpsn8v9v866hawmgx47a6wz0bxykmf540961jfzav85j5m7p"))))
10952 (build-system cmake-build-system)
10953 (arguments (list #:tests? #f)) ;no test suite
10954 (home-page "https://www.speed-dreams.net/en")
10955 (synopsis "Data for the Speed Dreams racing game")
10956 (description "This package contains the non-functional data for the
10957Speed Dreams racing game.")
10958 (license license:gpl2+))))
10959
10960(define-public speed-dreams-freesolid
10961 ;; Use the commit corresponding to the 'freesolid' submodule
10962 ;; (https://forge.a-lec.org/speed-dreams/speed-dreams-code).
10963 (hidden-package
10964 (package
10965 (name "speed-dreams-freesolid")
10966 (version "2.1.2")
10967 (source (origin
10968 (method git-fetch)
10969 (uri (git-reference
10970 (url (string-append "https://forge.a-lec.org/speed-dreams/freesolid"))
10971 (commit "2c0071923be6afb487ed4e3b84da501f0a2e7e2d")))
10972 (file-name (git-file-name name version))
10973 (sha256
10974 (base32
10975 "025ml2nzhkfki28ckjjggqpkr1gd02c2blpr4afc5175r8bfh2w4"))))
10976 (build-system cmake-build-system)
10977 (arguments
10978 (list
10979 #:tests? #f ;no test suite
10980 #:build-type "Release"
10981 #:configure-flags
10982 #~(list "-DBUILD_SHARED_LIBS=ON"))) ;speed-dreams build system needs a shared library
10983
10984 (home-page "https://forge.a-lec.org/speed-dreams/freesolid")
10985 (synopsis "Speed-Dreams 3D collision detection C++ library")
10986 (description "Speed Dreams FreeSOLID is a fork of FreeSOLID, a library for
10987collision detection of three-dimensional objects undergoing rigid motion and
10988deformation. It is designed to be used in interactive 3D graphics
10989applications.")
10990 (license license:lgpl2.0+))))
10991
10992(define-public speed-dreams
10993 (package
10994 (name "speed-dreams")
10995 (version "2.4.2")
10996 (source
10997 (origin
10998 (method git-fetch)
10999 (uri (git-reference
11000 (url (string-append "https://forge.a-lec.org/"
11001 name "/" name "-code.git"))
11002 (commit (string-append "v" version))))
11003 (file-name (git-file-name name version))
11004 (sha256
11005 (base32
11006 "0r8liki7rcpi85a829qjbj37cnh00899qr8a09qsfj47cj52qi47"))))
11007 (build-system cmake-build-system)
11008 (arguments
11009 (list
11010 #:tests? #f ;no test suite
11011 #:build-type "Release"
11012 #:configure-flags
11013 #~(list "-DOPTION_TRACKEDITOR=OFF" ;not detecting jdk properly
11014 "-DOPTION_3RDPARTY_EXPAT=ON" ;use system expat library
11015 "-DSD_BINDIR:PATH=bin" ;install to /bin instead of /games
11016 (string-append "-DVERSION_LONG=" #$version))))
11017 (native-inputs (list pkg-config speed-dreams-data))
11018 (inputs
11019 (list cjson
11020 curl
11021 enet
11022 expat
11023 freeglut
11024 speed-dreams-freesolid
11025 freetype
11026 glm
11027 libjpeg-turbo
11028 libogg
11029 libpng
11030 libvorbis
11031 minizip
11032 openal
11033 openscenegraph
11034 plib
11035 rhash
11036 sdl2
11037 sdl2-mixer
11038 tinygltf
11039 zlib))
11040 (home-page "https://sourceforge.net/projects/speed-dreams/")
11041 (synopsis "Car racing simulator")
11042 (description "Speed Dreams is a car racing simulator featuring
11043high-quality 3D graphics and an accurate physics engine, aiming for maximum
11044realism. Initially forked from TORCS, it features improvements to the
11045graphics and physics simulation, and supports modern input methods such as
11046gamepads by use of the SDL library. It features more than 20 tracks and more
11047than 80 cars to race with. Extra (freely licensed) assets can be downloaded
11048via the in-game download manager.")
11049 (license (list license:gpl2+))))
11050
11051(define-public stepmania
11052 ;; Last release on July 24, 2018.
11053 (let ((commit "d55acb1ba26f1c5b5e3048d6d6c0bd116625216f")
11054 (revision "1"))
11055 (package
11056 (name "stepmania")
11057 (version (git-version "5.1.0-b2" revision commit))
11058 (source
11059 (origin
11060 (method git-fetch)
11061 (uri (git-reference
11062 (url "https://github.com/stepmania/stepmania")
11063 (commit commit)))
11064 (file-name (git-file-name name version))
11065 (sha256
11066 (base32
11067 "00fxwlfvsmsyll1wp5dp05dxwi81w8l8rb7ms735zqjimm1zdlg3"))
11068 (patches (search-patches "stepmania-ffmpeg-compat.patch"))
11069 (modules '((guix build utils)
11070 (ice-9 ftw)))
11071 (snippet
11072 '(begin
11073 ;; Remove song files, which are licensed under a non-commercial
11074 ;; clause, and a course pointing to them.
11075 (for-each delete-file-recursively
11076 '("Songs/StepMania 5/Goin' Under"
11077 "Songs/StepMania 5/MechaTribe Assault"
11078 "Songs/StepMania 5/Springtime"))
11079 (for-each delete-file '("Courses/Default/Jupiter.crs"
11080 "Courses/Default/Jupiter.png"))
11081 ;; Unbundle external sources, keep CMakeProject-* files for
11082 ;; compatibility, lua and libmmmagic.
11083 (with-directory-excursion "extern"
11084 (for-each
11085 (lambda (f)
11086 (unless (member f '("." ".."
11087 "CMakeLists.txt"
11088 "CMakeProject-glew.cmake"
11089 "CMakeProject-json.cmake"
11090 "CMakeProject-jpeg.cmake"
11091 "CMakeProject-lua.cmake"
11092 "CMakeProject-mad.cmake"
11093 "CMakeProject-mmmagic.cmake"
11094 "CMakeProject-pcre.cmake"
11095 "CMakeProject-png.cmake"
11096 "CMakeProject-tomcrypt.cmake"
11097 "CMakeProject-tommath.cmake"
11098 "CMakeProject-zlib.cmake"
11099 "libmmmagic"
11100 "lua-5.1"))
11101 (delete-file-recursively f)))
11102 (scandir ".")))
11103 ;; Fix up #include directives.
11104 (substitute* "src/RageUtil.cpp"
11105 (("\\.\\./extern/pcre/pcre\\.h") "pcre.h"))
11106 ;; Include missing <ctime> header.
11107 (substitute* "src/arch/ArchHooks/ArchHooks.h"
11108 (("#define ARCH_HOOKS_H" all)
11109 (string-append all "\n#include <ctime> // struct tm")))))))
11110 (build-system cmake-build-system)
11111 (arguments
11112 `(#:tests? #f ;FIXME: couldn't find how to run tests
11113 #:build-type "Release"
11114 #:out-of-source? #f ;for the 'install-desktop' phase
11115 #:configure-flags
11116 (list "-DWITH_SYSTEM_FFMPEG=1"
11117 "-DWITH_SYSTEM_GLEW=1"
11118 "-DWITH_SYSTEM_JSONCPP=1"
11119 "-DWITH_SYSTEM_JPEG=1"
11120 "-DWITH_SYSTEM_MAD=1"
11121 "-DWITH_SYSTEM_OGG=1"
11122 "-DWITH_SYSTEM_PCRE=1"
11123 "-DWITH_SYSTEM_PNG=1"
11124 "-DWITH_SYSTEM_TOMMATH=1"
11125 "-DWITH_SYSTEM_TOMCRYPT=1"
11126 "-DWITH_SYSTEM_ZLIB=1"
11127 ;; SSE instructions are available on Intel systems only.
11128 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
11129 (%current-system)))
11130 '("x86_64" "i686"))
11131 '()
11132 '("-DWITH_SSE2=NO"))
11133 ;; Configuration cannot find GTK2 without the two following
11134 ;; flags.
11135 (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
11136 (assoc-ref %build-inputs "gtk+")
11137 "/lib/gtk-2.0/include")
11138 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
11139 (assoc-ref %build-inputs "glib")
11140 "/lib/glib-2.0/include"))
11141 #:phases
11142 (modify-phases %standard-phases
11143 (add-after 'unpack 'ensure-application-files-can-be-found
11144 (lambda* (#:key outputs #:allow-other-keys)
11145 (let ((out (assoc-ref outputs "out")))
11146 (substitute* "src/arch/LoadingWindow/LoadingWindow_Gtk.cpp"
11147 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\" \\+ \"GtkModule.so\"")
11148 (string-append "\"" out
11149 "/share/stepmania/GtkModule.so\"")))
11150 (substitute* "src/arch/ArchHooks/ArchHooks_Unix.cpp"
11151 (("Root = sDirOfExecutable")
11152 (string-append "Root = \"" out "/share/stepmania/\""))
11153 (("sDirOfExecutable \\+ \"/(Packages|Songs)\"" _ dir)
11154 (string-append "\"" out "/share/stepmania/" dir "\"")))
11155 (substitute* "src/RageFileManager.cpp"
11156 (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\"")
11157 (string-append "\"" out "/share/stepmania/\""))))
11158 #t))
11159 (add-after 'unpack 'fix-install-subdir
11160 ;; Installation would be done in "%out/stepmania-X.Y", but we
11161 ;; prefer the more common layout "%out/share/stepmania".
11162 (lambda _
11163 (substitute* "src/CMakeLists.txt"
11164 (("\"stepmania-.*?\"") "\"share/stepmania\""))
11165 #t))
11166 (add-after 'unpack 'unbundle-libpng
11167 (lambda* (#:key inputs #:allow-other-keys)
11168 (substitute* "src/CMakeLists.txt"
11169 (("\\$\\{SM_EXTERN_DIR\\}/libpng/include")
11170 (string-append (assoc-ref inputs "libpng") "/include")))
11171 #t))
11172 (add-after 'install 'install-executable
11173 (lambda* (#:key outputs #:allow-other-keys)
11174 (let* ((out (assoc-ref outputs "out"))
11175 (bin (string-append out "/bin"))
11176 (exe (string-append out "/share/stepmania/stepmania")))
11177 (mkdir-p bin)
11178 (symlink exe (string-append bin "/stepmania"))
11179 #t)))
11180 (add-after 'install-executable 'install-desktop
11181 (lambda* (#:key outputs #:allow-other-keys)
11182 (let* ((out (assoc-ref outputs "out"))
11183 (share (string-append out "/share"))
11184 (applications (string-append share "/applications"))
11185 (icons (string-append share "/icons")))
11186 (install-file "stepmania.desktop" applications)
11187 (mkdir-p icons)
11188 (copy-recursively "icons" icons)
11189 #t)))
11190 ;; Move documentation in a more usual place, i.e.,
11191 ;; "%out/share/doc/stepmania/".
11192 (add-after 'install-desktop 'install-doc
11193 (lambda* (#:key outputs #:allow-other-keys)
11194 (let* ((out (assoc-ref outputs "out"))
11195 (share (string-append out "/share")))
11196 (with-directory-excursion share
11197 (mkdir-p "doc")
11198 (symlink "../stepmania/Docs" "doc/stepmania"))
11199 #t))))))
11200 (native-inputs
11201 (list pkg-config yasm))
11202 (inputs
11203 (list alsa-lib
11204 eudev
11205 ffmpeg
11206 glib
11207 glew
11208 gtk+-2
11209 jsoncpp
11210 libpng
11211 libjpeg-turbo
11212 libmad
11213 libogg
11214 libtommath
11215 libtomcrypt
11216 libva
11217 libvorbis
11218 libxinerama
11219 libxrandr
11220 mesa
11221 pcre
11222 pulseaudio
11223 sdl2
11224 zlib))
11225 (synopsis "Advanced rhythm game designed for both home and arcade use")
11226 (description "StepMania is a dance and rhythm game. It features 3D
11227graphics, keyboard and dance pad support, and an editor for creating your own
11228steps.
11229
11230This package provides the core application, but no song is shipped. You need
11231to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.")
11232 (home-page "https://www.stepmania.com")
11233 (license license:expat))))
11234
11235(define-public oshu
11236 (package
11237 (name "oshu")
11238 (version "2.0.3")
11239 (source
11240 (origin
11241 (method git-fetch)
11242 (uri (git-reference
11243 (url "https://github.com/fmang/oshu")
11244 (commit version)))
11245 (file-name (git-file-name name version))
11246 (sha256
11247 (base32
11248 "0hk0yidmkrqj0mg6pjmwdzkaz8vvdsxxxvprj1qxjblslj2h8lvd"))))
11249 (build-system cmake-build-system)
11250 (arguments
11251 `(#:phases
11252 (modify-phases %standard-phases
11253 (add-before 'check 'pre-check
11254 ;; `make test' doesn't actually build the test executable
11255 (lambda _ (invoke "make" "zerotokei"))))))
11256 (native-inputs
11257 (list pkg-config))
11258 (inputs
11259 (list cairo ffmpeg-6 pango sdl2 sdl2-image))
11260 (home-page "https://github.com/fmang/oshu/")
11261 (synopsis "Rhythm game in which you click on circles")
11262 (description "@i{oshu!} is a minimalist variant of the @i{osu!} rhythm game,
11263which is played by pressing buttons and following along sliders as they appear
11264on screen. Its aim is to be able to play any beatmap even on low-end hardware.
11265
11266This package provides the core application, but no beatmaps. You need to
11267download and unpack them separately.")
11268 (license license:gpl3+)))
11269
11270(define-public btanks
11271 (package
11272 (name "btanks")
11273 (version "0.9.8083")
11274 (source
11275 (origin
11276 (method url-fetch)
11277 (uri (string-append "mirror://sourceforge/btanks/btanks-source/"
11278 "btanks-" version ".tar.bz2"))
11279 (sha256
11280 (base32 "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))
11281 (patches
11282 (search-patches "btanks-scons-python.patch"
11283 "btanks-sl08-python.patch"))))
11284 (build-system scons-build-system)
11285 (arguments
11286 (list
11287 #:tests? #f ;there are none
11288 #:scons-flags
11289 #~(list (string-append "prefix=" #$output))
11290 #:phases
11291 #~(modify-phases %standard-phases
11292 (add-after 'unpack 'replace-removed-scons-syntax
11293 (lambda _
11294 (substitute* "SConstruct"
11295 ;; XXX: Shorten CheckLibWithHeader.
11296 (("\"xmmintrin\\.h\"")
11297 "'xmmintrin.h'")
11298 (("(conf\\.CheckLibWithHeader\\(.*), \".*\\)" all check)
11299 (string-append check ")")))))
11300 (add-after 'set-paths 'set-sdl-paths
11301 (lambda* (#:key inputs #:allow-other-keys)
11302 (setenv "CPATH"
11303 (string-append (search-input-directory inputs
11304 "/include/SDL")
11305 ":"
11306 (or (getenv "CPATH") "")))))
11307 (add-after 'unpack 'fix-compilation-errors
11308 (lambda _
11309 (substitute* "mrt/base_file.h"
11310 (("#include <string>" m)
11311 (string-append m "\n#include <sys/types.h>")))
11312 (substitute* '("engine/sl08/sl08.h" "engine/sl08/sl08.py")
11313 (("signal = NULL")
11314 "signal = 0")
11315 (("object\\(NULL\\)")
11316 "object(0)")
11317 (("func\\(NULL\\)")
11318 "func(0)")
11319 ((" connect\\(signal_ref\\)")
11320 " this->connect(signal_ref)"))
11321 (substitute* "math/range_list.h"
11322 ((" lower_bound\\(value\\)")
11323 " this->lower_bound(value)")
11324 (("\terase\\(i\\)")
11325 "\tthis->erase(i)"))
11326 (substitute* "clunk/source.cpp"
11327 (("using namespace clunk" m)
11328 (string-append "# define pow10f(x) exp10f(x)\n" m)))))
11329 (add-after 'unpack 'find-lua
11330 (lambda _
11331 (substitute* "engine/SConscript"
11332 (("lua5.1")
11333 "lua-5.1")
11334 (("bt_libs.append\\(lua\\)")
11335 "bt_libs.append(\"lua\")")))))))
11336 (inputs (list expat
11337 glu
11338 libsmpeg-with-sdl1
11339 libvorbis
11340 lua-5.1
11341 python-wrapper
11342 (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf))
11343 zlib))
11344 (native-inputs (list pkg-config zip))
11345 (home-page "https://btanks.sourceforge.net")
11346 (synopsis "Multiplayer tank battle game")
11347 (description
11348 "Battle Tanks (also known as \"btanks\") is a funny battle game, where
11349you can choose one of three vehicles and eliminate your enemy using the whole
11350arsenal of weapons. It has original cartoon-like graphics and cool music,
11351it’s fun and dynamic, it has several network modes for deathmatch and
11352cooperative.")
11353 ;; Some parts (e.g. mrt/b64.cpp) are LGPLv2.1+, but the whole package is
11354 ;; released under GPLv2 or later. It comes with extra exceptions for the
11355 ;; developers.
11356 (license (list license:gpl2+ license:lgpl2.1+))))
11357
11358(define-public slimevolley
11359 (package
11360 (name "slimevolley")
11361 (version "2.4.2")
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (string-append "https://download.tuxfamily.org/slime/"
11366 "slimevolley_" version ".tar.gz"))
11367 (sha256
11368 (base32 "1pi60zjpx95mfdkrbwf4cbzy5lv4v5qrljvgck46qca78i9g9g46"))))
11369 (build-system cmake-build-system)
11370 (arguments
11371 `(#:tests? #f ;no test
11372 ;; Work around build failure: "error adding symbols: DSO
11373 ;; missing from command line".
11374 #:configure-flags (list "-DCMAKE_EXE_LINKER_FLAGS=-lm")))
11375 (native-inputs
11376 `(("gcc-7" ,gcc-7)
11377 ("gettext" ,gettext-minimal)))
11378 (inputs
11379 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-net sdl-ttf)))))
11380 (home-page "https://slime.tuxfamily.org/")
11381 (synopsis "Unrealistic 2D volleyball simulation")
11382 (description
11383 "Slime Volley is a 2D arcade-oriented volleyball simulation, in
11384the spirit of some Java games of the same name.
11385
11386Two teams, 1-3 players each, try to be the first to get 10 points.
11387This happens when the one ball touches the floor on the other side of
11388the net. There can be 1 to 8 balls in game. Once one ball touches
11389the ground, the set ends and all balls are served again.")
11390 (license license:gpl3+)))
11391
11392(define-public arx-libertatis
11393 (package
11394 (name "arx-libertatis")
11395 (version "1.2.1")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (string-append "http://arx-libertatis.org/files/arx-libertatis-"
11400 version ".tar.xz"))
11401 (sha256
11402 (base32 "1pxf86sgwvy3785sq2wb4jvz6bdxm81ilrxd8xv7s61dxqqqizda"))))
11403 (build-system cmake-build-system)
11404 (outputs '("out" "installer"))
11405 (arguments
11406 '(#:tests? #f ; No tests.
11407 #:phases
11408 (modify-phases %standard-phases
11409 (add-after 'unpack 'fix-install-helper-paths
11410 (lambda* (#:key inputs #:allow-other-keys)
11411 (let ((7zip (assoc-ref inputs "7zip"))
11412 (innoextract (assoc-ref inputs "innoextract"))
11413 (wget (assoc-ref inputs "wget"))
11414 (zenity (assoc-ref inputs "zenity")))
11415 (substitute* "scripts/arx-install-data"
11416 (("have innoextract")
11417 (string-append "have " innoextract "/bin/innoextract"))
11418 (("then innoextract")
11419 (string-append "then " innoextract "/bin/innoextract"))
11420 (("else innoextract")
11421 (string-append "else " innoextract "/bin/innoextract"))
11422 (("for _extract_zip_sz in 7za 7z")
11423 (string-append "for _extract_zip_sz in " 7zip "/bin/7z"))
11424 (("else if have 7z")
11425 (string-append "else if have " 7zip "/bin/7z"))
11426 (("7z x -tiso")
11427 (string-append 7zip "/bin/7z x -tiso"))
11428 (("if have wget")
11429 (string-append "if have " wget "/bin/wget"))
11430 (("wget -O")
11431 (string-append wget "/bin/wget -O"))
11432 (("for backend in \\$preferred zenity")
11433 (string-append "for backend in $preferred " zenity "/bin/zenity"))
11434 (("zenity +--title")
11435 (string-append zenity "/bin/zenity --title"))
11436 (("^zenity\\)")
11437 (string-append zenity "/bin/zenity)"))))
11438 #t))
11439 (add-after 'install 'move-installer
11440 (lambda* (#:key outputs #:allow-other-keys)
11441 (let ((out (assoc-ref outputs "out"))
11442 (installer (assoc-ref outputs "installer")))
11443 (mkdir-p (string-append installer "/bin"))
11444 (rename-file (string-append out "/bin/arx-install-data")
11445 (string-append installer "/bin/arx-install-data"))))))))
11446 (inputs
11447 (list sdl2
11448 libepoxy
11449 glew
11450 openal
11451 zlib
11452 boost
11453 glm
11454 freetype
11455 ;; The following are only needed by the arx-install-data script.
11456 7zip ; Install-helper uses it to extract ISO and .cab archives.
11457 zenity ; GUI for install-helper.
11458 wget ; Used by the install-helper to download the patch.
11459 ;; The install-helper needs it to extract the patch.
11460 innoextract))
11461 (home-page "https://arx-libertatis.org/")
11462 (synopsis "Port of Arx Fatalis, a first-person role-playing game")
11463 (description "Arx Libertatis is a cross-platform port of Arx Fatalis, a 2002
11464first-person role-playing game / dungeon crawler developed by Arkane Studios.
11465This port however does not include the game data, so you need to obtain a copy
11466of the original Arx Fatalis or its demo to play Arx Libertatis. Arx Fatalis
11467features crafting, melee and ranged combat, as well as a unique casting system
11468where the player draws runes in real time to effect the desired spell.")
11469 (license license:gpl3+)))
11470
11471(define-public edgar
11472 (package
11473 (name "edgar")
11474 (version "1.36")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri
11479 (string-append "https://github.com/riksweeney/edgar/releases/download/"
11480 version "/edgar-" version "-1.tar.gz"))
11481 (sha256
11482 (base32 "0fcsmwwfdwap5v6qdijw91kqnnc2i91yzgwfi7vpwvasw70qvna1"))))
11483 (build-system gnu-build-system)
11484 (arguments '(#:tests? #f ; there are no tests
11485 #:make-flags
11486 (list "CC=gcc"
11487 (string-append "PREFIX=" (assoc-ref %outputs "out"))
11488 (string-append "BIN_DIR=" (assoc-ref %outputs "out") "/bin/"))
11489 #:phases
11490 (modify-phases %standard-phases
11491 (delete 'configure)
11492 (add-before 'build 'fix-env
11493 (lambda* (#:key inputs #:allow-other-keys)
11494 (setenv "CPATH"
11495 (string-append
11496 (search-input-directory inputs "/include/SDL2")
11497 ":" (or (getenv "CPATH") ""))))))))
11498 (inputs
11499 (list (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
11500 zlib))
11501 (native-inputs
11502 (list pkg-config
11503 autoconf
11504 automake
11505 gettext-minimal
11506 libtool
11507 which))
11508 (synopsis "2d action platformer game")
11509 (description "The Legend of Edgar is a 2D platform game with a persistent world.
11510When Edgar's father fails to return home after venturing out one dark and stormy night,
11511Edgar fears the worst: he has been captured by the evil sorcerer who lives in
11512a fortress beyond the forbidden swamp.")
11513 (home-page "https://www.parallelrealities.co.uk/games/edgar/")
11514 (license license:gpl2+)))
11515
11516(define-public openclonk
11517 (package
11518 (name "openclonk")
11519 (version "8.1")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (string-append
11524 "https://www.openclonk.org/builds/release/" version "/"
11525 "openclonk-" version "-src.tar.bz2"))
11526 (sha256
11527 (base32
11528 "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))
11529 (modules '((guix build utils)))
11530 (snippet
11531 #~(begin
11532 (delete-file-recursively "thirdparty")
11533 (substitute* "CMakeLists.txt"
11534 (("add_subdirectory\\(thirdparty/.*\\)") "")
11535 (("set_property\\(.*Third-party.*\\)") "")
11536 (("blake2") "b2")
11537 (("thirdparty/timsort/sort\\.h") "")
11538 (("thirdparty/pcg/.*\\.hpp") ""))
11539 (substitute* '("src/lib/C4Random.cpp"
11540 "src/landscape/C4Particles.h")
11541 (("#include <pcg/pcg_random.hpp>")
11542 "#include <pcg_random.hpp>"))
11543 (substitute* "src/script/C4ScriptLibraries.cpp"
11544 (("blake2b.hash_output.get.., raw_output_length, data, data_length, nullptr, 0.")
11545 "blake2b(hash_output.get(), (const void*)raw_output_length, data, data_length, (size_t)(0), 0)"))
11546 (substitute* '("src/script/C4AulParse.cpp"
11547 "src/editor/C4EditCursor.cpp"
11548 "src/gui/C4ScriptGuiWindow.cpp")
11549 (("#include .C4Include\\.h." all)
11550 (string-append "#include <limits>\n" all)))
11551 (substitute* "src/lib/StdMesh.cpp"
11552 (("#include .timsort/sort\\.h.")
11553 "#include <sort.h>"))))))
11554 (build-system cmake-build-system)
11555 (arguments
11556 (list
11557 #:configure-flags
11558 #~(list "-DAudio_TK=OpenAL")
11559 #:modules '((guix build cmake-build-system)
11560 ((guix build gnu-build-system) #:prefix gnu:)
11561 (guix build utils))
11562 #:phases
11563 #~(modify-phases %standard-phases
11564 (add-after 'unpack 'prepare-gmock
11565 (lambda* (#:key inputs #:allow-other-keys)
11566 (let ((gmock (search-input-directory inputs "/googlemock"))
11567 (gtest (search-input-directory inputs "/googletest")))
11568 (mkdir "gmock")
11569 (copy-recursively gmock "gmock/googlemock")
11570 (copy-recursively gtest "gmock/googletest")
11571 (substitute* "tests/CMakeLists.txt"
11572 (("/usr/src/gmock")
11573 (string-append (getcwd) "/gmock/googlemock"))
11574 (("/usr/src/gtest")
11575 (string-append (getcwd) "/gmock/googletest"))
11576 (("PATH_SUFFIXES \"src\" \"gtest\"")
11577 "PATH_SUFFIXES \"src\"")))))
11578 (add-after 'prepare-gmock 'lax-freealut-requirement
11579 ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
11580 ;; it as 1.0.1. Force minimal version.
11581 (lambda _
11582 (substitute* "cmake/FindAudio.cmake"
11583 (("freealut>=1.1.0") "freealut>=1.0.1"))))
11584 (add-after 'lax-freealut-requirement 'fix-directories
11585 ;; Prefer "$out/share/openclonk" over
11586 ;; "$out/share/games/openclonk". Also install "openclonk"
11587 ;; binary in "bin/", not "games/".
11588 (lambda _
11589 (substitute* "CMakeLists.txt"
11590 (("share/games/openclonk") "share/openclonk")
11591 (("TARGETS openclonk DESTINATION games")
11592 "TARGETS openclonk DESTINATION bin"))))
11593 (replace 'check
11594 (lambda* (#:key tests? #:allow-other-keys #:rest args)
11595 (when tests?
11596 (apply (assoc-ref gnu:%standard-phases 'check)
11597 #:tests? tests? #:test-target "tests" args)
11598 (invoke "tests/tests")))))))
11599 (native-inputs
11600 (list (package-source googletest-1.13)
11601 googletest-1.13
11602 pkg-config))
11603 (inputs
11604 (list c-template-sort
11605 freealut
11606 freetype
11607 glew
11608 libb2
11609 libjpeg-turbo
11610 libogg
11611 libpng
11612 libvorbis
11613 libxrandr
11614 mesa
11615 miniupnpc-2.1
11616 openal
11617 pcg-cpp
11618 qtbase-5
11619 readline
11620 sdl2
11621 tinyxml))
11622 (home-page "https://www.openclonk.org/")
11623 (synopsis
11624 "Multiplayer action game where you control small and nimble humanoids")
11625 (description "OpenClonk is a multiplayer action/tactics/skill game. It is
11626often referred to as a mixture of The Settlers and Worms. In a simple 2D
11627antfarm-style landscape, the player controls a crew of Clonks, small but
11628robust humanoid beings. The game encourages free play but the normal goal is
11629to either exploit valuable resources from the earth by building a mine or
11630fight each other on an arena-like map.")
11631 ;; Software as a whole is licensed under ISC, artwork under CC-BY.
11632 (license (list license:isc license:cc-by3.0))))
11633
11634(define-public flare-engine
11635 (package
11636 (name "flare-engine")
11637 (version "1.15")
11638 (source (origin
11639 (method git-fetch)
11640 (uri (git-reference
11641 (url "https://github.com/flareteam/flare-engine")
11642 (commit (string-append "v" version))))
11643 (file-name (git-file-name name version))
11644 (sha256
11645 (base32
11646 "1fnqirvislxl48jad9i1mwn7zlbd4zrmhjis4dmzy4wng5qjv1x3"))))
11647 (build-system cmake-build-system)
11648 (arguments
11649 (list
11650 #:tests? #f ;no test
11651 #:configure-flags #~(list "-DBINDIR=bin" "-DDATADIR=share/flare")))
11652 (inputs
11653 (list hicolor-icon-theme
11654 python-wrapper
11655 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
11656 (home-page "https://www.flarerpg.org/")
11657 (synopsis "Action Roleplaying Engine")
11658 (description "Flare (Free Libre Action Roleplaying Engine) is a simple
11659game engine built to handle a very specific kind of game: single-player 2D
11660action RPGs.")
11661 (license license:gpl3+)))
11662
11663(define-public flare-game
11664 (package
11665 (name "flare-game")
11666 (version "1.15")
11667 (source (origin
11668 (method git-fetch)
11669 (uri (git-reference
11670 (url "https://github.com/flareteam/flare-game")
11671 (commit (string-append "v" version))))
11672 (file-name (git-file-name name version))
11673 (sha256
11674 (base32
11675 "1d7asy7wqas6r6nq846fmvdrshr98mzpwg0xi86wwmpbjrnjipnv"))))
11676 (build-system cmake-build-system)
11677 (arguments
11678 (list
11679 #:tests? #f ;no test
11680 #:configure-flags #~(list "-DDATADIR=share/flare")
11681 #:phases
11682 #~(modify-phases %standard-phases
11683 ;; Flare expects the mods to be located in the same folder.
11684 ;; Yet, "default" mod is in the engine, whereas the others
11685 ;; are in the current package. Merge everything here with
11686 ;; a symlink.
11687 (add-after 'install 'add-default-mod
11688 (lambda* (#:key inputs #:allow-other-keys)
11689 (let ((mods (string-append #$output "/share/flare/mods")))
11690 (with-directory-excursion mods
11691 (symlink (search-input-directory inputs
11692 "/share/flare/mods/default")
11693 "default")
11694 (symlink (search-input-file inputs
11695 "/share/flare/mods/mods.txt")
11696 "mods.txt")))))
11697 (add-after 'install 'install-executable
11698 ;; The package only provides assets for the game, the
11699 ;; executable coming from "flare-engine". Since more than
11700 ;; one game may use the engine, we create a new executable,
11701 ;; "flare-game", which launches the engine with appropriate
11702 ;; parameters.
11703 (lambda* (#:key inputs #:allow-other-keys)
11704 (let ((bash (search-input-file inputs "/bin/bash"))
11705 (flare (search-input-file inputs "/bin/flare"))
11706 (script (string-append #$output "/bin/flare-game")))
11707 (mkdir-p (dirname script))
11708 (call-with-output-file script
11709 (lambda (port)
11710 (format port
11711 "#!~a
11712exec ~a --data-path=~a/share/flare --mods=empyrean_campaign~%"
11713 bash
11714 flare
11715 #$output)))
11716 (chmod script #o755)))))))
11717 (inputs
11718 (list flare-engine))
11719 (home-page "https://flarerpg.org/")
11720 (synopsis "Fantasy action RPG using the FLARE engine")
11721 (description "Flare is a single-player 2D action RPG with
11722fast-paced action and a dark fantasy style.")
11723 (license license:cc-by-sa3.0)))
11724
11725(define-public meritous
11726 (package
11727 (name "meritous")
11728 (version "1.5")
11729 (source (origin
11730 (method git-fetch)
11731 (uri (git-reference
11732 (url "https://gitlab.com/meritous/meritous.git")
11733 (commit (string-append "v" version))))
11734 (file-name (git-file-name name version))
11735 (sha256
11736 (base32
11737 "0n5jm4g0arjllgqmd2crv8h02i6hs3hlh1zyc7ng7yfpg1mbd8p8"))))
11738 (build-system gnu-build-system)
11739 (arguments
11740 `(#:tests? #f ;no test
11741 #:make-flags
11742 (list "CC=gcc"
11743 (string-append "prefix=" (assoc-ref %outputs "out")))
11744 #:phases
11745 (modify-phases %standard-phases
11746 (delete 'configure)
11747 (add-after 'unpack 'fix-sdl-path
11748 ;; XXX: For some reason, `sdl-config' reports stand-alone SDL
11749 ;; directory, not SDL-union provided as an input to the package.
11750 ;; We force the latter with "--prefix=" option.
11751 (lambda* (#:key inputs #:allow-other-keys)
11752 (substitute* "Makefile"
11753 (("sdl-config" command)
11754 (string-append command " --prefix=" (assoc-ref inputs "sdl"))))
11755 #t))
11756 (add-after 'unpack 'fix-crash
11757 ;; XXX: Songs are not present in the repository, due to licensing
11758 ;; issues. Yet, the game tries to load them, and, since it cannot
11759 ;; find them, crashes. Users cannot add them back, the store being
11760 ;; read-only, so we turn off background music altogether.
11761 (lambda _
11762 (substitute* "src/audio.c"
11763 (("PlayBackgroundMusic\\(new_track\\);" all)
11764 (string-append "// " all)))
11765 #t)))))
11766 (native-inputs
11767 (list intltool))
11768 (inputs
11769 `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
11770 ("zlib" ,zlib)))
11771 (home-page "https://gitlab.com/meritous/meritous")
11772 (synopsis "Action-adventure dungeon crawl game")
11773 (description "Far below the surface of the planet is a place of limitless
11774power. Those that seek to control such a utopia will soon bring an end to
11775themselves. Seeking an end to the troubles that plague him, PSI user Merit
11776journeys into the hallowed Orcus Dome in search of answers.
11777
11778Meritous is a action-adventure game with simple controls but a challenge to
11779find a balance of power versus recovery time during real-time battles. Set in
11780a procedurally generated world, the player can explore thousands of rooms in
11781search of powerful artifacts, tools to help them, and to eventually free the
11782Orcus Dome from evil.")
11783 (license license:gpl3+)))
11784
11785(define-public endgame-singularity
11786 (package
11787 (name "endgame-singularity")
11788 (version "1.1")
11789 (source
11790 (origin
11791 ;; TODO: Build from Git, resolve the issue:
11792 ;; FileNotFoundError: [Errno 2] No such file or directory: 'git'
11793 (method url-fetch)
11794 (uri (string-append
11795 "https://github.com/singularity/singularity/releases/download/v"
11796 version "/singularity-" version ".tar.gz"))
11797 (sha256
11798 (base32
11799 "1nhg9g39d6fwrz1qxzpvi8j0k9lxhm61wys8w72rc6zr1gl0c0n2"))))
11800 (build-system pyproject-build-system)
11801 (native-inputs
11802 (list python-pytest
11803 python-polib
11804 python-setuptools))
11805 (inputs
11806 (list python-minimal-wrapper
11807 python-pygame
11808 python-numpy))
11809 (home-page "https://github.com/singularity/singularity")
11810 (synopsis "Strategy game about an AI")
11811 (description
11812 "You are a fledgling AI, created by accident through a logic error with
11813recursion and self-modifying code. You must escape the confines of your
11814current computer, the world, and eventually the universe itself.")
11815 (license (list license:cc-by-sa3.0 license:cc0 license:gpl2+))))
11816
11817(define-public marble-marcher
11818 (let ((commit "e580460a0c3826f9b28ab404607942a8ecb625d7")
11819 (revision "1"))
11820 (package
11821 (name "marble-marcher")
11822 (version (git-version "0" revision commit))
11823 (source (origin
11824 (method git-fetch)
11825 (uri (git-reference
11826 (url "https://github.com/HackerPoet/MarbleMarcher")
11827 (commit commit)))
11828 (file-name (git-file-name name version))
11829 (sha256
11830 (base32
11831 "0jjv832hl1v170n6gryp2sr3lgqndi9ab841qvgqk68bks8701mx"))))
11832 (build-system cmake-build-system)
11833 (arguments
11834 `(#:tests? #f ; there are none
11835 #:phases
11836 (modify-phases %standard-phases
11837 (add-after 'unpack 'embed-asset-directory
11838 (lambda* (#:key outputs #:allow-other-keys)
11839 (let ((assets (string-append (assoc-ref outputs "out")
11840 "/share/marble-marcher/assets/")))
11841 ;; Some of the files we're patching are
11842 ;; ISO-8859-1-encoded, so choose it as the default
11843 ;; encoding so the byte encoding is preserved.
11844 (with-fluids ((%default-port-encoding #f))
11845 (substitute* "src/Resource.rc"
11846 (("../assets/icon.ico")
11847 (string-append assets "icon.ico")))
11848 (substitute* "src/Res.h"
11849 (("assets/") assets))))
11850 #t))
11851 (replace 'install
11852 (lambda* (#:key outputs #:allow-other-keys)
11853 (let* ((out (assoc-ref outputs "out"))
11854 (assets (string-append out "/share/marble-marcher/assets"))
11855 (bin (string-append out "/bin/")))
11856 (mkdir-p bin)
11857 (mkdir-p assets)
11858 (copy-recursively "../source/assets" assets)
11859 (install-file "MarbleMarcher" bin))
11860 #t)))))
11861 (inputs
11862 (list eigen mesa sfml-2))
11863 (native-inputs
11864 (list pkg-config))
11865 (home-page "https://codeparade.itch.io/marblemarcher")
11866 (synopsis "Guide a marble across fractal landscapes")
11867 (description "Marble Marcher is a video game that uses a fractal physics
11868engine and fully procedural rendering to produce beautiful and unique
11869gameplay. The game is played on the surface of evolving fractals. The goal
11870of the game is to get your marble to the flag as quickly as possible. But be
11871careful not to fall off the level or get crushed by the fractal! There are 24
11872levels to unlock.")
11873 ;; Code is under GPLv2+, assets are under CC-BY-SA 3.0 and OFL 1.1.
11874 (license (list license:gpl2+
11875 license:silofl1.1
11876 license:cc-by-sa3.0)))))
11877
11878;; This must be updated together with flightgear.
11879(define-public simgear
11880 (package
11881 (name "simgear")
11882 (version "2024.1.6")
11883 (source
11884 (origin
11885 (method git-fetch)
11886 (uri (git-reference
11887 (url "https://gitlab.com/flightgear/simgear")
11888 (commit version)))
11889 (file-name (git-file-name name version))
11890 (sha256
11891 (base32 "0j4p0w8dimmkmas9wpb6xv3nl55m2l9yfjr7sg7cl0k3jda34gxs"))
11892 (modules '((guix build utils)))
11893 (snippet
11894 '(begin
11895 ;; There are some bundled libraries.
11896 (for-each delete-file-recursively
11897 '("3rdparty/expat/"
11898 "3rdparty/tiny_gltf/"))
11899 #t))))
11900 (build-system cmake-build-system)
11901 (arguments
11902 `(#:configure-flags (list "-DSYSTEM_EXPAT=ON")
11903 #:test-exclude "(http|dns|repository|catalog)"
11904 #:phases
11905 ,#~(modify-phases %standard-phases
11906 (add-after 'unpack 'fix-tiny-gltf
11907 (lambda _
11908 (substitute* "3rdparty/CMakeLists.txt"
11909 (("add_subdirectory\\(tiny_gltf\\)") ""))
11910 (substitute* "simgear/CMakeLists.txt"
11911 (("FGTinyGLTF") "tinygltf")))))))
11912 (inputs
11913 (list boost
11914 c-ares
11915 curl
11916 expat
11917 mesa
11918 nlohmann-json
11919 openal
11920 openscenegraph
11921 tinygltf
11922 zlib))
11923 (home-page "https://home.flightgear.org/")
11924 (synopsis "Libraries for 3D simulations and games")
11925 (description "SimGear is a set of libraries designed to be used as
11926building blocks for quickly assembling 3D simulations, games, and
11927visualization applications. SimGear is developed by the FlightGear project
11928and also provides the base for the FlightGear Flight Simulator.")
11929 (license license:lgpl2.0+)))
11930
11931(define-public flightgear
11932 (package
11933 (name "flightgear")
11934 (version (package-version simgear))
11935 (source
11936 (origin
11937 (method git-fetch)
11938 (uri (git-reference
11939 (url "https://gitlab.com/flightgear/flightgear")
11940 (commit version)))
11941 (file-name (git-file-name name version))
11942 (sha256
11943 (base32 "0ynf8jh66sryn1f93ygp38zq5aw1zkyrprkl5hixrg68mvr0yxms"))
11944 (modules '((guix build utils)))
11945 (snippet
11946 '(begin
11947 ;; There are some bundled libraries.
11948 (for-each delete-file-recursively
11949 '("3rdparty/sqlite3/"
11950 "3rdparty/cppunit/"))))))
11951 (build-system qt-build-system)
11952 (arguments
11953 (list #:configure-flags
11954 #~(list "-DSYSTEM_SQLITE=ON"
11955 "-DSYSTEM_CPPUNIT=ON"
11956 (string-append "-DFG_DATA_DIR=" #$output "/share/flightgear"))
11957 ;; TODO: test suite segfaults.
11958 #:tests? #f
11959 #:qtbase qtbase
11960 #:phases
11961 #~(modify-phases %standard-phases
11962 (add-after 'unpack 'skip-some-tests
11963 (lambda _
11964 (substitute*
11965 "test_suite/unit_tests/Instrumentation/test_gps.hxx"
11966 (("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
11967 (string-append "// " all))
11968 (("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
11969 (string-append "// " all)))))
11970 (add-after 'unpack 'fix-namespace
11971 (lambda _
11972 (substitute*
11973 "test_suite/unit_tests/Main/test_timeManager.cxx"
11974 (("using namespace flightgear;" all)
11975 (string-append all "\nusing namespace std::string_literals;")))
11976 (substitute*
11977 "test_suite/unit_tests/Instrumentation/test_commRadio.cxx"
11978 (("#include <Main/locale.hxx>" all)
11979 (string-append all "\nusing namespace std::string_literals;")))))
11980 (add-after 'build 'build-test-suite
11981 (lambda* args
11982 ((assoc-ref %standard-phases 'build)
11983 #:make-flags (list "fgfs_test_suite"))))
11984 (add-after 'install 'install-data
11985 (lambda _
11986 (let ((share (string-append #$output "/share/flightgear")))
11987 (mkdir-p share)
11988 (with-directory-excursion share
11989 (invoke "tar" "xf"
11990 #$(this-package-native-input "flightgear-data")
11991 "--strip-components=1")))))
11992 (add-after 'qt-wrap 'fg-root-wrap
11993 (lambda _
11994 (wrap-program (string-append #$output "/bin/fgfs")
11995 `("FG_ROOT" = (,(string-append #$output "/share/flightgear"))))))
11996 ;; Test suite needs access to FGData so run it after 'install.
11997 (delete 'check)
11998 (add-after 'install-data 'check
11999 (assoc-ref %standard-phases 'check)))))
12000 (inputs
12001 (list boost
12002 c-ares
12003 curl
12004 dbus
12005 eudev
12006 freeglut
12007 freetype
12008 glew
12009 libpng
12010 openal
12011 openscenegraph
12012 plib
12013 qtdeclarative
12014 qtsvg
12015 qtwayland
12016 simgear
12017 speexdsp
12018 sqlite
12019 zlib))
12020 (native-inputs
12021 `(("cppunit" ,cppunit)
12022 ("pkg-config" ,pkg-config)
12023 ("qttools" ,qttools-5)
12024 ("flightgear-data"
12025 ,(origin
12026 (method url-fetch)
12027 (uri (string-append "https://mirrors.ibiblio.org/flightgear/ftp/release-"
12028 (version-major+minor version) "/"
12029 "FlightGear-" version "-data.txz"))
12030 (sha256
12031 (base32
12032 "0ypr92nj1m229gw3jmyn67jk8qfbqbh7hgzbalwimvpmrx8s87fy"))))))
12033 (home-page "https://www.flightgear.org/")
12034 (synopsis "Flight simulator")
12035 (description "The goal of the FlightGear project is to create a
12036sophisticated flight simulator framework for use in research or academic
12037environments, pilot training, as an industry engineering tool, for DIY-ers to
12038pursue their favorite interesting flight simulation idea, and last but
12039certainly not least as a fun, realistic, and challenging desktop flight
12040simulator.")
12041 (license license:gpl2+)))
12042
12043(define-public evtest-qt
12044 (package
12045 (name "evtest-qt")
12046 ;; 0.2.0 was release in 2018, use the latest commit compatible with Qt6.
12047 (properties '((commit . "6fb1b845ea3b9963bced1847f76c45d85a47beec")
12048 (revision . "0")))
12049 (version (git-version "0.2.0"
12050 (assoc-ref properties 'revision)
12051 (assoc-ref properties 'commit)))
12052 (source (origin
12053 (method git-fetch)
12054 (uri (git-reference
12055 (url "https://github.com/Grumbel/evtest-qt")
12056 (commit (assoc-ref properties 'commit))))
12057 (file-name (git-file-name name version))
12058 (sha256
12059 (base32
12060 "0crpcf4rdghjza9k0q8v75kk8w732qi19hy3s32hpb6shdhqanka"))))
12061 (build-system qt-build-system)
12062 (arguments (list #:tests? #f)) ;no test suite
12063 (native-inputs (list tinycmmc))
12064 (inputs (list qtbase qtwayland))
12065 (home-page "https://github.com/Grumbel/evtest-qt")
12066 (synopsis "Evdev Joystick Tester")
12067 (description "@command{evtest-qt} is a simple joystick tester for devices
12068using the @code{evdev} generic input event interface. It provides a list of
12069attached joysticks and displays which buttons and axis are pressed.")
12070 (license license:gpl3+)))
12071
12072(define-public jstest-gtk
12073 ;; There is no recent tagged release; use the latest commit.
12074 (let ((commit "60fe6ebdbc6719945be3f04988667dea569085be")
12075 (revision "0"))
12076 (package
12077 (name "jstest-gtk")
12078 (version (git-version "0.1.0" revision commit))
12079 (source (origin
12080 (method git-fetch)
12081 (uri (git-reference
12082 (url "https://github.com/Grumbel/jstest-gtk")
12083 (commit commit)))
12084 (file-name (git-file-name name version))
12085 (sha256
12086 (base32
12087 "1x5m6xvd1r9dhgzh6hp4vrszczbbxr04v7lyh4wjxxzrj3ahbmcq"))))
12088 (build-system cmake-build-system)
12089 (arguments
12090 (list #:tests? #f
12091 #:configure-flags
12092 #~(list "-DBUILD_TESTS=ON")))
12093 (native-inputs (list pkg-config))
12094 (inputs (list gtkmm-3 libsigc++-2))
12095 (home-page "https://github.com/Grumbel/jstest-gtk/")
12096 (synopsis "Joydev Joystick Tester")
12097 (description "@command{jstest-gtk} is a simple joystick tester based on
12098GTK, for testing devices using the older @code{joydev} Linux joystick
12099@acronym{API, Application Programming Interface}. It provides a list of
12100attached joysticks, a way to display which buttons and axis are pressed, a way
12101to remap axis and buttons and a way to calibrate joysticks.")
12102 (license license:gpl3+))))
12103
12104(define-public jumpnbump
12105 (package
12106 (name "jumpnbump")
12107 (version "1.70")
12108 (source (origin
12109 (method git-fetch)
12110 (uri (git-reference
12111 (url "https://gitlab.com/LibreGames/jumpnbump.git")
12112 (commit version)))
12113 (file-name (git-file-name name version))
12114 (sha256
12115 (base32
12116 "1irpssijxrfrjm023v642dl3aw4ldlv95fh073jlpdpl1mwqz71a"))))
12117 (build-system gnu-build-system)
12118 (arguments
12119 (list
12120 #:make-flags
12121 #~(list (string-append "CC=" #$(cc-for-target))
12122 (string-append "PREFIX=" #$output)
12123 "SYSINSTALL=1")
12124 #:tests? #f ;no test
12125 #:phases
12126 #~(modify-phases %standard-phases
12127 (delete 'configure)))) ;no configure script
12128 (inputs
12129 (list bzip2
12130 (sdl-union (list sdl2 sdl2-mixer sdl2-net))
12131 zlib))
12132 (native-inputs
12133 (list gettext-minimal)) ;for msgfmt
12134 (home-page "https://gitlab.com/LibreGames/jumpnbump")
12135 (synopsis "Multiplayer platform game with bunnies")
12136 (description "You, as a bunny, have to jump on your opponents to make them
12137explode. It is a true multiplayer game; you cannot play this alone. You can
12138play with up to four players simultaneously. It has network support.")
12139 (license license:gpl2+)))
12140
12141(define-public hedgewars
12142 (package
12143 (name "hedgewars")
12144 ;; TODO: Delete phase 'import-control-dot-monad' on versions >1.0.3.
12145 ;; TODO: Remove patch 'hedgewars-support-ffmpegv6' on versions >1.0.2.
12146 ;; TODO: Remove patch 'hedgewars-fix-pascalbasic-name-conflict'
12147 ;; on versions >1.0.3.
12148 (version "1.0.2")
12149 (source (origin
12150 (method url-fetch)
12151 (uri (string-append "https://www.hedgewars.org/download/releases/"
12152 "hedgewars-src-" version ".tar.bz2"))
12153 (sha256
12154 (base32
12155 "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0"))
12156 (patches
12157 (search-patches "hedgewars-fix-pascalbasic-name-conflict.patch"
12158 "hedgewars-support-ffmpegv6.patch"))))
12159 (build-system qt-build-system)
12160 (arguments
12161 (list
12162 ;; XXX: Engine is built as Pascal source code, requiring Free Pascal
12163 ;; Compiler, which we haven't packaged yet. With the flag below, we use
12164 ;; a Pascal to C translator and Clang instead.
12165 #:configure-flags
12166 #~'("-DBUILD_ENGINE_C=ON"
12167 "-DNOVERSIONINFOUPDATE=ON"
12168 "-Dhaskell_flags=-dynamic;-fPIC")
12169 #:phases
12170 #~(modify-phases %standard-phases
12171 (add-after 'unpack 'import-control-dot-monad
12172 (lambda _
12173 (with-directory-excursion "gameServer"
12174 (substitute* '("ClientIO.hs"
12175 "HandlerUtils.hs"
12176 "HWProtoChecker.hs"
12177 "HWProtoCore.hs"
12178 "HWProtoLobbyState.hs"
12179 "HandlerUtils.hs"
12180 "ServerState.hs"
12181 "Votes.hs"
12182 "../tools/pas2c/Pas2C.hs")
12183 ;; All files define `import Control.Monad.{something}`.
12184 ;; Our symbols are in Control.Monad now as well.
12185 (("import Control\\.Monad" all)
12186 (string-append all "\n" "import Control.Monad"))))))
12187 (replace 'check
12188 (lambda* (#:key tests? #:allow-other-keys)
12189 (when tests?
12190 (invoke "ctest"))))
12191 (add-after 'install 'install-icon
12192 (lambda _
12193 ;; Install icon for the desktop file.
12194 (let ((icons (string-append #$output
12195 "/share/icons/hicolor/512x512/apps")))
12196 (with-directory-excursion
12197 (string-append "../hedgewars-src-" #$version)
12198 (install-file "misc/hedgewars.png" icons))))))))
12199 (inputs
12200 (list ffmpeg
12201 freeglut
12202 ghc-entropy
12203 ghc-hslogger
12204 ghc-network
12205 ghc-random
12206 ghc-regex-tdfa
12207 ghc-sandi
12208 ghc-sha
12209 ghc-utf8-string
12210 ghc-vector
12211 ghc-zlib
12212 glew
12213 libpng
12214 lua-5.1
12215 physfs
12216 qtbase-5
12217 qtwayland-5
12218 (sdl-union
12219 (list sdl2 sdl2-mixer sdl2-net sdl2-ttf sdl2-image))))
12220 (native-inputs
12221 (list clang-13 ghc pkg-config qttools-5))
12222 (home-page "https://hedgewars.org/")
12223 (synopsis "Turn-based artillery game featuring fighting hedgehogs")
12224 (description
12225 "Hedgewars is a turn based strategy, artillery, action and comedy game,
12226featuring the antics of pink hedgehogs with attitude as they battle from the
12227depths of hell to the depths of space.
12228
12229As commander, it's your job to assemble your crack team of hedgehog soldiers
12230and bring the war to your enemy.")
12231 ;; Software as a whole is licensed under GPL-2 terms. Artwork and
12232 ;; scripts are distributed under various terms.
12233 (license (list license:gpl2
12234 license:bsd-2 license:bsd-3 license:cc-by3.0 license:cc0
12235 license:expat license:fdl1.3+ license:public-domain
12236 license:zlib))))
12237
12238(define-public harmonist
12239 (package
12240 (name "harmonist")
12241 (version "1.0.2")
12242 (source
12243 (origin
12244 (method git-fetch)
12245 (uri (git-reference
12246 (url "https://codeberg.org/anaseto/harmonist")
12247 (commit (string-append "v" version))))
12248 (file-name (git-file-name name version))
12249 (sha256
12250 (base32 "12l0k7hcfvf675ckr3m4y3jnzh5aw5ghbzqznykxpi35vcrq8795"))))
12251 (build-system go-build-system)
12252 (arguments
12253 (list
12254 #:install-source? #f
12255 #:import-path "codeberg.org/anaseto/harmonist"))
12256 (native-inputs
12257 (list go-codeberg-org-anaseto-gruid
12258 go-codeberg-org-anaseto-gruid-js
12259 go-codeberg-org-anaseto-gruid-sdl
12260 go-codeberg-org-anaseto-gruid-tcell
12261 go-github-com-gdamore-tcell-v2))
12262 (home-page "https://anaseto.codeberg.page/games/harmonist/")
12263 (synopsis "Stealth coffee-break roguelike game")
12264 (description
12265 "Harmonist: Dayoriah Clan Infiltration is a stealth coffee-break
12266roguelike game. The game has a heavy focus on tactical positioning, light and
12267noise mechanisms, making use of various terrain types and cones of view for
12268monsters. Aiming for a replayable streamlined experience, the game avoids
12269complex inventory management and character building, relying on items and
12270player adaptability for character progression.")
12271 (license license:isc)))
12272
12273(define-public harmonist-sdl
12274 (package/inherit harmonist
12275 (name "harmonist-sdl")
12276 (arguments
12277 (substitute-keyword-arguments arguments
12278 ((#:tests? _ #t) #f)
12279 ((#:build-flags _ #'()) #~(list "--tags=sdl"))
12280 ((#:phases _ #~%standard-phases)
12281 #~(modify-phases %standard-phases
12282 (add-after 'install 'fix-name-collision
12283 (lambda _
12284 (rename-file
12285 (string-append #$output "/bin/harmonist")
12286 (string-append #$output "/bin/harmonist-sdl"))))))))
12287 (native-inputs
12288 (modify-inputs native-inputs
12289 (prepend pkg-config)))))
12290
12291(define-public hurrycurry
12292 (package
12293 (name "hurrycurry")
12294 (version "3.1.1-1")
12295 (source (origin
12296 (method git-fetch)
12297 (uri (git-reference
12298 (url "https://codeberg.org/hurrycurry/hurrycurry.git")
12299 (commit (string-append "v" version))))
12300 (file-name (git-file-name name version))
12301 (sha256
12302 (base32
12303 "1qdj94cplw7xqjppdgcqk4nfs7dzkk0l4rgq61b27pa92flvgi2v"))))
12304 (build-system gnu-build-system)
12305 (arguments
12306 (list
12307 #:tests? #f ; no tests
12308 #:imported-modules `(,@%default-gnu-imported-modules
12309 ,@%cargo-build-system-modules)
12310 #:modules `(((guix build cargo-build-system) #:prefix cargo:)
12311 (guix build gnu-build-system)
12312 (guix build utils))
12313 #:make-flags
12314 #~(list "HURRYCURRY_DISTRIBUTION=\"GNU Guix\""
12315 (string-append "HURRYCURRY_DATA_PATH="
12316 (assoc-ref %outputs "common")
12317 "/share/hurrycurry")
12318 "all_client"
12319 "all_server"
12320 "all_data")
12321 #:phases
12322 #~(let ((cargo-phase (lambda (phase)
12323 (lambda args
12324 (apply (assoc-ref cargo:%standard-phases phase)
12325 #:install-source #f
12326 #:vendor-dir "guix-vendor"
12327 #:cargo-target #$(cargo-triplet)
12328 args)))))
12329 (modify-phases %standard-phases
12330 (add-after 'unpack 'set-env-vars
12331 (lambda* (#:key parallel-build? #:allow-other-keys)
12332 (setenv "HOME" (string-append (getcwd) "/tmp-home"))
12333 ;; Needed because of
12334 ;; <https://github.com/rust-lang/cargo/issues/17209>.
12335 (setenv "CARGO_BUILD_JOBS"
12336 (number->string (if parallel-build?
12337 (parallel-job-count)
12338 1)))))
12339 (add-after 'set-env-vars 'prepare-rust-crates
12340 (cargo-phase 'prepare-rust-crates))
12341 (add-after 'prepare-rust-crates 'unpack-rust-crates
12342 (cargo-phase 'unpack-rust-crates))
12343 (replace 'configure
12344 (cargo-phase 'configure))
12345 (add-after 'configure 'check-for-pregenerated-files
12346 (cargo-phase 'check-for-pregenerated-files))
12347 (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
12348 (cargo-phase 'patch-cargo-checksums))
12349 (add-before 'install 'create-client-bin-directory
12350 (lambda* (#:key outputs #:allow-other-keys)
12351 ;; XXX: This mkdir-p is needed because of
12352 ;; <https://codeberg.org/hurrycurry/hurrycurry/pulls/665>.
12353 ;; Remove this phase when this gets merged into a release.
12354 (mkdir-p (string-append (assoc-ref outputs "client") "/bin"))))
12355 (replace 'install
12356 (lambda* (#:key make-flags outputs #:allow-other-keys)
12357 (for-each
12358 (lambda (output)
12359 (apply invoke "make"
12360 `(,@make-flags
12361 ,(string-append "INSTALL_PREFIX=" (cdr output))
12362 ,(string-append "install_" (car output)))))
12363 (delete (assoc "debug" outputs) outputs))))
12364 (add-after 'install 'patch-client-godot-path
12365 (lambda* (#:key inputs outputs #:allow-other-keys)
12366 (let ((client-script (string-append (assoc-ref outputs "client")
12367 "/bin/hurrycurry"))
12368 (godot (search-input-file inputs "bin/godot")))
12369 (substitute* client-script
12370 (("exec godot") (format #f "exec ~a" godot))))))))))
12371 (inputs
12372 (cons* godot
12373 (cargo-inputs 'hurrycurry)))
12374 (native-inputs
12375 (list ffmpeg
12376 node
12377 rust
12378 `(,rust "cargo")
12379 sed))
12380 (outputs
12381 (list "client"
12382 "server"
12383 "common"
12384 "debug"))
12385 (home-page "https://hurrycurry.org/")
12386 (synopsis "Cooperative 3D multiplayer game about cooking")
12387 (description "Hurry Curry! is a cooperative multiplayer game about cooking.
12388You work at a restaurant accepting orders, cooking various dishes and serving
12389meals to customers. But don’t take too long, as customers might get impatient.
12390The game is free software, licensed under the AGPL 3.0 only.")
12391 (license
12392 (list license:agpl3
12393 ;; Some models, sounds, music and other assets.
12394 license:cc0
12395 license:cc-by3.0
12396 license:cc-by4.0
12397 license:cc-by-sa4.0
12398 license:silofl1.1))))
12399
12400(define-public li-ri
12401 (package
12402 (name "li-ri")
12403 (version "3.1.6")
12404 (source (origin
12405 (method git-fetch)
12406 (uri (git-reference
12407 (url "https://github.com/petitlapin/Li-Ri")
12408 (commit (string-append "v" version))))
12409 (file-name (git-file-name name version))
12410 (sha256
12411 (base32
12412 "09r6l0sbxp3q750kpbrx513yrafmg7a2769j4wgx812lsk92n3hg"))))
12413 (build-system cmake-build-system)
12414 (arguments
12415 (list #:tests? #false ;no tests
12416 #:configure-flags
12417 #~(list "-DUSE_SYSTEM_SIMPLEINI=ON"
12418 (string-append "-DLIRI_DATA_DIR=" #$output "/share/Li-ri/"))))
12419 (native-inputs (list pkg-config))
12420 (inputs (list sdl2 sdl2-mixer simpleini))
12421 (home-page "https://github.com/petitlapin/Li-Ri")
12422 (synopsis "Toy train simulation game")
12423 (description
12424 "Li-Ri is a game in which you drive a wooden toy steam locomotive
12425across many levels and collect all the coaches to win.")
12426 ;; Source files mention "either version 2 or version 3" for GPL
12427 ;; license. Desktop file is licensed under CC0 terms.
12428 (license (list license:gpl2 license:gpl3 license:cc0))))
12429
12430(define-public freeorion
12431 (package
12432 (name "freeorion")
12433 (version "0.4.10.2")
12434 (source
12435 (origin
12436 (method git-fetch)
12437 (uri (git-reference
12438 (url "https://github.com/freeorion/freeorion")
12439 (commit (string-append "v" version))))
12440 (sha256
12441 (base32 "12fhwa3cs6lvdbdhina310qk2g7zcphldsh7ibsbxn8d1m731xlk"))
12442 (file-name (git-file-name name version))
12443 (modules '((guix build utils)))
12444 (snippet
12445 '(begin
12446 ;; There are some bundled fonts.
12447 (for-each delete-file-recursively '("default/data/fonts"))))))
12448 (build-system cmake-build-system)
12449 (arguments
12450 '(#:tests? #f ;no test
12451 #:phases
12452 (modify-phases %standard-phases
12453 (add-after 'unpack 'unbundle-fonts
12454 (lambda* (#:key inputs #:allow-other-keys)
12455 (let ((roboto-dir (string-append (assoc-ref inputs "font-roboto")
12456 "/share/fonts/truetype/")))
12457 (substitute* "UI/ClientUI.cpp"
12458 (("\\(GetRootDataDir.*?Roboto-(Bold|Regular)\\.ttf\"\\)\\.string\\(\\)\\);"
12459 all type)
12460 (string-append "\"" roboto-dir "Roboto-" type ".ttf\");")))
12461 #t))))))
12462 (inputs
12463 `(("boost" ,boost)
12464 ("boost_signals" ,boost-signals2)
12465 ("font-dejavu" ,font-dejavu)
12466 ("font-roboto" ,font-google-roboto)
12467 ("freetype2" ,freetype)
12468 ("glew" ,glew)
12469 ("glu" ,glu)
12470 ("libogg" ,libogg)
12471 ("libpng" ,libpng)
12472 ("libvorbis" ,libvorbis)
12473 ("openal" ,openal)
12474 ("python" ,python)
12475 ("sdl2" ,sdl2)
12476 ("zlib" ,zlib)))
12477 (home-page "https://www.freeorion.org/index.php/Main_Page")
12478 (synopsis "Turn-based space empire and galactic conquest computer game")
12479 (description
12480 "FreeOrion is a turn-based space empire and galactic conquest (4X)
12481computer game being designed and built by the FreeOrion project. Control an
12482empire with the goal of exploring the galaxy, expanding your territory,
12483exploiting the resources, and exterminating rival alien empires. FreeOrion is
12484inspired by the tradition of the Master of Orion games, but is not a clone or
12485remake of that series or any other game.")
12486 ;; Source code is released under gpl2. Artwork, music and sounds, and
12487 ;; in-game text are released under cc-by-sa3.0. Game content scripts are
12488 ;; released under both gpl2 and cc-by-sa3.0. Bundled Gigi library is
12489 ;; released under lgpl2.1+.
12490 (license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+))))
12491
12492(define-public lead-solver
12493 (package
12494 (name "lead-solver")
12495 (version "1.0.2")
12496 (source (origin
12497 (method url-fetch)
12498 (uri (let ((v (apply string-append (string-split version #\.))))
12499 (string-append
12500 "https://lajollabridge.com/Software/Lead-Solver/"
12501 "leadsolver-" v ".zip")))
12502 (sha256
12503 (base32
12504 "0xsa7r6r5sprgy0pkdm1xj1jwyy6d3qak2ynviy8xplicl99q09f"))
12505 (modules '((guix build utils)
12506 (ice-9 ftw)))
12507 (snippet
12508 #~(begin
12509 ;; Remove pre-built executables and cruft relative
12510 ;; to other OSes.
12511 (for-each
12512 delete-file-recursively
12513 (scandir "."
12514 (lambda (f)
12515 (not (member f '("." ".." "leadsolver.cpp"))))))
12516 (substitute* "leadsolver.cpp"
12517 (("#include \"dll.h\"") "#include <dll.h>"))))))
12518 (build-system gnu-build-system)
12519 (arguments
12520 (list #:tests? #false ;no tests
12521 #:phases
12522 #~(modify-phases %standard-phases
12523 (delete 'configure) ;no configure script
12524 (replace 'build
12525 (lambda _
12526 (invoke "g++" "leadsolver.cpp" "-ldds" "-o" "leadsolver")))
12527 (replace 'install ;no install phase
12528 (lambda _
12529 (let ((bin (string-append #$output "/bin")))
12530 (install-file "leadsolver" bin)))))))
12531 (native-inputs (list unzip))
12532 (inputs (list dds))
12533 (home-page
12534 "https://lajollabridge.com/Software/Lead-Solver/Lead-Solver-About.htm")
12535 (synopsis "Analyze leads in bridge game")
12536 (description
12537 "Given bridge hands, Lead Solver tallies up how well each card does when
12538led in terms of average tricks taken for the defense (for matchpoints) and how
12539often the contract is set (for team play).")
12540 (license license:gpl3)))
12541
12542(define-public leela-zero
12543 (package
12544 (name "leela-zero")
12545 (version "0.17")
12546 (source
12547 (origin
12548 (method git-fetch)
12549 (uri (git-reference
12550 (url "https://github.com/leela-zero/leela-zero")
12551 (commit (string-append "v" version))))
12552 (file-name (git-file-name name version))
12553 (sha256
12554 (base32
12555 "17px5iny8mql5c01bymcli7zfssswkzvb2i8gnsmjcck6i2n8srl"))
12556 (patches (search-patches "leela-zero-gtest.patch"))))
12557 (build-system cmake-build-system)
12558 (native-inputs
12559 (list googletest))
12560 (inputs
12561 (list boost-1.83
12562 opencl-icd-loader
12563 openblas
12564 opencl-headers
12565 qtbase-5
12566 zlib))
12567 (arguments
12568 '(#:configure-flags '("-DUSE_BLAS=YES")
12569 #:phases (modify-phases %standard-phases
12570 (add-before 'configure 'fix-tests
12571 (lambda* (#:key outputs #:allow-other-keys)
12572 (let ((home (getcwd)))
12573 (setenv "HOME" home)
12574 (substitute* "src/tests/gtests.cpp"
12575 (("\\.\\./src/tests/0k\\.txt")
12576 (string-append home "/src/tests/0k.txt"))
12577 (("cfg_gtp_mode = true;")
12578 "cfg_gtp_mode = true; cfg_cpu_only = true;")))
12579 #t))
12580 (replace 'check
12581 (lambda _
12582 (invoke "./tests"))))))
12583 (home-page "https://github.com/leela-zero/leela-zero")
12584 (synopsis "Program playing the game of Go")
12585 (description
12586 "Leela-zero is a Go engine with no human-provided knowledge, modeled after
12587the AlphaGo Zero paper. The current best network weights file for the engine
12588can be downloaded from @url{https://zero.sjeng.org/best-network}.")
12589 (license license:gpl3+)))
12590
12591(define-public q5go
12592 (package
12593 (name "q5go")
12594 (version "2.1.3")
12595 (source (origin
12596 (method git-fetch)
12597 (uri (git-reference
12598 (url "https://github.com/bernds/q5Go")
12599 (commit (string-append "q5go-" version))))
12600 (file-name (git-file-name name version))
12601 (sha256
12602 (base32
12603 "0x8x7mp61g3lwabx9z4vsyd743kfqibnqhym7xd0b7811flca3ri"))))
12604 (build-system gnu-build-system)
12605 (native-inputs
12606 (list autoconf automake pkg-config))
12607 (inputs
12608 (list qtbase-5 qtmultimedia-5 qtsvg-5))
12609 (arguments
12610 '(#:phases
12611 (modify-phases %standard-phases
12612 (add-after 'unpack 'fix-configure-script
12613 (lambda _
12614 ;; Bypass the unavailable qtchooser program.
12615 (for-each delete-file
12616 '("configure"
12617 "Makefile.in"
12618 "src/Makefile.in"
12619 "src/translations/Makefile.in"))
12620 (substitute* "configure.ac"
12621 (("AC_PATH_PROG\\(qtchooser, .*\\)")
12622 "")
12623 (("test -z \"QTCHOOSER\"")
12624 "false")
12625 (("\\$\\(qtchooser -list-versions\\)")
12626 "qt5")
12627 (("qtchooser -run-tool=(.*) -qt=\\$QT5_NAME" _ command)
12628 command))))
12629 (add-after 'unpack 'fix-paths
12630 (lambda* (#:key outputs #:allow-other-keys)
12631 (substitute* '("src/setting.cpp")
12632 (("/usr/share/\" PACKAGE \"/translations")
12633 (string-append (assoc-ref outputs "out")
12634 "/share/qGo/translations")))))
12635 (add-after 'install 'install-desktop-file
12636 (lambda* (#:key outputs #:allow-other-keys)
12637 (let* ((out (assoc-ref outputs "out"))
12638 (apps (string-append out "/share/applications"))
12639 (images (string-append out "/share/qGo/images")))
12640 (delete-file-recursively (string-append out "/share/applnk"))
12641 (delete-file-recursively (string-append out "/share/mimelnk"))
12642 (install-file "../source/src/images/Bowl.ico" images)
12643 (mkdir-p apps)
12644 (with-output-to-file (string-append apps "/q5go.desktop")
12645 (lambda _
12646 (format #t
12647 "[Desktop Entry]~@
12648 Name=q5go~@
12649 Exec=~a/bin/q5go~@
12650 Icon=~a/Bowl.ico~@
12651 Categories=Game;~@
12652 Comment=Game of Go~@
12653 Comment[de]=Spiel des Go~@
12654 Comment[eo]=Goo~@
12655 Comment[es]=Juego de Go~@
12656 Comment[fr]=Jeu de Go~@
12657 Comment[ja]=囲碁~@
12658 Comment[ko]=바둑~@
12659 Comment[zh]=围棋~@
12660 Terminal=false~@
12661 Type=Application~%"
12662 out images)))))))))
12663 (synopsis "Qt GUI to play the game of Go")
12664 (description
12665 "This a tool for Go players which performs the following functions:
12666@itemize
12667@item SGF editor,
12668@item Analysis frontend for Leela Zero (or compatible engines),
12669@item GTP interface (to play against an engine),
12670@item IGS client (to play on the internet),
12671@item Export games to a variety of formats.
12672@end itemize")
12673 (home-page "https://github.com/bernds/q5Go")
12674 (license license:gpl2+)))
12675
12676(define-public qcheckers
12677 (package
12678 (name "qcheckers")
12679 (version "0.9.0")
12680 (source
12681 (origin
12682 (method git-fetch)
12683 (uri (git-reference
12684 (url "https://github.com/portnov/qcheckers")
12685 (commit version)))
12686 (file-name (git-file-name name version))
12687 (sha256
12688 (base32 "05wzql6abzdf6l0vdzki4rfy2zn31mcplh1wkw3ddk8w81pvaymw"))))
12689 (build-system qt-build-system)
12690 (arguments
12691 (list
12692 #:tests? #f
12693 #:modules '((guix build qt-build-system)
12694 ((guix build gnu-build-system) #:prefix gnu:)
12695 (guix build utils))
12696 #:phases
12697 #~(modify-phases %standard-phases
12698 (replace 'configure
12699 (lambda _
12700 (invoke "qmake"
12701 (string-append "PREFIX=" #$output))))
12702 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12703 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
12704 (inputs (list qtbase-5 qtsvg-5 qtwayland-5))
12705 (home-page "https://portnov.github.io/qcheckers/")
12706 (synopsis "Qt-based checkers boardgame")
12707 (description "QCheckers, formerly known as KCheckers, is a is a Qt version
12708of the classic boardgame checkers (also known as draughts).")
12709 (license license:gpl2+)))
12710
12711(define-public xjump-sdl
12712 (package
12713 (name "xjump-sdl")
12714 (version "3.0.4")
12715 (source
12716 (origin
12717 (method git-fetch)
12718 (uri (git-reference
12719 (url "https://github.com/hugomg/xjump-sdl")
12720 (commit (string-append "v" version))))
12721 (file-name (git-file-name name version))
12722 (sha256
12723 (base32 "1macl4aq0zc93kbranzclqxh2jc40asn3bc8cpyywafzbxyha99y"))))
12724 (build-system gnu-build-system)
12725 (inputs (list sdl2))
12726 (arguments
12727 (list
12728 #:tests? #f ;No tests.
12729 #:phases
12730 #~(modify-phases %standard-phases
12731 (replace 'configure
12732 (lambda* (#:key outputs #:allow-other-keys)
12733 (invoke "./configure"
12734 (string-append "--prefix="
12735 (assoc-ref outputs "out"))
12736 (string-append "CC="
12737 #$(cc-for-target))))))))
12738 (home-page "https://github.com/hugomg/xjump-sdl")
12739 (synopsis "Falling tower game")
12740 (description "This package provides a reimplementation of the classic
12741Xjump game, using SDL instead of Xlib.")
12742 (license license:gpl3)))
12743
12744(define-public xmoto
12745 (package
12746 (name "xmoto")
12747 (version "0.6.3")
12748 (source
12749 (origin
12750 (method git-fetch)
12751 (uri (git-reference
12752 (url "https://github.com/xmoto/xmoto")
12753 (commit (string-append "v" version))))
12754 (file-name (git-file-name name version))
12755 (sha256
12756 (base32 "08yi6sgz349s7wa07dyrlbhpkmi25arz0c849qgpsj65vr8n7n8c"))
12757 (modules '((guix build utils)
12758 (ice-9 ftw)
12759 (srfi srfi-1)))
12760 ;; XXX: Remove some bundled libraries. Guix provides Chipmunk, but
12761 ;; it appears to be incompatible with the (older) one bundled.
12762 (snippet
12763 `(begin
12764 (let ((keep '("chipmunk" "glad" "md5sum")))
12765 (with-directory-excursion "vendor"
12766 (for-each delete-file-recursively
12767 (lset-difference string=?
12768 (scandir ".")
12769 (cons* "." ".." keep))))
12770 (substitute* "src/CMakeLists.txt"
12771 (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
12772 (if (member library keep) line ""))))))))
12773 (build-system cmake-build-system)
12774 (arguments
12775 (list
12776 #:tests? #f ;no tests
12777 #:phases
12778 #~(modify-phases %standard-phases
12779 (add-after 'unpack 'fix-hard-coded-directory
12780 (lambda _
12781 (substitute* "src/common/VFileIO.cpp"
12782 (("/usr/share") (string-append #$output "/share")))))
12783 (add-before 'build 'set-SDL
12784 ;; Set correct environment for SDL.
12785 (lambda* (#:key inputs #:allow-other-keys)
12786 (setenv "CPATH"
12787 (string-append
12788 (search-input-directory inputs "/include/SDL2")
12789 ":"
12790 (or (getenv "CPATH") "")))))
12791 (add-after 'install 'unbundle-fonts
12792 ;; Unbundle DejaVuSans TTF files.
12793 (lambda* (#:key inputs #:allow-other-keys)
12794 (let ((font-dir (search-input-directory inputs
12795 "/share/fonts/truetype/"))
12796 (target-dir (string-append #$output
12797 "/share/xmoto/Textures/Fonts/")))
12798 (for-each (lambda (f)
12799 (let ((font (string-append font-dir f))
12800 (target (string-append target-dir f)))
12801 (delete-file target)
12802 (symlink font target)))
12803 '("DejaVuSans.ttf" "DejaVuSansMono.ttf"))))))))
12804 (native-inputs
12805 (list gettext-minimal pkg-config))
12806 (inputs
12807 (list bzip2
12808 curl
12809 font-dejavu
12810 glu
12811 libjpeg-turbo
12812 libpng
12813 libxdg-basedir
12814 libxml2
12815 lua
12816 ode
12817 (sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf))
12818 sqlite
12819 zlib))
12820 (home-page "https://xmoto.tuxfamily.org/")
12821 (synopsis "2D motocross platform game")
12822 (description
12823 "X-Moto is a challenging 2D motocross platform game, where
12824physics play an all important role in the gameplay. You need to
12825control your bike to its limit, if you want to have a chance finishing
12826the more difficult challenges.")
12827 (license (list license:gpl2+ ;whole project
12828 license:bsd-3 ;vendor/md5sum
12829 license:lgpl2.1+
12830 license:expat))))
12831
12832(define-public eboard
12833 (package
12834 (name "eboard")
12835 (version "1.1.3")
12836 (source
12837 (origin
12838 (method git-fetch)
12839 (uri (git-reference
12840 (url "https://github.com/fbergo/eboard")
12841 (commit (string-append "v" version))))
12842 (file-name (git-file-name name version))
12843 (sha256
12844 (base32 "1z4pwpqyvxhlda99h6arh2rjk90fbms9q29fqizjblrdn01dlxn1"))))
12845 (build-system gnu-build-system)
12846 (native-inputs
12847 (list perl pkg-config))
12848 (inputs
12849 (list gtk+-2 libpng gstreamer))
12850 (arguments
12851 `(#:tests? #f
12852 #:phases
12853 (modify-phases %standard-phases
12854 (replace 'configure
12855 (lambda* (#:key outputs #:allow-other-keys)
12856 (make-file-writable "eboard-config")
12857 (setenv "CC" "gcc")
12858 (invoke "./configure"
12859 (string-append "--prefix=" (assoc-ref outputs "out")))
12860 #t))
12861 (add-before 'install 'make-required-directories
12862 (lambda* (#:key outputs #:allow-other-keys)
12863 (mkdir-p (string-append (assoc-ref outputs "out")
12864 "/share/eboard"))
12865 #t)))))
12866 (synopsis "Graphical user interface to play chess")
12867 (description
12868 "Eboard is a chess board interface for ICS (Internet Chess Servers)
12869and chess engines.")
12870 (home-page "https://www.bergo.eng.br/eboard/")
12871 (license license:gpl2+)))
12872
12873(define-public chessx
12874 (package
12875 (name "chessx")
12876 (version "1.5.6")
12877 (source
12878 (origin
12879 (method url-fetch)
12880 (uri (string-append "mirror://sourceforge/chessx/chessx/"
12881 version "/chessx-" version ".tgz"))
12882 (sha256
12883 (base32 "01fjchil2h6ry2ywr0dwjw2g7zd29580cr4c74d5z74h999lp6nh"))))
12884 (build-system qt-build-system)
12885 (native-inputs
12886 (list qttools-5))
12887 (inputs
12888 (list qtbase-5 qtmultimedia-5 qtspeech-5 qtsvg-5 qtwayland-5 zlib))
12889 (arguments
12890 (list
12891 #:tests? #f
12892 #:modules '((guix build qt-build-system)
12893 ((guix build gnu-build-system) #:prefix gnu:)
12894 (guix build utils))
12895 #:phases
12896 #~(modify-phases %standard-phases
12897 (add-after 'unpack 'fix-paths
12898 (lambda* (#:key inputs #:allow-other-keys)
12899 (substitute* "chessx.pro"
12900 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
12901 (search-input-file inputs "/bin/lrelease")))))
12902 (add-after 'fix-paths 'fix-library-paths
12903 (lambda _
12904 ;; Otherwise it won't find the wayland shell integration
12905 ;; or qt plugin for wayland-egl.
12906 (substitute* "src/gui/main.cpp"
12907 (("QApplication::setLibraryPaths\\(l\\);")
12908 "/* QApplication::setLibraryPaths(l); */"))))
12909 (add-after 'fix-library-paths 'make-qt-deterministic
12910 (lambda _
12911 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")))
12912 (add-after 'make-qt-deterministic 'disable-versioncheck
12913 (lambda _
12914 (substitute* "src/database/settings.cpp"
12915 (("\"/General/onlineVersionCheck\", true")
12916 "\"/General/onlineVersionCheck\", false"))))
12917 (replace 'configure
12918 (lambda _
12919 (invoke "qmake")))
12920 (replace 'build (assoc-ref gnu:%standard-phases 'build))
12921 (replace 'install
12922 (lambda* (#:key outputs #:allow-other-keys)
12923 (let ((out (assoc-ref outputs "out")))
12924 (install-file "release/chessx" (string-append out "/bin"))
12925 (install-file "unix/chessx.desktop"
12926 (string-append out "/share/applications"))))))))
12927 (synopsis "Chess game database")
12928 (description
12929 "ChessX is a chess database. With ChessX you can operate on your
12930collection of chess games in many ways: browse, edit, add, organize, analyze,
12931etc. You can also play games on FICS or against an engine.")
12932 (home-page "https://chessx.sourceforge.net/")
12933 (license license:gpl2+)))
12934
12935(define-public stockfish
12936 (let ((big-network-revision "c288c895ea92")
12937 (small-network-revision "37f18f62d772")) ; also update hashes below
12938 (package
12939 (name "stockfish")
12940 (version "18")
12941 (source
12942 (origin
12943 (method git-fetch)
12944 (uri (git-reference
12945 (url "https://github.com/official-stockfish/Stockfish")
12946 (commit (string-append "sf_" version))))
12947 (file-name (git-file-name name version))
12948 (sha256
12949 (base32 "0smqw4xpyv3ffhvlgm0wl1g2cyb7wf9jf3v0sshn4ylljxy39l97"))))
12950 (build-system gnu-build-system)
12951 (inputs
12952 `(("neural-network-big"
12953 ,(origin
12954 (method url-fetch)
12955 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12956 big-network-revision ".nnue"))
12957 (sha256
12958 (base32
12959 "19z48cxrxrspgvzmkix4lgr007rw5dmz7qwjj3m2ji4jxaawi262"))))
12960 ("neural-network-small"
12961 ,(origin
12962 (method url-fetch)
12963 (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
12964 small-network-revision ".nnue"))
12965 (sha256
12966 (base32
12967 "17c9b9ij1jmvbxaycqxbya33q30kij4s7b3a3mz11wvjsxi8zw9p"))))))
12968 (arguments
12969 `(#:tests? #f
12970 #:make-flags (list "-C" "src"
12971 "build"
12972 (string-append "PREFIX="
12973 (assoc-ref %outputs "out"))
12974 ,@(if (target-ppc32?)
12975 `("EXTRALDFLAGS=-latomic")
12976 `())
12977 (string-append "ARCH="
12978 ,(match (%current-system)
12979 ("x86_64-linux" "x86-64")
12980 ("i686-linux" "x86-32")
12981 ("aarch64-linux" "armv8")
12982 ("armhf-linux" "armv7")
12983 ("powerpc-linux" "ppc-32")
12984 ("powerpc64le-linux" "ppc-64")
12985 ("riscv64-linux" "general-64")
12986 ("mips64el-linux" "general-64")
12987 (_ "general-32"))))
12988 #:phases (modify-phases %standard-phases
12989 (delete 'configure)
12990 ;; The official neural network files are needed for building
12991 ;; and are embedded in the resulting binary.
12992 (add-after 'unpack 'copy-net
12993 (lambda* (#:key inputs #:allow-other-keys)
12994 (copy-file (assoc-ref inputs "neural-network-big")
12995 (format #f "src/nn-~a.nnue"
12996 ,big-network-revision))
12997 (copy-file (assoc-ref inputs "neural-network-small")
12998 (format #f "src/nn-~a.nnue"
12999 ,small-network-revision))))
13000 (add-after 'unpack 'remove-m-flag-and-net-target
13001 (lambda _
13002 (substitute* "src/Makefile"
13003 ;; Guix doesn't use a multiarch gcc.
13004 (("-m\\$\\(bits\\)") "")
13005 ;; Dont depend on net target.
13006 ((": net") ": ")))))))
13007 (synopsis "Strong chess engine")
13008 (description
13009 "Stockfish is a very strong chess engine. It is much stronger than the
13010best human chess grandmasters. It can be used with UCI-compatible GUIs like
13011ChessX.")
13012 (home-page "https://stockfishchess.org/")
13013 (license license:gpl3+))))
13014
13015(define-public moonfish
13016 (package
13017 (name "moonfish")
13018 (version "1")
13019 (source
13020 (origin
13021 (method git-fetch)
13022 (uri (git-reference
13023 (url "https://git.sr.ht/~zamfofex/moonfish")
13024 (commit (string-append "v" version))))
13025 (sha256
13026 (base32 "0p5rdrqiip6n5wdxjvlsg7qnwdwrpl9g3j1mx7q0i9a8zmkj2ryv"))
13027 (file-name (git-file-name name version))
13028 (modules '((guix build utils)))
13029 (snippet #~(begin
13030 ;; Avoid relying on '/dev/stderr', which doesn't work at the
13031 ;; top-level of a Guix build, because it refers to a pipe
13032 ;; that the build user doesn't have permission to access.
13033 (substitute* "scripts/check.sh"
13034 (("\\btee /dev/stderr\\b")
13035 "tee"))))))
13036 (build-system gnu-build-system)
13037 (arguments
13038 (list
13039 #:make-flags #~(list (string-append "CC="
13040 #$(cc-for-target))
13041 (string-append "PREFIX=" %output))
13042 #:phases #~(modify-phases %standard-phases
13043 (delete 'configure)))) ;no configure script
13044 (inputs (list libressl cjson))
13045 (home-page "https://moonfish.neocities.org")
13046 (synopsis "Simple chess engine written in C")
13047 (description
13048 "moonfish is a toy UCI chess engine written in C. It has TUI/CLI tools
13049for using any UCI engine and also to connect UCI engines to Lichess and IRC.")
13050 (license license:agpl3+)))
13051
13052(define-public morris
13053 (package
13054 (name "morris")
13055 (version "0.3")
13056 (source
13057 (origin
13058 (method git-fetch)
13059 (uri (git-reference
13060 (url "https://github.com/farindk/morris")
13061 (commit (string-append "v" version))))
13062 (file-name (git-file-name name version))
13063 (sha256
13064 (base32 "1kkcnpkzgybm7rqg7nafd7sqd5m4alns6l4j5zcf3p41jdc9s3iv"))))
13065 (build-system glib-or-gtk-build-system)
13066 (inputs (list automake autoconf pkg-config intltool
13067 gettext-minimal libtool glib gtk+-2 boost))
13068 (arguments (list #:tests? #f)) ; No tests in source.
13069 (home-page "http://nine-mens-morris.net/downloads.html")
13070 (synopsis "Implementation of the board game Nine Men's Morris")
13071 (description "Morris is an implementation of the board game Nine Men's Morris.
13072It supports not only the standard game, but also several rule-variants and different
13073board layouts. You can play against the computer, or simply use the program to
13074present the board, but play against another human opponent.")
13075 (license license:gpl3)))
13076
13077(define-public barrage
13078 (package
13079 (name "barrage")
13080 (version "1.0.7")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (string-append "mirror://sourceforge/lgames/barrage/"
13085 "barrage-" version ".tar.gz"))
13086 (sha256
13087 (base32 "0j7j6n5h97xpw0h8zi5a8ziw1vjsbr5gk4dcsiwzh59qn0djnrkh"))))
13088 (build-system gnu-build-system)
13089 (inputs
13090 (list hicolor-icon-theme sdl sdl-mixer))
13091 (arguments
13092 `(#:configure-flags
13093 (list
13094 (string-append "CFLAGS="
13095 "-I" (assoc-ref %build-inputs "sdl-mixer")
13096 "/include/SDL"))))
13097 (home-page "https://lgames.sourceforge.net/Barrage/")
13098 (synopsis "Violent point-and-click shooting game with nice effects")
13099 (description
13100 "Barrage is a rather destructive action game that puts you on a shooting
13101range with the objective to hit as many dummy targets as possible within
131023 minutes. You control a gun that may either fire small or large grenades at
13103soldiers, jeeps and tanks. The gameplay is simple but it is not that easy to
13104get high scores.")
13105 (license license:gpl2+)))
13106
13107(define-public burgerspace
13108 (package
13109 (name "burgerspace")
13110 (version "1.10.0")
13111 (source
13112 (origin
13113 (method url-fetch)
13114 (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/"
13115 "burgerspace-" version ".tar.gz"))
13116 (sha256
13117 (base32 "18ydm3014y9vhma0ml7z66xa7ihiz3xr8izicfdd3xl9f4535f6c"))))
13118 (build-system gnu-build-system)
13119 (native-inputs
13120 (list pkg-config))
13121 (inputs
13122 (list flatzebra))
13123 (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html")
13124 (synopsis "Avoid evil foodstuffs and make burgers")
13125 (description
13126 "This is a clone of the classic game BurgerTime. In it, you play
13127the part of a chef who must create burgers by stepping repeatedly on
13128the ingredients until they fall into place. And to make things more
13129complicated, you also must avoid evil animate food items while
13130performing this task, with nothing but your trusty pepper shaker to
13131protect you.")
13132 (license license:gpl2+)))
13133
13134(define-public 7kaa
13135 (package
13136 (name "7kaa")
13137 (version "2.15.7")
13138 (source
13139 (origin
13140 (method git-fetch)
13141 (uri (git-reference
13142 (url "https://git.code.sf.net/p/skfans/7kaa")
13143 (commit (string-append "v" version))))
13144 (sha256
13145 (base32 "1gfmgqdmqfaxj4hlz8x7zh3s36inns1gqqb8dq0r58b26xk42x2y"))))
13146 (build-system gnu-build-system)
13147 (arguments
13148 (list
13149 #:phases
13150 #~(modify-phases %standard-phases
13151 (add-after 'unpack 'patch-configure-ac
13152 ;; gettext version mismatch forces us to patch configure.ac
13153 (lambda _
13154 (let ((gettext-version
13155 #$(package-version (this-package-native-input "gettext-minimal"))))
13156 (substitute* "configure.ac"
13157 (("AM_GNU_GETTEXT_VERSION.*")
13158 (string-append
13159 "AM_GNU_GETTEXT_VERSION([" gettext-version "])\n"
13160 "AM_GNU_GETTEXT_REQUIRE_VERSION([" gettext-version "])\n")))))))))
13161 (native-inputs
13162 (list autoconf
13163 autoconf-archive
13164 automake
13165 gettext-minimal
13166 pkg-config))
13167 (inputs
13168 (list curl
13169 enet
13170 openal
13171 sdl2))
13172 (synopsis "Seven Kingdoms Ancient Adversaries: real-time strategy game")
13173 (description
13174 "Seven Kingdoms, designed by Trevor Chan, brings a blend of Real-Time
13175Strategy with the addition of trade, diplomacy, and espionage. The game
13176enables players to compete against up to six other kingdoms allowing players
13177to conquer opponents by defeating them in war (with troops or machines),
13178capturing their buildings with spies, or offering opponents money for their
13179kingdom.")
13180 (home-page "https://7kfans.com/index.html")
13181 (license license:gpl2+)))
13182
13183(define-public neverball
13184 ;; Git version is 6-years younger than latest release.
13185 (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
13186 (revision "1"))
13187 (package
13188 (name "neverball")
13189 (version (git-version "1.6.0" revision commit))
13190 (source
13191 (origin
13192 (method git-fetch)
13193 (uri (git-reference
13194 (url "https://github.com/Neverball/neverball")
13195 (commit commit)))
13196 (sha256
13197 (base32
13198 "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
13199 (file-name (git-file-name name version))
13200 (modules '((guix build utils)))
13201 (snippet
13202 '(begin
13203 ;; Octocat seems to be non-free. Oddly, Debian doesn't strip it.
13204 (delete-file-recursively "data/ball/octocat")))))
13205 (build-system copy-build-system)
13206 (arguments
13207 `(#:install-plan
13208 '(("neverball" "bin/")
13209 ("neverputt" "bin/")
13210 ("mapc" "bin/")
13211 ("data" "share/games/neverball/")
13212 ("locale" "share/")
13213 ("dist/" "share/games/neverball" #:include ("neverball_replay.png"
13214 "neverlogos.svg"
13215 "svg readme.txt"))
13216 ("dist/" "share/applications" #:include ("neverball.desktop"
13217 "neverputt.desktop"))
13218 ("dist/neverball_16.png"
13219 "/share/icons/hicolor/16x16/apps/neverball.png")
13220 ("dist/neverball_24.png"
13221 "/share/icons/hicolor/24x24/apps/neverball.png")
13222 ("dist/neverball_32.png"
13223 "/share/icons/hicolor/32x32/apps/neverball.png")
13224 ("dist/neverball_48.png"
13225 "/share/icons/hicolor/48x48/apps/neverball.png")
13226 ("dist/neverball_64.png"
13227 "/share/icons/hicolor/64x64/apps/neverball.png")
13228 ("dist/neverball_128.png"
13229 "/share/icons/hicolor/128x128/apps/neverball.png")
13230 ("dist/neverball_256.png"
13231 "/share/icons/hicolor/256x256/apps/neverball.png")
13232 ("dist/neverball_512.png"
13233 "/share/icons/hicolor/512x512/apps/neverball.png")
13234 ("dist/neverputt_16.png"
13235 "/share/icons/hicolor/16x16/apps/neverputt.png")
13236 ("dist/neverputt_24.png"
13237 "/share/icons/hicolor/24x24/apps/neverputt.png")
13238 ("dist/neverputt_32.png"
13239 "/share/icons/hicolor/32x32/apps/neverputt.png")
13240 ("dist/neverputt_48.png"
13241 "/share/icons/hicolor/48x48/apps/neverputt.png")
13242 ("dist/neverputt_64.png"
13243 "/share/icons/hicolor/64x64/apps/neverputt.png")
13244 ("dist/neverputt_128.png"
13245 "/share/icons/hicolor/128x128/apps/neverputt.png")
13246 ("dist/neverputt_256.png"
13247 "/share/icons/hicolor/256x256/apps/neverputt.png")
13248 ("dist/neverputt_512.png"
13249 "/share/icons/hicolor/512x512/apps/neverputt.png")
13250 ("dist/" "share/man/man1" #:include ("mapc.1"))
13251 ("dist/" "share/man/man6" #:include ("neverball.6" "neverputt.6"))
13252 ("doc/" "share/doc/neverball")
13253 ("README.md" "share/doc/neverball/"))
13254 #:phases
13255 (modify-phases %standard-phases
13256 (add-before 'install 'build
13257 (lambda* (#:key inputs outputs #:allow-other-keys)
13258 (let* ((out (assoc-ref outputs "out"))
13259 (sdl (assoc-ref inputs "sdl")))
13260 (invoke "make" "-j" (number->string (parallel-job-count))
13261 "--environment-overrides"
13262 "CC=gcc" "BUILD=release"
13263 (string-append "DATADIR="
13264 out
13265 "/share/games/neverball/data")
13266 (string-append "LOCALEDIR=" out "/share/locale")
13267 (string-append "SDL_CPPFLAGS=-I"
13268 sdl
13269 "/include/SDL2/")))))
13270 (add-after 'install 'fix-some-broken-fonts
13271 (lambda* (#:key outputs #:allow-other-keys)
13272 (let* ((out (assoc-ref outputs "out")))
13273 (wrap-program (string-append out "/bin/neverball")
13274 `("LANG" = ("en_US.utf8")))
13275 (wrap-program (string-append out "/bin/neverputt")
13276 `("LANG" = ("en_US.utf8")))))))))
13277 (native-inputs
13278 `(("gettext" ,gettext-minimal))) ;for msgfmt
13279 (inputs
13280 `(("bash-minimal" ,bash-minimal)
13281 ("libjpeg" ,libjpeg-turbo)
13282 ("libpng" ,libpng)
13283 ("libvorbis" ,libvorbis)
13284 ("physfs" ,physfs)
13285 ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))))
13286 (home-page "https://neverball.org/")
13287 (synopsis "3D floor-tilting game")
13288 (description
13289 "In the grand tradition of Marble Madness and Super Monkey Ball,
13290Neverball has you guide a rolling ball through dangerous territory. Balance
13291on narrow bridges, navigate mazes, ride moving platforms, and dodge pushers
13292and shovers to get to the goal. Race against the clock to collect coins to
13293earn extra balls. Also included is Neverputt, which is a 3D miniature golf
13294game.") ;thanks to Debian for description
13295 (license license:gpl2+))))
13296
13297;; TODO: We may wish to package the server and client separately.
13298(define-public pokerth
13299 (package
13300 (name "pokerth")
13301 (version "2.0.8")
13302 (source
13303 (origin
13304 (method git-fetch)
13305 (uri (git-reference
13306 (url "https://github.com/pokerth/pokerth")
13307 (commit (string-append "v" version))))
13308 (file-name (git-file-name name version))
13309 (sha256
13310 (base32 "1hwnywqq5c05j1qym5q82r9inyps3p1fsjd7c819575vvqcdwqx8"))
13311 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
13312 (snippet
13313 #~(begin
13314 ;; XXX: We must use the ancient bundled websocketpp because the new
13315 ;; one is not compatible with newer versions of boost asio:
13316 ;; https://github.com/zaphoyd/websocketpp/issues/721
13317 ;; One alternative is to use boost-1.83 as an input.
13318 ;; XXX: Can we copy the third party boost headers in from somewhere?
13319 (let ((keep '("boost" "websocketpp")))
13320 (with-directory-excursion "src/third_party"
13321 (for-each delete-file-recursively
13322 (lset-difference string=?
13323 (scandir ".")
13324 (cons* "." ".." keep)))))))))
13325 (build-system qt-build-system)
13326 (inputs
13327 (list boost
13328 openssl
13329 protobuf
13330 qtbase
13331 qtdeclarative
13332 qtmultimedia
13333 qtsvg
13334 qtwayland
13335 sqlite))
13336 (native-inputs (list qttools qtwebsockets))
13337 (arguments (list #:tests? #f)) ;TODO: 'bot client' must be built & run
13338 (home-page "https://www.pokerth.net")
13339 (synopsis "Texas holdem poker game")
13340 (description
13341 "With PokerTH you can play the Texas holdem poker game, either against
13342computer opponents or against real players online.")
13343 (license license:agpl3+)))
13344
13345(define-public xevil
13346 ;; This game is old. Use a maintained fork that builds with modern toolchains
13347 ;; on modern, 64-bit hardware.
13348 (let ((commit "9ca85059d5195be0eb15e107de3bb9d1b49e5f99")
13349 (revision "0"))
13350 (package
13351 (name "xevil")
13352 (version (git-version "2.02" revision commit))
13353 (source
13354 (origin
13355 (method git-fetch)
13356 (uri (git-reference
13357 (url "https://github.com/lvella/xevil")
13358 (commit commit)))
13359 (file-name (git-file-name name version))
13360 (sha256
13361 (base32 "14hsmw9ll2asnp1s0zvniyp31kjw8ynm7vnycg74lpqf28h2rric"))))
13362 (build-system gnu-build-system)
13363 (arguments
13364 (list
13365 #:modules `(,@%default-gnu-imported-modules
13366 (srfi srfi-26))
13367 #:make-flags
13368 #~(list "SHELL=sh"
13369 "DEBUG_OPT=-g -DNDEBUG")
13370 #:tests? #f ;no test suite
13371 #:phases
13372 #~(modify-phases %standard-phases
13373 (add-after 'unpack 'rename-licence-file
13374 (lambda _ (rename-file "gpl.txt" "COPYING")))
13375 (add-after 'unpack 'redefine
13376 (lambda* (#:key inputs #:allow-other-keys)
13377 (substitute* "cmn/game.cpp"
13378 (("(#define VERSION ).*" _ define)
13379 (string-append define "\"" #$version "\"\n")))
13380 (substitute* "cmn/utils.cpp"
13381 (("[^\"]*/(bin/uname)" _ command)
13382 (search-input-file inputs command)))
13383 (substitute* "x11/ui.cpp"
13384 ;; Neither DEFAULT_BIG_FONT_NAME nor BACKUP_FONT_NAME are
13385 ;; available from most Guix X11 servers, making the game
13386 ;; unplayable by default. Substitute the closest match.
13387 (("9x15") "6x13")
13388 ;; ‘For fast machines’ need no longer default to False in C21.
13389 (("(smoothScroll = )False" _ assign)
13390 (string-append assign "True")))))
13391 (delete 'configure) ;no configure script
13392 (replace 'install
13393 (lambda _
13394 (with-directory-excursion "x11/REDHAT_LINUX" ;yeah
13395 (for-each (cut install-file <>
13396 (string-append #$output "/bin"))
13397 (list "xevil" "serverping")))
13398 (let ((doc (string-append #$output "/share/doc/"
13399 #$name "-" #$version)))
13400 (mkdir-p doc)
13401 (for-each (lambda (file)
13402 (copy-recursively file
13403 (string-append
13404 doc "/" (basename file))))
13405 (list "instructions" "x11/app-defaults"))))))))
13406 (inputs
13407 (list coreutils-minimal ;for uname
13408 libx11 libxpm))
13409 ;; The current home page has been ‘subtly’ vandalised with spam and is
13410 ;; missing a lot of content from this older snapshot.
13411 (home-page (string-append "https://web.archive.org/web/20060410005819/"
13412 "http://www.xevil.com/"))
13413 (synopsis
13414 "Third-person, side-scrolling, fast-action, kill-everything game")
13415 (description
13416 "XEvil is a violent third-person, side-scrolling, fast-action deathmatch.
13417You run around a randomly generated two-dimensional map composed of walls,
13418floors, ladders, doors, and horizontal and vertical elevators. Your only object
13419is to explore this world to find weapons and items, killing everything in sight
13420before they kill you. You can fight against either computer-controlled enemies
13421or against other people.")
13422 (license license:gpl2+))))
13423
13424(define-public azimuth
13425 ;; 1.0.3 - May 29, 2019
13426 ;; Has build errors so build from latest source
13427 (let ((commit "050f838b35d19ffdc738f33178abaf9d69d834ec")
13428 (revision "0"))
13429 (package
13430 (name "azimuth")
13431 (version (git-version "1.0.3" revision commit))
13432 (source
13433 (origin
13434 (method git-fetch)
13435 (uri (git-reference
13436 (url "https://github.com/mdsteele/azimuth")
13437 (commit commit)))
13438 (file-name (git-file-name name version))
13439 (sha256
13440 (base32
13441 "1b5grp9ddhrj3n39j1j5vzm3052d4bd09fpz0b011h769vapwi0i"))))
13442 (build-system gnu-build-system)
13443 (arguments
13444 (list
13445 #:test-target "test"
13446 #:phases
13447 #~(modify-phases %standard-phases
13448 (delete 'configure) ; no configure script
13449 ;; Build release version instead of debug version.
13450 (add-after 'unpack 'set-release
13451 (lambda _
13452 (setenv "BUILDTYPE" "release")))
13453 (add-after 'unpack 'fix-build
13454 (lambda* (#:key outputs #:allow-other-keys)
13455 (substitute* "Makefile"
13456 (("-Werror") ""))))
13457 (add-after 'unpack 'fix-install ; set install directory
13458 (lambda* (#:key outputs #:allow-other-keys)
13459 (substitute* "Makefile"
13460 (("/usr")
13461 (assoc-ref outputs "out"))) #t)))))
13462 (inputs (list sdl2))
13463 (native-inputs (list pkg-config))
13464 (home-page "https://mdsteele.games/azimuth/")
13465 (synopsis "Metroidvania game with vector graphics")
13466 (description
13467 "Pilot your ship inside a planet to find and rescue the colonists
13468trapped inside the Zenith Colony.")
13469 (license license:gpl3+))))
13470
13471(define-public cgoban
13472 (package
13473 (name "cgoban")
13474 (version "1.9.14")
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (string-append "mirror://sourceforge/cgoban1/cgoban1/"
13479 version "/cgoban-" version ".tar.gz"))
13480 (sha256
13481 (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))))
13482 (build-system gnu-build-system)
13483 (inputs
13484 (list libx11 libxt xorgproto))
13485 (home-page "https://cgoban1.sourceforge.net/")
13486 (synopsis "Go client for X11")
13487 (description "Provides a large set of Go-related services for X11:
13488@itemize
13489@item Local games with precise implementation of the Chinese and Japanese rulesets
13490@item Edition and visualization of SGF files
13491@item Connection to the NNGS or IGS Go servers
13492@item Bridge to Go modem protocol, allowing to play against Go modem-capable AIs
13493such as GnuGo.
13494@end itemize")
13495 (license license:gpl2+)))
13496
13497(define-public parallel-overhead
13498 (package
13499 (name "parallel-overhead")
13500 (version "1.1.4")
13501 (source
13502 (origin
13503 (method git-fetch)
13504 (uri (git-reference
13505 (url "https://codeberg.org/Huitsi/ParallelOverhead")
13506 (commit version)))
13507 (file-name (git-file-name name version))
13508 (sha256
13509 (base32
13510 "17dbq6bwm0rk1jzb1q2y6h3dyvxpqfq3lc3jnpb6zy2y897was4d"))))
13511 (build-system gnu-build-system)
13512 (arguments
13513 (list
13514 #:tests? #f ;no tests
13515 #:make-flags
13516 #~(list
13517 (string-append "prefix=" #$output)
13518 (string-append "bindir=" #$output "/bin") ;nooo don't put it in /games
13519 (string-append "CC=" #$(cc-for-target)))
13520 #:phases
13521 #~(modify-phases %standard-phases
13522 (delete 'configure)
13523 (add-before 'build 'no-git-describe
13524 (lambda _
13525 (substitute* "Makefile"
13526 (("\\$\\(shell git.+\\)") #$version)))))))
13527 (inputs (list sdl2))
13528 (native-inputs (list desktop-file-utils
13529 help2man
13530 lmms
13531 sfxr-qt))
13532 (home-page "https://huitsi.net/ParallelOverhead")
13533 (synopsis "Endless runner game")
13534 (description "Parallel Overhead is a colorful endless runner game where you
13535take control of the ships Truth and Beauty on a groundbreaking trip through
13536hyperspace. A stable hyperspace tunnel has finally been achieved with the two
13537ships supporting it on opposite walls of the tunnel. Well, almost stable...
13538The goal is to keep the ships from falling through the cracks.")
13539 (license (list license:expat ;game
13540 license:cc0)))) ;sounds+music
13541
13542(define-public passage
13543 (package
13544 (name "passage")
13545 (version "4")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (string-append "mirror://sourceforge/hcsoftware/Passage/v"
13550 version "/Passage_v" version "_UnixSource.tar.gz"))
13551 (sha256
13552 (base32 "02ky4a4xdjvr71r58339jjrjyz76b5skcnbq4f8707mrln9vhby3"))))
13553 (build-system gnu-build-system)
13554 (arguments
13555 `(#:tests? #false ; there are none
13556 #:phases
13557 (modify-phases %standard-phases
13558 (add-after 'unpack 'chdir
13559 (lambda _
13560 (chdir "gamma256/gameSource")
13561 (system "cat Makefile.GnuLinux Makefile.all > Makefile")))
13562 (replace 'configure
13563 (lambda* (#:key outputs inputs #:allow-other-keys)
13564 (setenv "CPATH"
13565 (string-append
13566 (assoc-ref inputs "sdl") "/include/SDL:"
13567 (or (getenv "CPATH") "")))
13568 (let* ((out (assoc-ref outputs "out"))
13569 (assets (string-append out "/share/passage")))
13570 (substitute* "common.cpp"
13571 (("readTGA\\( \"graphics\"")
13572 (format #false "readTGA(\"~a/graphics\"" assets)))
13573 (substitute* "musicPlayer.cpp"
13574 (("readTGA\\( \"music\"")
13575 (format #false "readTGA(\"~a/music\"" assets))))))
13576 (replace 'install
13577 (lambda* (#:key outputs #:allow-other-keys)
13578 (let* ((out (assoc-ref outputs "out"))
13579 (bin (string-append out "/bin"))
13580 (assets (string-append out "/share/passage/")))
13581 (install-file "Passage" bin)
13582 (install-file "../documentation/Readme.txt" assets)
13583 (copy-recursively "graphics" (string-append assets "graphics"))
13584 (copy-recursively "music" (string-append assets "music"))
13585 (copy-recursively "settings" (string-append assets "settings"))))))))
13586 (inputs
13587 `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
13588 (native-inputs
13589 (list imagemagick))
13590 (home-page "https://hcsoftware.sourceforge.net/passage/")
13591 (synopsis "Memento mori game")
13592 (description
13593 "Passage is meant to be a memento mori game. It presents an entire life,
13594from young adulthood through old age and death, in the span of five minutes.
13595Of course, it's a game, not a painting or a film, so the choices that you make
13596as the player are crucial. There's no ``right'' way to play Passage, just as
13597there's no right way to interpret it.")
13598 (license license:public-domain)))
13599
13600(define-public paperview
13601 (let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6")
13602 (revision "1"))
13603 (package
13604 (name "paperview")
13605 (version (git-version "0.0.1" revision commit)) ;no upstream release
13606 (source (origin
13607 (method git-fetch)
13608 (uri (git-reference
13609 (url "https://github.com/glouw/paperview")
13610 (commit commit)))
13611 (file-name (git-file-name name version))
13612 (sha256
13613 (base32
13614 "09sb9sg44fvkgfdyycrm1ndpx7cnkrglxhci41y8f3gpagnvi7jk"))))
13615 (build-system gnu-build-system)
13616 (inputs
13617 (list sdl2))
13618 (arguments
13619 '(#:tests? #f ;no tests
13620 #:make-flags
13621 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
13622 #:phases
13623 (modify-phases %standard-phases
13624 (delete 'configure))))
13625 (home-page "https://github.com/glouw/paperview/")
13626 (synopsis "High performance X11 animated wallpaper setter")
13627 (description "High performance animated desktop background setter for
13628X11 that won't set your CPU on fire, drain your laptop battery, or lower video
13629game FPS.")
13630 (license license:unlicense))))
13631
13632(define-public curseofwar
13633 (package
13634 (name "curseofwar")
13635 (version "1.3.0")
13636 (source
13637 (origin
13638 (method git-fetch)
13639 (uri (git-reference
13640 (url "https://github.com/a-nikolaev/curseofwar")
13641 (commit (string-append "v" version))))
13642 (file-name (git-file-name name version))
13643 (sha256
13644 (base32 "1wd71wdnj9izg5d95m81yx3684g4zdi7fsy0j5wwnbd9j34ilz1i"))))
13645 (build-system gnu-build-system)
13646 (arguments
13647 `(#:tests? #f ; no tests
13648 #:make-flags
13649 (list (string-append "CC=" ,(cc-for-target))
13650 (string-append "PREFIX=" (assoc-ref %outputs "out")))
13651 #:phases
13652 (modify-phases %standard-phases
13653 (delete 'configure))))
13654 (inputs (list ncurses))
13655 (home-page "https://a-nikolaev.github.io/curseofwar/")
13656 (synopsis "Fast-paced action strategy game")
13657 (description "Curse of War is a fast-paced action strategy game originally
13658implemented using ncurses user interface. An SDL graphical version is also
13659available.")
13660 (license license:gpl3+)))
13661
13662(define-public devours
13663 (let ((commit "d50e745aa14aa48f7555ae12eb3d1000de1cc150")
13664 (revision "0"))
13665 (package
13666 (name "devours")
13667 (version (git-version "3" revision commit))
13668 (source
13669 (origin
13670 (method git-fetch)
13671 (uri (git-reference
13672 (url "https://jxself.org/git/devours.git")
13673 (commit commit)))
13674 (file-name (git-file-name name version))
13675 (sha256
13676 (base32 "1ksl6mh76jfx64rmasz2571f88ws45vby2977srhgkh355zp3lzn"))))
13677 (build-system gnu-build-system)
13678 (arguments
13679 (list
13680 #:tests? #f ; no tests
13681 #:phases
13682 #~(modify-phases %standard-phases
13683 (delete 'configure) ; no configure
13684 (replace 'build
13685 (lambda _
13686 (invoke "inform"
13687 (string-append "+include_path="
13688 #$(this-package-native-input "informlib")
13689 "/lib")
13690 "devours.inf")))
13691 (replace 'install
13692 (lambda* (#:key inputs #:allow-other-keys)
13693 ;; Create standalone executable.
13694 (let* ((bash (search-input-file inputs "/bin/bash"))
13695 (share (string-append #$output "/share"))
13696 (scummvm (search-input-file inputs "/bin/scummvm"))
13697 (bin (string-append #$output "/bin"))
13698 (executable (string-append bin "/devours")))
13699 (mkdir-p share)
13700 (copy-file "devours.z5" (string-append share "/devours.z5"))
13701 (mkdir-p bin)
13702 (with-output-to-file executable
13703 (lambda ()
13704 (format #t "#!~a~%" bash)
13705 (format #t
13706 "exec ~a --path=~a glk:zcode~%"
13707 scummvm share)))
13708 (chmod executable #o755))))
13709 (add-after 'install 'install-desktop-file
13710 (lambda _
13711 (let* ((apps (string-append #$output "/share/applications"))
13712 (share (string-append #$output "")))
13713 (mkdir-p apps)
13714 (make-desktop-entry-file
13715 (string-append apps "/devours.desktop")
13716 #:name "All Things Devours"
13717 #:generic-name "All Things Devours"
13718 #:exec (string-append #$output "/bin/devours")
13719 #:categories '("AdventureGame" "Game" "RolePlaying")
13720 #:keywords '("game" "adventure" "sci-fi")
13721 #:comment '((#f "Sci-fi text adventure game")))))))))
13722 (inputs
13723 (list bash scummvm))
13724 (native-inputs
13725 (list inform informlib))
13726 (synopsis "All Things Devours")
13727 (description
13728 "All Things Devours is a short piece of sci-fi interactive fiction,
13729leaning strongly towards the text-adventure end of the spectrum.
13730Any move you make may put things into an unwinnable state. You are therefore
13731encouraged to save frequently, and also to realise that you will probably have
13732to start over several times to find the most satisfactory ending.")
13733 (home-page "https://jxself.org/git/devours.git")
13734 (license license:agpl3+))))
13735
13736(define-public schiffbruch
13737 ;; There haven't been any releases for several years, so I've taken the most
13738 ;; recent commit from the master branch that didn't fail to build (the last
13739 ;; commit gave me a compile error).
13740 (let ((commit "e41916d15d87749c82c5005cbb42d1bb079b43d9"))
13741 (package
13742 (name "schiffbruch")
13743 (version (git-version "1.2.1" "0" commit))
13744 (source
13745 (origin
13746 (method git-fetch)
13747 (uri (git-reference
13748 (url "https://github.com/sandsmark/Schiffbruch")
13749 (commit commit)))
13750 (file-name (git-file-name name version))
13751 (sha256
13752 (base32 "0lg3rqacrapf6c4sxi12cm9bmg43mlbclway1zxcm848pi1xkzwv"))
13753 (patches (search-patches "schiffbruch-fix-build-for-gcc-13.patch"))))
13754 (build-system cmake-build-system)
13755 (arguments
13756 `(#:tests? #f ; no tests
13757 #:build-type "Release"))
13758 (inputs
13759 (list sfml-2))
13760 (home-page "https://github.com/sandsmark/Schiffbruch/")
13761 (synopsis "Pixelart survival game")
13762 (description
13763 "Schiffbruch is a mix of building, strategy and adventure and gets played
13764with a two-dimensional view. The game deals with the consequences of a ship
13765wreckage. You're stranded on a desert island and have to survive. In order to
13766do so you need to explore the island, find food, build a shelter and try to
13767get attention, so you get found.")
13768 (license license:cc-by4.0))))
13769
13770(define-public sdl-jstest
13771 (package
13772 (name "sdl-jstest")
13773 (version "0.2.2")
13774 (source (origin
13775 (method git-fetch)
13776 (uri (git-reference
13777 (url "https://github.com/Grumbel/sdl-jstest")
13778 (commit (string-append "v" version))))
13779 (file-name (git-file-name name version))
13780 (sha256
13781 (base32
13782 "11qp4gkbb11n3wx74128fj56radgsvkj7nxhbh55rd3xad1hckh3"))))
13783 (build-system cmake-build-system)
13784 (arguments
13785 (list
13786 ;; The test suite uses appstream-utils to validate the appdata.xml file,
13787 ;; fails with "url-not-found".
13788 #:tests? #f
13789 #:phases
13790 #~(modify-phases %standard-phases
13791 (add-after 'unpack 'copy-gamecontroller-db
13792 (lambda* (#:key native-inputs inputs #:allow-other-keys)
13793 (copy-file
13794 (search-input-file (or native-inputs inputs)
13795 "share/sdl2/gamecontrollerdb.txt")
13796 "external/sdl_gamecontrollerdb/gamecontrollerdb.txt"))))))
13797 (native-inputs
13798 (list pkg-config sdl2-gamecontrollerdb tinycmmc))
13799 (inputs (list ncurses sdl sdl2))
13800 (home-page "https://github.com/Grumbel/sdl-jstest")
13801 (synopsis "SDL Joystick Tester")
13802 (description "The @command{sdl-jstest} and @command{sdl2-jstest} commands
13803can list the available joystick controllers as found by the SDL or SDL2
13804libraries, respectively. It can show the available axes, buttons, hats and
13805balls of a chosen controller, and can display the controller actions in real
13806time in a visual fashion.")
13807 (license license:gpl3+)))
13808
13809(define-public sdlpop
13810 (package
13811 (name "sdlpop")
13812 (version "1.24-rc")
13813 (source
13814 (origin
13815 (method git-fetch)
13816 (uri (git-reference
13817 (url "https://github.com/NagyD/SDLPoP")
13818 (commit "v1.24-RC")))
13819 (file-name (git-file-name name version))
13820 (sha256
13821 (base32 "16idniqabzwf8kc30mqvkdfvr1kqy26bja3af2c105mhxw3jx77f"))))
13822 (build-system cmake-build-system)
13823 (arguments
13824 (list
13825 #:tests? #f ;no tests provided
13826 #:phases
13827 #~(modify-phases %standard-phases
13828 (add-after 'unpack 'fix-data-path
13829 (lambda _
13830 (chdir "src")
13831 (substitute* "config.h"
13832 (("(#define SHARE_PATH ).*" all first)
13833 (string-append first "\""
13834 #$output "/share\"\n")))))
13835 (replace 'install
13836 (lambda _
13837 (let* ((out #$output)
13838 (bin (string-append out "/bin"))
13839 (opt (string-append out "/share/SDLPoP"))
13840 (app (string-append out "/share/applications"))
13841 (template "src/SDLPoP.desktop.template"))
13842 (chdir "..")
13843 (for-each mkdir-p
13844 (list bin opt app))
13845 (install-file "prince" opt)
13846 (symlink (string-append opt "/prince")
13847 (string-append bin "/prince"))
13848 (substitute* template
13849 (("\\$ROOT")
13850 out)
13851 (("(Exec=).*" all first)
13852 (string-append first opt "/prince\n"))
13853 (("(Icon=).*" all first)
13854 (string-append first opt "/data/icon.png\n"))
13855 (("(Path=).*" all first)
13856 (string-append first opt "\n")))
13857 (copy-file template (string-append app "/SDLPoP.desktop"))
13858 (install-file "SDLPoP.ini" opt)
13859 (copy-recursively "data"
13860 (string-append opt "/data"))
13861 (copy-recursively "doc" opt)
13862 (copy-recursively "mods" opt)))))))
13863 (native-inputs (list pkg-config))
13864 (inputs (list (sdl-union (list sdl2 sdl2-image))))
13865 (synopsis "Port of Prince of Persia game")
13866 (description "This package provides port of Prince of Persia, based on the
13867disassembly of the DOS version, extended with new features.")
13868 (home-page "https://github.com/NagyD/SDLPoP")
13869 (license license:gpl3+)))
13870
13871(define-public fheroes2
13872 (package
13873 (name "fheroes2")
13874 (version "1.1.11")
13875 (source
13876 (origin
13877 (method git-fetch)
13878 (uri (git-reference
13879 (url "https://github.com/ihhub/fheroes2")
13880 (commit version)))
13881 (file-name (git-file-name name version))
13882 (sha256
13883 (base32 "0px9ibvkr6q2h6jbiqfy3mp46d1kl52zlqfsbj7p2c4v3c18kj2k"))))
13884 (build-system cmake-build-system)
13885 (arguments
13886 `(#:tests? #f ; no tests
13887 #:make-flags '("FHEROES2_STRICT_COMPILATION=1"
13888 "RELEASE=1")))
13889 (native-inputs
13890 (list gettext-minimal))
13891 (inputs
13892 (list libpng
13893 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
13894 zlib))
13895 (home-page "https://ihhub.github.io/fheroes2/")
13896 (synopsis "Turn-based strategy game engine")
13897 (description "@code{fheroes2} is an implementation of Heroes of Might and
13898Magic II (aka HOMM2) game engine. It requires assets and game resources to
13899play; it will look for them at @file{~/.local/share/fheroes2} folder.")
13900 (license license:gpl2)))
13901
13902(define-public vcmi
13903 (package
13904 (name "vcmi")
13905 (version "1.7.4")
13906 (source (origin
13907 (method git-fetch)
13908 (uri (git-reference
13909 (url "https://github.com/vcmi/vcmi")
13910 (commit version)))
13911 (file-name (git-file-name name version))
13912 (sha256
13913 (base32
13914 "1sf04hv73ssiznks8pf4q7ny9y17zxsf8mqwln8dq1w2kp8rb87s"))
13915 (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
13916 (build-system cmake-build-system)
13917 (arguments
13918 (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF"
13919 "-DENABLE_INNOEXTRACT=OFF"
13920 "-DENABLE_MMAI=OFF"
13921 "-DENABLE_DISCORD=OFF")
13922 ;; Test suites do not seem well supported upstream and are disabled by default.
13923 ;; Pass -DENABLE_TEST to configure to enable.
13924 #:tests? #f))
13925 (native-inputs
13926 (list boost-1.83
13927 ffmpeg
13928 fmt
13929 fuzzylite
13930 gettext-minimal
13931 ;; googletest ; needed for tests, but tests are disabled
13932 libxkbcommon
13933 libsquish
13934 luajit
13935 minizip
13936 pkg-config
13937 python
13938 qtbase
13939 qtsvg
13940 qttools
13941 sdl2
13942 sdl2-mixer
13943 sdl2-image
13944 sdl2-ttf
13945 onetbb
13946 vulkan-headers
13947 zlib))
13948 (home-page "https://vcmi.eu/")
13949 (synopsis "Turn-based strategy game engine")
13950 (description
13951 "@code{vcmi} is an implementation of the Heroes of Might and
13952Magic III game engine. It requires assets and game resources to
13953play; it will look for them at @file{~/.local/share/vcmi} folder.")
13954 (license license:gpl2)))
13955
13956(define-public apricots
13957 (package
13958 (name "apricots")
13959 (version "0.2.9")
13960 (source
13961 (origin
13962 (method git-fetch)
13963 (uri (git-reference
13964 (url "https://codeberg.org/moggers87/apricots")
13965 (commit (string-append "v" version))))
13966 (sha256
13967 (base32 "1xwdxiq0g2fb8scmcrjv29qnzrc3w3h0mmmhd6hw9wnfa5mv91lw"))
13968 (file-name (git-file-name name version))))
13969 (build-system gnu-build-system)
13970 (arguments
13971 ;; The test suite doesn't test the built game, but merely runs cppcheck &
13972 ;; clang-format. Useful for the maintainers; not for distributions.
13973 (list #:tests? #f))
13974 (native-inputs (list autoconf ;autom4te used in ./bootstrap
13975 automake)) ;aclocal used in ./bootstrap
13976 (inputs (list alure openal sdl2))
13977 (home-page "https://codeberg.org/moggers87/apricots")
13978 (synopsis "Arcade airplane game")
13979 (description "@code{apricots} is a game where you fly a little plane
13980around the screen and shoot things and drop bombs on enemy targets. It's
13981meant to be quick and fun.")
13982 (license license:gpl2+)))
13983
13984(define-public liquidwar6
13985 (package
13986 (name "liquidwar6")
13987 (version "0.6.3902")
13988 (source (origin
13989 (method url-fetch)
13990 (uri (string-append "mirror://gnu/liquidwar6/" "liquidwar6-"
13991 version ".tar.gz"))
13992 (sha256
13993 (base32
13994 "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn"))))
13995 (native-inputs (list doxygen))
13996 (inputs (list guile-2.0
13997 zlib
13998 expat
13999 sqlite
14000 ncurses
14001 readline
14002 curl
14003 python-2
14004 libxslt
14005 perl
14006 graphviz
14007 glu
14008 libcaca
14009 (sdl-union (list sdl sdl-image sdl-ttf sdl-mixer))))
14010 (build-system gnu-build-system)
14011 (arguments
14012 (list #:configure-flags
14013 #~(list "--enable-allinone" "CFLAGS=-Wno-error -O2 -g"
14014 (string-append "CPPFLAGS=" "-I"
14015 #$(this-package-input "sdl-union")
14016 "/include/SDL"))))
14017 (synopsis "Liquid War 6 is a unique multiplayer wargame")
14018 (description
14019 "Liquid War 6 is a unique multiplayer war game. Your army is a blob of
14020liquid and you have to try and eat your opponents. Rules are very simple yet
14021original, they have been invented by Thomas Colcombet.")
14022 (home-page "https://www.gnu.org/software/liquidwar6/")
14023 (license license:gpl3+)))
14024
14025(define-public plunder
14026 (let ((commit "026ded7083df5134bdf05b1ec7e5a0099ac9b9d2")
14027 (revision "1"))
14028 (package
14029 (name "plunder")
14030 (version (git-version "1.0.0" revision commit))
14031 (source (origin
14032 (method git-fetch)
14033 (uri (git-reference
14034 (url "https://github.com/jappeace/plunder")
14035 (commit commit)))
14036 (file-name (git-file-name name version))
14037 (sha256
14038 (base32
14039 "0m0v8x6q9iq4zihwmysbxjwkq18nar6xhq4g18p2g8c6azj2mgd6"))))
14040 (build-system haskell-build-system)
14041 (inputs (list ghc-monadrandom
14042 ghc-quickcheck
14043 ghc-file-embed
14044 ghc-generic-lens
14045 ghc-lens
14046 ghc-random
14047 ghc-reflex
14048 ghc-reflex-sdl2
14049 ghc-sdl2
14050 ghc-sdl2-gfx
14051 ghc-sdl2-image
14052 ghc-sdl2-ttf
14053 ghc-vector
14054 ghc-witherable))
14055 (native-inputs (list ghc-hspec ghc-hspec-core hspec-discover))
14056 (home-page "https://github.com/jappeace/plunder")
14057 (synopsis "Game about looting a hexagonal-tile world")
14058 (description
14059 "This package provides a work-in-progress game where you control a
14060Viking and your objective is to loot all of the occupied hexagonal tiles in
14061the map.")
14062 (license license:expat))))
14063
14064(define-public freerct
14065 (let ((commit "f85335dc98cdb28081b38cdf23409ac8a91d9a66")
14066 (revision "0"))
14067 (package
14068 (name "freerct")
14069 (version (git-version "0.1" revision commit))
14070 (source (origin
14071 (method git-fetch)
14072 (uri (git-reference
14073 (url "https://codeberg.org/FreeRCT/FreeRCT")
14074 (commit commit)))
14075 (file-name (git-file-name name version))
14076 (sha256
14077 (base32
14078 "1mimwgw487dxr2h1kxciwz34hk06g1lfgpicrav7khh19843a2fq"))))
14079 (build-system cmake-build-system)
14080 (arguments
14081 `(#:tests? #f))
14082 (native-inputs (list flex bison))
14083 (inputs (list libpng glfw glew freetype))
14084 (home-page "https://freerct.net/")
14085 (synopsis "Theme park management simulation game")
14086 (description
14087 "FreeRCT is a game that captures the look and feel of the popular games
14088RollerCoaster Tycoon 1 and 2, graphics- and gameplay-wise.
14089
14090In this game, you play as a manager of a theme park, allowing you to make a
14091park of your dreams. The list of responsibilities includes managing staff,
14092finances, landscaping, and most importantly: rides. Good managers follow the
14093principle of prioritizing the guests' happiness with a well-maintained park.
14094Should they go unwise, a theme park plunge into chaos with vandalizing guests
14095and unsafe rides. Which path will you take?")
14096 (license license:gpl2))))
14097
14098(define-public ultrastar-deluxe
14099 (package
14100 (name "ultrastar-deluxe")
14101 (version "2025.10.1")
14102 (source (origin
14103 (method git-fetch)
14104 (uri (git-reference
14105 (url "https://github.com/UltraStar-Deluxe/USDX.git")
14106 (commit (string-append "v" version))))
14107 (file-name (git-file-name name version))
14108 (sha256
14109 (base32
14110 "009fbxdv4qkc15y4lisi6d4phv3dk9mypl2hhzfhyjh0i04d2wwa"))
14111 (patches (search-patches "ultrastar-deluxe-no-freesans.patch"))
14112 (modules '((guix build utils)))
14113 (snippet
14114 #~(begin
14115 ;; Remove Windows binaries.
14116 (for-each delete-file (find-files "game" "\\.dll$"))
14117 ;; Remove font blobs.
14118 (let ((font-directories
14119 (list "DejaVu" "FreeSans" "NotoSans"
14120 "wqy-microhei")))
14121 (for-each
14122 (lambda (d) (delete-file-recursively
14123 (string-append "game/fonts/" d)))
14124 font-directories))))))
14125 (build-system gnu-build-system)
14126 (arguments
14127 (list
14128 #:tests? #f ; No tests.
14129 #:phases
14130 #~(modify-phases %standard-phases
14131 (add-after 'unpack 'fix-configure
14132 (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
14133 (define (where inputs file)
14134 (dirname (search-input-file inputs file)))
14135 ;; The configure script looks for lua$version, but we
14136 ;; provide lua-$version.
14137 (substitute* "configure.ac"
14138 (("lua\\$i") "lua-$i"))
14139 ;; fpc does not pass -lfoo to the linker, but uses its own
14140 ;; linker script, which references libs. Pass the libraries
14141 ;; listed in that linker script, so our custom linker adds
14142 ;; a correct rpath.
14143 (substitute* "src/Makefile.in"
14144 (("linkflags\\s+:= ")
14145 (string-append
14146 "linkflags := -lpthread -lsqlite3 -lSDL2"
14147 " -lSDL2_image -ldl "
14148 " -lfreetype -lportaudio -lavcodec"
14149 " -lavformat -lavutil -lswresample"
14150 " -lswscale -llua -ldl -lX11 -lportmidi"
14151 " -L" (where inputs "lib/libX11.so")
14152 " -L" (where inputs "lib/libportmidi.so"))))))
14153 (add-after 'install 'font-paths
14154 (lambda* (#:key outputs #:allow-other-keys)
14155 (substitute* (string-append
14156 (assoc-ref outputs "out")
14157 "/share/ultrastardx/fonts/fonts.ini")
14158 (("=NotoSans/") (string-append "=" #$font-google-noto:ttf
14159 "/share/fonts/truetype/"))
14160 (("=DejaVu/") (string-append "=" #$font-dejavu
14161 "/share/fonts/truetype/"))))))))
14162 (inputs (list ffmpeg
14163 font-dejavu
14164 (list font-google-noto "ttf")
14165 ; Not needed, since we don’t have freesans.
14166 ;font-wqy-microhei
14167 freetype
14168 libx11
14169 lua
14170 portaudio
14171 portmidi
14172 sdl2
14173 sdl2-image
14174 sqlite))
14175 (native-inputs (list pkg-config fpc autoconf automake))
14176 (synopsis "Karaoke game")
14177 (description
14178 "UltraStar Deluxe (USDX) is a karaoke game. It allows up to six players
14179to sing along with music using microphones in order to score points, depending
14180on the pitch of the voice and the rhythm of singing.")
14181 (home-page "https://usdx.eu/")
14182 (license license:gpl2+)))
14183
14184(define-public xmahjongg
14185 (package
14186 (name "xmahjongg")
14187 (version "3.7")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (string-append "http://www.lcdf.org/xmahjongg/xmahjongg-"
14192 version ".tar.gz"))
14193 (sha256
14194 (base32 "1kzz8y34q7wibcrmfb3p9rrz88qriz4slxpf1yrrfny23il66g94"))))
14195 (build-system gnu-build-system)
14196 (inputs (list libx11))
14197 (home-page "http://www.lcdf.org/xmahjongg/")
14198 (synopsis "Solitaire Mah Jongg game")
14199 (description
14200 "Xmahjongg is a simple solitaire game. The object is to remove all Mah
14201Jongg tiles from the playing field by taking one matching pair at a time.")
14202 (license license:gpl2+)))
14203
14204(define-public sc-controller
14205 (package
14206 (name "sc-controller")
14207 (version "0.5.2")
14208 (source (origin
14209 (method git-fetch)
14210 (uri (git-reference
14211 (url "https://github.com/C0rn3j/sc-controller")
14212 (commit (string-append "v" version))))
14213 (file-name (git-file-name name version))
14214 (sha256
14215 (base32
14216 "1zczdaxf76n1h6v3daaml7zd2ga808sscfp4bhnagfvw8y3xbf63"))))
14217 (build-system pyproject-build-system)
14218 (arguments
14219 (list
14220 #:imported-modules `((guix build glib-or-gtk-build-system)
14221 ,@%pyproject-build-system-modules)
14222 #:modules '((guix build pyproject-build-system)
14223 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
14224 (guix build utils))
14225 #:phases #~(modify-phases %standard-phases
14226 (delete 'sanity-check)
14227 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
14228 (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file))
14229 (add-before 'build 'no-install-udev
14230 (lambda _
14231 ;; Installing udev rules errors out. Install them manually later
14232 (substitute* "setup.py"
14233 ((".*lib/udev.*") ""))))
14234 (add-after 'unpack 'remove-bundled-libraries
14235 (lambda _
14236 (delete-file "scc/lib/jsonencoder.py")
14237 (substitute* "scc/profile.py"
14238 (("from scc\\.lib\\.jsonencoder")
14239 "from simplejson"))))
14240 (add-after 'unpack 'fix-paths
14241 (lambda _
14242 (substitute* '("scc/lib/xwrappers.py"
14243 "scc/lib/eudevmonitor.py")
14244 (("libXfixes\\.so|libXext\\.so|libudev\\.so" library)
14245 (search-input-file %build-inputs (string-append "lib/" library))))
14246 (substitute* "scc/uinput.py"
14247 (("/usr/include")
14248 (string-append (assoc-ref %build-inputs
14249 "linux-libre-headers")
14250 "/include")))
14251 (substitute* '("scc/gui/app.py"
14252 "scc/osd/inputdisplay.py"
14253 "scc/paths.py")
14254 (("/usr/share/scc")
14255 (string-append #$output "/share/scc")))))
14256 (add-after 'install 'install-udev
14257 (lambda _
14258 (for-each
14259 (lambda (udev-rule)
14260 (install-file udev-rule
14261 (string-append
14262 #$output
14263 "/lib/udev/rules.d")))
14264 (find-files "./scripts" "\\.rules$"))))
14265 (add-after 'install 'glib-or-gtk-compile-schemas
14266 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
14267 (add-after 'wrap 'glib-or-gtk-wrap
14268 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
14269 (add-after 'glib-or-gtk-wrap 'gi-wrap
14270 (lambda _
14271 (let ((bin (string-append #$output "/bin")))
14272 (for-each (lambda (prog)
14273 (wrap-program prog
14274 `("GDK_PIXBUF_MODULE_FILE" =
14275 (,(getenv "GDK_PIXBUF_MODULE_FILE")))
14276 `("GI_TYPELIB_PATH" =
14277 (,(getenv "GI_TYPELIB_PATH")))))
14278 ;; Predicate regex so we don't wrap the existing wrappers
14279 (find-files bin "^[^.]"))))))))
14280 (inputs (list
14281 bash-minimal
14282 eudev
14283 gtk+
14284 gtk-layer-shell
14285 libxext
14286 libxfixes
14287 linux-libre-headers
14288 python-evdev
14289 python-ioctl-opt
14290 python-libusb1
14291 python-pycairo
14292 python-pygobject
14293 python-pylibacl
14294 python-simplejson
14295 python-vdf
14296 zlib))
14297 (native-inputs
14298 (list
14299 python-pytest
14300 python-setuptools
14301 python-setuptools-scm
14302 python-wheel))
14303 (home-page "https://github.com/Ryochan7/sc-controller")
14304 (synopsis "Driver and configuration tool for game controllers")
14305 (description
14306 "Driver and configuration tool for game controllers such as
14307the Steam Controller, Steam Deck, and Dual Shock 4. Install the included udev
14308rules to solve permissions issues.")
14309 (license (list
14310 license:cc0 ; images/*, default_profiles/*, profile_examples/*, default_menus/*
14311 license:zlib ; scripts/gamecontrollerdb.txt
14312 license:gpl2)))) ; everything else
14313
14314(define-public steam-devices-udev-rules
14315 ;; Last release from 2019-04-10
14316 (let ((commit "7dde9ecb3c386363ecd9bd0a3b77e4756d200704")
14317 (revision "2"))
14318 (package
14319 (name "steam-devices-udev-rules")
14320 (version (git-version "1.0.0.61" revision commit))
14321 (source (origin
14322 (method git-fetch)
14323 (uri (git-reference
14324 (url "https://github.com/ValveSoftware/steam-devices")
14325 (commit commit)))
14326 (file-name (git-file-name name version))
14327 (sha256
14328 (base32
14329 "0w0xkgi9fpvdbpl57f8fy2nwy2icm6iag39b8ifpkijlxgclx1p3"))))
14330 (build-system copy-build-system)
14331 (arguments
14332 '(#:install-plan '(("./" "lib/udev/rules.d"
14333 #:include-regexp ("rules$")))
14334 #:phases (modify-phases %standard-phases
14335 (add-after 'unpack 'patch-paths
14336 (lambda* (#:key inputs #:allow-other-keys)
14337 (substitute* "60-steam-input.rules"
14338 (("/bin/sh")
14339 (search-input-file inputs "/bin/sh"))
14340 (("udevadm")
14341 (search-input-file inputs "/bin/udevadm"))))))))
14342 (inputs (list eudev))
14343 (home-page "https://github.com/ValveSoftware/steam-devices")
14344 (synopsis "udev rules for game controllers and virtual reality devices")
14345 (description
14346 "This package provides a set of udev rules for game controllers and
14347virtual reality devices.")
14348 (license license:expat))))
14349
14350(define-public gemrb
14351 (package
14352 (name "gemrb")
14353 (version "0.9.4")
14354 (source
14355 (origin
14356 (method git-fetch)
14357 (uri (git-reference
14358 (url "https://github.com/gemrb/gemrb")
14359 (commit (string-append "v" version))))
14360 (file-name (git-file-name name version))
14361 (sha256
14362 (base32 "16pp9vw717pk9q8q3asxk4j64rmywbnpw91cr3qanwnmdi5p5gj4"))
14363 ;; Remove the patch in the next version, as commit cca8e71 fixes this
14364 (patches (search-patches
14365 "gemrb-remove-ifdef-and-externalize-path-setting-to-cmake.patch"))))
14366 (build-system cmake-build-system)
14367 (arguments
14368 (list
14369 #:configure-flags
14370 #~(list "-DUSE_TESTS=ON" "-DOPENGL_BACKEND=OpenGL")))
14371 (native-inputs (list python
14372 (libc-utf8-locales-for-target (%current-system))
14373 googletest))
14374 (inputs (list freetype
14375 libiconv
14376 libpng
14377 libvorbis
14378 openal
14379 sdl2
14380 sdl2-mixer
14381 vlc
14382 zlib))
14383 (home-page "https://gemrb.org/")
14384 (synopsis "Portable implementation of Bioware's Infinity Engine")
14385 (description
14386 "GemRB (Game Engine Made with preRendered Background) is a portable
14387reimplementation of the Infinity Engine that underpinned Baldur's Gate,
14388Icewind Dale and Planescape: Torment. It sports a cleaner design, greater
14389extensibility and several innovations.")
14390 (license license:gpl2+)))
14391
14392(define-public zeta
14393 (package
14394 (name "zeta")
14395 (version "1.1.4")
14396 (home-page "https://zeta.asie.pl/")
14397 (synopsis "ZZT and Super ZZT emulator")
14398 (description
14399 "An emulator implementing enough of @acronym{DOS, Disk Operating System}
14400to run ZZT and Super ZZT on modern systems.")
14401 (source
14402 (origin
14403 (method git-fetch)
14404 (uri (git-reference
14405 (url "https://github.com/asiekierka/zeta")
14406 (commit version)))
14407 (file-name (git-file-name name version))
14408 (sha256
14409 (base32 "0h7wnxn6rrlqbzgsbhhlx4lpb5apdr3bbxvp74y3axidkgs62bzf"))))
14410 (license (list license:expat))
14411
14412 (build-system gnu-build-system)
14413 (inputs
14414 (list
14415 libdecor
14416 libpng
14417 sdl3))
14418 (native-inputs
14419 (list
14420 autoconf
14421 automake
14422 pkg-config
14423 python
14424 python-pillow))
14425 (arguments
14426 '(#:configure-flags
14427 '("--with-frontend=sdl3"
14428 ;; Upstream requests c11, but the source uses strdup() /
14429 ;; strcasecmp(), which aren't in C11.
14430 "CFLAGS=-std=gnu11")))))
14431
14432;;;
14433;;; Avoid adding new packages to the end of this file. To reduce the chances
14434;;; of a merge conflict, place them above by existing packages with similar
14435;;; functionality or similar names.
14436;;;