Commit | Line | Data |
---|---|---|
6cb89466 TČ |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz> | |
f586c877 | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
189be331 | 4 | ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org> |
a6dec13b | 5 | ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com> |
68c6110c | 6 | ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org> |
daca7077 | 7 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
762c89fb | 8 | ;;; Copyright © 2016, 2017, 2020 Kei Kebreau <kkebreau@posteo.net> |
cd528946 | 9 | ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
cd6ae1ce | 10 | ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com> |
d6660ef6 | 11 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
42d0d13d | 12 | ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> |
194b4e7d | 13 | ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com> |
3c399e9b | 14 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
6bc30a57 | 15 | ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com> |
5b8d2ace | 16 | ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> |
4041fabb | 17 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
4db5addb | 18 | ;;; Copyright © 2019, 2020, 2021 Leo Prikler <leo.prikler@student.tugraz.at> |
328dd9b7 | 19 | ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com> |
dfb67d2c | 20 | ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
d8682615 | 21 | ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si> |
2e0787a5 | 22 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
a0609772 | 23 | ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro> |
6cb89466 TČ |
24 | ;;; |
25 | ;;; This file is part of GNU Guix. | |
26 | ;;; | |
27 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
28 | ;;; under the terms of the GNU General Public License as published by | |
29 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
30 | ;;; your option) any later version. | |
31 | ;;; | |
32 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
33 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
34 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
35 | ;;; GNU General Public License for more details. | |
36 | ;;; | |
37 | ;;; You should have received a copy of the GNU General Public License | |
38 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
39 | ||
40 | (define-module (gnu packages game-development) | |
9fd50db3 | 41 | #:use-module (srfi srfi-1) |
0b5bf615 | 42 | #:use-module (ice-9 match) |
b0910aad | 43 | #:use-module ((guix licenses) #:prefix license:) |
6cb89466 TČ |
44 | #:use-module (guix packages) |
45 | #:use-module (guix download) | |
2a068aec | 46 | #:use-module (guix git-download) |
4041fabb | 47 | #:use-module (guix svn-download) |
be4d26f5 | 48 | #:use-module (guix utils) |
6cb89466 | 49 | #:use-module (guix build-system cmake) |
b0910aad | 50 | #:use-module (guix build-system gnu) |
4bc37bf0 | 51 | #:use-module (guix build-system python) |
92b51d12 | 52 | #:use-module (guix build-system scons) |
b0910aad | 53 | #:use-module (gnu packages) |
1297bc05 | 54 | #:use-module (gnu packages audio) |
c608fe8c | 55 | #:use-module (gnu packages autotools) |
e4ff9dff | 56 | #:use-module (gnu packages base) |
94a66dd9 | 57 | #:use-module (gnu packages boost) |
1297bc05 | 58 | #:use-module (gnu packages compression) |
a0609772 | 59 | #:use-module (gnu packages check) |
2a068aec | 60 | #:use-module (gnu packages curl) |
99828fa7 | 61 | #:use-module (gnu packages documentation) |
531003be | 62 | #:use-module (gnu packages fltk) |
42d0d13d | 63 | #:use-module (gnu packages fonts) |
d2cc38b7 | 64 | #:use-module (gnu packages fontutils) |
324b0040 | 65 | #:use-module (gnu packages freedesktop) |
d2cc38b7 | 66 | #:use-module (gnu packages fribidi) |
255d1bbe | 67 | #:use-module (gnu packages dbm) |
771e1e75 | 68 | #:use-module (gnu packages gcc) |
cccab9bf | 69 | #:use-module (gnu packages gettext) |
1297bc05 | 70 | #:use-module (gnu packages gl) |
c24fff61 | 71 | #:use-module (gnu packages glib) |
1297bc05 | 72 | #:use-module (gnu packages gnome) |
c24fff61 | 73 | #:use-module (gnu packages gnunet) |
42d0d13d MR |
74 | #:use-module (gnu packages graphics) |
75 | #:use-module (gnu packages graphviz) | |
1297bc05 | 76 | #:use-module (gnu packages gtk) |
c24fff61 | 77 | #:use-module (gnu packages guile) |
1297bc05 EF |
78 | #:use-module (gnu packages image) |
79 | #:use-module (gnu packages linux) | |
80 | #:use-module (gnu packages lua) | |
c608fe8c | 81 | #:use-module (gnu packages m4) |
7158fe4d | 82 | #:use-module (gnu packages mono) |
1297bc05 | 83 | #:use-module (gnu packages mp3) |
c24fff61 | 84 | #:use-module (gnu packages multiprecision) |
4bc37bf0 | 85 | #:use-module (gnu packages music) |
c24fff61 | 86 | #:use-module (gnu packages ncurses) |
c1bc92c0 | 87 | #:use-module (gnu packages pcre) |
1297bc05 EF |
88 | #:use-module (gnu packages pkg-config) |
89 | #:use-module (gnu packages pulseaudio) | |
4bc37bf0 | 90 | #:use-module (gnu packages python) |
44d10b1f | 91 | #:use-module (gnu packages python-xyz) |
b0910aad | 92 | #:use-module (gnu packages qt) |
1297bc05 | 93 | #:use-module (gnu packages sdl) |
45c552ec | 94 | #:use-module (gnu packages sphinx) |
67c127c9 | 95 | #:use-module (gnu packages stb) |
00fca594 | 96 | #:use-module (gnu packages texinfo) |
2e0787a5 | 97 | #:use-module (gnu packages textutils) |
1297bc05 | 98 | #:use-module (gnu packages tls) |
4bc37bf0 | 99 | #:use-module (gnu packages video) |
451e1075 | 100 | #:use-module (gnu packages web) |
2a068aec | 101 | #:use-module (gnu packages xdisorg) |
83a4a70b | 102 | #:use-module (gnu packages xiph) |
194b4e7d | 103 | #:use-module (gnu packages xml) |
1297bc05 | 104 | #:use-module (gnu packages xorg)) |
6cb89466 TČ |
105 | |
106 | (define-public bullet | |
107 | (package | |
108 | (name "bullet") | |
623a0d83 | 109 | (version "2.89") |
6cb89466 | 110 | (source (origin |
fbb456dd EF |
111 | (method git-fetch) |
112 | (uri (git-reference | |
113 | (url "https://github.com/bulletphysics/bullet3/") | |
114 | (commit version))) | |
115 | (file-name (git-file-name name version)) | |
6cb89466 TČ |
116 | (sha256 |
117 | (base32 | |
623a0d83 | 118 | "10ncf2z474jnv7p5lv01ak2mk2hib3rj5rz1zr8v2v5pnciqbijl")) |
fbb456dd EF |
119 | (modules '((guix build utils))) |
120 | (snippet | |
121 | '(begin | |
122 | (for-each delete-file (find-files "build3" "premake*")) | |
123 | (with-directory-excursion "examples/ThirdPartyLibs" | |
124 | (for-each delete-file-recursively | |
125 | '("Gwen" "clsocket" "enet" "glad" "imgui" | |
126 | "lua-5.2.3" "midi" "minizip" "openvr" | |
127 | "optionalX11" "serial" "zlib"))) | |
623a0d83 | 128 | ;; These need files from ThirdPartyLibs. |
fbb456dd | 129 | (substitute* "Extras/CMakeLists.txt" |
623a0d83 TGR |
130 | (("BulletRobotics") "")) |
131 | ;; Tests fail on linking, cannot find -lBussIK. | |
fbb456dd EF |
132 | (substitute* "test/CMakeLists.txt" |
133 | ((" InverseDynamics") | |
134 | "../examples/ThirdPartyLibs/BussIK InverseDynamics")) | |
135 | ; (("SharedMemory") "")) | |
136 | #t)))) | |
6cb89466 | 137 | (build-system cmake-build-system) |
937bc2d1 | 138 | (arguments |
fbb456dd EF |
139 | '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" |
140 | "-DBUILD_CPU_DEMOS=OFF" | |
141 | "-DBUILD_OPENGL3_DEMOS=OFF" | |
142 | "-DBUILD_BULLET2_DEMOS=OFF" | |
143 | (string-append "-DCMAKE_CXX_FLAGS=-fPIC " | |
144 | (or (getenv "CXXFLAGS") ""))) | |
145 | #:phases | |
146 | (modify-phases %standard-phases | |
147 | (add-after 'unpack 'remove-failing-tests | |
623a0d83 | 148 | ;; These tests fail specifically after removing 3rd party code. |
fbb456dd EF |
149 | (lambda _ |
150 | (substitute* "test/SharedMemory/CMakeLists.txt" | |
151 | (("ADD_TEST") "# ADD_TEST")) | |
152 | (substitute* "test/InverseDynamics/CMakeLists.txt" | |
153 | (("ADD_TEST\\(Test_BulletInverseForward") | |
154 | "# ADD_TEST(Test_BulletInverseForward")) | |
155 | #t))))) | |
937bc2d1 EF |
156 | (inputs |
157 | `(("glu" ,glu) | |
158 | ("libx11" ,libx11) | |
159 | ("mesa" ,mesa))) | |
9b811f69 | 160 | (home-page "https://pybullet.org/wordpress/") |
6cb89466 TČ |
161 | (synopsis "3D physics engine library") |
162 | (description | |
163 | "Bullet is a physics engine library usable for collision detection. It | |
164 | is used in some video games and movies.") | |
b0910aad DT |
165 | (license license:zlib))) |
166 | ||
1a0c4437 KK |
167 | (define-public deutex |
168 | (package | |
169 | (name "deutex") | |
d6660ef6 TGR |
170 | (version "5.2.2") |
171 | (source | |
172 | (origin | |
173 | (method url-fetch) | |
174 | (uri (string-append "https://github.com/Doom-Utils/deutex" | |
175 | "/releases/download/v" version "/" | |
176 | "deutex-" version ".tar.zst")) | |
177 | (sha256 | |
178 | (base32 "0psb2za6ldrlak7s8pjvli98ij5yiwjx8j1ms2v7rj9yadx0xv8h")))) | |
1a0c4437 | 179 | (build-system gnu-build-system) |
5bd80333 JK |
180 | (inputs |
181 | `(("libpng" ,libpng))) | |
182 | (native-inputs | |
183 | `(("asciidoc" ,asciidoc) | |
d6660ef6 TGR |
184 | ("pkg-config" ,pkg-config) |
185 | ("zstd" ,zstd))) | |
1a0c4437 KK |
186 | (home-page "https://github.com/Doom-Utils/deutex") |
187 | (synopsis "WAD file composer for Doom and related games") | |
188 | (description | |
189 | "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be | |
190 | used to extract the lumps of a wad and save them as individual files. | |
191 | Conversely, it can also build a wad from separate files. When extracting a | |
192 | lump to a file, it does not just copy the raw data, it converts it to an | |
193 | appropriate format (such as PPM for graphics, Sun audio for samples, etc.). | |
194 | Conversely, when it reads files for inclusion in pwads, it does the necessary | |
195 | conversions (for example, from PPM to Doom picture format). In addition, | |
196 | DeuTex has functions such as merging wads, etc.") | |
197 | (license license:gpl2+))) | |
198 | ||
94a66dd9 KK |
199 | (define-public grfcodec |
200 | (package | |
201 | (name "grfcodec") | |
202 | (version "6.0.6") | |
127c7fba NG |
203 | (source |
204 | (origin | |
205 | (method url-fetch) | |
206 | (uri (string-append "https://binaries.openttd.org/extra/" | |
207 | name "/" version "/" name "-" version | |
208 | "-source.tar.xz")) | |
209 | (sha256 | |
210 | (base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk")))) | |
94a66dd9 KK |
211 | (build-system gnu-build-system) |
212 | (arguments | |
127c7fba | 213 | '(#:tests? #f ;no check target |
94a66dd9 | 214 | #:phases |
127c7fba NG |
215 | (modify-phases %standard-phases |
216 | (delete 'configure) ;no configure script | |
217 | (replace 'install ;no install target | |
218 | (lambda* (#:key outputs #:allow-other-keys) | |
219 | (let* ((out (assoc-ref outputs "out")) | |
220 | (bin (string-append out "/bin")) | |
221 | (doc (string-append out "/share/doc")) | |
222 | (man (string-append out "/share/man/man1"))) | |
223 | (for-each (lambda (file) | |
224 | (install-file file bin)) | |
225 | '("grfcodec" "grfid" "grfstrip" "nforenum")) | |
226 | (install-file "COPYING" doc) | |
227 | (with-directory-excursion "docs" | |
228 | (for-each (lambda (file) | |
229 | (install-file (string-append file ".txt") doc)) | |
230 | '("auto_correct" "commands" "grf" "grfcodec" "grftut" | |
231 | "readme" "readme.rpn")) | |
232 | (for-each (lambda (file) | |
233 | (install-file file man)) | |
234 | (find-files "." "\\.1")))) | |
235 | #t))))) | |
94a66dd9 KK |
236 | (inputs |
237 | `(("boost" ,boost) | |
238 | ("libpng" ,libpng) | |
239 | ("zlib" ,zlib))) | |
240 | (synopsis "GRF development tools") | |
241 | (description | |
3d77785a | 242 | "The @dfn{Graphics Resource File} (GRF) development tools are a set of |
94a66dd9 KK |
243 | tools for developing (New)GRFs. It includes a number of smaller programs, each |
244 | with a specific task: | |
245 | @enumerate | |
246 | @item @code{grfcodec} decodes and encodes GRF files for OpenTTD. | |
247 | @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF. | |
248 | @item @code{grfstrip} strips all sprites from a GRF. | |
249 | @item @code{nforenum} checks NFO code for errors, making corrections when | |
250 | necessary. | |
251 | @end enumerate") | |
0661638f | 252 | (home-page "https://dev.openttdcoop.org/projects/grfcodec") |
94a66dd9 KK |
253 | ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2. |
254 | ;; NFORenum is under the GPL2+. | |
255 | ;; The MD5 implementation contained in GRFID is under the zlib license. | |
256 | (license (list license:gpl2 license:gpl2+ license:zlib)))) | |
257 | ||
3c399e9b AI |
258 | (define-public catcodec |
259 | (package | |
260 | (name "catcodec") | |
261 | (version "1.0.5") | |
262 | (source | |
263 | (origin | |
264 | (method url-fetch) | |
265 | (uri (string-append "https://binaries.openttd.org/extra/catcodec/" | |
266 | version "/catcodec-" version "-source.tar.xz")) | |
267 | (sha256 | |
2798d5b5 | 268 | (base32 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7")))) |
3c399e9b AI |
269 | (build-system gnu-build-system) |
270 | (arguments | |
271 | `(#:tests? #f ; no tests | |
272 | #:make-flags (list (string-append "prefix=" %output)) | |
273 | #:phases (modify-phases %standard-phases | |
274 | (delete 'configure)))) | |
2798d5b5 | 275 | (home-page "https://dev.openttdcoop.org/projects/catcodec") |
3c399e9b AI |
276 | (synopsis "Encode/decode OpenTTD sounds") |
277 | (description "catcodec encodes and decodes sounds for OpenTTD. These | |
278 | sounds are not much more than some metadata (description and filename) and raw | |
279 | PCM data.") | |
280 | (license license:gpl2))) | |
281 | ||
c24fff61 JG |
282 | (define-public gzochi |
283 | (package | |
284 | (name "gzochi") | |
95878903 | 285 | (version "0.13") |
c24fff61 JG |
286 | (source (origin |
287 | (method url-fetch) | |
288 | (uri (string-append "mirror://savannah/gzochi/gzochi-" | |
289 | version ".tar.gz")) | |
290 | (sha256 | |
291 | (base32 | |
95878903 | 292 | "1vcvf04qqzs3q8kaild2x7qvkwc6bwzfsisb78147b8z747j7hj0")))) |
c24fff61 | 293 | (build-system gnu-build-system) |
1798e9ee LC |
294 | (arguments |
295 | '(#:phases (modify-phases %standard-phases | |
296 | (add-before 'build 'no-Werror | |
297 | (lambda _ | |
298 | ;; Don't abort builds due to things like GLib | |
299 | ;; deprecation warnings. | |
300 | (substitute* (find-files "." "^Makefile\\.in$") | |
301 | (("-Werror") "")) | |
302 | #t))))) | |
c24fff61 JG |
303 | (native-inputs `(("pkgconfig" ,pkg-config))) |
304 | (inputs `(("bdb" ,bdb) | |
305 | ("glib" ,glib) | |
95878903 | 306 | ("guile" ,guile-3.0) |
c24fff61 JG |
307 | ("libmicrohttpd" ,libmicrohttpd) |
308 | ("ncurses" ,ncurses) | |
309 | ("sdl" ,sdl) | |
310 | ("zlib" ,zlib))) | |
340978d7 | 311 | (home-page "https://www.nongnu.org/gzochi/") |
c24fff61 JG |
312 | (synopsis "Scalable middleware for multiplayer games") |
313 | (description | |
314 | "gzochi is a framework for developing massively multiplayer online games. | |
315 | A server container provides services to deployed games, which are written in | |
316 | Guile Scheme, that abstract and simplify some of the most challenging and | |
317 | error-prone aspects of online game development: Concurrency, data persistence, | |
318 | and network communications. A very thin client library can be embedded to | |
319 | provide connectivity for client applications written in any language.") | |
320 | (license license:gpl3+))) | |
321 | ||
7357fcf2 KK |
322 | (define-public nml |
323 | (package | |
324 | (name "nml") | |
1f334a5c | 325 | (version "0.5.3") |
7357fcf2 KK |
326 | (source |
327 | (origin | |
328 | (method url-fetch) | |
362ae431 | 329 | (uri (pypi-uri "nml" version)) |
7357fcf2 | 330 | (sha256 |
1f334a5c | 331 | (base32 "0l5pfs8q7jrl3xscqq7pnwh5h5d17fsyjy7xspkc73sa0ayjm9jx")))) |
7357fcf2 | 332 | (build-system python-build-system) |
362ae431 KK |
333 | ;; TODO: Fix test that fails with |
334 | ;; "AttributeError: partially initialized module 'nml.nmlop' has no | |
335 | ;; attribute 'ADD' (most likely due to a circular import)" | |
e877f4d0 | 336 | (arguments |
362ae431 | 337 | '(#:tests? #f)) |
7357fcf2 KK |
338 | (propagated-inputs |
339 | `(("python-pillow" ,python-pillow) | |
340 | ("python-ply" ,python-ply))) | |
362ae431 | 341 | (home-page "https://github.com/OpenTTD/nml") |
7357fcf2 KK |
342 | (synopsis "NML compiler") |
343 | (description | |
a7cbe727 | 344 | "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of |
7357fcf2 KK |
345 | compiling NML files (along with their associated language, sound and graphic |
346 | files) into @file{.grf} and/or @file{.nfo} files.") | |
347 | (license license:gpl2+))) | |
348 | ||
762c89fb | 349 | (define-public python-sge |
45f8e7f7 | 350 | (package |
762c89fb | 351 | (name "python-sge") |
ff9c881f | 352 | (version "2.0.post0") |
45f8e7f7 KK |
353 | (source |
354 | (origin | |
355 | (method url-fetch) | |
762c89fb | 356 | (uri (pypi-uri "sge" version)) |
45f8e7f7 KK |
357 | (sha256 |
358 | (base32 | |
ff9c881f | 359 | "0s5d5qzlzfmqb10iyrqi62n36ll94d99xjaznp5ca6dz1b91qkvr")))) |
45f8e7f7 KK |
360 | (build-system python-build-system) |
361 | (propagated-inputs | |
362 | `(("python-pygame" ,python-pygame) | |
81353514 | 363 | ("python-uniseg" ,python-uniseg))) |
762c89fb | 364 | (home-page "https://python-sge.github.io/") |
45f8e7f7 KK |
365 | (synopsis "2D game engine for Python") |
366 | (description | |
367 | "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a | |
ffbe2dc1 | 368 | general-purpose 2D game engine. It takes care of several details for you so |
45f8e7f7 KK |
369 | you can focus on the game itself. This makes more rapid game development |
370 | possible, and it also makes the SGE easy to learn.") | |
371 | (license license:lgpl3+))) | |
372 | ||
762c89fb KK |
373 | (define-public python-sge-pygame |
374 | (deprecated-package "python-sge-pygame" python-sge)) | |
45f8e7f7 | 375 | |
1b775fd1 KK |
376 | (define-public python-tmx |
377 | (package | |
378 | (name "python-tmx") | |
95c1324a | 379 | (version "1.10") |
1b775fd1 KK |
380 | (source |
381 | (origin | |
382 | (method url-fetch) | |
be4d26f5 KK |
383 | (uri (string-append "mirror://savannah/python-tmx/" |
384 | (version-major+minor version) "/tmx-" | |
1b775fd1 KK |
385 | version ".tar.gz")) |
386 | (sha256 | |
387 | (base32 | |
95c1324a | 388 | "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0")))) |
1b775fd1 KK |
389 | (build-system python-build-system) |
390 | (propagated-inputs | |
391 | `(("python-six" ,python-six))) | |
392 | (home-page "http://python-tmx.nongnu.org") | |
393 | (synopsis "Python library for the @code{Tiled} TMX format") | |
394 | (description | |
395 | "Python TMX reads and writes the @code{Tiled} TMX format in a simple way. | |
396 | This is useful for map editors or generic level editors, and it's also useful | |
397 | for using a map editor or generic level editor like Tiled to edit your game's | |
398 | levels.") | |
399 | (license (list license:asl2.0 | |
400 | ;; Documentation (only available in the source tarball) is | |
401 | ;; under the CC0 license. | |
402 | license:cc0)))) | |
403 | ||
404 | (define-public python2-tmx | |
405 | (let ((python2-tmx (package-with-python2 python-tmx))) | |
406 | (package | |
407 | (inherit python2-tmx) | |
408 | (propagated-inputs | |
409 | `(("python2-pathlib" ,python2-pathlib) | |
410 | ,@(package-propagated-inputs python2-tmx)))))) | |
411 | ||
e99039b5 KK |
412 | (define-public python-xsge |
413 | (package | |
414 | (name "python-xsge") | |
2110cd13 | 415 | (version "2020.09.07") |
e99039b5 KK |
416 | (source (origin |
417 | (method url-fetch) | |
2110cd13 KK |
418 | (uri (string-append "https://github.com/python-sge/xsge" |
419 | "/releases/download/v" version | |
420 | "/xsge-" version ".zip")) | |
e99039b5 KK |
421 | (sha256 |
422 | (base32 | |
2110cd13 | 423 | "136xgy3f9vw636wxpqbha022avk0wyxw63mm3a2dvwhh90s716f9")))) |
e99039b5 KK |
424 | (build-system python-build-system) |
425 | (arguments | |
426 | '(#:phases | |
427 | (modify-phases %standard-phases | |
428 | ;; xSGE's setup.py script does not support one of the Python build | |
429 | ;; system's default flags, "--single-version-externally-managed". | |
430 | (replace 'install | |
431 | (lambda* (#:key outputs #:allow-other-keys) | |
6e92fba4 KK |
432 | (invoke "python" "setup.py" "install" |
433 | (string-append "--prefix=" (assoc-ref outputs "out")) | |
434 | "--root=/")))) | |
e99039b5 | 435 | #:tests? #f)) ; no check target |
2110cd13 KK |
436 | (native-inputs |
437 | `(("unzip" ,unzip))) | |
e99039b5 | 438 | (propagated-inputs |
2110cd13 KK |
439 | `(("python-sge" ,python-sge))) |
440 | (home-page "https://python-sge.github.io/") | |
e99039b5 KK |
441 | (synopsis "Extensions for the SGE Game Engine") |
442 | (description | |
443 | "xSGE is a collection of modules that make doing certain tasks with the SGE | |
444 | Game Engine easier. In addition to SGE's conveniences, the user has access to a | |
445 | GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format | |
446 | support.") | |
447 | (license license:gpl3+))) | |
448 | ||
b0910aad DT |
449 | (define-public tiled |
450 | (package | |
451 | (name "tiled") | |
1ccc5cfc | 452 | (version "1.5.0") |
b0910aad | 453 | (source (origin |
902068b4 RW |
454 | (method git-fetch) |
455 | (uri (git-reference | |
b0e7b699 | 456 | (url "https://github.com/bjorn/tiled") |
902068b4 RW |
457 | (commit (string-append "v" version)))) |
458 | (file-name (git-file-name name version)) | |
b0910aad DT |
459 | (sha256 |
460 | (base32 | |
1ccc5cfc | 461 | "1prajkx1xpp3csa0xpkrn3c2cnzvmwzxgrqb9d3gqszp3sllr2dg")))) |
b0910aad | 462 | (build-system gnu-build-system) |
864cc7ef | 463 | (inputs |
ea0a5107 | 464 | `(("qtbase" ,qtbase-5) |
664821f1 | 465 | ("qtdeclarative" ,qtdeclarative) |
864cc7ef RW |
466 | ("qtsvg" ,qtsvg) |
467 | ("zlib" ,zlib))) | |
468 | (native-inputs | |
469 | `(("qttools" ,qttools))) | |
b0910aad DT |
470 | (arguments |
471 | '(#:phases | |
d06fc008 EF |
472 | (modify-phases %standard-phases |
473 | (replace 'configure | |
864cc7ef RW |
474 | (lambda* (#:key inputs outputs #:allow-other-keys) |
475 | (substitute* "translations/translations.pro" | |
476 | (("LRELEASE =.*") | |
477 | (string-append "LRELEASE = " | |
478 | (assoc-ref inputs "qttools") | |
479 | "/bin/lrelease\n"))) | |
d06fc008 | 480 | (let ((out (assoc-ref outputs "out"))) |
9dafb647 KK |
481 | (invoke "qmake" |
482 | (string-append "PREFIX=" out)))))))) | |
88b028f3 | 483 | (home-page "https://www.mapeditor.org/") |
b0910aad DT |
484 | (synopsis "Tile map editor") |
485 | (description | |
486 | "Tiled is a general purpose tile map editor. It is meant to be used for | |
487 | editing maps of any tile-based game, be it an RPG, a platformer or a Breakout | |
488 | clone.") | |
489 | ||
490 | ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is | |
491 | ;; under BSD-2. | |
492 | (license license:gpl2+))) | |
5809ffcc | 493 | |
3e072a59 LP |
494 | (define-public tsukundere |
495 | (package | |
496 | (name "tsukundere") | |
cccab9bf | 497 | (version "0.3.1") |
3e072a59 LP |
498 | (source (origin |
499 | (method git-fetch) | |
500 | (uri (git-reference | |
501 | (url "https://gitlab.com/leoprikler/tsukundere") | |
502 | (commit version))) | |
503 | (file-name (git-file-name name version)) | |
504 | (sha256 | |
505 | (base32 | |
cccab9bf | 506 | "13p9inz7jj3hm2lmx4p0lhva4ng1m148pjzhq12ybc4kk139i75b")))) |
3e072a59 | 507 | (build-system gnu-build-system) |
1e1e6ebf | 508 | (arguments |
13b13190 LP |
509 | `(#:modules ((ice-9 match) |
510 | (srfi srfi-1) | |
511 | ((guix build guile-build-system) | |
1e1e6ebf LP |
512 | #:select (target-guile-effective-version)) |
513 | ,@%gnu-build-system-modules) | |
514 | #:imported-modules ((guix build guile-build-system) | |
515 | ,@%gnu-build-system-modules) | |
516 | #:phases | |
517 | (modify-phases %standard-phases | |
518 | (add-after 'unpack 'patch-command | |
13b13190 LP |
519 | (lambda* (#:key inputs outputs #:allow-other-keys) |
520 | (let* ((scm (lambda (in) | |
521 | (string-append in "/share/guile/site/" | |
522 | (target-guile-effective-version)))) | |
523 | (ccache (lambda (in) | |
524 | (string-append in "/lib/guile/" | |
525 | (target-guile-effective-version) | |
526 | "/site-ccache"))) | |
527 | (pkgs | |
528 | (cons | |
529 | (assoc-ref outputs "out") | |
530 | (filter-map | |
531 | (match-lambda | |
532 | (("guile" . pkg) pkg) | |
533 | ((label . pkg) | |
534 | (and (string-prefix? "guile-" label) pkg))) | |
535 | inputs)))) | |
1e1e6ebf | 536 | (substitute* "bin/tsukundere" |
13b13190 | 537 | (("exec guile (.*)" _ args) |
1e1e6ebf | 538 | (string-append |
13b13190 LP |
539 | (format #f "export GUILE_LOAD_PATH=\"~@?\"~%" |
540 | "~{~a~^:~}" (map scm pkgs)) | |
541 | (format #f "export GUILE_LOAD_COMPILED_PATH=\"~@?\"~%" | |
542 | "~{~a~^:~}" (map ccache pkgs)) | |
543 | "exec " | |
544 | (assoc-ref inputs "guile") | |
545 | "/bin/guile " args))) | |
1e1e6ebf | 546 | #t)))))) |
3e072a59 | 547 | (native-inputs |
ce10e2b3 | 548 | `(("autoconf" ,autoconf) |
3e072a59 | 549 | ("automake" ,automake) |
cccab9bf | 550 | ("gettext" ,gettext-minimal) |
3e072a59 | 551 | ("guile" ,guile-3.0) |
1e1e6ebf LP |
552 | ("pkg-config" ,pkg-config) |
553 | ("texinfo" ,texinfo))) | |
13b13190 LP |
554 | (inputs |
555 | `(("guile-sdl2" ,guile3.0-sdl2) | |
556 | ("guile" ,guile-3.0))) | |
3e072a59 LP |
557 | (home-page "https://gitlab.com/leoprikler/tsukundere") |
558 | (synopsis "Visual novel engine") | |
559 | (description "Tsukundere is a game engine geared heavily towards the | |
560 | development of visual novels, written on top of Guile-SDL2. It is still | |
1e1e6ebf | 561 | experimental.") |
3e072a59 LP |
562 | (license license:lgpl3+))) |
563 | ||
5809ffcc DT |
564 | (define-public sfml |
565 | (package | |
566 | (name "sfml") | |
9ac59ad3 | 567 | (version "2.5.1") |
5809ffcc | 568 | (source (origin |
95f6adae | 569 | (method git-fetch) |
7d1b5022 RW |
570 | ;; Do not fetch the archives from |
571 | ;; http://mirror0.sfml-dev.org/files/ because files there seem | |
572 | ;; to be changed in place. | |
95f6adae | 573 | (uri (git-reference |
b0e7b699 | 574 | (url "https://github.com/SFML/SFML") |
95f6adae TGR |
575 | (commit version))) |
576 | (file-name (git-file-name name version)) | |
5809ffcc DT |
577 | (sha256 |
578 | (base32 | |
9ac59ad3 | 579 | "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay")) |
67c127c9 MB |
580 | (modules '((guix build utils))) |
581 | (snippet | |
582 | '(begin | |
583 | ;; Ensure system libraries are used. | |
584 | (delete-file-recursively "extlibs") | |
585 | #t)))) | |
5809ffcc DT |
586 | (build-system cmake-build-system) |
587 | (arguments | |
a6e25a50 | 588 | '(#:configure-flags |
0bc27248 MB |
589 | (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE" |
590 | "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig") | |
a6e25a50 | 591 | #:tests? #f)) ; no tests |
0bc27248 MB |
592 | (native-inputs |
593 | `(("pkg-config" ,pkg-config))) | |
5809ffcc DT |
594 | (inputs |
595 | `(("mesa" ,mesa) | |
596 | ("glew" ,glew) | |
597 | ("libx11" ,libx11) | |
240f2785 | 598 | ("xcb-util-image" ,xcb-util-image) |
5809ffcc DT |
599 | ("libxrandr" ,libxrandr) |
600 | ("eudev" ,eudev) | |
4bd428a7 | 601 | ("libjpeg" ,libjpeg-turbo) |
67c127c9 MB |
602 | ("libsndfile" ,libsndfile) |
603 | ("stb-image" ,stb-image) | |
604 | ("stb-image-write" ,stb-image-write))) | |
0bc27248 MB |
605 | (propagated-inputs |
606 | ;; In Requires.private of pkg-config files. | |
607 | `(("flac" ,flac) | |
608 | ("freetype" ,freetype) | |
609 | ("libvorbis" ,libvorbis) | |
5809ffcc | 610 | ("openal" ,openal))) |
167f0e82 | 611 | (home-page "https://www.sfml-dev.org") |
5809ffcc DT |
612 | (synopsis "Simple and Fast Multimedia Library") |
613 | (description | |
614 | "SFML provides a simple interface to the various computer components, | |
615 | to ease the development of games and multimedia applications. It is composed | |
616 | of five modules: system, window, graphics, audio and network.") | |
617 | (license license:zlib))) | |
d620ea88 DT |
618 | |
619 | (define-public sfxr | |
620 | (package | |
621 | (name "sfxr") | |
622 | (version "1.2.1") | |
623 | (source (origin | |
624 | (method url-fetch) | |
625 | (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) | |
626 | (sha256 | |
627 | (base32 | |
628 | "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) | |
629 | (build-system gnu-build-system) | |
630 | (arguments | |
631 | `(#:phases (modify-phases %standard-phases | |
632 | (delete 'configure) ; no configure script | |
633 | (add-before 'build 'patch-makefile | |
634 | (lambda* (#:key outputs #:allow-other-keys) | |
635 | (let ((out (assoc-ref outputs "out"))) | |
636 | (substitute* "Makefile" | |
637 | (("\\$\\(DESTDIR\\)/usr") out)) | |
638 | (substitute* "main.cpp" | |
639 | (("/usr/share") | |
640 | (string-append out "/share"))) | |
641 | #t)))) | |
642 | #:tests? #f)) ; no tests | |
643 | (native-inputs | |
644 | `(("pkg-config" ,pkg-config) | |
645 | ("desktop-file-utils" ,desktop-file-utils))) | |
646 | (inputs | |
647 | `(("sdl" ,sdl) | |
648 | ("gtk+" ,gtk+))) | |
649 | (synopsis "Simple sound effect generator") | |
650 | (description "Sfxr is a tool for quickly generating simple sound effects. | |
651 | Originally created for use in video game prototypes, it can generate random | |
652 | sounds from presets such as \"explosion\" or \"powerup\".") | |
653 | (home-page "http://www.drpetter.se/project_sfxr.html") | |
654 | (license license:expat))) | |
0f6139b1 | 655 | |
540d41d8 TL |
656 | (define-public surgescript |
657 | (package | |
658 | (name "surgescript") | |
94466f95 | 659 | (version "0.5.5") |
540d41d8 TL |
660 | (source |
661 | (origin | |
662 | (method git-fetch) | |
663 | (uri (git-reference | |
b0e7b699 | 664 | (url "https://github.com/alemart/surgescript") |
540d41d8 TL |
665 | (commit (string-append "v" version)))) |
666 | (file-name (git-file-name name version)) | |
667 | (sha256 | |
94466f95 | 668 | (base32 "0xwd4g7n0b0rxkpbyshkzyl472h1y606ghyvf8gv034n3jz2g4jk")))) |
540d41d8 TL |
669 | (build-system cmake-build-system) |
670 | (arguments | |
671 | '(#:configure-flags | |
672 | (let ((share (string-append (assoc-ref %outputs "out") "/share"))) | |
497a4646 TGR |
673 | (list "-DWANT_STATIC=NO" |
674 | (string-append "-DICON_PATH=" share "/pixmaps") | |
540d41d8 TL |
675 | (string-append "-DMETAINFO_PATH=" share "/metainfo"))) |
676 | #:tests? #f)) | |
677 | (home-page "https://docs.opensurge2d.org") | |
678 | (synopsis "Scripting language for games") | |
679 | (description "@code{SurgeScript} is a dynamically typed object-oriented | |
680 | scripting language designed for games. Each object is a state machine that | |
681 | can be customized by attaching other objects. The language supports automatic | |
682 | garbage collection and can be extended with plugins.") | |
683 | (license license:asl2.0))) | |
684 | ||
0f6139b1 AK |
685 | (define-public physfs |
686 | (package | |
687 | (name "physfs") | |
d00a8b84 | 688 | (version "3.0.2") |
0f6139b1 AK |
689 | (source (origin |
690 | (method url-fetch) | |
691 | (uri (string-append | |
167f0e82 | 692 | "https://icculus.org/physfs/downloads/physfs-" |
0f6139b1 AK |
693 | version ".tar.bz2")) |
694 | (file-name (string-append name "-" version ".tar.gz")) | |
695 | (sha256 | |
696 | (base32 | |
d00a8b84 | 697 | "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h")))) |
0f6139b1 AK |
698 | (build-system cmake-build-system) |
699 | (arguments | |
08e977d2 | 700 | '(#:tests? #f ; no check target |
a904223e | 701 | #:configure-flags '("-DPHYSFS_BUILD_STATIC=OFF") |
08e977d2 MB |
702 | #:phases (modify-phases %standard-phases |
703 | (add-after 'unpack 'patch-CMakeLists.txt | |
704 | (lambda _ | |
705 | (substitute* "CMakeLists.txt" | |
706 | ;; XXX: For some reason CMakeLists.txt disables | |
707 | ;; RUNPATH manipulation when the compiler is GCC. | |
708 | (("CMAKE_COMPILER_IS_GNUCC") "FALSE")) | |
709 | #t))))) | |
0f6139b1 AK |
710 | (inputs |
711 | `(("zlib" ,zlib))) | |
712 | (native-inputs | |
713 | `(("doxygen" ,doxygen))) | |
167f0e82 | 714 | (home-page "https://icculus.org/physfs") |
0f6139b1 AK |
715 | (synopsis "File system abstraction library") |
716 | (description | |
717 | "PhysicsFS is a library to provide abstract access to various archives. | |
718 | It is intended for use in video games. For security, no file writing done | |
719 | through the PhysicsFS API can leave a defined @emph{write directory}. For | |
720 | file reading, a @emph{search path} with archives and directories is defined, | |
721 | and it becomes a single, transparent hierarchical file system. So archive | |
722 | files can be accessed in the same way as you access files directly on a disk, | |
723 | and it makes it easy to ship a new archive that will override a previous | |
724 | archive on a per-file basis.") | |
725 | (license license:zlib))) | |
83a4a70b DT |
726 | |
727 | (define-public love | |
728 | (package | |
729 | (name "love") | |
dd88c89e | 730 | (version "11.3") |
83a4a70b DT |
731 | (source (origin |
732 | (method url-fetch) | |
733 | (uri (string-append "https://bitbucket.org/rude/love/downloads/" | |
734 | "love-" version "-linux-src.tar.gz")) | |
735 | (sha256 | |
736 | (base32 | |
dd88c89e | 737 | "0m8lvlabmcchskx4qpzkdlsm44360f3j0q3vvvj2388cfnvhv7v4")))) |
83a4a70b DT |
738 | (build-system gnu-build-system) |
739 | (native-inputs | |
740 | `(("pkg-config" ,pkg-config))) | |
741 | (inputs | |
742 | `(("devil" ,devil) | |
743 | ("freetype" ,freetype) | |
744 | ("libmodplug" ,libmodplug) | |
05d48c52 | 745 | ("libtheora" ,libtheora) |
83a4a70b DT |
746 | ("libvorbis" ,libvorbis) |
747 | ("luajit" ,luajit) | |
748 | ("mesa" ,mesa) | |
749 | ("mpg123" ,mpg123) | |
750 | ("openal" ,openal) | |
83a4a70b DT |
751 | ("sdl2" ,sdl2) |
752 | ("zlib" ,zlib))) | |
753 | (synopsis "2D game framework for Lua") | |
754 | (description "LÖVE is a framework for making 2D games in the Lua | |
755 | programming language.") | |
756 | (home-page "https://love2d.org/") | |
757 | (license license:zlib))) | |
154f6156 | 758 | |
328dd9b7 JC |
759 | (define-public love-nuklear |
760 | (let ((version "v2.6") | |
761 | (commit "fef4e00a602efb16c57ae962850b6e7a01f7a29a")) | |
762 | (package | |
763 | (name "love-nuklear") | |
764 | (version (git-version version "1" commit)) | |
765 | (source (origin | |
766 | (method git-fetch) | |
767 | (uri (git-reference | |
768 | (url "https://github.com/keharriso/love-nuklear/") | |
769 | (commit commit) | |
770 | (recursive? #t))) | |
4db5addb | 771 | ;; NOTE: the HEAD of the Nuklear git-submodule is at commit |
328dd9b7 JC |
772 | ;; "adc52d710fe3c87194b99f540c53e82eb75c2521" of Oct 1 2019 |
773 | (file-name (git-file-name name version)) | |
774 | (sha256 | |
775 | (base32 | |
776 | "15qmy8mfwkxy2x9rmxs6f9cyvjvwwj6yf78bs863xmc56dmjzzbn")))) | |
777 | (build-system cmake-build-system) | |
778 | (arguments | |
779 | `(#:build-type "Release" | |
780 | #:tests? #f)) | |
781 | (inputs | |
782 | `(("luajit" ,luajit))) | |
783 | (synopsis "Lightweight immediate mode GUI for LÖVE games") | |
784 | (description "LÖVE is a Lua framework for making 2D games. Nuklear | |
785 | is a minimal state immediate mode graphical user interface toolkit. This | |
786 | package is the Nuklear bindings for LÖVE created by Kevin Harrison.") | |
787 | (home-page "https://github.com/keharriso/love-nuklear/") | |
788 | (license license:expat)))) | |
789 | ||
154f6156 DT |
790 | (define-public allegro-4 |
791 | (package | |
792 | (name "allegro") | |
b2cf5597 | 793 | (version "4.4.3") |
154f6156 DT |
794 | (source (origin |
795 | (method url-fetch) | |
3a12e21c EF |
796 | (uri (string-append "https://github.com/liballeg/allegro5/" |
797 | "releases/download/" version "/allegro-" | |
798 | version ".tar.gz")) | |
154f6156 DT |
799 | (sha256 |
800 | (base32 | |
b2cf5597 | 801 | "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y")))) |
154f6156 DT |
802 | (build-system cmake-build-system) |
803 | (arguments | |
804 | '(#:phases | |
805 | (modify-phases %standard-phases | |
806 | (add-after 'unpack 'patch-build-system | |
807 | (lambda _ | |
808 | ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE | |
809 | ;; via a command line option doesn't work because it is | |
810 | ;; unconditionally clobbered in the build script. | |
811 | (substitute* '("CMakeLists.txt") | |
812 | (("ADDON_LINKAGE STATIC") | |
813 | "ADDON_LINKAGE SHARED")) | |
814 | #t))))) | |
815 | (inputs | |
816 | `(("glu" ,glu) | |
817 | ("libpng" ,libpng) | |
818 | ("libvorbis" ,libvorbis) | |
819 | ("mesa" ,mesa) | |
820 | ("zlib" ,zlib))) | |
821 | (synopsis "Game programming library") | |
822 | (description "Allegro is a library mainly aimed at video game and | |
823 | multimedia programming. It handles common, low-level tasks such as creating | |
824 | windows, accepting user input, loading data, drawing images, playing sounds, | |
825 | etc.") | |
4968ea2c | 826 | (home-page "https://liballeg.org") |
154f6156 | 827 | (license license:giftware))) |
2a068aec | 828 | |
19d311b4 RW |
829 | (define-public allegro |
830 | (package | |
831 | (name "allegro") | |
49405aaf | 832 | (version "5.2.5.0") |
19d311b4 RW |
833 | (source (origin |
834 | (method url-fetch) | |
3a12e21c EF |
835 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
836 | "/download/" version "/allegro-" | |
b15a020d | 837 | version ".tar.gz")) |
19d311b4 RW |
838 | (sha256 |
839 | (base32 | |
49405aaf | 840 | "06dpkfnac8w3pq36834nn2iij3ajz6prladqd0w92lq39aiqv5jr")))) |
19d311b4 | 841 | (build-system cmake-build-system) |
49405aaf | 842 | (arguments `(#:tests? #f)) ; there are no tests |
19d311b4 RW |
843 | (inputs |
844 | ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb | |
845 | `(("flac" ,flac) | |
846 | ("freetype" ,freetype) | |
847 | ("glu" ,glu) | |
848 | ("gtk" ,gtk+-2) | |
4bd428a7 | 849 | ("libjpeg" ,libjpeg-turbo) |
19d311b4 RW |
850 | ("libpng" ,libpng) |
851 | ("libtheora" ,libtheora) | |
852 | ("libvorbis" ,libvorbis) | |
853 | ("libxcursor" ,libxcursor) | |
854 | ("libxinerama" ,libxinerama) | |
855 | ("libxrandr" ,libxrandr) | |
856 | ("mesa" ,mesa) | |
857 | ("openal" ,openal) | |
858 | ("physfs" ,physfs) | |
859 | ("zlib" ,zlib))) | |
860 | (native-inputs | |
861 | `(("pkg-config" ,pkg-config))) | |
862 | (synopsis "Game programming library") | |
863 | (description "Allegro is a library mainly aimed at video game and | |
864 | multimedia programming. It handles common, low-level tasks such as creating | |
865 | windows, accepting user input, loading data, drawing images, playing sounds, | |
866 | etc.") | |
4968ea2c | 867 | (home-page "https://liballeg.org") |
19d311b4 RW |
868 | (license license:bsd-3))) |
869 | ||
cdf8f391 RW |
870 | (define-public allegro-5.0 |
871 | (package (inherit allegro) | |
872 | (name "allegro") | |
873 | (version "5.0.11") | |
874 | (source (origin | |
875 | (method url-fetch) | |
3a12e21c EF |
876 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
877 | "/download/" version "/allegro-" | |
878 | (if (equal? "0" (string-take-right version 1)) | |
879 | (string-drop-right version 2) | |
880 | version) | |
881 | ".tar.gz")) | |
0109b89c EF |
882 | (patches (search-patches |
883 | "allegro-mesa-18.2.5-and-later.patch")) | |
cdf8f391 RW |
884 | (sha256 |
885 | (base32 | |
886 | "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) | |
887 | ||
2a068aec DT |
888 | (define-public aseprite |
889 | (package | |
890 | (name "aseprite") | |
82654d95 | 891 | (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL. |
ff4dc16e | 892 | ;; TODO: Unbundle third party software. |
2a068aec | 893 | (source (origin |
ff4dc16e MB |
894 | (method url-fetch/zipbomb) |
895 | (uri (string-append "https://github.com/aseprite/aseprite" | |
896 | "/releases/download/v" version | |
897 | "/Aseprite-v" version "-Source.zip")) | |
2a068aec DT |
898 | (sha256 |
899 | (base32 | |
82654d95 | 900 | "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv")))) |
2a068aec DT |
901 | (build-system cmake-build-system) |
902 | (arguments | |
903 | '(#:configure-flags | |
904 | ;; Use shared libraries instead of building bundled source. | |
905 | (list "-DWITH_WEBP_SUPPORT=1" | |
906 | "-DUSE_SHARED_CURL=1" | |
907 | "-DUSE_SHARED_GIFLIB=1" | |
908 | "-DUSE_SHARED_JPEGLIB=1" | |
909 | "-DUSE_SHARED_ZLIB=1" | |
910 | "-DUSE_SHARED_LIBPNG=1" | |
911 | "-DUSE_SHARED_LIBLOADPNG=1" | |
912 | "-DUSE_SHARED_LIBWEBP=1" | |
913 | "-DUSE_SHARED_TINYXML=1" | |
914 | "-DUSE_SHARED_PIXMAN=1" | |
915 | "-DUSE_SHARED_FREETYPE=1" | |
916 | "-DUSE_SHARED_ALLEGRO4=1" | |
917 | "-DENABLE_UPDATER=0" ; no auto-updates | |
918 | (string-append "-DFREETYPE_INCLUDE_DIR=" | |
919 | (assoc-ref %build-inputs "freetype") | |
de1d68a2 | 920 | "/include/freetype2")))) |
2a068aec DT |
921 | (native-inputs |
922 | `(("pkg-config" ,pkg-config))) | |
923 | ;; TODO: Use a patched Allegro 4 that supports window resizing. This | |
924 | ;; patched version is bundled with Aseprite, but the patches should be | |
925 | ;; extracted and applied on top of a standalone Allegro 4 package. | |
926 | (inputs | |
927 | `(("allegro" ,allegro-4) | |
928 | ("curl" ,curl) | |
929 | ("freetype" ,freetype) | |
930 | ("giflib" ,giflib) | |
4bd428a7 | 931 | ("libjpeg" ,libjpeg-turbo) |
2a068aec DT |
932 | ("libpng" ,libpng) |
933 | ("libwebp" ,libwebp) | |
934 | ("libx11" ,libx11) | |
935 | ("libxext" ,libxext) | |
936 | ("libxxf86vm" ,libxxf86vm) | |
937 | ("pixman" ,pixman) | |
938 | ("tinyxml" ,tinyxml) | |
939 | ("zlib" ,zlib))) | |
940 | (synopsis "Animated sprite editor and pixel art tool") | |
941 | (description "Aseprite is a tool for creating 2D pixel art for video | |
942 | games. In addition to basic pixel editing features, Aseprite can assist in | |
943 | the creation of animations, tiled graphics, texture atlases, and more.") | |
167f0e82 | 944 | (home-page "https://www.aseprite.org/") |
2a068aec | 945 | (license license:gpl2+))) |
966dff3b KY |
946 | |
947 | (define-public qqwing | |
948 | (package | |
949 | (name "qqwing") | |
950 | (version "1.3.4") | |
951 | (source (origin | |
952 | (method url-fetch) | |
953 | (uri (string-append | |
954 | "https://qqwing.com/" | |
955 | name "-" version ".tar.gz")) | |
956 | (sha256 | |
957 | (base32 | |
958 | "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp")))) | |
959 | (build-system gnu-build-system) | |
960 | (native-inputs | |
961 | `(("pkg-config" ,pkg-config))) | |
962 | (home-page "https://qqwing.com/") | |
963 | (synopsis "Sudoku puzzle solver and generator") | |
964 | (description | |
965 | "QQWing is a Sudoku puzzle generator and solver. | |
966 | It offers the following features: | |
967 | @enumerate | |
968 | @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds. | |
969 | @item Uses logic. Uses as many solve techniques as possible when solving | |
970 | puzzles rather than guessing. | |
971 | @item Rates puzzles. Most generators don't give an indication of the difficulty | |
972 | of a Sudoku puzzle. QQwing does. | |
973 | @item Can print solve instructions for any puzzle. | |
974 | @item Customizable output style, including a CSV style that is easy to | |
975 | import into a database. | |
976 | @end enumerate") | |
977 | (license license:gpl2+))) | |
d2cc38b7 KK |
978 | |
979 | (define-public quesoglc | |
980 | (package | |
981 | (name "quesoglc") | |
982 | (version "0.7.2") | |
983 | (source (origin | |
984 | (method url-fetch) | |
985 | (uri (string-append "mirror://sourceforge/" name "/" version "/" | |
986 | name "-" version "-free.tar.bz2")) | |
987 | (sha256 | |
988 | (base32 | |
989 | "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks")))) | |
990 | (build-system gnu-build-system) | |
991 | (native-inputs `(("pkg-config" ,pkg-config))) | |
992 | (inputs `(("fontconfig" ,fontconfig) | |
993 | ("freeglute" ,freeglut) | |
994 | ("fribidi" ,fribidi) | |
995 | ("glew" ,glew))) | |
996 | (home-page "http://quesoglc.sourceforge.net") | |
997 | (synopsis "Implementation of the OpenGL Character Renderer (GLC)") | |
998 | (description | |
999 | "The OpenGL Character Renderer (GLC) is a state machine that provides | |
1000 | OpenGL programs with character rendering services via an application programming | |
1001 | interface (API).") | |
1002 | (license (list license:expat license:lgpl2.1+)))) | |
4bc37bf0 KK |
1003 | |
1004 | (define-public python-pygame | |
1005 | (package | |
1006 | (name "python-pygame") | |
a9db93c1 | 1007 | (version "1.9.4") |
4bc37bf0 KK |
1008 | (source (origin |
1009 | (method url-fetch) | |
052f75da | 1010 | (uri (pypi-uri "pygame" version)) |
4bc37bf0 KK |
1011 | (sha256 |
1012 | (base32 | |
a9db93c1 | 1013 | "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh")))) |
4bc37bf0 KK |
1014 | (build-system python-build-system) |
1015 | (arguments | |
a9db93c1 | 1016 | `(#:tests? #f ; tests require pygame to be installed first |
4bc37bf0 KK |
1017 | #:phases |
1018 | (modify-phases %standard-phases | |
1019 | ;; Set the paths to the dependencies manually because | |
1020 | ;; the configure script does not allow passing them as | |
1021 | ;; parameters. This also means we can skip the configure | |
1022 | ;; phase. | |
1023 | (add-before 'build 'set-library-paths | |
1024 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1025 | (let ((sdl-ref (assoc-ref inputs "sdl")) | |
1026 | (font-ref (assoc-ref inputs "sdl-ttf")) | |
1027 | (image-ref (assoc-ref inputs "sdl-image")) | |
1028 | (mixer-ref (assoc-ref inputs "sdl-mixer")) | |
1029 | (smpeg-ref (assoc-ref inputs "libsmpeg")) | |
1030 | (png-ref (assoc-ref inputs "libpng")) | |
1031 | (jpeg-ref (assoc-ref inputs "libjpeg")) | |
052f75da | 1032 | (freetype-ref (assoc-ref inputs "freetype")) |
4bc37bf0 KK |
1033 | (v4l-ref (assoc-ref inputs "v4l-utils")) |
1034 | (out-ref (assoc-ref outputs "out"))) | |
1035 | (substitute* "Setup.in" | |
1036 | (("SDL = -I/usr/include/SDL") | |
1037 | (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) | |
1038 | (substitute* "Setup.in" | |
1039 | (("FONT = -lSDL_ttf") | |
1040 | (string-append "FONT = -I" font-ref "/include/SDL -L" | |
a9db93c1 | 1041 | font-ref "/lib -lSDL_ttf"))) |
4bc37bf0 KK |
1042 | (substitute* "Setup.in" |
1043 | (("IMAGE = -lSDL_image") | |
1044 | (string-append "IMAGE = -I" image-ref "/include/SDL -L" | |
a9db93c1 | 1045 | image-ref "/lib -lSDL_image"))) |
4bc37bf0 KK |
1046 | (substitute* "Setup.in" |
1047 | (("MIXER = -lSDL_mixer") | |
1048 | (string-append "MIXER = -I" mixer-ref "/include/SDL -L" | |
a9db93c1 | 1049 | mixer-ref "/lib -lSDL_mixer"))) |
4bc37bf0 KK |
1050 | (substitute* "Setup.in" |
1051 | (("SMPEG = -lsmpeg") | |
1052 | (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" | |
a9db93c1 | 1053 | smpeg-ref "/lib -lsmpeg"))) |
4bc37bf0 KK |
1054 | (substitute* "Setup.in" |
1055 | (("PNG = -lpng") | |
1056 | (string-append "PNG = -I" png-ref "/include -L" | |
a9db93c1 | 1057 | png-ref "/lib -lpng"))) |
4bc37bf0 KK |
1058 | (substitute* "Setup.in" |
1059 | (("JPEG = -ljpeg") | |
1060 | (string-append "JPEG = -I" jpeg-ref "/include -L" | |
1061 | jpeg-ref "/lib -ljpeg"))) | |
052f75da DM |
1062 | |
1063 | (substitute* "Setup.in" | |
1064 | (("FREETYPE = -lfreetype") | |
1065 | (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" | |
1066 | freetype-ref "/lib -lfreetype"))) | |
1067 | ||
4bc37bf0 KK |
1068 | (substitute* "Setup.in" |
1069 | (("^pypm") "#pypm")) | |
4bc37bf0 KK |
1070 | ;; Create a path to a header file provided by v4l-utils. |
1071 | (system* "mkdir" "linux") | |
1072 | (system* "ln" "--symbolic" | |
1073 | (string-append v4l-ref "/include/libv4l1-videodev.h") | |
1074 | "linux/videodev.h") | |
1075 | (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) | |
4bc37bf0 | 1076 | (inputs |
052f75da DM |
1077 | `(("freetype" ,freetype) |
1078 | ("sdl" ,sdl) | |
4bc37bf0 KK |
1079 | ("sdl-image" ,sdl-image) |
1080 | ("sdl-mixer" ,sdl-mixer) | |
1081 | ("sdl-ttf" ,sdl-ttf) | |
1082 | ("sdl-gfx" ,sdl-gfx) | |
4bd428a7 | 1083 | ("libjpeg" ,libjpeg-turbo) |
4bc37bf0 KK |
1084 | ("libpng" ,libpng) |
1085 | ("libX11" ,libx11) | |
1086 | ("libsmpeg" ,libsmpeg) | |
1087 | ("portmidi" ,portmidi) | |
1088 | ("v4l-utils" ,v4l-utils))) | |
167f0e82 | 1089 | (home-page "https://www.pygame.org") |
4bc37bf0 KK |
1090 | (synopsis "SDL wrapper for Python") |
1091 | (description "Pygame is a set of Python modules designed for writing games. | |
1092 | Pygame adds functionality on top of the excellent SDL library. This allows you | |
1093 | to create fully featured games and multimedia programs in the python language.") | |
1094 | (license (list license:bsd-2 | |
1095 | ;; python numeric license as listed by Debian looks like | |
1096 | ;; an Expat-style license with a warranty disclaimer for | |
1097 | ;; the U.S. government and the University of California. | |
1098 | license:expat | |
1099 | license:lgpl2.0+ | |
1100 | license:lgpl2.1+ | |
1101 | license:gpl3+ | |
1102 | license:psfl | |
1103 | license:public-domain | |
1104 | license:lgpl2.1+)))) | |
052f75da DM |
1105 | |
1106 | (define-public python2-pygame | |
1107 | (package-with-python2 python-pygame)) | |
68c6110c | 1108 | |
8476e585 CY |
1109 | (define-public python2-pygame-sdl2 |
1110 | (let ((real-version "2.1.0") | |
8229b2b5 | 1111 | (renpy-version "7.4.5")) |
8476e585 CY |
1112 | (package |
1113 | (inherit python2-pygame) | |
1114 | (name "python2-pygame-sdl2") | |
1115 | (version (string-append real-version "-for-renpy-" renpy-version)) | |
1116 | (source | |
1117 | (origin | |
1118 | (method url-fetch) | |
1119 | (uri (string-append "https://www.renpy.org/dl/" renpy-version | |
1120 | "/pygame_sdl2-" version ".tar.gz")) | |
8229b2b5 | 1121 | (sha256 (base32 "03jqg4lniazqrm40v2fy4z1a16qzs037r22qavzb6bh7kcmg1ydy")) |
2a951e87 LP |
1122 | (modules '((guix build utils))) |
1123 | (snippet | |
1124 | '(begin | |
1125 | ;; drop generated sources | |
1126 | (delete-file-recursively "gen") | |
b4d71a62 | 1127 | (delete-file-recursively "gen-static") |
2a951e87 | 1128 | #t)))) |
8476e585 CY |
1129 | (build-system python-build-system) |
1130 | (arguments | |
1131 | `(#:tests? #f ; tests require pygame to be installed first | |
1132 | #:python ,python-2 | |
1133 | #:phases | |
1134 | (modify-phases %standard-phases | |
1135 | (add-after 'set-paths 'set-sdl-vars | |
1136 | (lambda* (#:key inputs #:allow-other-keys) | |
1137 | (setenv "PYGAME_SDL2_CFLAGS" | |
1138 | (string-append "-I" | |
1139 | (assoc-ref inputs "sdl-union") | |
1140 | "/include/SDL2 -D_REENTRANT")) | |
1141 | (setenv "PYGAME_SDL2_LDFLAGS" | |
1142 | (string-append "-L" | |
1143 | (assoc-ref inputs "sdl-union") | |
1144 | "/lib -Wl,-rpath," | |
1145 | (assoc-ref inputs "sdl-union") | |
1146 | "/lib -Wl,--enable-new-dtags -lSDL2")) | |
8476e585 CY |
1147 | #t))))) |
1148 | (inputs | |
1149 | `(("sdl-union" | |
1150 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
1151 | (native-inputs | |
1152 | `(("python2-cython" ,python2-cython))) | |
dfb67d2c | 1153 | (home-page "https://www.renpy.org/") |
8476e585 CY |
1154 | (synopsis "Reimplementation of the Pygame API using SDL2") |
1155 | (description "Pygame_SDL2 reimplements the Pygame API using SDL2, | |
1156 | staying close to the original, but also adding some SDL2-specific features. | |
1157 | While it aims to be used as a drop-in replacement, it appears to be | |
1158 | developed mainly for Ren'py.") | |
1159 | (license (list license:lgpl2.1 license:zlib))))) | |
1160 | ||
1161 | (define-public python2-renpy | |
1162 | (package | |
1163 | (name "python2-renpy") | |
8229b2b5 | 1164 | (version "7.4.5") |
8476e585 CY |
1165 | (source |
1166 | (origin | |
1167 | (method url-fetch) | |
1168 | (uri (string-append "https://www.renpy.org/dl/" version | |
1169 | "/renpy-" version "-source.tar.bz2")) | |
8229b2b5 | 1170 | (sha256 (base32 "0a7lwijmj9l3sjdmxgwvvlx28byws3z9cq94l417bi6r7f6pcxam")) |
1592491c LP |
1171 | (modules '((guix build utils))) |
1172 | (patches | |
1173 | (search-patches | |
1174 | "renpy-use-system-fribidi.patch")) | |
1175 | (snippet | |
1176 | '(with-directory-excursion "module" | |
1177 | ;; drop generated sources | |
1178 | (delete-file-recursively "gen") | |
1179 | ;; drop fribidi sources | |
1180 | (delete-file-recursively "fribidi-src") | |
1181 | #t)))) | |
8476e585 CY |
1182 | (build-system python-build-system) |
1183 | (arguments | |
1184 | `(#:tests? #f ; Ren'py doesn't seem to package tests | |
1185 | #:python ,python-2 | |
1186 | #:phases | |
1187 | (modify-phases %standard-phases | |
1188 | (add-after 'unpack 'fix-commands | |
1189 | (lambda _ | |
1190 | (substitute* "renpy/editor.py" | |
1191 | (("xdg-open") | |
1192 | (which "xdg-open"))) | |
1193 | #t)) | |
1592491c LP |
1194 | (add-after 'unpack 'fix-include-paths |
1195 | (lambda* (#:key inputs #:allow-other-keys) | |
1196 | (substitute* "module/setup.py" | |
1197 | (("/usr/include/fribidi") | |
1198 | (string-append (assoc-ref inputs "fribidi") | |
1199 | "/include/fribidi"))) | |
1200 | #t)) | |
8476e585 CY |
1201 | (add-after 'set-paths 'set-build-vars |
1202 | (lambda* (#:key inputs #:allow-other-keys) | |
1203 | (setenv "RENPY_CYTHON" | |
1204 | (string-append (assoc-ref inputs "python2-cython") | |
1205 | "/bin/cython")) | |
1206 | (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":")) | |
1207 | #t)) | |
1208 | (replace 'build | |
37c52b5b LP |
1209 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) |
1210 | ;; The "module" subdirectory contains a python (really cython) | |
1211 | ;; project, which is built using a script, that is thankfully | |
1212 | ;; named "setup.py". | |
1213 | (with-directory-excursion "module" | |
1214 | (apply (assoc-ref %standard-phases 'build) args)) | |
1215 | ;; the above causes renpy.__init__ to be compiled but does not | |
1216 | ;; compile anything else, hence we do that here | |
1217 | (delete-file "renpy/__init__.pyc") | |
1218 | (invoke "python" "-m" "compileall" "renpy") | |
8476e585 CY |
1219 | #t)) |
1220 | (replace 'install | |
37c52b5b LP |
1221 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) |
1222 | ;; Again, we have to wrap the module installation. | |
1223 | ;; Additionally, we want to install the python code | |
1224 | ;; (both source and compiled) in the same directory. | |
1225 | (let* ((out (assoc-ref outputs "out")) | |
1226 | (site (string-append "/lib/python" | |
eaa99857 LP |
1227 | (python-version |
1228 | (assoc-ref inputs "python")) | |
37c52b5b LP |
1229 | "/site-packages"))) |
1230 | (with-directory-excursion "module" | |
1231 | (apply (assoc-ref %standard-phases 'install) args)) | |
1232 | (copy-recursively "renpy" | |
1233 | (string-append out site "/renpy"))) | |
8476e585 CY |
1234 | #t))))) |
1235 | (inputs | |
1236 | `(("ffmpeg" ,ffmpeg) | |
1237 | ("freetype" ,freetype) | |
1592491c | 1238 | ("fribidi" ,fribidi) |
8476e585 CY |
1239 | ("glew" ,glew) |
1240 | ("libpng" ,libpng) | |
8476e585 CY |
1241 | ("sdl-union" |
1242 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
eaa99857 LP |
1243 | (propagated-inputs |
1244 | `(("python2-future" ,python2-future) | |
1245 | ("python2-pygame" ,python2-pygame-sdl2))) | |
8476e585 | 1246 | (native-inputs |
771e1e75 LP |
1247 | `(("gcc" ,gcc-8) ; for const variables as initializer elements |
1248 | ("python2-cython" ,python2-cython) | |
8476e585 | 1249 | ("xdg-utils" ,xdg-utils))) |
22e5a77a | 1250 | (home-page "https://www.renpy.org/") |
8476e585 CY |
1251 | (synopsis "Ren'py python module") |
1252 | (description "This package contains the shared libraries and Python | |
1253 | modules of Ren'py.") | |
1254 | (license license:expat))) | |
1255 | ||
1256 | (define-public renpy | |
1257 | (package | |
1258 | (inherit python2-renpy) | |
1259 | (name "renpy") | |
8476e585 CY |
1260 | (build-system python-build-system) |
1261 | (arguments | |
1262 | `(#:tests? #f ; see python2-renpy | |
1263 | #:python ,python-2 | |
1264 | #:phases | |
1265 | (modify-phases %standard-phases | |
1266 | (add-after 'unpack 'fix-commands | |
1267 | (lambda* (#:key outputs #:allow-other-keys) | |
1268 | (substitute* "launcher/game/choose_directory.rpy" | |
1269 | (("/usr/bin/python") (which "python2"))) | |
1270 | (substitute* "launcher/game/front_page.rpy" | |
1271 | (("xdg-open") | |
1272 | (which "xdg-open"))) | |
1273 | (substitute* "launcher/game/project.rpy" | |
1274 | (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]") | |
1275 | (string-append "cmd = [ \"" (assoc-ref outputs "out") | |
1276 | "/bin/renpy\" ]")) | |
1277 | ;; Projects are still created in the usual style, so we need | |
1278 | ;; to adjust the path. | |
1279 | (("cmd.append\\(self.path\\)") | |
1280 | "cmd.append(self.path + \"/game\")")) | |
1281 | #t)) | |
1282 | (add-after 'unpack 'drop-game-from-paths | |
1283 | (lambda _ | |
1284 | (substitute* (list "launcher/game/gui7.rpy" | |
1285 | "launcher/game/gui7/images.py") | |
1286 | ((", \"game\",") ",")) | |
1287 | #t)) | |
1288 | (add-before 'build 'start-xserver | |
1289 | (lambda* (#:key inputs #:allow-other-keys) | |
1290 | (let ((xorg-server (assoc-ref inputs "xorg-server"))) | |
1291 | (setenv "HOME" (getcwd)) | |
1292 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
1293 | (setenv "DISPLAY" ":1") | |
1294 | #t))) | |
1295 | (replace 'build | |
1296 | (lambda _ | |
1297 | (invoke "python" "renpy.py" "launcher" "quit") | |
1298 | (invoke "python" "renpy.py" "the_question" "quit") | |
1299 | (invoke "python" "renpy.py" "tutorial" "quit") | |
1300 | #t)) | |
1301 | (replace 'install | |
1302 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1303 | ;; Here we install our custom renpy program. | |
1304 | ;; After finishing this step, "out" will have the following: | |
1305 | ;; |-- bin/renpy | |
1306 | ;; `-- share/renpy ; i.e. path_to_renpy_base() | |
1307 | ;; `-- common | |
1308 | ;; | |
1309 | ;; Note that common is also a de facto unused directory in | |
1310 | ;; python2-renpy. On other systems, renpy_base would point to | |
1311 | ;; site-packages or even somewhere in /opt. | |
1312 | ;; The former approach is not as straightforward as it seems | |
1313 | ;; -- it causes renpy to load files twice for some weird reason -- | |
1314 | ;; and the latter is impossible on Guix. Hence the detour through | |
1315 | ;; share/renpy and the custom renpy program. | |
1316 | ;; | |
1317 | ;; As a convention, other games should be installed as | |
1318 | ;; subdirectories of share/renpy in their respective outputs as | |
1319 | ;; well. This differs from the traditional layout, which is | |
1320 | ;; roughly the following: | |
1321 | ;; `-- Super Awesome Game | |
1322 | ;; |-- game ; <- the folder we actually want | |
1323 | ;; |-- lib ; compiled renpy module and dependencies | |
1324 | ;; |-- renpy ; Ren'py python code (source + compiled) | |
1325 | ;; |-- Super Awesome Game.py | |
1326 | ;; `-- Super Awesome Game.sh | |
1327 | (let* ((out (assoc-ref outputs "out")) | |
1328 | (bin/renpy (string-append out "/bin/renpy"))) | |
1329 | (mkdir-p (string-append out "/bin")) | |
1330 | (copy-recursively "renpy/common" | |
1331 | (string-append out "/share/renpy/common")) | |
1332 | (copy-recursively "gui" | |
1333 | (string-append out "/share/renpy/gui")) | |
1334 | ||
1335 | (call-with-output-file bin/renpy | |
1336 | (lambda (port) | |
1337 | (format port "#!~a~%" (which "python2")) | |
1338 | (format port " | |
1339 | from __future__ import print_function | |
1340 | ||
1341 | import os | |
1342 | import sys | |
1343 | import warnings | |
1344 | ||
1345 | def path_to_common(renpy_base): | |
1346 | return renpy_base + \"/common\" | |
1347 | ||
1348 | def path_to_saves(gamedir, save_directory=None): | |
1349 | import renpy # @UnresolvedImport | |
1350 | ||
1351 | if save_directory is None: | |
1352 | save_directory = renpy.config.save_directory | |
1353 | save_directory = renpy.exports.fsencode(save_directory) | |
1354 | ||
1355 | if not save_directory: | |
1356 | return gamedir + \"/saves\" | |
1357 | ||
1358 | return os.path.expanduser(\"~~/.renpy/\" + save_directory) | |
1359 | ||
1360 | def path_to_renpy_base(): | |
1361 | return \"~a\" | |
1362 | ||
1363 | def main(): | |
1364 | renpy_base = path_to_renpy_base() | |
1365 | try: | |
1366 | import renpy.bootstrap | |
1367 | import renpy.arguments | |
1368 | except ImportError: | |
1369 | print(\"\"\"Could not import renpy.bootstrap. | |
1370 | Please ensure you decompressed Ren'Py correctly, preserving the directory | |
1371 | structure.\"\"\", file=sys.stderr) | |
1372 | raise | |
1373 | ||
1374 | args = renpy.arguments.bootstrap() | |
1375 | if not args.basedir: | |
1376 | print(\"\"\"This Ren'py requires a basedir to launch. | |
1377 | The basedir is the directory, in which .rpy files live -- usually the 'game' | |
1378 | subdirectory of a game packaged by Ren'py. | |
1379 | ||
1380 | If you want the Ren'py launcher, use renpy-launcher instead.\"\"\", | |
1381 | file=sys.stderr) | |
1382 | sys.exit() | |
1383 | ||
1384 | renpy.bootstrap.bootstrap(renpy_base) | |
1385 | ||
1386 | if __name__ == \"__main__\": | |
1387 | main() | |
1388 | " | |
1389 | (string-append out "/share/renpy")))) | |
1390 | (chmod bin/renpy #o755) | |
1391 | #t))) | |
1392 | ||
1393 | (add-after 'install 'install-games | |
1394 | (lambda* (#:key outputs #:allow-other-keys) | |
1395 | (define renpy (assoc-ref outputs "out")) | |
1396 | ;; TODO: We should offer a renpy-build-system to make the | |
1397 | ;; installation of Ren'py games easier. | |
1398 | (define* (install-renpy-game #:key output game name (renpy renpy) | |
1399 | #:allow-other-keys) | |
1400 | (let* ((name (or name (basename game))) | |
1401 | (launcher (string-append output "/bin/renpy-" name)) | |
1402 | (share (string-append output "/share/renpy/" name))) | |
1403 | (copy-recursively (string-append game "/game") share) | |
1404 | (mkdir-p (string-append output "/bin")) | |
1405 | (with-output-to-file launcher | |
1406 | (lambda () | |
1407 | (format #t | |
1408 | "#!~a~%~a ~a \"$@\"" | |
1409 | (which "bash") | |
1410 | (string-append renpy "/bin/renpy") | |
1411 | share))) | |
1412 | (chmod launcher #o755))) | |
1413 | ||
1414 | (install-renpy-game #:output (assoc-ref outputs "out") | |
1415 | #:game "launcher") | |
1416 | ||
1417 | (install-renpy-game #:output (assoc-ref outputs "the-question") | |
1418 | #:game "the_question" | |
1419 | #:name "the-question") | |
1420 | ||
1421 | (install-renpy-game #:output (assoc-ref outputs "tutorial") | |
1422 | #:game "tutorial") | |
1423 | #t)) | |
1424 | (replace 'wrap | |
1425 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1426 | (wrap-program (string-append (assoc-ref outputs "out") | |
1427 | "/bin/renpy") | |
1428 | `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) | |
1429 | #t))))) | |
1430 | (inputs | |
1431 | `(("python2-tkinter" ,python-2 "tk") | |
1432 | ("python2-pygame" ,python2-pygame-sdl2) | |
1433 | ("python2-renpy" ,python2-renpy) | |
1434 | ("xorg-server" ,xorg-server))) | |
1435 | (outputs | |
1436 | (list "out" "tutorial" "the-question")) | |
10052b70 | 1437 | (home-page "https://www.renpy.org/") |
8476e585 CY |
1438 | (synopsis "Visual Novel Engine") |
1439 | (description "Ren'Py is a visual novel engine that helps you use words, | |
1440 | images, and sounds to tell interactive stories that run on computers and | |
1441 | mobile devices. These can be both visual novels and life simulation games. | |
1442 | The easy to learn script language allows anyone to efficiently write large | |
1443 | visual novels, while its Python scripting is enough for complex simulation | |
1444 | games.") | |
1445 | (license license:expat))) | |
1446 | ||
68c6110c DT |
1447 | (define-public grafx2 |
1448 | (package | |
1449 | (name "grafx2") | |
1450 | (version "2.4") | |
1451 | (source (origin | |
1452 | (method url-fetch) | |
1453 | ;; XXX: There is no URL that contains the version. :( | |
1454 | (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21") | |
1455 | (sha256 | |
1456 | (base32 | |
1457 | "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q")))) | |
1458 | (build-system gnu-build-system) | |
1459 | (arguments | |
1460 | '(#:phases | |
1461 | (modify-phases %standard-phases | |
1462 | (delete 'configure) ; no configure script | |
1463 | (add-before 'build 'change-to-src-directory | |
1464 | (lambda _ | |
1465 | (chdir "src") | |
1466 | #t))) | |
1467 | #:make-flags | |
1468 | ;; SDL header files are referenced without the preceeding "SDL/". | |
1469 | (list (string-append "CFLAGS=-I" | |
1470 | (assoc-ref %build-inputs "sdl-union") | |
1471 | "/include/SDL") | |
1472 | (string-append "prefix=" | |
1473 | (assoc-ref %outputs "out"))) | |
1474 | #:tests? #f)) ; no check target | |
1475 | (native-inputs | |
1476 | `(("pkg-config" ,pkg-config))) | |
1477 | (inputs | |
1478 | `(("libpng" ,libpng) | |
1479 | ("lua" ,lua-5.1) | |
1480 | ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf))))) | |
1481 | (synopsis "Bitmap paint program") | |
1482 | (description "GrafX2 is a bitmap paint program inspired by the Amiga | |
7432d3ae | 1483 | programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it |
68c6110c DT |
1484 | includes a very large number of tools and effects that make it particularly |
1485 | suitable for pixel art, game graphics, and generally any detailed graphics | |
1486 | painted with a mouse.") | |
1487 | (home-page "http://pulkomandy.tk/projects/GrafX2") | |
1488 | (license license:gpl2))) ; GPLv2 only | |
c608fe8c MR |
1489 | |
1490 | (define-public ois | |
1491 | (package | |
1492 | (name "ois") | |
1c4144a1 | 1493 | (version "1.5.1") |
c608fe8c MR |
1494 | (source |
1495 | (origin | |
c608fe8c MR |
1496 | (method git-fetch) |
1497 | (uri (git-reference | |
b0e7b699 | 1498 | (url "https://github.com/wgois/OIS") |
006345c1 TGR |
1499 | (commit (string-append "v" version)))) |
1500 | (file-name (git-file-name name version)) | |
c608fe8c | 1501 | (sha256 |
1c4144a1 | 1502 | (base32 "0nkh0zrsbyv47c0i0vhdna3jsnvs69pb1svg75avxw6z7kwskgla")))) |
006345c1 TGR |
1503 | (build-system cmake-build-system) |
1504 | (arguments | |
1505 | `(#:tests? #f)) ; no test suite | |
c608fe8c | 1506 | (inputs |
006345c1 | 1507 | `(("libx11" ,libx11))) |
c608fe8c MR |
1508 | (synopsis "Object Oriented Input System") |
1509 | (description | |
1510 | "Cross Platform Object Oriented Input Lib System is a cross platform, | |
1511 | simple solution for using all kinds of Input Devices (Keyboards, Mice, | |
1512 | Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very | |
1513 | robust and compatible with many systems and operating systems.") | |
1514 | (home-page "https://github.com/wgois/OIS") | |
1515 | (license license:zlib))) | |
42d0d13d MR |
1516 | |
1517 | (define-public mygui | |
1518 | (package | |
1519 | (name "mygui") | |
1520 | (version "3.2.2") | |
1521 | (source | |
1522 | (origin | |
47f4d5d3 PN |
1523 | (method git-fetch) |
1524 | (uri (git-reference | |
1525 | (url "https://github.com/MyGUI/mygui") | |
1526 | (commit (string-append "MyGUI" version)))) | |
1527 | (file-name (git-file-name name version)) | |
42d0d13d MR |
1528 | (sha256 |
1529 | (base32 | |
47f4d5d3 | 1530 | "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw")))) |
42d0d13d MR |
1531 | (build-system cmake-build-system) |
1532 | (arguments | |
1533 | '(#:tests? #f ; No test target | |
1534 | #:configure-flags | |
1535 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1536 | (string-append "-DOGRE_INCLUDE_DIR=" | |
1537 | (assoc-ref %build-inputs "ogre") | |
47f4d5d3 PN |
1538 | "/include/OGRE") |
1539 | ;; Demos and tools are Windows-specific: | |
1540 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1541 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1542 | "-DMYGUI_BUILD_TOOLS=FALSE"))) | |
42d0d13d MR |
1543 | (native-inputs |
1544 | `(("boost" ,boost) | |
1545 | ("doxygen" ,doxygen) | |
1546 | ("pkg-config" ,pkg-config))) | |
1547 | (inputs | |
1548 | `(("font-dejavu" ,font-dejavu) | |
1549 | ("freetype" ,freetype) | |
1550 | ("graphviz" ,graphviz) | |
1551 | ("libx11" ,libx11) | |
1552 | ("ogre" ,ogre) | |
1553 | ("ois" ,ois))) | |
1554 | (synopsis "Fast, flexible and simple GUI") | |
1555 | (description | |
1556 | "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games | |
1557 | and 3D applications. The main goals of mygui are: speed, flexibility and ease | |
1558 | of use.") | |
1559 | (home-page "http://mygui.info/") | |
1560 | (license license:expat))) | |
e9a599cd | 1561 | |
9fd50db3 PN |
1562 | (define-public mygui-gl |
1563 | ;; Closure size is reduced by some 800 MiB. | |
1564 | (package | |
1565 | (inherit mygui) | |
1566 | (name "mygui-gl") | |
1567 | (version "3.2.2") | |
1568 | (arguments | |
1569 | (substitute-keyword-arguments (package-arguments mygui) | |
1570 | ((#:configure-flags _) | |
1571 | `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL. | |
1572 | ;; We can't reuse the flags because of the mention to Ogre. | |
1573 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1574 | ;; Demos and tools are Windows-specific: | |
1575 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1576 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1577 | "-DMYGUI_BUILD_TOOLS=FALSE"))))) | |
1578 | (inputs | |
1579 | `(("mesa" ,mesa) | |
1580 | ("glu" ,glu) | |
1581 | ,@(fold alist-delete (package-inputs mygui) | |
1582 | '("ogre")))) | |
1583 | (synopsis "Fast, flexible and simple GUI (OpenGL backend)"))) | |
1584 | ||
e9a599cd MR |
1585 | (define-public openmw |
1586 | (package | |
1587 | (name "openmw") | |
d6797a56 | 1588 | (version "0.46.0") |
e9a599cd MR |
1589 | (source |
1590 | (origin | |
aa246eaa EF |
1591 | (method git-fetch) |
1592 | (uri (git-reference | |
1593 | (url "https://github.com/OpenMW/openmw") | |
1594 | (commit (string-append "openmw-" version)))) | |
1595 | (file-name (git-file-name name version)) | |
e9a599cd MR |
1596 | (sha256 |
1597 | (base32 | |
aa246eaa | 1598 | "0rm32zsmxvr6b0jjihfj543skhicbw5kg6shjx312clhlm035w2x")))) |
e9a599cd MR |
1599 | (build-system cmake-build-system) |
1600 | (arguments | |
1601 | `(#:tests? #f ; No test target | |
1602 | #:configure-flags | |
1603 | (list "-DDESIRED_QT_VERSION=5"))) | |
1604 | (native-inputs | |
1605 | `(("boost" ,boost) | |
1606 | ("doxygen" ,doxygen) | |
1607 | ("pkg-config" ,pkg-config))) | |
1608 | (inputs | |
1609 | `(("bullet" ,bullet) | |
1610 | ("ffmpeg" ,ffmpeg) | |
1611 | ("libxt" ,libxt) | |
0655c16e | 1612 | ("mygui" ,mygui-gl) ; OpenMW does not need Ogre. |
e9a599cd | 1613 | ("openal" ,openal) |
f95ec65b | 1614 | ("openscenegraph" ,openmw-openscenegraph) |
ea0a5107 | 1615 | ("qtbase" ,qtbase-5) |
e9a599cd MR |
1616 | ("sdl" ,sdl2) |
1617 | ("unshield" ,unshield))) | |
5a80c15c | 1618 | (synopsis "Re-implementation of the RPG Morrowind engine") |
e9a599cd | 1619 | (description |
5a80c15c RW |
1620 | "OpenMW is a game engine which reimplements and extends the one that runs |
1621 | the 2002 open-world RPG Morrowind. The engine comes with its own editor, | |
1622 | called OpenMW-CS which allows the user to edit or create their own original | |
1623 | games.") | |
e9a599cd | 1624 | (home-page "https://openmw.org") |
8b1f8f64 | 1625 | (license license:gpl3))) |
194b4e7d PM |
1626 | |
1627 | (define-public godot | |
1628 | (package | |
1629 | (name "godot") | |
85c84b10 | 1630 | (version "3.2.3") |
194b4e7d | 1631 | (source (origin |
39f516cb TGR |
1632 | (method git-fetch) |
1633 | (uri (git-reference | |
1634 | (url "https://github.com/godotengine/godot") | |
1635 | (commit (string-append version "-stable")))) | |
1636 | (file-name (git-file-name name version)) | |
194b4e7d | 1637 | (sha256 |
9766c6e2 | 1638 | (base32 |
85c84b10 | 1639 | "19vrp5lhyvxbm6wjxzn28sn3i0s8j08ca7nani8l1nrhvlc8wi0v")) |
18f8e935 TL |
1640 | (modules '((guix build utils) |
1641 | (ice-9 ftw) | |
1642 | (srfi srfi-1))) | |
5b8d2ace MB |
1643 | (snippet |
1644 | '(begin | |
18f8e935 TL |
1645 | ;; Keep only those bundled files we have not (yet) replaced |
1646 | ;; with Guix versions. Note that some of these may be | |
1647 | ;; modified; see "thirdparty/README.md". | |
5b8d2ace | 1648 | (with-directory-excursion "thirdparty" |
18f8e935 TL |
1649 | (let* ((preserved-files |
1650 | '("README.md" | |
451e1075 | 1651 | "assimp" |
18f8e935 TL |
1652 | "certs" |
1653 | "cvtt" | |
1654 | "enet" | |
1655 | "etc2comp" | |
1656 | "fonts" | |
1657 | "glad" | |
1658 | "jpeg-compressor" | |
1659 | "libsimplewebm" | |
18f8e935 TL |
1660 | "miniupnpc" |
1661 | "minizip" | |
1662 | "misc" | |
1663 | "nanosvg" | |
1664 | "pvrtccompressor" | |
1665 | "recastnavigation" | |
1666 | "squish" | |
18f8e935 | 1667 | "tinyexr" |
451e1075 | 1668 | "vhacd" |
18f8e935 TL |
1669 | "xatlas"))) |
1670 | (for-each delete-file-recursively | |
1671 | (lset-difference string=? | |
1672 | (scandir ".") | |
1673 | (cons* "." ".." preserved-files))))) | |
1674 | #t)))) | |
92b51d12 | 1675 | (build-system scons-build-system) |
194b4e7d | 1676 | (arguments |
92b51d12 | 1677 | `(#:scons ,scons-python2 |
ab67f84b | 1678 | #:scons-flags (list "platform=x11" "target=release_debug" |
92b51d12 AI |
1679 | ;; Avoid using many of the bundled libs. |
1680 | ;; Note: These options can be found in the SConstruct file. | |
c1bc92c0 | 1681 | "builtin_bullet=no" |
92b51d12 AI |
1682 | "builtin_freetype=no" |
1683 | "builtin_glew=no" | |
1684 | "builtin_libmpdec=no" | |
1685 | "builtin_libogg=no" | |
1686 | "builtin_libpng=no" | |
1687 | "builtin_libtheora=no" | |
1688 | "builtin_libvorbis=no" | |
5b8d2ace | 1689 | "builtin_libvpx=no" |
92b51d12 | 1690 | "builtin_libwebp=no" |
c1bc92c0 | 1691 | "builtin_mbedtls=no" |
92b51d12 | 1692 | "builtin_opus=no" |
c1bc92c0 | 1693 | "builtin_pcre2=no" |
451e1075 | 1694 | "builtin_wslay=no" |
c1bc92c0 TL |
1695 | "builtin_zlib=no" |
1696 | "builtin_zstd=no") | |
545511df | 1697 | #:tests? #f ; There are no tests |
194b4e7d PM |
1698 | #:phases |
1699 | (modify-phases %standard-phases | |
194b4e7d PM |
1700 | (add-after 'unpack 'scons-use-env |
1701 | (lambda _ | |
1702 | ;; Scons does not use the environment variables by default, | |
1703 | ;; but this substitution makes it do so. | |
1704 | (substitute* "SConstruct" | |
1705 | (("env_base = Environment\\(tools=custom_tools\\)") | |
1706 | (string-append | |
1707 | "env_base = Environment(tools=custom_tools)\n" | |
1708 | "env_base = Environment(ENV=os.environ)"))) | |
1709 | #t)) | |
545511df TL |
1710 | ;; Build headless tools, used for packaging games without depending on X. |
1711 | (add-after 'build 'build-headless | |
1712 | (lambda* (#:key scons-flags #:allow-other-keys) | |
1713 | (apply invoke "scons" | |
1714 | `(,(string-append "-j" (number->string (parallel-job-count))) | |
1715 | "platform=server" ,@(delete "platform=x11" scons-flags))))) | |
194b4e7d | 1716 | (replace 'install |
545511df | 1717 | (lambda* (#:key inputs outputs #:allow-other-keys) |
194b4e7d | 1718 | (let* ((out (assoc-ref outputs "out")) |
545511df TL |
1719 | (headless (assoc-ref outputs "headless")) |
1720 | (zenity (assoc-ref inputs "zenity"))) | |
1721 | ;; Strip build info from filenames. | |
194b4e7d | 1722 | (with-directory-excursion "bin" |
545511df TL |
1723 | (for-each |
1724 | (lambda (file) | |
1725 | (let ((dest (car (string-split (basename file) #\.)))) | |
1726 | (rename-file file dest))) | |
1727 | (find-files "." "godot.*\\.x11\\.opt\\.tools.*")) | |
1728 | (install-file "godot" (string-append out "/bin")) | |
1729 | (install-file "godot_server" (string-append headless "/bin"))) | |
1730 | ;; Tell the editor where to find zenity for OS.alert(). | |
1731 | (wrap-program (string-append out "/bin/godot") | |
1732 | `("PATH" ":" prefix (,(string-append zenity "/bin"))))) | |
1733 | #t)) | |
194b4e7d PM |
1734 | (add-after 'install 'install-godot-desktop |
1735 | (lambda* (#:key outputs #:allow-other-keys) | |
1736 | (let* ((out (assoc-ref outputs "out")) | |
bf076da9 TL |
1737 | (applications (string-append out "/share/applications")) |
1738 | (icons (string-append out "/share/icons/hicolor"))) | |
1739 | (mkdir-p applications) | |
1740 | (copy-file "misc/dist/linux/org.godotengine.Godot.desktop" | |
1741 | (string-append applications "/godot.desktop")) | |
1742 | (for-each (lambda (icon dest) | |
1743 | (mkdir-p (dirname dest)) | |
1744 | (copy-file icon dest)) | |
1745 | '("icon.png" "icon.svg") | |
1746 | `(,(string-append icons "/256x256/apps/godot.png") | |
1747 | ,(string-append icons "/scalable/apps/godot.svg")))) | |
1748 | #t))))) | |
545511df | 1749 | (outputs '("out" "headless")) |
92b51d12 | 1750 | (native-inputs `(("pkg-config" ,pkg-config))) |
194b4e7d | 1751 | (inputs `(("alsa-lib" ,alsa-lib) |
c1bc92c0 | 1752 | ("bullet" ,bullet) |
194b4e7d PM |
1753 | ("freetype" ,freetype) |
1754 | ("glew" ,glew) | |
1755 | ("glu" ,glu) | |
1756 | ("libtheora" ,libtheora) | |
1757 | ("libvorbis" ,libvorbis) | |
5b8d2ace | 1758 | ("libvpx" ,libvpx) |
194b4e7d PM |
1759 | ("libwebp" ,libwebp) |
1760 | ("libx11" ,libx11) | |
1761 | ("libxcursor" ,libxcursor) | |
9766c6e2 | 1762 | ("libxi" ,libxi) |
194b4e7d PM |
1763 | ("libxinerama" ,libxinerama) |
1764 | ("libxrandr" ,libxrandr) | |
c1bc92c0 | 1765 | ("mbedtls" ,mbedtls-apache) |
194b4e7d | 1766 | ("mesa" ,mesa) |
194b4e7d | 1767 | ("opusfile" ,opusfile) |
c1bc92c0 TL |
1768 | ("pcre2" ,pcre2) |
1769 | ("pulseaudio" ,pulseaudio) | |
451e1075 | 1770 | ("wslay" ,wslay) |
7b2ba609 | 1771 | ("zenity" ,zenity) |
c1bc92c0 | 1772 | ("zstd" ,zstd "lib"))) |
194b4e7d PM |
1773 | (home-page "https://godotengine.org/") |
1774 | (synopsis "Advanced 2D and 3D game engine") | |
1775 | (description | |
1776 | "Godot is an advanced multi-platform game engine written in C++. If | |
1777 | features design tools such as a visual editor, can import 3D models and | |
1778 | provide high-quality 3D rendering, it contains an animation editor, and can be | |
1779 | scripted in a Python-like language.") | |
1780 | (license license:expat))) | |
531003be | 1781 | |
a0609772 ASM |
1782 | (define-public entt |
1783 | (package | |
1784 | (name "entt") | |
d3480fbf | 1785 | (version "3.7.1") |
a0609772 ASM |
1786 | (source (origin |
1787 | (method git-fetch) | |
1788 | (uri (git-reference | |
1789 | (url "https://github.com/skypjack/entt") | |
1790 | (commit (string-append "v" version)))) | |
1791 | (file-name (git-file-name name version)) | |
1792 | (sha256 | |
1793 | (base32 | |
d3480fbf | 1794 | "151jg3m262xwaywl2rqnc90yr6p48rhmgi5mxyv6bwqvmfli2m5p")))) |
a0609772 ASM |
1795 | (build-system cmake-build-system) |
1796 | (arguments | |
1797 | `(#:configure-flags (list "-DENTT_BUILD_TESTING=ON" | |
1798 | "-DENTT_FIND_GTEST_PACKAGE=ON" | |
1799 | "-DENTT_BUILD_DOCS=ON") | |
1800 | ;; Only tests are compiled, and they need assertions to work correctly. | |
1801 | #:build-type "Debug")) | |
1802 | (native-inputs | |
1803 | `(;; for testing | |
1804 | ("googletest" ,googletest) | |
1805 | ;; for documentation | |
1806 | ("doxygen" ,doxygen) | |
1807 | ("graphviz" ,graphviz))) | |
1808 | (synopsis "Entity component system") | |
1809 | (description "EnTT is a header-only library, containing (among other things) | |
1810 | @itemize | |
1811 | @item an entity component system based on sparse sets, | |
1812 | @item a configuration system using the monostate pattern, | |
1813 | @item a static reflection system, | |
1814 | @item and a cooperative scheduler. | |
1815 | @end itemize") | |
1816 | (home-page "https://github.com/skypjack/entt") | |
1817 | (license (list license:expat ; code | |
1818 | license:cc-by4.0)))) ; documentation | |
1819 | ||
531003be | 1820 | (define-public eureka |
1821 | (package | |
1822 | (name "eureka") | |
75f66e4a | 1823 | (version "1.24") |
531003be | 1824 | (source (origin |
1825 | (method url-fetch) | |
1826 | (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/" | |
1827 | version "/eureka-" | |
1828 | ;; version without dots e.g 1.21 => 121 | |
1829 | (string-join (string-split version #\.) "") | |
1830 | "-source.tar.gz")) | |
1831 | (sha256 | |
1832 | (base32 | |
75f66e4a | 1833 | "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v")))) |
531003be | 1834 | (build-system gnu-build-system) |
1835 | (arguments | |
1836 | '(#:tests? #f | |
1837 | #:make-flags | |
1838 | (let ((out (assoc-ref %outputs "out"))) | |
1839 | (list (string-append "PREFIX=" out))) | |
1840 | #:phases | |
1841 | (modify-phases %standard-phases | |
1842 | (delete 'configure) | |
1843 | (add-before 'build 'prepare-install-directories | |
1844 | (lambda* (#:key outputs #:allow-other-keys) | |
1845 | (let ((out (assoc-ref outputs "out"))) | |
1846 | (mkdir-p (string-append out "/bin")) | |
1847 | (mkdir-p (string-append out "/share")) | |
1848 | ||
1849 | (with-fluids ((%default-port-encoding #f)) | |
1850 | (substitute* "./src/main.cc" | |
1851 | (("/usr/local") out))) | |
1852 | ||
1853 | (substitute* "Makefile" | |
1854 | (("-o root") "")))))))) | |
1855 | (inputs `(("mesa" ,mesa) | |
1856 | ("libxft" ,libxft) | |
1857 | ("libxinerama" ,libxinerama) | |
1858 | ("libfontconfig" ,fontconfig) | |
4bd428a7 | 1859 | ("libjpeg" ,libjpeg-turbo) |
531003be | 1860 | ("libpng" ,libpng) |
1861 | ("fltk" ,fltk) | |
1862 | ("zlib" ,zlib))) | |
1863 | (native-inputs `(("pkg-config" ,pkg-config) | |
1864 | ("xdg-utils" ,xdg-utils))) | |
1865 | (synopsis "Doom map editor") | |
1866 | (description "Eureka is a map editor for the classic DOOM games, and a few | |
1867 | related games such as Heretic and Hexen. It comes with a 3d preview mode and | |
1868 | a 2D editor view.") | |
1869 | (home-page "http://eureka-editor.sourceforge.net/") | |
1870 | (license license:gpl2+))) | |
00fca594 RW |
1871 | |
1872 | (define-public guile-chickadee | |
1873 | (package | |
1874 | (name "guile-chickadee") | |
c8c336f9 | 1875 | (version "0.7.0") |
00fca594 RW |
1876 | (source (origin |
1877 | (method url-fetch) | |
1878 | (uri (string-append "https://files.dthompson.us/chickadee/" | |
1879 | "chickadee-" version ".tar.gz")) | |
1880 | (sha256 | |
1881 | (base32 | |
c8c336f9 | 1882 | "199y4kc28va6klfs19h998sfh7vx9spnrvjw7p92i47q5a7jdcp6")))) |
00fca594 | 1883 | (build-system gnu-build-system) |
daca7077 EF |
1884 | (arguments |
1885 | '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) | |
00fca594 | 1886 | (propagated-inputs |
be4d9527 DT |
1887 | `(("guile-opengl" ,guile3.0-opengl) |
1888 | ("guile-sdl2" ,guile3.0-sdl2))) | |
00fca594 | 1889 | (inputs |
44110297 | 1890 | `(("freetype" ,freetype) |
be4d9527 | 1891 | ("guile" ,guile-3.0) |
70fb07b5 DB |
1892 | ("libvorbis" ,libvorbis) |
1893 | ("mpg123" ,mpg123) | |
1894 | ("openal" ,openal))) | |
00fca594 RW |
1895 | (native-inputs |
1896 | `(("pkg-config" ,pkg-config) | |
1897 | ("texinfo" ,texinfo))) | |
1898 | (home-page "https://dthompson.us/projects/chickadee.html") | |
1899 | (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL") | |
1900 | (description "Chickadee is a game development toolkit for Guile Scheme | |
1901 | built on top of SDL2 and OpenGL. Chickadee aims to provide all the features | |
1902 | that parenthetically inclined game developers need to make 2D (and eventually | |
1903 | 3D) games in Scheme, such as: | |
1904 | ||
abb0ff45 RW |
1905 | @enumerate |
1906 | @item extensible, fixed-timestep game loop | |
1907 | @item OpenGL-based rendering engine | |
1908 | @item keyboard, mouse, controller input | |
1909 | @item REPL-driven development model | |
1910 | @end enumerate\n") | |
1911 | (license license:gpl3+))) | |
1912 | ||
1913 | (define-public guile3.0-chickadee | |
b4b15389 | 1914 | (deprecated-package "guile3.0-chickadee" guile-chickadee)) |
4041fabb PN |
1915 | |
1916 | (define-public bennu-game-development | |
1917 | (package | |
1918 | (name "bennu-game-development") | |
abb64b5e | 1919 | (version "353") |
4041fabb PN |
1920 | (source (origin |
1921 | (method svn-fetch) | |
1922 | (uri (svn-reference | |
1923 | (url "http://svn.code.sf.net/p/bennugd/code") | |
1924 | (revision (string->number version)))) | |
1925 | (file-name (string-append name "-" version)) | |
1926 | (sha256 | |
1927 | (base32 | |
abb64b5e | 1928 | "1iri58ryk9lbqn585cbccnvrfkj8qxlbcsk8rpih40jhvs1j101l")) |
edf1ce60 EF |
1929 | (modules '((guix build utils))) |
1930 | (snippet | |
1931 | '(begin | |
1932 | (delete-file-recursively "3rdparty") #t)))) | |
4041fabb PN |
1933 | (build-system gnu-build-system) |
1934 | (arguments | |
1935 | '(#:phases | |
1936 | (modify-phases %standard-phases | |
f0e4cfcb | 1937 | (add-after 'unpack 'patch-configure-to-use-openssl |
4041fabb PN |
1938 | (lambda* (#:key outputs #:allow-other-keys) |
1939 | (chdir "core") | |
1940 | (delete-file "configure") | |
1941 | (substitute* "configure.in" | |
1942 | (("i\\*86\\)") | |
f0e4cfcb | 1943 | "*) |
4041fabb PN |
1944 | COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\" |
1945 | COMMON_LDFLAGS=\"$COMMON_LDFLAGS\" | |
1946 | LIBSSL=\"crypto\" | |
1947 | USE_OPENSSL=yes | |
1948 | ;; | |
1949 | ||
f0e4cfcb EF |
1950 | i*86)")) |
1951 | #t))))) | |
4041fabb PN |
1952 | (inputs `(("openssl" ,openssl) |
1953 | ("zlib" ,zlib))) | |
1954 | (native-inputs `(("pkg-config" ,pkg-config) | |
1955 | ("autoconf" ,autoconf) | |
1956 | ("automake" ,automake) | |
1957 | ("libtool" ,libtool))) | |
1958 | (synopsis "Programming language to create games") | |
1959 | (description "Bennu Game Development, also known as bennudg, is a | |
1960 | programming language tailored at game development. It is the successor of | |
1961 | Fenix.") | |
1962 | (home-page "https://sourceforge.net/projects/bennugd/") | |
1963 | (license license:zlib))) | |
24c4b012 PN |
1964 | |
1965 | (define-public bennu-game-development-modules | |
1966 | (package | |
1967 | (inherit bennu-game-development) | |
1968 | (name "bennu-game-development-modules") | |
1969 | (arguments | |
1970 | '(#:phases | |
1971 | (modify-phases %standard-phases | |
1972 | (add-after 'unpack 'patch-conflicting-definitions | |
1973 | (lambda _ | |
1974 | (with-fluids ((%default-port-encoding #f)) | |
1975 | (substitute* "core/include/fmath.h" | |
1976 | (("extern fixed fmul\\( int x, int y \\);") "") | |
1977 | (("extern fixed fdiv\\( int x, int y \\);") ""))) | |
1978 | (chdir "modules")))))) | |
1979 | (inputs `(("zlib" ,zlib) | |
1980 | ("libpng" ,libpng) | |
1981 | ("openssl" ,openssl) | |
1982 | ("sdl-mixer" ,sdl-mixer) | |
1983 | ("bennu-game-development" ,bennu-game-development))) | |
0525864b | 1984 | (synopsis "Modules for the Bennu Game Development programming language") |
24c4b012 | 1985 | (description "This package contains a collection of modules for the Bennu |
0525864b | 1986 | Game Development programming language, from CD handling through SDL to |
24c4b012 | 1987 | joystick support."))) |
cd528946 RW |
1988 | |
1989 | (define-public plib | |
1990 | (package | |
1991 | (name "plib") | |
1992 | (version "1.8.5") | |
1993 | (source (origin | |
1994 | (method url-fetch) | |
1995 | (uri (string-append "http://plib.sourceforge.net/dist/" | |
1996 | "plib-" version ".tar.gz")) | |
1997 | (sha256 | |
1998 | (base32 | |
05f386f1 EF |
1999 | "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8")) |
2000 | (patches (search-patches "plib-CVE-2011-4620.patch" | |
2001 | "plib-CVE-2012-4552.patch")))) | |
cd528946 RW |
2002 | (build-system gnu-build-system) |
2003 | (inputs | |
2004 | `(("mesa" ,mesa) | |
2005 | ("libxi" ,libxi) | |
2006 | ("libxmu" ,libxmu))) | |
2007 | (native-inputs | |
2008 | `(("pkg-config" ,pkg-config))) | |
2009 | (home-page "http://plib.sourceforge.net/") | |
2010 | (synopsis "Suite of portable game libraries") | |
2011 | (description "PLIB is a set of libraries that will permit programmers to | |
2012 | write games and other realtime interactive applications that are 100% portable | |
2013 | across a wide range of hardware and operating systems. PLIB includes sound | |
2014 | effects, music, a complete 3D engine, font rendering, a simple Windowing | |
2015 | library, a game scripting language, a GUI, networking, 3D math library and a | |
2016 | collection of handy utility functions. All are 100% portable across nearly | |
2017 | all modern computing platforms. Each library component is fairly independent | |
2018 | of the others") | |
2019 | (license license:lgpl2.0+))) | |
e4ff9dff PN |
2020 | |
2021 | (define-public ioquake3 | |
2022 | ;; We follow master since it seems that there won't be releases after 1.3.6. | |
2023 | (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0")) | |
2024 | (package | |
2025 | (name "ioquake3") | |
2026 | (version (git-version "1.3.6" "1" commit)) | |
2027 | (source | |
2028 | (origin | |
2029 | (method git-fetch) | |
2030 | (uri (git-reference | |
b0e7b699 | 2031 | (url "https://github.com/ioquake/ioq3") |
e4ff9dff PN |
2032 | (commit commit))) |
2033 | (file-name (git-file-name name version)) | |
2034 | (sha256 | |
2035 | (base32 | |
2036 | "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z")))) | |
2037 | (build-system gnu-build-system) | |
2038 | (inputs | |
2039 | `(("sdl2" ,sdl2) | |
4bd428a7 | 2040 | ("libjpeg" ,libjpeg-turbo) |
e4ff9dff PN |
2041 | ("openal" ,openal) |
2042 | ("curl" ,curl) | |
2043 | ("opusfile" ,opusfile) | |
2044 | ("opus" ,opus) | |
2045 | ("libvorbis" ,libvorbis) | |
2046 | ("freetype" ,freetype) | |
2047 | ("libogg" ,libogg))) | |
2048 | (native-inputs | |
2049 | `(("which" ,which) ; Else SDL_version.h won't be found. | |
2050 | ("pkg-config" ,pkg-config))) | |
2051 | (arguments | |
2052 | '(#:tests? #f ; No tests. | |
2053 | #:make-flags '("CC=gcc" | |
2054 | "USE_INTERNAL_LIBS=0" | |
2055 | "USE_FREETYPE=1" | |
2056 | "USE_RENDERER_DLOPEN=0" | |
2057 | "USE_OPENAL_DLOPEN=0" | |
2058 | "USE_CURL_DLOPEN=0") | |
2059 | #:phases | |
2060 | (modify-phases %standard-phases | |
2061 | (delete 'configure) | |
2062 | (replace 'install | |
2063 | (lambda* (#:key outputs #:allow-other-keys) | |
2064 | (invoke "make" "copyfiles" "CC=gcc" | |
2065 | "USE_INTERNAL_LIBS=0" | |
2066 | (string-append "COPYDIR=" | |
2067 | (assoc-ref outputs "out") | |
2068 | "/bin"))))))) | |
2069 | (home-page "https://ioquake3.org/") | |
2070 | (synopsis "FPS game engine based on Quake 3") | |
2071 | (description "ioquake3 is a free software first person shooter engine | |
2072 | based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to | |
2073 | the original, ioquake3 has been cleaned up, bugs have been fixed and features | |
2074 | added. The permanent goal is to create the open source Quake 3 distribution | |
2075 | upon which people base their games, ports to new platforms, and other | |
2076 | projects.") | |
e4ff9dff | 2077 | (license license:gpl2)))) |
545946f6 PN |
2078 | |
2079 | (define-public openvr | |
2080 | (package | |
2081 | (name "openvr") | |
1854a0ec | 2082 | (version "1.8.19") |
545946f6 PN |
2083 | (home-page "https://github.com/ValveSoftware/openvr/") |
2084 | (source | |
2085 | (origin | |
2086 | (method git-fetch) | |
2087 | (uri (git-reference | |
2088 | (url home-page) | |
2089 | (commit (string-append "v" version)))) | |
2090 | (file-name (git-file-name name version)) | |
2091 | (sha256 | |
1854a0ec | 2092 | (base32 "1b8cppvw6ib0kvx0vjq7jsk3plg1vh171w8xr230vjn05381wp52")))) |
545946f6 PN |
2093 | (build-system cmake-build-system) |
2094 | (arguments | |
2095 | ;; No tests. | |
2096 | '(#:tests? #f | |
2097 | #:configure-flags (list "-DBUILD_SHARED=1"))) | |
2098 | (synopsis "Virtual reality software development kit") | |
2099 | (description "OpenVR is an API and runtime that allows access to VR | |
2100 | hardware from multiple vendors without requiring that applications have | |
2101 | specific knowledge of the hardware they are targeting.") | |
2102 | (license license:bsd-3))) | |
7158fe4d | 2103 | |
93c47bff NG |
2104 | (define-public flatzebra |
2105 | (package | |
2106 | (name "flatzebra") | |
2107 | (version "0.1.7") | |
2108 | (source | |
2109 | (origin | |
2110 | (method url-fetch) | |
2111 | (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/" | |
2112 | "flatzebra-" version ".tar.gz")) | |
2113 | (sha256 | |
2114 | (base32 "1x2dy41c8vrq62bn03b82fpmk7x4rzd7qqiwvq0mgcl5rmasc2c8")))) | |
2115 | (build-system gnu-build-system) | |
2116 | (arguments | |
2117 | `(#:phases | |
2118 | (modify-phases %standard-phases | |
2119 | (add-after 'unpack 'fix-sdl-config | |
2120 | (lambda* (#:key inputs #:allow-other-keys) | |
2121 | ;; XXX: sdl-config in sdl-union is a link to sdl-config from | |
2122 | ;; plain sdl package. As a consequence, the prefix is wrong. | |
2123 | ;; Force correct one with "--prefix" argument. | |
2124 | (let ((sdl-union (assoc-ref inputs "sdl"))) | |
2125 | (setenv "SDL_CONFIG" | |
2126 | (string-append sdl-union | |
2127 | "/bin/sdl-config --prefix=" | |
2128 | sdl-union))) | |
2129 | #t))))) | |
2130 | (native-inputs | |
2131 | `(("pkg-config" ,pkg-config))) | |
2132 | (inputs | |
2133 | `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer))))) | |
2134 | (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html") | |
2135 | (synopsis "Generic game engine for 2D double-buffering animation") | |
2136 | (description | |
2137 | "Flatzebra is a simple, generic C++ game engine library supporting 2D | |
2138 | double-buffering.") | |
2139 | (license license:gpl2+))) | |
2140 | ||
7158fe4d PN |
2141 | (define-public fna |
2142 | (package | |
2143 | (name "fna") | |
2144 | (version "19.12.01") | |
2145 | (source | |
2146 | (origin | |
2147 | (method git-fetch) | |
2148 | (uri (git-reference | |
b0e7b699 | 2149 | (url "https://github.com/FNA-XNA/FNA") |
7158fe4d PN |
2150 | (commit version))) |
2151 | (file-name (git-file-name name version)) | |
2152 | (sha256 | |
2153 | (base32 "1vdyi9hac24fqcs8kpj6yk36bf5rrl4dvlvdd9fc701fawcf6lrr")))) | |
2154 | (build-system gnu-build-system) | |
2155 | (arguments | |
2156 | '(#:tests? #f ; No tests. | |
2157 | #:phases | |
2158 | (modify-phases %standard-phases | |
2159 | (add-after 'unpack 'link-dep-src | |
2160 | (lambda* (#:key inputs #:allow-other-keys) | |
2161 | (let ((sdl2 (assoc-ref inputs "sdl2-cs-src")) | |
2162 | (mojoshader (assoc-ref inputs "mojoshader-src")) | |
2163 | (faudio (assoc-ref inputs "faudio-src")) | |
2164 | (theorafile (assoc-ref inputs "theorafile-src"))) | |
2165 | (symlink (string-append sdl2 "/src") "lib/SDL2-CS/src") | |
2166 | (symlink (string-append mojoshader "/csharp") "lib/MojoShader/csharp") | |
2167 | (symlink (string-append faudio "/csharp") "lib/FAudio/csharp") | |
2168 | (symlink (string-append theorafile "/csharp") "lib/Theorafile/csharp")))) | |
2169 | (delete 'configure) | |
2170 | (replace 'build | |
2171 | (lambda _ | |
2172 | (invoke "make" "release"))) | |
2173 | (replace 'install | |
2174 | (lambda* (#:key outputs #:allow-other-keys) | |
2175 | (let ((out (assoc-ref outputs "out"))) | |
2176 | (install-file "bin/Release/FNA.dll" (string-append out "/lib")) | |
2177 | #t)))))) | |
2178 | (native-inputs | |
2179 | `(("mono" ,mono))) | |
2180 | (inputs `(("sdl2-cs-src" ,(package-source sdl2-cs)) | |
2181 | ("mojoshader-src" ,(package-source mojoshader-cs)) | |
2182 | ("faudio-src" ,(package-source faudio)) | |
2183 | ("theorafile-src" ,(package-source theorafile)))) | |
2184 | (home-page "https://fna-xna.github.io/") | |
2185 | (synopsis "Accuracy-focused XNA4 reimplementation") | |
2186 | (description "FNA is a Microsoft XNA Game Studio 4.0 reimplementation that | |
2187 | focuses solely on developing a fully accurate XNA4 runtime for the desktop.") | |
2188 | (license (list license:ms-pl ; FNA | |
2189 | license:lgpl2.1 ; LzxDecoder.cs | |
2190 | ;; Mono.Xna: | |
2191 | license:expat)))) | |
45c552ec NG |
2192 | |
2193 | (define-public libccd | |
2194 | (package | |
2195 | (name "libccd") | |
2196 | (version "2.1") | |
2197 | (source | |
2198 | (origin | |
2199 | (method git-fetch) | |
2200 | (uri (git-reference | |
b0e7b699 | 2201 | (url "https://github.com/danfis/libccd") |
45c552ec NG |
2202 | (commit (string-append "v" version)))) |
2203 | (file-name (git-file-name name version)) | |
2204 | (sha256 | |
2205 | (base32 "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc")))) | |
2206 | (build-system cmake-build-system) | |
2207 | (arguments | |
2208 | `(#:configure-flags '("-DBUILD_DOCUMENTATION=ON" | |
2209 | "-DBUILD_TESTING=ON" | |
2210 | "-DENABLE_DOUBLE_PRECISION=ON"))) | |
2211 | (native-inputs | |
2212 | `(("python-sphinx" ,python-sphinx))) | |
2213 | (home-page "https://github.com/danfis/libccd") | |
2214 | (synopsis "Library for collision detection between two convex shapes") | |
2215 | (description "@code{libccd} is library for a collision detection | |
2216 | between two convex shapes. @code{libccd} implements variation on | |
2217 | Gilbert–Johnson–Keerthi algorithm plus Expand Polytope Algorithm (EPA) | |
2218 | and also implements algorithm Minkowski Portal Refinement (MPR, | |
2219 | a.k.a. XenoCollide) as described in Game Programming Gems 7.") | |
2220 | (license license:expat))) | |
42399ad7 NG |
2221 | |
2222 | (define-public ode | |
2223 | (package | |
2224 | (name "ode") | |
416fe466 | 2225 | (version "0.16.2") |
42399ad7 NG |
2226 | (source |
2227 | (origin | |
2228 | (method url-fetch) | |
2229 | (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/" | |
2230 | "ode-" version ".tar.gz")) | |
2231 | (sha256 | |
416fe466 | 2232 | (base32 "08hgh4gqdk77jcw8b7gq2mwsfg4a5v5y0j7g42bxiqhmn3ffnsmj")) |
42399ad7 NG |
2233 | (modules '((guix build utils))) |
2234 | (snippet | |
2235 | '(begin | |
2236 | (delete-file-recursively "libccd") | |
2237 | #t)))) | |
2238 | (build-system cmake-build-system) | |
2239 | (arguments | |
416fe466 | 2240 | `(#:configure-flags '("-DODE_WITH_LIBCCD_SYSTEM=ON") |
42399ad7 NG |
2241 | #:phases |
2242 | (modify-phases %standard-phases | |
2243 | (add-after 'unpack 'unbundle-libccd | |
2244 | (lambda _ | |
2245 | (substitute* "CMakeLists.txt" | |
2246 | (("configure_file\\(libccd/.*") "")) | |
2247 | #t))))) | |
2248 | (inputs | |
2249 | `(("glu" ,glu) | |
2250 | ("libccd" ,libccd) | |
2251 | ("mesa" ,mesa))) | |
76fcbb78 | 2252 | (home-page "https://www.ode.org/") |
42399ad7 NG |
2253 | (synopsis "High performance library for simulating rigid body dynamics") |
2254 | (description "ODE is a high performance library for simulating | |
2255 | rigid body dynamics. It is fully featured, stable, mature and | |
2256 | platform independent with an easy to use C/C++ API. It has advanced | |
2257 | joint types and integrated collision detection with friction. ODE is | |
2258 | useful for simulating vehicles, objects in virtual reality | |
2259 | environments and virtual creatures. It is currently used in many | |
2260 | computer games, 3D authoring tools and simulation tools.") | |
2261 | ;; Software is dual-licensed. | |
2262 | (license (list license:lgpl2.1+ license:expat)))) | |
d6ab5f4f NG |
2263 | |
2264 | (define-public chipmunk | |
2265 | (package | |
2266 | (name "chipmunk") | |
2267 | (version "7.0.3") | |
2268 | (source | |
2269 | (origin | |
2270 | (method git-fetch) | |
2271 | (uri (git-reference | |
b0e7b699 | 2272 | (url "https://github.com/slembcke/Chipmunk2D") |
d6ab5f4f NG |
2273 | (commit (string-append "Chipmunk-" version)))) |
2274 | (file-name (git-file-name name version)) | |
2275 | (sha256 | |
2276 | (base32 "1qmkn01g06p3rnhmbyffmjns6wj5vhgf9cscigk3wzxcpwv1hyxb")))) | |
2277 | (build-system cmake-build-system) | |
2278 | (arguments | |
2279 | `(#:tests? #f ;no test | |
2280 | #:configure-flags '("-DBUILD_STATIC=OFF" | |
2281 | "-DBUILD_DEMOS=OFF"))) | |
2282 | (inputs | |
2283 | `(("freeglut" ,freeglut) | |
2284 | ("libxmu" ,libxmu) | |
2285 | ("libxrandr" ,libxrandr))) | |
d0bb1c2f | 2286 | (home-page "https://chipmunk-physics.net/") |
d6ab5f4f NG |
2287 | (synopsis "Fast and lightweight 2D game physics library") |
2288 | (description "Chipmunk is a simple, lightweight, fast and portable 2D | |
2289 | rigid body physics library written in C.") | |
2290 | (license license:expat))) | |
2e0787a5 GL |
2291 | |
2292 | (define-public libtcod | |
2293 | (package | |
2294 | (name "libtcod") | |
2295 | (version "1.15.1") | |
2296 | (source (origin | |
2297 | (method git-fetch) | |
2298 | (uri (git-reference | |
b0e7b699 | 2299 | (url "https://github.com/libtcod/libtcod") |
2e0787a5 GL |
2300 | (commit version))) |
2301 | (file-name (git-file-name name version)) | |
2302 | (sha256 | |
2303 | (base32 | |
2304 | "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5")) | |
2305 | (modules '((guix build utils))) | |
2306 | (snippet '(begin | |
2307 | (delete-file-recursively "src/vendor/utf8proc") | |
2308 | (delete-file-recursively "src/vendor/zlib") | |
2309 | (delete-file "src/vendor/stb_truetype.h") | |
2310 | (delete-file "src/vendor/stb_sprintf.h") | |
2311 | (delete-file "src/vendor/lodepng.cpp") | |
2312 | (delete-file "src/vendor/lodepng.h") | |
2313 | ||
2314 | (substitute* "buildsys/autotools/sources.am" | |
2315 | (("\\.\\./\\.\\./src/vendor/lodepng\\.cpp \\\\\n") "") | |
2316 | (("\\.\\./\\.\\./src/vendor/stb\\.c \\\\") | |
2317 | "../../src/vendor/stb.c") | |
2318 | (("\\.\\./\\.\\./src/vendor/utf8proc/utf8proc\\.c") "")) | |
2319 | ||
2320 | (substitute* "src/libtcod/sys_sdl_img_png.cpp" | |
2321 | (("\\.\\./vendor/") "")) | |
2322 | ||
2323 | (substitute* '("src/libtcod/color/canvas.cpp" | |
2324 | "src/libtcod/sys_sdl_img_png.cpp" | |
2325 | "src/libtcod/tileset/truetype.cpp" | |
2326 | "src/libtcod/tileset/tilesheet.cpp") | |
2327 | (("\\.\\./\\.\\./vendor/") "")) | |
2328 | ||
2329 | (substitute* "src/libtcod/console/printing.cpp" | |
2330 | (("\\.\\./\\.\\./vendor/utf8proc/") "")) | |
2331 | #t)))) | |
2332 | (build-system gnu-build-system) | |
2333 | (arguments | |
2334 | `(#:configure-flags '("--with-gnu-ld" | |
2335 | "LIBS=-lutf8proc -llodepng") | |
2336 | #:phases | |
2337 | (modify-phases %standard-phases | |
2338 | (add-after 'unpack 'change-to-build-dir | |
2339 | (lambda _ | |
2340 | (chdir "buildsys/autotools") | |
2341 | (patch-shebang "get_version.py") | |
2342 | #t))))) | |
2343 | (native-inputs | |
2344 | `(("autoconf" ,autoconf) | |
2345 | ("automake" ,automake) | |
2346 | ("libtool" ,libtool) | |
2347 | ("python" ,python) | |
2348 | ("pkg-config" ,pkg-config) | |
2349 | ("stb-sprintf" ,stb-sprintf) | |
2350 | ("stb-truetype" ,stb-truetype))) | |
2351 | (inputs | |
2352 | `(("lodepng" ,lodepng) | |
2353 | ("sdl2" ,sdl2) | |
2354 | ("utf8proc" ,utf8proc) | |
2355 | ("zlib" ,zlib))) | |
2356 | (home-page "https://github.com/libtcod/libtcod") | |
2357 | (synopsis "Library specifically designed for writing roguelikes") | |
2358 | (description | |
2359 | "libtcod is a fast, portable and uncomplicated API for roguelike | |
2360 | developers providing an advanced true color console, input, and lots of other | |
2361 | utilities frequently used in roguelikes.") | |
2362 | (license license:bsd-3))) | |
0b5bf615 PN |
2363 | |
2364 | (define-public warsow-qfusion | |
2365 | ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated. | |
2366 | ;; The 2.5 beta as published on the homepage is commit | |
2367 | ;; c4de15df559410aff0ca6643724e24cddb0ecbbd | |
2368 | (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd")) | |
2369 | (package | |
2370 | (name "warsow-qfusion") | |
2371 | (version (git-version "2.5" "1" commit)) ; 2.5-beta | |
2372 | (source (origin | |
2373 | (method git-fetch) | |
2374 | (uri (git-reference | |
2375 | (url "https://github.com/Warsow/qfusion/") | |
2376 | (commit commit) | |
2377 | (recursive? #t))) | |
2378 | (file-name (git-file-name name version)) | |
2379 | (sha256 | |
2380 | (base32 | |
2381 | "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g")) | |
2382 | ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46 | |
e5f1f5ce PN |
2383 | (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch")) |
2384 | (modules '((guix build utils))) | |
2385 | (snippet '(begin | |
2386 | (delete-file-recursively "platforms") | |
2387 | (delete-file-recursively "debian") | |
2388 | (delete-file-recursively "libsrcs") | |
2389 | #t)))) | |
0b5bf615 PN |
2390 | (build-system cmake-build-system) |
2391 | (arguments | |
2392 | `(#:tests? #f ; No tests. | |
2393 | #:configure-flags '("-DQFUSION_GAME=Warsow") | |
2394 | #:modules | |
2395 | ((guix build utils) | |
2396 | (guix build cmake-build-system) | |
2397 | (ice-9 match)) | |
2398 | #:phases | |
2399 | (modify-phases %standard-phases | |
2400 | (add-after 'unpack 'change-to-build-dir | |
2401 | (lambda _ | |
2402 | (chdir "source") | |
2403 | #t)) | |
2404 | (add-after 'install 'really-install | |
2405 | (lambda* (#:key outputs system #:allow-other-keys) | |
2406 | (let ((arch (match system | |
2407 | ("x86_64-linux" "x86_64") | |
2408 | ("i686-linux" "i386"))) | |
2409 | (out (assoc-ref outputs "out"))) | |
2410 | (install-file (string-append "../source/build/basewsw/libgame_" | |
2411 | arch ".so") | |
2412 | (string-append out "/lib/")) | |
2413 | (install-file (string-append "../source/build/libui_" arch ".so") | |
2414 | (string-append out "/lib/")) | |
2415 | (for-each | |
2416 | (lambda (file) | |
2417 | (install-file file (string-append out "/bin/"))) | |
2418 | (append (find-files "../source/build" "warsow") | |
2419 | (find-files "../source/build" "wsw_server.")))) | |
2420 | #t))))) | |
2421 | (inputs | |
2422 | `(("alsa-lib" ,alsa-lib) | |
2423 | ("curl" ,curl) | |
2424 | ("freetype" ,freetype) | |
2425 | ("ffmpeg" ,ffmpeg) | |
c263cfdc | 2426 | ("libjpeg" ,libjpeg-turbo) |
0b5bf615 PN |
2427 | ("libogg" ,libogg) |
2428 | ("libpng" ,libpng) | |
2429 | ("libtheora" ,libtheora) | |
2430 | ("libvorbis" ,libvorbis) | |
2431 | ("mesa" ,mesa) | |
2432 | ("openal" ,openal) | |
2433 | ("pulseaudio" ,pulseaudio) | |
ea0a5107 | 2434 | ("qtbase" ,qtbase-5) |
0b5bf615 PN |
2435 | ("qtdeclarative" ,qtdeclarative) |
2436 | ("sdl2" ,sdl2) | |
c263cfdc | 2437 | ("uuid.h" ,util-linux "lib") |
0b5bf615 PN |
2438 | ("zlib" ,zlib))) |
2439 | (native-inputs | |
2440 | `(("pkg-config" ,pkg-config))) | |
2441 | (home-page "https://github.com/Warsow/qfusion") | |
2442 | (supported-systems '("i686-linux" "x86_64-linux")) | |
2443 | (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine") | |
2444 | (description | |
2445 | "This package contains the game engine of Warsow, a first-person | |
2446 | shooter video game. The engine is based on qfusion, the id Tech 2 derived | |
2447 | game engine. id Tech 2 is the engine originally behind Quake 2.") | |
2448 | (license license:gpl2+)))) | |
5f7474a2 PN |
2449 | |
2450 | (define-public dhewm3 | |
2451 | (package | |
2452 | (name "dhewm3") | |
b6df89ef | 2453 | (version "1.5.1") |
5f7474a2 PN |
2454 | (source (origin |
2455 | (method url-fetch) | |
2456 | (uri (string-append | |
2457 | "https://github.com/dhewm/dhewm3/releases/download/" | |
2458 | version "/dhewm3-" version "-src.tar.xz")) | |
2459 | (sha256 | |
2460 | (base32 | |
b6df89ef | 2461 | "0s2brx6wyljhjbpli97iy4lc4fqqsvdc09raz8njg0vgzcsiyrri")))) |
5f7474a2 PN |
2462 | (build-system cmake-build-system) |
2463 | (arguments | |
2464 | `(#:tests? #f ; No tests. | |
2465 | #:phases | |
2466 | (modify-phases %standard-phases | |
2467 | (add-after 'unpack 'change-to-build-dir | |
2468 | (lambda _ | |
2469 | (chdir "neo") | |
2470 | #t))))) | |
2471 | (inputs | |
2472 | `(("curl" ,curl) | |
2473 | ("libjpeg" ,libjpeg-turbo) | |
2474 | ("libogg" ,libogg) | |
2475 | ("libvorbis" ,libvorbis) | |
2476 | ("libx11" ,libx11) | |
2477 | ("openal" ,openal) | |
2478 | ("sdl2" ,sdl2) | |
2479 | ("zlib" ,zlib))) | |
2480 | (home-page "https://dhewm3.org/") | |
2481 | (synopsis "Port of the original Doom 3 engine") | |
2482 | (description | |
2483 | "@command{dhewm3} is a source port of the original Doom 3 engine (not | |
2484 | Doom 3: BFG Edition), also known as id Tech 4. Compared to the original | |
2485 | version of the Doom 3 engine, dhewm3 has many bugfixes, supports EAX-like | |
2486 | sound effects on all operating systems and hardware (via OpenAL Softs EFX | |
2487 | support), has much better support for widescreen resolutions and has 64bit | |
2488 | support.") | |
2489 | (license license:gpl3))) | |
f67ae666 PN |
2490 | |
2491 | (define-public tesseract-engine | |
2492 | (let ((svn-revision 2411)) | |
2493 | (package | |
2494 | (name "tesseract-engine") | |
2495 | (version (string-append "20200615-" (number->string svn-revision))) | |
2496 | (source | |
2497 | (origin | |
2498 | (method svn-fetch) | |
2499 | (uri (svn-reference | |
2500 | (url "svn://svn.tuxfamily.org/svnroot/tesseract/main") | |
2501 | (revision svn-revision))) | |
2502 | (file-name (git-file-name name version)) | |
2503 | (sha256 | |
2504 | (base32 "1av9jhl2ivbl7wfszyhyna84llvh1z2d8khkmadm8d105addj10q")) | |
2505 | (modules '((guix build utils))) | |
2506 | (snippet | |
2507 | '(begin | |
2508 | (for-each delete-file-recursively | |
2509 | '("bin" "bin64" | |
2510 | ;; Remove "media" since some files such as | |
2511 | ;; media/sound/game/soundsnap/info.txt refer to a | |
2512 | ;; non-commercial license. | |
2513 | "media" | |
2514 | "server.bat" | |
2515 | "tesseract.bat" | |
2516 | "src/lib" | |
2517 | "src/lib64")) | |
2518 | #t)))) | |
2519 | (build-system gnu-build-system) | |
2520 | (arguments | |
2521 | `(#:make-flags (list "CC=gcc") | |
2522 | #:tests? #f ; No tests. | |
2523 | #:phases | |
2524 | (modify-phases %standard-phases | |
2525 | (delete 'configure) | |
2526 | (add-after 'unpack 'cd-src | |
2527 | (lambda _ (chdir "src") #t)) | |
2528 | (add-before 'build 'fix-env | |
2529 | (lambda* (#:key inputs #:allow-other-keys) | |
2530 | (setenv "CPATH" | |
2531 | (string-append (assoc-ref inputs "sdl2-union") | |
2532 | "/include/SDL2:" | |
2533 | (or (getenv "CPATH") ""))) | |
2534 | #t)) | |
2535 | (add-after 'install 'really-install | |
2536 | (lambda* (#:key outputs #:allow-other-keys) | |
2537 | (let* ((out (assoc-ref outputs "out")) | |
2538 | (share (string-append out "/share/tesseract")) | |
2539 | (bin (string-append out "/bin/tesseract")) | |
2540 | (client (string-append out "/bin/tesseract-client"))) | |
2541 | (chdir "..") ; Back to root. | |
2542 | (for-each | |
2543 | (lambda (dir) | |
2544 | (mkdir-p (string-append share "/" dir)) | |
2545 | (copy-recursively dir (string-append share "/" dir))) | |
2546 | '("config")) | |
2547 | (mkdir-p (string-append out "/bin/")) | |
2548 | (copy-file "bin_unix/native_client" client) | |
2549 | (copy-file "bin_unix/native_server" | |
2550 | (string-append out "/bin/tesseract-server")) | |
2551 | (call-with-output-file bin | |
2552 | (lambda (p) | |
2553 | (format p "#!~a | |
2554 | TESS_DATA=~a | |
2555 | TESS_BIN=~a | |
2556 | TESS_OPTIONS=\"-u$HOME/.tesseract\" | |
2557 | cd \"$TESS_DATA\" | |
2558 | exec \"$TESS_BIN\" \"$TESS_OPTIONS\" \"$@\"" | |
2559 | (which "bash") | |
2560 | share | |
2561 | client))) | |
2562 | (chmod bin #o755) | |
2563 | (install-file "src/readme_tesseract.txt" | |
2564 | (string-append out "/share/licenses/tesseract/LICENSE"))) | |
2565 | #t))))) | |
2566 | (inputs | |
2567 | `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-image))) | |
2568 | ("zlib" ,zlib) | |
2569 | ("libpng" ,libpng) | |
2570 | ("libgl" ,mesa))) | |
2571 | (home-page "http://tesseract.gg/") | |
2572 | (synopsis "First-person shooter engine with map editing, instagib, DM and CTF") | |
2573 | (description "This package contains the game engine of Tesseract, a | |
2574 | first-person shooter focused on cooperative in-game map editing. | |
2575 | ||
2576 | The engine is derived from @emph{Cube 2: Sauerbraten} technology but with | |
2577 | upgraded modern rendering techniques. The new rendering features include | |
2578 | fully dynamic omnidirectional shadows, global illumination, HDR lighting, | |
2579 | deferred shading, morphological / temporal / multisample anti-aliasing, and | |
2580 | much more.") | |
2581 | (license license:zlib)))) |