1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
9 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
11 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
13 ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
14 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
15 ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
18 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
19 ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
20 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
21 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
22 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages game-development)
40 #:use-module (srfi srfi-1)
41 #:use-module (ice-9 match)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix svn-download)
47 #:use-module (guix utils)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system python)
51 #:use-module (guix build-system scons)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages audio)
54 #:use-module (gnu packages autotools)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages boost)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages curl)
59 #:use-module (gnu packages documentation)
60 #:use-module (gnu packages fltk)
61 #:use-module (gnu packages fonts)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages freedesktop)
64 #:use-module (gnu packages fribidi)
65 #:use-module (gnu packages dbm)
66 #:use-module (gnu packages gl)
67 #:use-module (gnu packages glib)
68 #:use-module (gnu packages gnome)
69 #:use-module (gnu packages gnunet)
70 #:use-module (gnu packages graphics)
71 #:use-module (gnu packages graphviz)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages guile)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages lua)
77 #:use-module (gnu packages m4)
78 #:use-module (gnu packages mono)
79 #:use-module (gnu packages mp3)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages music)
82 #:use-module (gnu packages ncurses)
83 #:use-module (gnu packages pcre)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages pulseaudio)
86 #:use-module (gnu packages python)
87 #:use-module (gnu packages python-xyz)
88 #:use-module (gnu packages qt)
89 #:use-module (gnu packages sdl)
90 #:use-module (gnu packages sphinx)
91 #:use-module (gnu packages stb)
92 #:use-module (gnu packages texinfo)
93 #:use-module (gnu packages textutils)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages video)
96 #:use-module (gnu packages web)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xorg))
102 (define-public bullet
109 (url "https://github.com/bulletphysics/bullet3/")
111 (file-name (git-file-name name version))
114 "10ncf2z474jnv7p5lv01ak2mk2hib3rj5rz1zr8v2v5pnciqbijl"))
115 (modules '((guix build utils)))
118 (for-each delete-file (find-files "build3" "premake*"))
119 (with-directory-excursion "examples/ThirdPartyLibs"
120 (for-each delete-file-recursively
121 '("Gwen" "clsocket" "enet" "glad" "imgui"
122 "lua-5.2.3" "midi" "minizip" "openvr"
123 "optionalX11" "serial" "zlib")))
124 ;; These need files from ThirdPartyLibs.
125 (substitute* "Extras/CMakeLists.txt"
126 (("BulletRobotics") ""))
127 ;; Tests fail on linking, cannot find -lBussIK.
128 (substitute* "test/CMakeLists.txt"
129 ((" InverseDynamics")
130 "../examples/ThirdPartyLibs/BussIK InverseDynamics"))
131 ; (("SharedMemory") ""))
133 (build-system cmake-build-system)
135 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
136 "-DBUILD_CPU_DEMOS=OFF"
137 "-DBUILD_OPENGL3_DEMOS=OFF"
138 "-DBUILD_BULLET2_DEMOS=OFF"
139 (string-append "-DCMAKE_CXX_FLAGS=-fPIC "
140 (or (getenv "CXXFLAGS") "")))
142 (modify-phases %standard-phases
143 (add-after 'unpack 'remove-failing-tests
144 ;; These tests fail specifically after removing 3rd party code.
146 (substitute* "test/SharedMemory/CMakeLists.txt"
147 (("ADD_TEST") "# ADD_TEST"))
148 (substitute* "test/InverseDynamics/CMakeLists.txt"
149 (("ADD_TEST\\(Test_BulletInverseForward")
150 "# ADD_TEST(Test_BulletInverseForward"))
156 (home-page "https://pybullet.org/wordpress/")
157 (synopsis "3D physics engine library")
159 "Bullet is a physics engine library usable for collision detection. It
160 is used in some video games and movies.")
161 (license license:zlib)))
163 (define-public deutex
169 (uri (string-append "https://github.com/Doom-Utils/deutex"
170 "/releases/download/v" version "/"
171 "deutex-" version ".tar.xz"))
174 "07w3asqxx89wl2wfv1z3cak8v83h3ys3b39mq9qq4gyf3xdhs76n"))))
175 (build-system gnu-build-system)
176 (native-inputs `(("asciidoc" ,asciidoc)))
177 (home-page "https://github.com/Doom-Utils/deutex")
178 (synopsis "WAD file composer for Doom and related games")
180 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
181 used to extract the lumps of a wad and save them as individual files.
182 Conversely, it can also build a wad from separate files. When extracting a
183 lump to a file, it does not just copy the raw data, it converts it to an
184 appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
185 Conversely, when it reads files for inclusion in pwads, it does the necessary
186 conversions (for example, from PPM to Doom picture format). In addition,
187 DeuTex has functions such as merging wads, etc.")
188 (license license:gpl2+)))
190 (define-public grfcodec
196 (uri (string-append "http://binaries.openttd.org/extra/"
197 name "/" version "/" name "-" version
201 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
202 (build-system gnu-build-system)
204 '(#:tests? #f ; no check target
206 (modify-phases %standard-phases
207 (delete 'configure) ; no configure script
208 (replace 'install ; no install target
209 (lambda* (#:key outputs #:allow-other-keys)
210 (let* ((out (assoc-ref outputs "out"))
211 (bin (string-append out "/bin"))
212 (doc (string-append out "/share/doc"))
213 (man (string-append out "/share/man/man1")))
214 (for-each (lambda (file)
215 (install-file file bin))
216 '("grfcodec" "grfid" "grfstrip" "nforenum"))
217 (install-file "COPYING" doc)
218 (with-directory-excursion "docs"
219 (for-each (lambda (file)
220 (install-file (string-append file ".txt") doc))
221 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
222 "readme" "readme.rpn"))
223 (for-each (lambda (file)
224 (install-file file man))
225 (find-files "." "\\.1"))))
231 (synopsis "GRF development tools")
233 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
234 tools for developing (New)GRFs. It includes a number of smaller programs, each
235 with a specific task:
237 @item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
238 @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
239 @item @code{grfstrip} strips all sprites from a GRF.
240 @item @code{nforenum} checks NFO code for errors, making corrections when
243 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
244 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
245 ;; NFORenum is under the GPL2+.
246 ;; The MD5 implementation contained in GRFID is under the zlib license.
247 (license (list license:gpl2 license:gpl2+ license:zlib))))
249 (define-public catcodec
256 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
257 version "/catcodec-" version "-source.tar.xz"))
260 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
261 (build-system gnu-build-system)
263 `(#:tests? #f ; no tests
264 #:make-flags (list (string-append "prefix=" %output))
265 #:phases (modify-phases %standard-phases
266 (delete 'configure))))
267 (home-page "http://dev.openttdcoop.org/projects/catcodec")
268 (synopsis "Encode/decode OpenTTD sounds")
269 (description "catcodec encodes and decodes sounds for OpenTTD. These
270 sounds are not much more than some metadata (description and filename) and raw
272 (license license:gpl2)))
274 (define-public gzochi
280 (uri (string-append "mirror://savannah/gzochi/gzochi-"
284 "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
285 (build-system gnu-build-system)
287 '(#:phases (modify-phases %standard-phases
288 (add-before 'build 'no-Werror
290 ;; Don't abort builds due to things like GLib
291 ;; deprecation warnings.
292 (substitute* (find-files "." "^Makefile\\.in$")
295 (native-inputs `(("pkgconfig" ,pkg-config)))
296 (inputs `(("bdb" ,bdb)
299 ("libmicrohttpd" ,libmicrohttpd)
303 (home-page "https://www.nongnu.org/gzochi/")
304 (synopsis "Scalable middleware for multiplayer games")
306 "gzochi is a framework for developing massively multiplayer online games.
307 A server container provides services to deployed games, which are written in
308 Guile Scheme, that abstract and simplify some of the most challenging and
309 error-prone aspects of online game development: Concurrency, data persistence,
310 and network communications. A very thin client library can be embedded to
311 provide connectivity for client applications written in any language.")
312 (license license:gpl3+)))
321 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
322 version "/nml-" version ".tar.gz"))
325 "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
326 (build-system python-build-system)
329 (modify-phases %standard-phases
330 (add-before 'build 'fix-pillow
332 ;; pillow's version is not in PIL.Image.VERSION anymore
333 (substitute* "nml/version_info.py"
334 (("from PIL import Image") "import PIL")
335 (("Image.VERSION") "PIL.__version__"))
338 `(("python-pillow" ,python-pillow)
339 ("python-ply" ,python-ply)))
340 (home-page "https://dev.openttdcoop.org/projects/nml")
341 (synopsis "NML compiler")
343 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
344 compiling NML files (along with their associated language, sound and graphic
345 files) into @file{.grf} and/or @file{.nfo} files.")
346 (license license:gpl2+)))
348 (define-public python-sge-pygame
350 (name "python-sge-pygame")
355 (uri (string-append "mirror://savannah/stellarengine/"
356 (version-major+minor version) "/sge-pygame-"
358 (file-name (string-append name "-" version ".tar.gz"))
361 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
362 (build-system python-build-system)
364 `(("python-pygame" ,python-pygame)
365 ("python-six" ,python-six)
366 ("python-uniseg" ,python-uniseg)))
367 (home-page "http://stellarengine.nongnu.org")
368 (synopsis "2D game engine for Python")
370 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
371 general-purpose 2D game engine. It takes care of several details for you so
372 you can focus on the game itself. This makes more rapid game development
373 possible, and it also makes the SGE easy to learn.")
374 (license license:lgpl3+)))
376 (define-public python2-sge-pygame
377 (package-with-python2 python-sge-pygame))
379 (define-public python-tmx
386 (uri (string-append "mirror://savannah/python-tmx/"
387 (version-major+minor version) "/tmx-"
391 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
392 (build-system python-build-system)
394 `(("python-six" ,python-six)))
395 (home-page "http://python-tmx.nongnu.org")
396 (synopsis "Python library for the @code{Tiled} TMX format")
398 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
399 This is useful for map editors or generic level editors, and it's also useful
400 for using a map editor or generic level editor like Tiled to edit your game's
402 (license (list license:asl2.0
403 ;; Documentation (only available in the source tarball) is
404 ;; under the CC0 license.
407 (define-public python2-tmx
408 (let ((python2-tmx (package-with-python2 python-tmx)))
410 (inherit python2-tmx)
412 `(("python2-pathlib" ,python2-pathlib)
413 ,@(package-propagated-inputs python2-tmx))))))
415 (define-public python-xsge
418 (version "2018.02.26")
421 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
425 "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
426 (build-system python-build-system)
429 (modify-phases %standard-phases
430 ;; xSGE's setup.py script does not support one of the Python build
431 ;; system's default flags, "--single-version-externally-managed".
433 (lambda* (#:key outputs #:allow-other-keys)
434 (invoke "python" "setup.py" "install"
435 (string-append "--prefix=" (assoc-ref outputs "out"))
437 #:tests? #f)) ; no check target
439 `(("python-sge-pygame" ,python-sge-pygame)
440 ("python-pygame" ,python-pygame)
441 ("python-six" ,python-six)
442 ("python-tmx" ,python-tmx)))
443 (home-page "http://xsge.nongnu.org")
444 (synopsis "Extensions for the SGE Game Engine")
446 "xSGE is a collection of modules that make doing certain tasks with the SGE
447 Game Engine easier. In addition to SGE's conveniences, the user has access to a
448 GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
450 (license license:gpl3+)))
452 (define-public python2-xsge
453 (package-with-python2 python-xsge))
462 (url "https://github.com/bjorn/tiled.git")
463 (commit (string-append "v" version))))
464 (file-name (git-file-name name version))
467 "14v2zfka2y3h0r0biw1rl59585lji5074x958s4xnb352jm5h9b9"))))
468 (build-system gnu-build-system)
474 `(("qttools" ,qttools)))
477 (modify-phases %standard-phases
479 (lambda* (#:key inputs outputs #:allow-other-keys)
480 (substitute* "translations/translations.pro"
482 (string-append "LRELEASE = "
483 (assoc-ref inputs "qttools")
485 (let ((out (assoc-ref outputs "out")))
487 (string-append "PREFIX=" out))))))))
488 (home-page "https://www.mapeditor.org/")
489 (synopsis "Tile map editor")
491 "Tiled is a general purpose tile map editor. It is meant to be used for
492 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
495 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
497 (license license:gpl2+)))
505 ;; Do not fetch the archives from
506 ;; http://mirror0.sfml-dev.org/files/ because files there seem
507 ;; to be changed in place.
509 (url "https://github.com/SFML/SFML.git")
511 (file-name (git-file-name name version))
514 "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
515 (modules '((guix build utils)))
518 ;; Ensure system libraries are used.
519 (delete-file-recursively "extlibs")
521 (build-system cmake-build-system)
524 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
525 "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
526 #:tests? #f)) ; no tests
528 `(("pkg-config" ,pkg-config)))
533 ("xcb-util-image" ,xcb-util-image)
534 ("libxrandr" ,libxrandr)
536 ("libjpeg" ,libjpeg-turbo)
537 ("libsndfile" ,libsndfile)
538 ("stb-image" ,stb-image)
539 ("stb-image-write" ,stb-image-write)))
541 ;; In Requires.private of pkg-config files.
543 ("freetype" ,freetype)
544 ("libvorbis" ,libvorbis)
546 (home-page "https://www.sfml-dev.org")
547 (synopsis "Simple and Fast Multimedia Library")
549 "SFML provides a simple interface to the various computer components,
550 to ease the development of games and multimedia applications. It is composed
551 of five modules: system, window, graphics, audio and network.")
552 (license license:zlib)))
560 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
563 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
564 (build-system gnu-build-system)
566 `(#:phases (modify-phases %standard-phases
567 (delete 'configure) ; no configure script
568 (add-before 'build 'patch-makefile
569 (lambda* (#:key outputs #:allow-other-keys)
570 (let ((out (assoc-ref outputs "out")))
571 (substitute* "Makefile"
572 (("\\$\\(DESTDIR\\)/usr") out))
573 (substitute* "main.cpp"
575 (string-append out "/share")))
577 #:tests? #f)) ; no tests
579 `(("pkg-config" ,pkg-config)
580 ("desktop-file-utils" ,desktop-file-utils)))
584 (synopsis "Simple sound effect generator")
585 (description "Sfxr is a tool for quickly generating simple sound effects.
586 Originally created for use in video game prototypes, it can generate random
587 sounds from presets such as \"explosion\" or \"powerup\".")
588 (home-page "http://www.drpetter.se/project_sfxr.html")
589 (license license:expat)))
591 (define-public surgescript
599 (url "https://github.com/alemart/surgescript.git")
600 (commit (string-append "v" version))))
601 (file-name (git-file-name name version))
603 (base32 "13q81439zg1bn7gskligskjgcfq0rdapp6f3llmrlk48vnyq49s0"))))
604 (build-system cmake-build-system)
607 (let ((share (string-append (assoc-ref %outputs "out") "/share")))
608 (list (string-append "-DICON_PATH=" share "/pixmaps")
609 (string-append "-DMETAINFO_PATH=" share "/metainfo")))
611 (home-page "https://docs.opensurge2d.org")
612 (synopsis "Scripting language for games")
613 (description "@code{SurgeScript} is a dynamically typed object-oriented
614 scripting language designed for games. Each object is a state machine that
615 can be customized by attaching other objects. The language supports automatic
616 garbage collection and can be extended with plugins.")
617 (license license:asl2.0)))
619 (define-public physfs
626 "https://icculus.org/physfs/downloads/physfs-"
628 (file-name (string-append name "-" version ".tar.gz"))
631 "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h"))))
632 (build-system cmake-build-system)
634 '(#:tests? #f ; no check target
635 #:phases (modify-phases %standard-phases
636 (add-after 'unpack 'patch-CMakeLists.txt
638 (substitute* "CMakeLists.txt"
639 ;; XXX: For some reason CMakeLists.txt disables
640 ;; RUNPATH manipulation when the compiler is GCC.
641 (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
646 `(("doxygen" ,doxygen)))
647 (home-page "https://icculus.org/physfs")
648 (synopsis "File system abstraction library")
650 "PhysicsFS is a library to provide abstract access to various archives.
651 It is intended for use in video games. For security, no file writing done
652 through the PhysicsFS API can leave a defined @emph{write directory}. For
653 file reading, a @emph{search path} with archives and directories is defined,
654 and it becomes a single, transparent hierarchical file system. So archive
655 files can be accessed in the same way as you access files directly on a disk,
656 and it makes it easy to ship a new archive that will override a previous
657 archive on a per-file basis.")
658 (license license:zlib)))
666 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
667 "love-" version "-linux-src.tar.gz"))
670 "0m8lvlabmcchskx4qpzkdlsm44360f3j0q3vvvj2388cfnvhv7v4"))))
671 (build-system gnu-build-system)
673 `(("pkg-config" ,pkg-config)))
676 ("freetype" ,freetype)
677 ("libmodplug" ,libmodplug)
678 ("libtheora" ,libtheora)
679 ("libvorbis" ,libvorbis)
687 (synopsis "2D game framework for Lua")
688 (description "LÖVE is a framework for making 2D games in the Lua
689 programming language.")
690 (home-page "https://love2d.org/")
691 (license license:zlib)))
693 (define-public love-nuklear
694 (let ((version "v2.6")
695 (commit "fef4e00a602efb16c57ae962850b6e7a01f7a29a"))
697 (name "love-nuklear")
698 (version (git-version version "1" commit))
702 (url "https://github.com/keharriso/love-nuklear/")
705 ;; NOTE: the HEAD of the Nuklear git-submodule is at commit
706 ;; "adc52d710fe3c87194b99f540c53e82eb75c2521" of Oct 1 2019
707 (file-name (git-file-name name version))
710 "15qmy8mfwkxy2x9rmxs6f9cyvjvwwj6yf78bs863xmc56dmjzzbn"))))
711 (build-system cmake-build-system)
713 `(#:build-type "Release"
716 `(("luajit" ,luajit)))
717 (synopsis "Lightweight immediate mode GUI for LÖVE games")
718 (description "LÖVE is a Lua framework for making 2D games. Nuklear
719 is a minimal state immediate mode graphical user interface toolkit. This
720 package is the Nuklear bindings for LÖVE created by Kevin Harrison.")
721 (home-page "https://github.com/keharriso/love-nuklear/")
722 (license license:expat))))
724 (define-public allegro-4
730 (uri (string-append "https://github.com/liballeg/allegro5/"
731 "releases/download/" version "/allegro-"
735 "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y"))))
736 (build-system cmake-build-system)
739 (modify-phases %standard-phases
740 (add-after 'unpack 'patch-build-system
742 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
743 ;; via a command line option doesn't work because it is
744 ;; unconditionally clobbered in the build script.
745 (substitute* '("CMakeLists.txt")
746 (("ADDON_LINKAGE STATIC")
747 "ADDON_LINKAGE SHARED"))
752 ("libvorbis" ,libvorbis)
755 (synopsis "Game programming library")
756 (description "Allegro is a library mainly aimed at video game and
757 multimedia programming. It handles common, low-level tasks such as creating
758 windows, accepting user input, loading data, drawing images, playing sounds,
760 (home-page "https://liballeg.org")
761 (license license:giftware)))
763 (define-public allegro
769 (uri (string-append "https://github.com/liballeg/allegro5/releases"
770 "/download/" version "/allegro-"
774 "06dpkfnac8w3pq36834nn2iij3ajz6prladqd0w92lq39aiqv5jr"))))
775 (build-system cmake-build-system)
776 (arguments `(#:tests? #f)) ; there are no tests
778 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
780 ("freetype" ,freetype)
783 ("libjpeg" ,libjpeg-turbo)
785 ("libtheora" ,libtheora)
786 ("libvorbis" ,libvorbis)
787 ("libxcursor" ,libxcursor)
788 ("libxinerama" ,libxinerama)
789 ("libxrandr" ,libxrandr)
795 `(("pkg-config" ,pkg-config)))
796 (synopsis "Game programming library")
797 (description "Allegro is a library mainly aimed at video game and
798 multimedia programming. It handles common, low-level tasks such as creating
799 windows, accepting user input, loading data, drawing images, playing sounds,
801 (home-page "https://liballeg.org")
802 (license license:bsd-3)))
804 (define-public allegro-5.0
805 (package (inherit allegro)
810 (uri (string-append "https://github.com/liballeg/allegro5/releases"
811 "/download/" version "/allegro-"
812 (if (equal? "0" (string-take-right version 1))
813 (string-drop-right version 2)
816 (patches (search-patches
817 "allegro-mesa-18.2.5-and-later.patch"))
820 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
822 (define-public aseprite
825 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
826 ;; TODO: Unbundle third party software.
828 (method url-fetch/zipbomb)
829 (uri (string-append "https://github.com/aseprite/aseprite"
830 "/releases/download/v" version
831 "/Aseprite-v" version "-Source.zip"))
834 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
835 (build-system cmake-build-system)
838 ;; Use shared libraries instead of building bundled source.
839 (list "-DWITH_WEBP_SUPPORT=1"
840 "-DUSE_SHARED_CURL=1"
841 "-DUSE_SHARED_GIFLIB=1"
842 "-DUSE_SHARED_JPEGLIB=1"
843 "-DUSE_SHARED_ZLIB=1"
844 "-DUSE_SHARED_LIBPNG=1"
845 "-DUSE_SHARED_LIBLOADPNG=1"
846 "-DUSE_SHARED_LIBWEBP=1"
847 "-DUSE_SHARED_TINYXML=1"
848 "-DUSE_SHARED_PIXMAN=1"
849 "-DUSE_SHARED_FREETYPE=1"
850 "-DUSE_SHARED_ALLEGRO4=1"
851 "-DENABLE_UPDATER=0" ; no auto-updates
852 (string-append "-DFREETYPE_INCLUDE_DIR="
853 (assoc-ref %build-inputs "freetype")
854 "/include/freetype2"))))
856 `(("pkg-config" ,pkg-config)))
857 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
858 ;; patched version is bundled with Aseprite, but the patches should be
859 ;; extracted and applied on top of a standalone Allegro 4 package.
861 `(("allegro" ,allegro-4)
863 ("freetype" ,freetype)
865 ("libjpeg" ,libjpeg-turbo)
870 ("libxxf86vm" ,libxxf86vm)
874 (synopsis "Animated sprite editor and pixel art tool")
875 (description "Aseprite is a tool for creating 2D pixel art for video
876 games. In addition to basic pixel editing features, Aseprite can assist in
877 the creation of animations, tiled graphics, texture atlases, and more.")
878 (home-page "https://www.aseprite.org/")
879 (license license:gpl2+)))
881 (define-public qqwing
888 "https://qqwing.com/"
889 name "-" version ".tar.gz"))
892 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
893 (build-system gnu-build-system)
895 `(("pkg-config" ,pkg-config)))
896 (home-page "https://qqwing.com/")
897 (synopsis "Sudoku puzzle solver and generator")
899 "QQWing is a Sudoku puzzle generator and solver.
900 It offers the following features:
902 @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
903 @item Uses logic. Uses as many solve techniques as possible when solving
904 puzzles rather than guessing.
905 @item Rates puzzles. Most generators don't give an indication of the difficulty
906 of a Sudoku puzzle. QQwing does.
907 @item Can print solve instructions for any puzzle.
908 @item Customizable output style, including a CSV style that is easy to
909 import into a database.
911 (license license:gpl2+)))
913 (define-public quesoglc
919 (uri (string-append "mirror://sourceforge/" name "/" version "/"
920 name "-" version "-free.tar.bz2"))
923 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
924 (build-system gnu-build-system)
925 (native-inputs `(("pkg-config" ,pkg-config)))
926 (inputs `(("fontconfig" ,fontconfig)
927 ("freeglute" ,freeglut)
930 (home-page "http://quesoglc.sourceforge.net")
931 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
933 "The OpenGL Character Renderer (GLC) is a state machine that provides
934 OpenGL programs with character rendering services via an application programming
936 (license (list license:expat license:lgpl2.1+))))
938 (define-public python-pygame
940 (name "python-pygame")
944 (uri (pypi-uri "pygame" version))
947 "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh"))))
948 (build-system python-build-system)
950 `(#:tests? #f ; tests require pygame to be installed first
952 (modify-phases %standard-phases
953 ;; Set the paths to the dependencies manually because
954 ;; the configure script does not allow passing them as
955 ;; parameters. This also means we can skip the configure
957 (add-before 'build 'set-library-paths
958 (lambda* (#:key inputs outputs #:allow-other-keys)
959 (let ((sdl-ref (assoc-ref inputs "sdl"))
960 (font-ref (assoc-ref inputs "sdl-ttf"))
961 (image-ref (assoc-ref inputs "sdl-image"))
962 (mixer-ref (assoc-ref inputs "sdl-mixer"))
963 (smpeg-ref (assoc-ref inputs "libsmpeg"))
964 (png-ref (assoc-ref inputs "libpng"))
965 (jpeg-ref (assoc-ref inputs "libjpeg"))
966 (freetype-ref (assoc-ref inputs "freetype"))
967 (v4l-ref (assoc-ref inputs "v4l-utils"))
968 (out-ref (assoc-ref outputs "out")))
969 (substitute* "Setup.in"
970 (("SDL = -I/usr/include/SDL")
971 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
972 (substitute* "Setup.in"
973 (("FONT = -lSDL_ttf")
974 (string-append "FONT = -I" font-ref "/include/SDL -L"
975 font-ref "/lib -lSDL_ttf")))
976 (substitute* "Setup.in"
977 (("IMAGE = -lSDL_image")
978 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
979 image-ref "/lib -lSDL_image")))
980 (substitute* "Setup.in"
981 (("MIXER = -lSDL_mixer")
982 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
983 mixer-ref "/lib -lSDL_mixer")))
984 (substitute* "Setup.in"
986 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
987 smpeg-ref "/lib -lsmpeg")))
988 (substitute* "Setup.in"
990 (string-append "PNG = -I" png-ref "/include -L"
991 png-ref "/lib -lpng")))
992 (substitute* "Setup.in"
994 (string-append "JPEG = -I" jpeg-ref "/include -L"
995 jpeg-ref "/lib -ljpeg")))
997 (substitute* "Setup.in"
998 (("FREETYPE = -lfreetype")
999 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
1000 freetype-ref "/lib -lfreetype")))
1002 (substitute* "Setup.in"
1003 (("^pypm") "#pypm"))
1004 ;; Create a path to a header file provided by v4l-utils.
1005 (system* "mkdir" "linux")
1006 (system* "ln" "--symbolic"
1007 (string-append v4l-ref "/include/libv4l1-videodev.h")
1009 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
1011 `(("freetype" ,freetype)
1013 ("sdl-image" ,sdl-image)
1014 ("sdl-mixer" ,sdl-mixer)
1015 ("sdl-ttf" ,sdl-ttf)
1016 ("sdl-gfx" ,sdl-gfx)
1017 ("libjpeg" ,libjpeg-turbo)
1020 ("libsmpeg" ,libsmpeg)
1021 ("portmidi" ,portmidi)
1022 ("v4l-utils" ,v4l-utils)))
1023 (home-page "https://www.pygame.org")
1024 (synopsis "SDL wrapper for Python")
1025 (description "Pygame is a set of Python modules designed for writing games.
1026 Pygame adds functionality on top of the excellent SDL library. This allows you
1027 to create fully featured games and multimedia programs in the python language.")
1028 (license (list license:bsd-2
1029 ;; python numeric license as listed by Debian looks like
1030 ;; an Expat-style license with a warranty disclaimer for
1031 ;; the U.S. government and the University of California.
1037 license:public-domain
1038 license:lgpl2.1+))))
1040 (define-public python2-pygame
1041 (package-with-python2 python-pygame))
1043 (define-public python2-pygame-sdl2
1044 (let ((real-version "2.1.0")
1045 (renpy-version "7.3.5"))
1047 (inherit python2-pygame)
1048 (name "python2-pygame-sdl2")
1049 (version (string-append real-version "-for-renpy-" renpy-version))
1053 (uri (string-append "https://www.renpy.org/dl/" renpy-version
1054 "/pygame_sdl2-" version ".tar.gz"))
1055 (sha256 (base32 "1bmr7j9mlsc4czpgw70ld15ymyp4wxrk9hdsqad40wjwdxvvg2dr"))))
1056 (build-system python-build-system)
1058 `(#:tests? #f ; tests require pygame to be installed first
1061 (modify-phases %standard-phases
1062 (add-after 'set-paths 'set-sdl-vars
1063 (lambda* (#:key inputs #:allow-other-keys)
1064 (setenv "PYGAME_SDL2_CFLAGS"
1066 (assoc-ref inputs "sdl-union")
1067 "/include/SDL2 -D_REENTRANT"))
1068 (setenv "PYGAME_SDL2_LDFLAGS"
1070 (assoc-ref inputs "sdl-union")
1072 (assoc-ref inputs "sdl-union")
1073 "/lib -Wl,--enable-new-dtags -lSDL2"))
1075 (add-before 'build 'drop-generated-files
1077 (delete-file-recursively "gen")
1078 (delete-file-recursively "gen3")
1082 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
1084 `(("python2-cython" ,python2-cython)))
1085 (home-page "http://www.renpy.org/")
1086 (synopsis "Reimplementation of the Pygame API using SDL2")
1087 (description "Pygame_SDL2 reimplements the Pygame API using SDL2,
1088 staying close to the original, but also adding some SDL2-specific features.
1089 While it aims to be used as a drop-in replacement, it appears to be
1090 developed mainly for Ren'py.")
1091 (license (list license:lgpl2.1 license:zlib)))))
1093 (define-public python2-renpy
1095 (name "python2-renpy")
1100 (uri (string-append "https://www.renpy.org/dl/" version
1101 "/renpy-" version "-source.tar.bz2"))
1102 (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4"))))
1103 (build-system python-build-system)
1105 `(#:tests? #f ; Ren'py doesn't seem to package tests
1108 (modify-phases %standard-phases
1109 (add-after 'unpack 'fix-commands
1111 (substitute* "renpy/editor.py"
1113 (which "xdg-open")))
1115 (add-after 'set-paths 'set-build-vars
1116 (lambda* (#:key inputs #:allow-other-keys)
1117 (setenv "RENPY_CYTHON"
1118 (string-append (assoc-ref inputs "python2-cython")
1120 (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":"))
1123 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
1124 ;; The "module" subdirectory contains a python (really cython)
1125 ;; project, which is built using a script, that is thankfully
1126 ;; named "setup.py".
1127 (with-directory-excursion "module"
1128 (apply (assoc-ref %standard-phases 'build) args))
1129 ;; the above causes renpy.__init__ to be compiled but does not
1130 ;; compile anything else, hence we do that here
1131 (delete-file "renpy/__init__.pyc")
1132 (invoke "python" "-m" "compileall" "renpy")
1135 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
1136 ;; Again, we have to wrap the module installation.
1137 ;; Additionally, we want to install the python code
1138 ;; (both source and compiled) in the same directory.
1139 (let* ((out (assoc-ref outputs "out"))
1140 (site (string-append "/lib/python"
1141 ,(version-major+minor
1142 (package-version python-2))
1144 (with-directory-excursion "module"
1145 (apply (assoc-ref %standard-phases 'install) args))
1146 (copy-recursively "renpy"
1147 (string-append out site "/renpy")))
1150 `(("ffmpeg" ,ffmpeg)
1151 ("freetype" ,freetype)
1154 ("python2-pygame" ,python2-pygame-sdl2)
1156 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
1158 `(("python2-cython" ,python2-cython)
1159 ("xdg-utils" ,xdg-utils)))
1160 (home-page "http://www.renpy.org/")
1161 (synopsis "Ren'py python module")
1162 (description "This package contains the shared libraries and Python
1163 modules of Ren'py.")
1164 (license license:expat)))
1166 (define-public renpy
1168 (inherit python2-renpy)
1171 (build-system python-build-system)
1173 `(#:tests? #f ; see python2-renpy
1176 (modify-phases %standard-phases
1177 (add-after 'unpack 'fix-commands
1178 (lambda* (#:key outputs #:allow-other-keys)
1179 (substitute* "launcher/game/choose_directory.rpy"
1180 (("/usr/bin/python") (which "python2")))
1181 (substitute* "launcher/game/front_page.rpy"
1183 (which "xdg-open")))
1184 (substitute* "launcher/game/project.rpy"
1185 (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]")
1186 (string-append "cmd = [ \"" (assoc-ref outputs "out")
1188 ;; Projects are still created in the usual style, so we need
1189 ;; to adjust the path.
1190 (("cmd.append\\(self.path\\)")
1191 "cmd.append(self.path + \"/game\")"))
1193 (add-after 'unpack 'drop-game-from-paths
1195 (substitute* (list "launcher/game/gui7.rpy"
1196 "launcher/game/gui7/images.py")
1197 ((", \"game\",") ","))
1199 (add-before 'build 'start-xserver
1200 (lambda* (#:key inputs #:allow-other-keys)
1201 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1202 (setenv "HOME" (getcwd))
1203 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
1204 (setenv "DISPLAY" ":1")
1208 (invoke "python" "renpy.py" "launcher" "quit")
1209 (invoke "python" "renpy.py" "the_question" "quit")
1210 (invoke "python" "renpy.py" "tutorial" "quit")
1213 (lambda* (#:key inputs outputs #:allow-other-keys)
1214 ;; Here we install our custom renpy program.
1215 ;; After finishing this step, "out" will have the following:
1217 ;; `-- share/renpy ; i.e. path_to_renpy_base()
1220 ;; Note that common is also a de facto unused directory in
1221 ;; python2-renpy. On other systems, renpy_base would point to
1222 ;; site-packages or even somewhere in /opt.
1223 ;; The former approach is not as straightforward as it seems
1224 ;; -- it causes renpy to load files twice for some weird reason --
1225 ;; and the latter is impossible on Guix. Hence the detour through
1226 ;; share/renpy and the custom renpy program.
1228 ;; As a convention, other games should be installed as
1229 ;; subdirectories of share/renpy in their respective outputs as
1230 ;; well. This differs from the traditional layout, which is
1231 ;; roughly the following:
1232 ;; `-- Super Awesome Game
1233 ;; |-- game ; <- the folder we actually want
1234 ;; |-- lib ; compiled renpy module and dependencies
1235 ;; |-- renpy ; Ren'py python code (source + compiled)
1236 ;; |-- Super Awesome Game.py
1237 ;; `-- Super Awesome Game.sh
1238 (let* ((out (assoc-ref outputs "out"))
1239 (bin/renpy (string-append out "/bin/renpy")))
1240 (mkdir-p (string-append out "/bin"))
1241 (copy-recursively "renpy/common"
1242 (string-append out "/share/renpy/common"))
1243 (copy-recursively "gui"
1244 (string-append out "/share/renpy/gui"))
1246 (call-with-output-file bin/renpy
1248 (format port "#!~a~%" (which "python2"))
1250 from __future__ import print_function
1256 def path_to_common(renpy_base):
1257 return renpy_base + \"/common\"
1259 def path_to_saves(gamedir, save_directory=None):
1260 import renpy # @UnresolvedImport
1262 if save_directory is None:
1263 save_directory = renpy.config.save_directory
1264 save_directory = renpy.exports.fsencode(save_directory)
1266 if not save_directory:
1267 return gamedir + \"/saves\"
1269 return os.path.expanduser(\"~~/.renpy/\" + save_directory)
1271 def path_to_renpy_base():
1275 renpy_base = path_to_renpy_base()
1277 import renpy.bootstrap
1278 import renpy.arguments
1280 print(\"\"\"Could not import renpy.bootstrap.
1281 Please ensure you decompressed Ren'Py correctly, preserving the directory
1282 structure.\"\"\", file=sys.stderr)
1285 args = renpy.arguments.bootstrap()
1286 if not args.basedir:
1287 print(\"\"\"This Ren'py requires a basedir to launch.
1288 The basedir is the directory, in which .rpy files live -- usually the 'game'
1289 subdirectory of a game packaged by Ren'py.
1291 If you want the Ren'py launcher, use renpy-launcher instead.\"\"\",
1295 renpy.bootstrap.bootstrap(renpy_base)
1297 if __name__ == \"__main__\":
1300 (string-append out "/share/renpy"))))
1301 (chmod bin/renpy #o755)
1304 (add-after 'install 'install-games
1305 (lambda* (#:key outputs #:allow-other-keys)
1306 (define renpy (assoc-ref outputs "out"))
1307 ;; TODO: We should offer a renpy-build-system to make the
1308 ;; installation of Ren'py games easier.
1309 (define* (install-renpy-game #:key output game name (renpy renpy)
1311 (let* ((name (or name (basename game)))
1312 (launcher (string-append output "/bin/renpy-" name))
1313 (share (string-append output "/share/renpy/" name)))
1314 (copy-recursively (string-append game "/game") share)
1315 (mkdir-p (string-append output "/bin"))
1316 (with-output-to-file launcher
1319 "#!~a~%~a ~a \"$@\""
1321 (string-append renpy "/bin/renpy")
1323 (chmod launcher #o755)))
1325 (install-renpy-game #:output (assoc-ref outputs "out")
1328 (install-renpy-game #:output (assoc-ref outputs "the-question")
1329 #:game "the_question"
1330 #:name "the-question")
1332 (install-renpy-game #:output (assoc-ref outputs "tutorial")
1336 (lambda* (#:key inputs outputs #:allow-other-keys)
1337 (wrap-program (string-append (assoc-ref outputs "out")
1339 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
1342 `(("python2-tkinter" ,python-2 "tk")
1343 ("python2-pygame" ,python2-pygame-sdl2)
1344 ("python2-renpy" ,python2-renpy)
1345 ("xorg-server" ,xorg-server)))
1347 (list "out" "tutorial" "the-question"))
1348 (home-page "http://www.renpy.org/")
1349 (synopsis "Visual Novel Engine")
1350 (description "Ren'Py is a visual novel engine that helps you use words,
1351 images, and sounds to tell interactive stories that run on computers and
1352 mobile devices. These can be both visual novels and life simulation games.
1353 The easy to learn script language allows anyone to efficiently write large
1354 visual novels, while its Python scripting is enough for complex simulation
1356 (license license:expat)))
1358 (define-public grafx2
1364 ;; XXX: There is no URL that contains the version. :(
1365 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
1368 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
1369 (build-system gnu-build-system)
1372 (modify-phases %standard-phases
1373 (delete 'configure) ; no configure script
1374 (add-before 'build 'change-to-src-directory
1379 ;; SDL header files are referenced without the preceeding "SDL/".
1380 (list (string-append "CFLAGS=-I"
1381 (assoc-ref %build-inputs "sdl-union")
1383 (string-append "prefix="
1384 (assoc-ref %outputs "out")))
1385 #:tests? #f)) ; no check target
1387 `(("pkg-config" ,pkg-config)))
1389 `(("libpng" ,libpng)
1391 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
1392 (synopsis "Bitmap paint program")
1393 (description "GrafX2 is a bitmap paint program inspired by the Amiga
1394 programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
1395 includes a very large number of tools and effects that make it particularly
1396 suitable for pixel art, game graphics, and generally any detailed graphics
1397 painted with a mouse.")
1398 (home-page "http://pulkomandy.tk/projects/GrafX2")
1399 (license license:gpl2))) ; GPLv2 only
1409 (url "https://github.com/wgois/OIS.git")
1410 (commit (string-append "v" version))))
1411 (file-name (git-file-name name version))
1413 (base32 "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa"))))
1414 (build-system cmake-build-system)
1416 `(#:tests? #f)) ; no test suite
1418 `(("libx11" ,libx11)))
1419 (synopsis "Object Oriented Input System")
1421 "Cross Platform Object Oriented Input Lib System is a cross platform,
1422 simple solution for using all kinds of Input Devices (Keyboards, Mice,
1423 Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
1424 robust and compatible with many systems and operating systems.")
1425 (home-page "https://github.com/wgois/OIS")
1426 (license license:zlib)))
1428 (define-public mygui
1436 (url "https://github.com/MyGUI/mygui")
1437 (commit (string-append "MyGUI" version))))
1438 (file-name (git-file-name name version))
1441 "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw"))))
1442 (build-system cmake-build-system)
1444 '(#:tests? #f ; No test target
1446 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1447 (string-append "-DOGRE_INCLUDE_DIR="
1448 (assoc-ref %build-inputs "ogre")
1450 ;; Demos and tools are Windows-specific:
1451 ;; https://github.com/MyGUI/mygui/issues/24.
1452 "-DMYGUI_BUILD_DEMOS=FALSE"
1453 "-DMYGUI_BUILD_TOOLS=FALSE")))
1456 ("doxygen" ,doxygen)
1457 ("pkg-config" ,pkg-config)))
1459 `(("font-dejavu" ,font-dejavu)
1460 ("freetype" ,freetype)
1461 ("graphviz" ,graphviz)
1465 (synopsis "Fast, flexible and simple GUI")
1467 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1468 and 3D applications. The main goals of mygui are: speed, flexibility and ease
1470 (home-page "http://mygui.info/")
1471 (license license:expat)))
1473 (define-public mygui-gl
1474 ;; Closure size is reduced by some 800 MiB.
1480 (substitute-keyword-arguments (package-arguments mygui)
1481 ((#:configure-flags _)
1482 `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL.
1483 ;; We can't reuse the flags because of the mention to Ogre.
1484 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1485 ;; Demos and tools are Windows-specific:
1486 ;; https://github.com/MyGUI/mygui/issues/24.
1487 "-DMYGUI_BUILD_DEMOS=FALSE"
1488 "-DMYGUI_BUILD_TOOLS=FALSE")))))
1492 ,@(fold alist-delete (package-inputs mygui)
1494 (synopsis "Fast, flexible and simple GUI (OpenGL backend)")))
1496 (define-public openmw
1504 (string-append "https://github.com/OpenMW/openmw/archive/"
1505 "openmw-" version ".tar.gz"))
1508 "0r0wgvv1faan8z8lbply8lks4hcnppifjrcz04l5zvq6yiqzjg5n"))))
1509 (build-system cmake-build-system)
1511 `(#:tests? #f ; No test target
1513 (list "-DDESIRED_QT_VERSION=5")))
1516 ("doxygen" ,doxygen)
1517 ("pkg-config" ,pkg-config)))
1519 `(("bullet" ,bullet)
1522 ("mygui" ,mygui-gl) ; OpenMW does not need Ogre.
1524 ("openscenegraph" ,openmw-openscenegraph)
1527 ("unshield" ,unshield)))
1528 (synopsis "Re-implementation of the RPG Morrowind engine")
1530 "OpenMW is a game engine which reimplements and extends the one that runs
1531 the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1532 called OpenMW-CS which allows the user to edit or create their own original
1534 (home-page "https://openmw.org")
1535 (license license:gpl3)))
1537 (define-public godot
1544 (url "https://github.com/godotengine/godot")
1545 (commit (string-append version "-stable"))))
1546 (file-name (git-file-name name version))
1549 "1kndls0rklha7kz9l4i2ivjxab4jpk3b2j7dcgcg2qc3s81yd0r6"))
1550 (modules '((guix build utils)
1555 ;; Keep only those bundled files we have not (yet) replaced
1556 ;; with Guix versions. Note that some of these may be
1557 ;; modified; see "thirdparty/README.md".
1558 (with-directory-excursion "thirdparty"
1559 (let* ((preserved-files
1580 (for-each delete-file-recursively
1581 (lset-difference string=?
1583 (cons* "." ".." preserved-files)))))
1585 (build-system scons-build-system)
1587 `(#:scons ,scons-python2
1588 #:scons-flags (list "platform=x11" "target=release_debug"
1589 ;; Avoid using many of the bundled libs.
1590 ;; Note: These options can be found in the SConstruct file.
1592 "builtin_freetype=no"
1594 "builtin_libmpdec=no"
1597 "builtin_libtheora=no"
1598 "builtin_libvorbis=no"
1600 "builtin_libwebp=no"
1601 "builtin_mbedtls=no"
1607 #:tests? #f ; There are no tests
1609 (modify-phases %standard-phases
1610 (add-after 'unpack 'scons-use-env
1612 ;; Scons does not use the environment variables by default,
1613 ;; but this substitution makes it do so.
1614 (substitute* "SConstruct"
1615 (("env_base = Environment\\(tools=custom_tools\\)")
1617 "env_base = Environment(tools=custom_tools)\n"
1618 "env_base = Environment(ENV=os.environ)")))
1620 ;; Build headless tools, used for packaging games without depending on X.
1621 (add-after 'build 'build-headless
1622 (lambda* (#:key scons-flags #:allow-other-keys)
1623 (apply invoke "scons"
1624 `(,(string-append "-j" (number->string (parallel-job-count)))
1625 "platform=server" ,@(delete "platform=x11" scons-flags)))))
1627 (lambda* (#:key inputs outputs #:allow-other-keys)
1628 (let* ((out (assoc-ref outputs "out"))
1629 (headless (assoc-ref outputs "headless"))
1630 (zenity (assoc-ref inputs "zenity")))
1631 ;; Strip build info from filenames.
1632 (with-directory-excursion "bin"
1635 (let ((dest (car (string-split (basename file) #\.))))
1636 (rename-file file dest)))
1637 (find-files "." "godot.*\\.x11\\.opt\\.tools.*"))
1638 (install-file "godot" (string-append out "/bin"))
1639 (install-file "godot_server" (string-append headless "/bin")))
1640 ;; Tell the editor where to find zenity for OS.alert().
1641 (wrap-program (string-append out "/bin/godot")
1642 `("PATH" ":" prefix (,(string-append zenity "/bin")))))
1644 (add-after 'install 'install-godot-desktop
1645 (lambda* (#:key outputs #:allow-other-keys)
1646 (let* ((out (assoc-ref outputs "out"))
1647 (applications (string-append out "/share/applications"))
1648 (icons (string-append out "/share/icons/hicolor")))
1649 (mkdir-p applications)
1650 (copy-file "misc/dist/linux/org.godotengine.Godot.desktop"
1651 (string-append applications "/godot.desktop"))
1652 (for-each (lambda (icon dest)
1653 (mkdir-p (dirname dest))
1654 (copy-file icon dest))
1655 '("icon.png" "icon.svg")
1656 `(,(string-append icons "/256x256/apps/godot.png")
1657 ,(string-append icons "/scalable/apps/godot.svg"))))
1659 (outputs '("out" "headless"))
1660 (native-inputs `(("pkg-config" ,pkg-config)))
1661 (inputs `(("alsa-lib" ,alsa-lib)
1663 ("freetype" ,freetype)
1666 ("libtheora" ,libtheora)
1667 ("libvorbis" ,libvorbis)
1669 ("libwebp" ,libwebp)
1671 ("libxcursor" ,libxcursor)
1673 ("libxinerama" ,libxinerama)
1674 ("libxrandr" ,libxrandr)
1675 ("mbedtls" ,mbedtls-apache)
1677 ("opusfile" ,opusfile)
1679 ("pulseaudio" ,pulseaudio)
1682 ("zstd" ,zstd "lib")))
1683 (home-page "https://godotengine.org/")
1684 (synopsis "Advanced 2D and 3D game engine")
1686 "Godot is an advanced multi-platform game engine written in C++. If
1687 features design tools such as a visual editor, can import 3D models and
1688 provide high-quality 3D rendering, it contains an animation editor, and can be
1689 scripted in a Python-like language.")
1690 (license license:expat)))
1692 (define-public eureka
1698 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1700 ;; version without dots e.g 1.21 => 121
1701 (string-join (string-split version #\.) "")
1705 "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v"))))
1706 (build-system gnu-build-system)
1710 (let ((out (assoc-ref %outputs "out")))
1711 (list (string-append "PREFIX=" out)))
1713 (modify-phases %standard-phases
1715 (add-before 'build 'prepare-install-directories
1716 (lambda* (#:key outputs #:allow-other-keys)
1717 (let ((out (assoc-ref outputs "out")))
1718 (mkdir-p (string-append out "/bin"))
1719 (mkdir-p (string-append out "/share"))
1721 (with-fluids ((%default-port-encoding #f))
1722 (substitute* "./src/main.cc"
1723 (("/usr/local") out)))
1725 (substitute* "Makefile"
1726 (("-o root") ""))))))))
1727 (inputs `(("mesa" ,mesa)
1729 ("libxinerama" ,libxinerama)
1730 ("libfontconfig" ,fontconfig)
1731 ("libjpeg" ,libjpeg-turbo)
1735 (native-inputs `(("pkg-config" ,pkg-config)
1736 ("xdg-utils" ,xdg-utils)))
1737 (synopsis "Doom map editor")
1738 (description "Eureka is a map editor for the classic DOOM games, and a few
1739 related games such as Heretic and Hexen. It comes with a 3d preview mode and
1741 (home-page "http://eureka-editor.sourceforge.net/")
1742 (license license:gpl2+)))
1744 (define-public guile-chickadee
1746 (name "guile-chickadee")
1750 (uri (string-append "https://files.dthompson.us/chickadee/"
1751 "chickadee-" version ".tar.gz"))
1754 "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l"))))
1755 (build-system gnu-build-system)
1757 `(("guile-opengl" ,guile-opengl)
1758 ("guile-sdl2" ,guile-sdl2)))
1760 `(("guile" ,guile-2.2)))
1762 `(("pkg-config" ,pkg-config)
1763 ("texinfo" ,texinfo)))
1764 (home-page "https://dthompson.us/projects/chickadee.html")
1765 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1766 (description "Chickadee is a game development toolkit for Guile Scheme
1767 built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1768 that parenthetically inclined game developers need to make 2D (and eventually
1769 3D) games in Scheme, such as:
1772 @item extensible, fixed-timestep game loop
1773 @item OpenGL-based rendering engine
1774 @item keyboard, mouse, controller input
1775 @item REPL-driven development model
1777 (license license:gpl3+)))
1779 (define-public guile3.0-chickadee
1781 (inherit guile-chickadee)
1782 (name "guile3.0-chickadee")
1786 (uri (string-append "https://files.dthompson.us/chickadee/"
1787 "chickadee-" version ".tar.gz"))
1790 "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l"))))
1791 (build-system gnu-build-system)
1793 `(("guile-opengl" ,guile3.0-opengl)
1794 ("guile-sdl2" ,guile3.0-sdl2)))
1796 `(("guile" ,guile-3.0)))
1798 `(("pkg-config" ,pkg-config)
1799 ("texinfo" ,texinfo)))
1800 (home-page "https://dthompson.us/projects/chickadee.html")
1801 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1802 (description "Chickadee is a game development toolkit for Guile Scheme
1803 built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1804 that parenthetically inclined game developers need to make 2D (and eventually
1805 3D) games in Scheme, such as:
1808 @item extensible, fixed-timestep game loop
1809 @item OpenGL-based rendering engine
1810 @item keyboard, mouse, controller input
1811 @item REPL-driven development model
1813 (license license:gpl3+)))
1815 (define-public bennu-game-development
1817 (name "bennu-game-development")
1822 (url "http://svn.code.sf.net/p/bennugd/code")
1823 (revision (string->number version))))
1824 (file-name (string-append name "-" version))
1827 "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))
1828 (modules '((guix build utils)))
1831 (delete-file-recursively "3rdparty") #t))))
1832 (build-system gnu-build-system)
1835 (modify-phases %standard-phases
1836 (add-after 'unpack 'patch-configure-to-use-openssl
1837 (lambda* (#:key outputs #:allow-other-keys)
1839 (delete-file "configure")
1840 (substitute* "configure.in"
1843 COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
1844 COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
1851 (inputs `(("openssl" ,openssl)
1853 (native-inputs `(("pkg-config" ,pkg-config)
1854 ("autoconf" ,autoconf)
1855 ("automake" ,automake)
1856 ("libtool" ,libtool)))
1857 (synopsis "Programming language to create games")
1858 (description "Bennu Game Development, also known as bennudg, is a
1859 programming language tailored at game development. It is the successor of
1861 (home-page "https://sourceforge.net/projects/bennugd/")
1862 (license license:zlib)))
1864 (define-public bennu-game-development-modules
1866 (inherit bennu-game-development)
1867 (name "bennu-game-development-modules")
1870 (modify-phases %standard-phases
1871 (add-after 'unpack 'patch-conflicting-definitions
1873 (with-fluids ((%default-port-encoding #f))
1874 (substitute* "core/include/fmath.h"
1875 (("extern fixed fmul\\( int x, int y \\);") "")
1876 (("extern fixed fdiv\\( int x, int y \\);") "")))
1877 (chdir "modules"))))))
1878 (inputs `(("zlib" ,zlib)
1880 ("openssl" ,openssl)
1881 ("sdl-mixer" ,sdl-mixer)
1882 ("bennu-game-development" ,bennu-game-development)))
1883 (synopsis "Modules for the Bennu Game Development programming language")
1884 (description "This package contains a collection of modules for the Bennu
1885 Game Development programming language, from CD handling through SDL to
1886 joystick support.")))
1894 (uri (string-append "http://plib.sourceforge.net/dist/"
1895 "plib-" version ".tar.gz"))
1898 "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8"))
1899 (patches (search-patches "plib-CVE-2011-4620.patch"
1900 "plib-CVE-2012-4552.patch"))))
1901 (build-system gnu-build-system)
1905 ("libxmu" ,libxmu)))
1907 `(("pkg-config" ,pkg-config)))
1908 (home-page "http://plib.sourceforge.net/")
1909 (synopsis "Suite of portable game libraries")
1910 (description "PLIB is a set of libraries that will permit programmers to
1911 write games and other realtime interactive applications that are 100% portable
1912 across a wide range of hardware and operating systems. PLIB includes sound
1913 effects, music, a complete 3D engine, font rendering, a simple Windowing
1914 library, a game scripting language, a GUI, networking, 3D math library and a
1915 collection of handy utility functions. All are 100% portable across nearly
1916 all modern computing platforms. Each library component is fairly independent
1918 (license license:lgpl2.0+)))
1920 (define-public ioquake3
1921 ;; We follow master since it seems that there won't be releases after 1.3.6.
1922 (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0"))
1925 (version (git-version "1.3.6" "1" commit))
1930 (url "https://github.com/ioquake/ioq3.git")
1932 (file-name (git-file-name name version))
1935 "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z"))))
1936 (build-system gnu-build-system)
1939 ("libjpeg" ,libjpeg-turbo)
1942 ("opusfile" ,opusfile)
1944 ("libvorbis" ,libvorbis)
1945 ("freetype" ,freetype)
1946 ("libogg" ,libogg)))
1948 `(("which" ,which) ; Else SDL_version.h won't be found.
1949 ("pkg-config" ,pkg-config)))
1951 '(#:tests? #f ; No tests.
1952 #:make-flags '("CC=gcc"
1953 "USE_INTERNAL_LIBS=0"
1955 "USE_RENDERER_DLOPEN=0"
1956 "USE_OPENAL_DLOPEN=0"
1957 "USE_CURL_DLOPEN=0")
1959 (modify-phases %standard-phases
1962 (lambda* (#:key outputs #:allow-other-keys)
1963 (invoke "make" "copyfiles" "CC=gcc"
1964 "USE_INTERNAL_LIBS=0"
1965 (string-append "COPYDIR="
1966 (assoc-ref outputs "out")
1968 (home-page "https://ioquake3.org/")
1969 (synopsis "FPS game engine based on Quake 3")
1970 (description "ioquake3 is a free software first person shooter engine
1971 based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to
1972 the original, ioquake3 has been cleaned up, bugs have been fixed and features
1973 added. The permanent goal is to create the open source Quake 3 distribution
1974 upon which people base their games, ports to new platforms, and other
1976 (license license:gpl2))))
1978 (define-public openvr
1982 (home-page "https://github.com/ValveSoftware/openvr/")
1988 (commit (string-append "v" version))))
1989 (file-name (git-file-name name version))
1991 (base32 "1b8cppvw6ib0kvx0vjq7jsk3plg1vh171w8xr230vjn05381wp52"))))
1992 (build-system cmake-build-system)
1996 #:configure-flags (list "-DBUILD_SHARED=1")))
1997 (synopsis "Virtual reality software development kit")
1998 (description "OpenVR is an API and runtime that allows access to VR
1999 hardware from multiple vendors without requiring that applications have
2000 specific knowledge of the hardware they are targeting.")
2001 (license license:bsd-3)))
2006 (version "19.12.01")
2011 (url "https://github.com/FNA-XNA/FNA.git")
2013 (file-name (git-file-name name version))
2015 (base32 "1vdyi9hac24fqcs8kpj6yk36bf5rrl4dvlvdd9fc701fawcf6lrr"))))
2016 (build-system gnu-build-system)
2018 '(#:tests? #f ; No tests.
2020 (modify-phases %standard-phases
2021 (add-after 'unpack 'link-dep-src
2022 (lambda* (#:key inputs #:allow-other-keys)
2023 (let ((sdl2 (assoc-ref inputs "sdl2-cs-src"))
2024 (mojoshader (assoc-ref inputs "mojoshader-src"))
2025 (faudio (assoc-ref inputs "faudio-src"))
2026 (theorafile (assoc-ref inputs "theorafile-src")))
2027 (symlink (string-append sdl2 "/src") "lib/SDL2-CS/src")
2028 (symlink (string-append mojoshader "/csharp") "lib/MojoShader/csharp")
2029 (symlink (string-append faudio "/csharp") "lib/FAudio/csharp")
2030 (symlink (string-append theorafile "/csharp") "lib/Theorafile/csharp"))))
2034 (invoke "make" "release")))
2036 (lambda* (#:key outputs #:allow-other-keys)
2037 (let ((out (assoc-ref outputs "out")))
2038 (install-file "bin/Release/FNA.dll" (string-append out "/lib"))
2042 (inputs `(("sdl2-cs-src" ,(package-source sdl2-cs))
2043 ("mojoshader-src" ,(package-source mojoshader-cs))
2044 ("faudio-src" ,(package-source faudio))
2045 ("theorafile-src" ,(package-source theorafile))))
2046 (home-page "https://fna-xna.github.io/")
2047 (synopsis "Accuracy-focused XNA4 reimplementation")
2048 (description "FNA is a Microsoft XNA Game Studio 4.0 reimplementation that
2049 focuses solely on developing a fully accurate XNA4 runtime for the desktop.")
2050 (license (list license:ms-pl ; FNA
2051 license:lgpl2.1 ; LzxDecoder.cs
2055 (define-public libccd
2063 (url "https://github.com/danfis/libccd.git")
2064 (commit (string-append "v" version))))
2065 (file-name (git-file-name name version))
2067 (base32 "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc"))))
2068 (build-system cmake-build-system)
2070 `(#:configure-flags '("-DBUILD_DOCUMENTATION=ON"
2071 "-DBUILD_TESTING=ON"
2072 "-DENABLE_DOUBLE_PRECISION=ON")))
2074 `(("python-sphinx" ,python-sphinx)))
2075 (home-page "https://github.com/danfis/libccd")
2076 (synopsis "Library for collision detection between two convex shapes")
2077 (description "@code{libccd} is library for a collision detection
2078 between two convex shapes. @code{libccd} implements variation on
2079 Gilbert–Johnson–Keerthi algorithm plus Expand Polytope Algorithm (EPA)
2080 and also implements algorithm Minkowski Portal Refinement (MPR,
2081 a.k.a. XenoCollide) as described in Game Programming Gems 7.")
2082 (license license:expat)))
2091 (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/"
2092 "ode-" version ".tar.gz"))
2094 (base32 "1flfdqgdbcn1bx8nrrd4qnp6cvsxrhvk8cdg7vaq2dzkh6nsqa5j"))
2095 (modules '((guix build utils)))
2098 (delete-file-recursively "libccd")
2100 (build-system cmake-build-system)
2102 ;; Tests fail on all systems but x86_64. This is fixed upstream and can
2103 ;; be removed in 0.16.2+.
2104 `(#:tests? ,(string-prefix? "x86_64-"
2105 (or (%current-target-system)
2107 #:configure-flags '("-DODE_WITH_LIBCCD_SYSTEM=ON")
2109 (modify-phases %standard-phases
2110 (add-after 'unpack 'unbundle-libccd
2112 (substitute* "CMakeLists.txt"
2113 (("configure_file\\(libccd/.*") ""))
2119 (home-page "https://www.ode.org/")
2120 (synopsis "High performance library for simulating rigid body dynamics")
2121 (description "ODE is a high performance library for simulating
2122 rigid body dynamics. It is fully featured, stable, mature and
2123 platform independent with an easy to use C/C++ API. It has advanced
2124 joint types and integrated collision detection with friction. ODE is
2125 useful for simulating vehicles, objects in virtual reality
2126 environments and virtual creatures. It is currently used in many
2127 computer games, 3D authoring tools and simulation tools.")
2128 ;; Software is dual-licensed.
2129 (license (list license:lgpl2.1+ license:expat))))
2131 (define-public chipmunk
2139 (url "https://github.com/slembcke/Chipmunk2D.git")
2140 (commit (string-append "Chipmunk-" version))))
2141 (file-name (git-file-name name version))
2143 (base32 "1qmkn01g06p3rnhmbyffmjns6wj5vhgf9cscigk3wzxcpwv1hyxb"))))
2144 (build-system cmake-build-system)
2146 `(#:tests? #f ;no test
2147 #:configure-flags '("-DBUILD_STATIC=OFF"
2148 "-DBUILD_DEMOS=OFF")))
2150 `(("freeglut" ,freeglut)
2152 ("libxrandr" ,libxrandr)))
2153 (home-page "https://chipmunk-physics.net/")
2154 (synopsis "Fast and lightweight 2D game physics library")
2155 (description "Chipmunk is a simple, lightweight, fast and portable 2D
2156 rigid body physics library written in C.")
2157 (license license:expat)))
2159 (define-public libtcod
2166 (url "https://github.com/libtcod/libtcod.git")
2168 (file-name (git-file-name name version))
2171 "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5"))
2172 (modules '((guix build utils)))
2174 (delete-file-recursively "src/vendor/utf8proc")
2175 (delete-file-recursively "src/vendor/zlib")
2176 (delete-file "src/vendor/stb_truetype.h")
2177 (delete-file "src/vendor/stb_sprintf.h")
2178 (delete-file "src/vendor/lodepng.cpp")
2179 (delete-file "src/vendor/lodepng.h")
2181 (substitute* "buildsys/autotools/sources.am"
2182 (("\\.\\./\\.\\./src/vendor/lodepng\\.cpp \\\\\n") "")
2183 (("\\.\\./\\.\\./src/vendor/stb\\.c \\\\")
2184 "../../src/vendor/stb.c")
2185 (("\\.\\./\\.\\./src/vendor/utf8proc/utf8proc\\.c") ""))
2187 (substitute* "src/libtcod/sys_sdl_img_png.cpp"
2188 (("\\.\\./vendor/") ""))
2190 (substitute* '("src/libtcod/color/canvas.cpp"
2191 "src/libtcod/sys_sdl_img_png.cpp"
2192 "src/libtcod/tileset/truetype.cpp"
2193 "src/libtcod/tileset/tilesheet.cpp")
2194 (("\\.\\./\\.\\./vendor/") ""))
2196 (substitute* "src/libtcod/console/printing.cpp"
2197 (("\\.\\./\\.\\./vendor/utf8proc/") ""))
2199 (build-system gnu-build-system)
2201 `(#:configure-flags '("--with-gnu-ld"
2202 "LIBS=-lutf8proc -llodepng")
2204 (modify-phases %standard-phases
2205 (add-after 'unpack 'change-to-build-dir
2207 (chdir "buildsys/autotools")
2208 (patch-shebang "get_version.py")
2211 `(("autoconf" ,autoconf)
2212 ("automake" ,automake)
2213 ("libtool" ,libtool)
2215 ("pkg-config" ,pkg-config)
2216 ("stb-sprintf" ,stb-sprintf)
2217 ("stb-truetype" ,stb-truetype)))
2219 `(("lodepng" ,lodepng)
2221 ("utf8proc" ,utf8proc)
2223 (home-page "https://github.com/libtcod/libtcod")
2224 (synopsis "Library specifically designed for writing roguelikes")
2226 "libtcod is a fast, portable and uncomplicated API for roguelike
2227 developers providing an advanced true color console, input, and lots of other
2228 utilities frequently used in roguelikes.")
2229 (license license:bsd-3)))
2231 (define-public warsow-qfusion
2232 ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated.
2233 ;; The 2.5 beta as published on the homepage is commit
2234 ;; c4de15df559410aff0ca6643724e24cddb0ecbbd
2235 (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd"))
2237 (name "warsow-qfusion")
2238 (version (git-version "2.5" "1" commit)) ; 2.5-beta
2242 (url "https://github.com/Warsow/qfusion/")
2245 (file-name (git-file-name name version))
2248 "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g"))
2249 ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46
2250 (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch"))
2251 (modules '((guix build utils)))
2253 (delete-file-recursively "platforms")
2254 (delete-file-recursively "debian")
2255 (delete-file-recursively "libsrcs")
2257 (build-system cmake-build-system)
2259 `(#:tests? #f ; No tests.
2260 #:configure-flags '("-DQFUSION_GAME=Warsow")
2263 (guix build cmake-build-system)
2266 (modify-phases %standard-phases
2267 (add-after 'unpack 'change-to-build-dir
2271 (add-after 'install 'really-install
2272 (lambda* (#:key outputs system #:allow-other-keys)
2273 (let ((arch (match system
2274 ("x86_64-linux" "x86_64")
2275 ("i686-linux" "i386")))
2276 (out (assoc-ref outputs "out")))
2277 (install-file (string-append "../source/build/basewsw/libgame_"
2279 (string-append out "/lib/"))
2280 (install-file (string-append "../source/build/libui_" arch ".so")
2281 (string-append out "/lib/"))
2284 (install-file file (string-append out "/bin/")))
2285 (append (find-files "../source/build" "warsow")
2286 (find-files "../source/build" "wsw_server."))))
2289 `(("alsa-lib" ,alsa-lib)
2291 ("freetype" ,freetype)
2293 ("libjpeg" ,libjpeg-turbo)
2296 ("libtheora" ,libtheora)
2297 ("libvorbis" ,libvorbis)
2300 ("pulseaudio" ,pulseaudio)
2302 ("qtdeclarative" ,qtdeclarative)
2304 ("uuid.h" ,util-linux "lib")
2307 `(("pkg-config" ,pkg-config)))
2308 (home-page "https://github.com/Warsow/qfusion")
2309 (supported-systems '("i686-linux" "x86_64-linux"))
2310 (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine")
2312 "This package contains the game engine of Warsow, a first-person
2313 shooter video game. The engine is based on qfusion, the id Tech 2 derived
2314 game engine. id Tech 2 is the engine originally behind Quake 2.")
2315 (license license:gpl2+))))