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