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> |
d5c60e0a | 7 | ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
3c8ba11a | 8 | ;;; Copyright © 2016, 2017 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> |
2702d665 | 11 | ;;; Copyright © 2017, 2018, 2019, 2020 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> |
dae206f1 | 18 | ;;; Copyright © 2019 Leo Prikler <leo.prikler@student.tugraz.at> |
328dd9b7 | 19 | ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com> |
45c552ec | 20 | ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
6cb89466 TČ |
21 | ;;; |
22 | ;;; This file is part of GNU Guix. | |
23 | ;;; | |
24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
25 | ;;; under the terms of the GNU General Public License as published by | |
26 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
27 | ;;; your option) any later version. | |
28 | ;;; | |
29 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
32 | ;;; GNU General Public License for more details. | |
33 | ;;; | |
34 | ;;; You should have received a copy of the GNU General Public License | |
35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
36 | ||
37 | (define-module (gnu packages game-development) | |
9fd50db3 | 38 | #:use-module (srfi srfi-1) |
b0910aad | 39 | #:use-module ((guix licenses) #:prefix license:) |
6cb89466 TČ |
40 | #:use-module (guix packages) |
41 | #:use-module (guix download) | |
2a068aec | 42 | #:use-module (guix git-download) |
4041fabb | 43 | #:use-module (guix svn-download) |
be4d26f5 | 44 | #:use-module (guix utils) |
6cb89466 | 45 | #:use-module (guix build-system cmake) |
b0910aad | 46 | #:use-module (guix build-system gnu) |
4bc37bf0 | 47 | #:use-module (guix build-system python) |
92b51d12 | 48 | #:use-module (guix build-system scons) |
b0910aad | 49 | #:use-module (gnu packages) |
1297bc05 | 50 | #:use-module (gnu packages audio) |
c608fe8c | 51 | #:use-module (gnu packages autotools) |
e4ff9dff | 52 | #:use-module (gnu packages base) |
94a66dd9 | 53 | #:use-module (gnu packages boost) |
1297bc05 | 54 | #:use-module (gnu packages compression) |
2a068aec | 55 | #:use-module (gnu packages curl) |
99828fa7 | 56 | #:use-module (gnu packages documentation) |
531003be | 57 | #:use-module (gnu packages fltk) |
42d0d13d | 58 | #:use-module (gnu packages fonts) |
d2cc38b7 | 59 | #:use-module (gnu packages fontutils) |
324b0040 | 60 | #:use-module (gnu packages freedesktop) |
d2cc38b7 | 61 | #:use-module (gnu packages fribidi) |
255d1bbe | 62 | #:use-module (gnu packages dbm) |
1297bc05 | 63 | #:use-module (gnu packages gl) |
c24fff61 | 64 | #:use-module (gnu packages glib) |
1297bc05 | 65 | #:use-module (gnu packages gnome) |
c24fff61 | 66 | #:use-module (gnu packages gnunet) |
42d0d13d MR |
67 | #:use-module (gnu packages graphics) |
68 | #:use-module (gnu packages graphviz) | |
1297bc05 | 69 | #:use-module (gnu packages gtk) |
c24fff61 | 70 | #:use-module (gnu packages guile) |
1297bc05 EF |
71 | #:use-module (gnu packages image) |
72 | #:use-module (gnu packages linux) | |
73 | #:use-module (gnu packages lua) | |
c608fe8c | 74 | #:use-module (gnu packages m4) |
7158fe4d | 75 | #:use-module (gnu packages mono) |
1297bc05 | 76 | #:use-module (gnu packages mp3) |
c24fff61 | 77 | #:use-module (gnu packages multiprecision) |
4bc37bf0 | 78 | #:use-module (gnu packages music) |
c24fff61 | 79 | #:use-module (gnu packages ncurses) |
1297bc05 EF |
80 | #:use-module (gnu packages pkg-config) |
81 | #:use-module (gnu packages pulseaudio) | |
4bc37bf0 | 82 | #:use-module (gnu packages python) |
44d10b1f | 83 | #:use-module (gnu packages python-xyz) |
b0910aad | 84 | #:use-module (gnu packages qt) |
1297bc05 | 85 | #:use-module (gnu packages sdl) |
45c552ec | 86 | #:use-module (gnu packages sphinx) |
67c127c9 | 87 | #:use-module (gnu packages stb) |
00fca594 | 88 | #:use-module (gnu packages texinfo) |
1297bc05 | 89 | #:use-module (gnu packages tls) |
4bc37bf0 | 90 | #:use-module (gnu packages video) |
2a068aec | 91 | #:use-module (gnu packages xdisorg) |
83a4a70b | 92 | #:use-module (gnu packages xiph) |
194b4e7d | 93 | #:use-module (gnu packages xml) |
1297bc05 | 94 | #:use-module (gnu packages xorg)) |
6cb89466 TČ |
95 | |
96 | (define-public bullet | |
97 | (package | |
98 | (name "bullet") | |
623a0d83 | 99 | (version "2.89") |
6cb89466 | 100 | (source (origin |
fbb456dd EF |
101 | (method git-fetch) |
102 | (uri (git-reference | |
103 | (url "https://github.com/bulletphysics/bullet3/") | |
104 | (commit version))) | |
105 | (file-name (git-file-name name version)) | |
6cb89466 TČ |
106 | (sha256 |
107 | (base32 | |
623a0d83 | 108 | "10ncf2z474jnv7p5lv01ak2mk2hib3rj5rz1zr8v2v5pnciqbijl")) |
fbb456dd EF |
109 | (modules '((guix build utils))) |
110 | (snippet | |
111 | '(begin | |
112 | (for-each delete-file (find-files "build3" "premake*")) | |
113 | (with-directory-excursion "examples/ThirdPartyLibs" | |
114 | (for-each delete-file-recursively | |
115 | '("Gwen" "clsocket" "enet" "glad" "imgui" | |
116 | "lua-5.2.3" "midi" "minizip" "openvr" | |
117 | "optionalX11" "serial" "zlib"))) | |
623a0d83 | 118 | ;; These need files from ThirdPartyLibs. |
fbb456dd | 119 | (substitute* "Extras/CMakeLists.txt" |
623a0d83 TGR |
120 | (("BulletRobotics") "")) |
121 | ;; Tests fail on linking, cannot find -lBussIK. | |
fbb456dd EF |
122 | (substitute* "test/CMakeLists.txt" |
123 | ((" InverseDynamics") | |
124 | "../examples/ThirdPartyLibs/BussIK InverseDynamics")) | |
125 | ; (("SharedMemory") "")) | |
126 | #t)))) | |
6cb89466 | 127 | (build-system cmake-build-system) |
937bc2d1 | 128 | (arguments |
fbb456dd EF |
129 | '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" |
130 | "-DBUILD_CPU_DEMOS=OFF" | |
131 | "-DBUILD_OPENGL3_DEMOS=OFF" | |
132 | "-DBUILD_BULLET2_DEMOS=OFF" | |
133 | (string-append "-DCMAKE_CXX_FLAGS=-fPIC " | |
134 | (or (getenv "CXXFLAGS") ""))) | |
135 | #:phases | |
136 | (modify-phases %standard-phases | |
137 | (add-after 'unpack 'remove-failing-tests | |
623a0d83 | 138 | ;; These tests fail specifically after removing 3rd party code. |
fbb456dd EF |
139 | (lambda _ |
140 | (substitute* "test/SharedMemory/CMakeLists.txt" | |
141 | (("ADD_TEST") "# ADD_TEST")) | |
142 | (substitute* "test/InverseDynamics/CMakeLists.txt" | |
143 | (("ADD_TEST\\(Test_BulletInverseForward") | |
144 | "# ADD_TEST(Test_BulletInverseForward")) | |
145 | #t))))) | |
937bc2d1 EF |
146 | (inputs |
147 | `(("glu" ,glu) | |
148 | ("libx11" ,libx11) | |
149 | ("mesa" ,mesa))) | |
9b811f69 | 150 | (home-page "https://pybullet.org/wordpress/") |
6cb89466 TČ |
151 | (synopsis "3D physics engine library") |
152 | (description | |
153 | "Bullet is a physics engine library usable for collision detection. It | |
154 | is used in some video games and movies.") | |
b0910aad DT |
155 | (license license:zlib))) |
156 | ||
1a0c4437 KK |
157 | (define-public deutex |
158 | (package | |
159 | (name "deutex") | |
2702d665 | 160 | (version "5.2.1") |
1a0c4437 KK |
161 | (source (origin |
162 | (method url-fetch) | |
5fbb9f0b | 163 | (uri (string-append "https://github.com/Doom-Utils/deutex" |
f7b60fdc | 164 | "/releases/download/v" version "/" |
5fbb9f0b | 165 | "deutex-" version ".tar.xz")) |
1a0c4437 KK |
166 | (sha256 |
167 | (base32 | |
2702d665 | 168 | "07w3asqxx89wl2wfv1z3cak8v83h3ys3b39mq9qq4gyf3xdhs76n")))) |
1a0c4437 | 169 | (build-system gnu-build-system) |
f7b60fdc | 170 | (native-inputs `(("asciidoc" ,asciidoc))) |
1a0c4437 KK |
171 | (home-page "https://github.com/Doom-Utils/deutex") |
172 | (synopsis "WAD file composer for Doom and related games") | |
173 | (description | |
174 | "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be | |
175 | used to extract the lumps of a wad and save them as individual files. | |
176 | Conversely, it can also build a wad from separate files. When extracting a | |
177 | lump to a file, it does not just copy the raw data, it converts it to an | |
178 | appropriate format (such as PPM for graphics, Sun audio for samples, etc.). | |
179 | Conversely, when it reads files for inclusion in pwads, it does the necessary | |
180 | conversions (for example, from PPM to Doom picture format). In addition, | |
181 | DeuTex has functions such as merging wads, etc.") | |
182 | (license license:gpl2+))) | |
183 | ||
94a66dd9 KK |
184 | (define-public grfcodec |
185 | (package | |
186 | (name "grfcodec") | |
187 | (version "6.0.6") | |
188 | (source (origin | |
189 | (method url-fetch) | |
190 | (uri (string-append "http://binaries.openttd.org/extra/" | |
191 | name "/" version "/" name "-" version | |
192 | "-source.tar.xz")) | |
193 | (sha256 | |
194 | (base32 | |
195 | "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk")))) | |
196 | (build-system gnu-build-system) | |
197 | (arguments | |
198 | '(#:tests? #f ; no check target | |
199 | #:phases | |
200 | (modify-phases %standard-phases | |
201 | (delete 'configure) ; no configure script | |
202 | (replace 'install ; no install target | |
203 | (lambda* (#:key outputs #:allow-other-keys) | |
204 | (let* ((out (assoc-ref outputs "out")) | |
205 | (bin (string-append out "/bin")) | |
206 | (doc (string-append out "/share/doc")) | |
207 | (man (string-append out "/share/man/man1"))) | |
208 | (for-each (lambda (file) | |
209 | (install-file file bin)) | |
210 | '("grfcodec" "grfid" "grfstrip" "nforenum")) | |
211 | (install-file "COPYING" doc) | |
212 | (with-directory-excursion "docs" | |
213 | (for-each (lambda (file) | |
214 | (install-file (string-append file ".txt") doc)) | |
215 | '("auto_correct" "commands" "grf" "grfcodec" "grftut" | |
216 | "readme" "readme.rpn")) | |
217 | (for-each (lambda (file) | |
218 | (install-file file man)) | |
219 | (find-files "." "\\.1")))) | |
220 | #t))))) | |
221 | (inputs | |
222 | `(("boost" ,boost) | |
223 | ("libpng" ,libpng) | |
224 | ("zlib" ,zlib))) | |
225 | (synopsis "GRF development tools") | |
226 | (description | |
3d77785a | 227 | "The @dfn{Graphics Resource File} (GRF) development tools are a set of |
94a66dd9 KK |
228 | tools for developing (New)GRFs. It includes a number of smaller programs, each |
229 | with a specific task: | |
230 | @enumerate | |
231 | @item @code{grfcodec} decodes and encodes GRF files for OpenTTD. | |
232 | @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF. | |
233 | @item @code{grfstrip} strips all sprites from a GRF. | |
234 | @item @code{nforenum} checks NFO code for errors, making corrections when | |
235 | necessary. | |
236 | @end enumerate") | |
237 | (home-page "http://dev.openttdcoop.org/projects/grfcodec") | |
238 | ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2. | |
239 | ;; NFORenum is under the GPL2+. | |
240 | ;; The MD5 implementation contained in GRFID is under the zlib license. | |
241 | (license (list license:gpl2 license:gpl2+ license:zlib)))) | |
242 | ||
3c399e9b AI |
243 | (define-public catcodec |
244 | (package | |
245 | (name "catcodec") | |
246 | (version "1.0.5") | |
247 | (source | |
248 | (origin | |
249 | (method url-fetch) | |
250 | (uri (string-append "https://binaries.openttd.org/extra/catcodec/" | |
251 | version "/catcodec-" version "-source.tar.xz")) | |
252 | (sha256 | |
253 | (base32 | |
254 | "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7")))) | |
255 | (build-system gnu-build-system) | |
256 | (arguments | |
257 | `(#:tests? #f ; no tests | |
258 | #:make-flags (list (string-append "prefix=" %output)) | |
259 | #:phases (modify-phases %standard-phases | |
260 | (delete 'configure)))) | |
261 | (home-page "http://dev.openttdcoop.org/projects/catcodec") | |
262 | (synopsis "Encode/decode OpenTTD sounds") | |
263 | (description "catcodec encodes and decodes sounds for OpenTTD. These | |
264 | sounds are not much more than some metadata (description and filename) and raw | |
265 | PCM data.") | |
266 | (license license:gpl2))) | |
267 | ||
c24fff61 JG |
268 | (define-public gzochi |
269 | (package | |
270 | (name "gzochi") | |
cd6ae1ce | 271 | (version "0.12") |
c24fff61 JG |
272 | (source (origin |
273 | (method url-fetch) | |
274 | (uri (string-append "mirror://savannah/gzochi/gzochi-" | |
275 | version ".tar.gz")) | |
276 | (sha256 | |
277 | (base32 | |
cd6ae1ce | 278 | "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59")))) |
c24fff61 | 279 | (build-system gnu-build-system) |
1798e9ee LC |
280 | (arguments |
281 | '(#:phases (modify-phases %standard-phases | |
282 | (add-before 'build 'no-Werror | |
283 | (lambda _ | |
284 | ;; Don't abort builds due to things like GLib | |
285 | ;; deprecation warnings. | |
286 | (substitute* (find-files "." "^Makefile\\.in$") | |
287 | (("-Werror") "")) | |
288 | #t))))) | |
c24fff61 JG |
289 | (native-inputs `(("pkgconfig" ,pkg-config))) |
290 | (inputs `(("bdb" ,bdb) | |
291 | ("glib" ,glib) | |
0e4885af | 292 | ("guile" ,guile-2.2) |
c24fff61 JG |
293 | ("libmicrohttpd" ,libmicrohttpd) |
294 | ("ncurses" ,ncurses) | |
295 | ("sdl" ,sdl) | |
296 | ("zlib" ,zlib))) | |
340978d7 | 297 | (home-page "https://www.nongnu.org/gzochi/") |
c24fff61 JG |
298 | (synopsis "Scalable middleware for multiplayer games") |
299 | (description | |
300 | "gzochi is a framework for developing massively multiplayer online games. | |
301 | A server container provides services to deployed games, which are written in | |
302 | Guile Scheme, that abstract and simplify some of the most challenging and | |
303 | error-prone aspects of online game development: Concurrency, data persistence, | |
304 | and network communications. A very thin client library can be embedded to | |
305 | provide connectivity for client applications written in any language.") | |
306 | (license license:gpl3+))) | |
307 | ||
7357fcf2 KK |
308 | (define-public nml |
309 | (package | |
310 | (name "nml") | |
41770337 | 311 | (version "0.4.5") |
7357fcf2 KK |
312 | (source |
313 | (origin | |
314 | (method url-fetch) | |
315 | (uri (string-append "http://bundles.openttdcoop.org/nml/releases/" | |
316 | version "/nml-" version ".tar.gz")) | |
317 | (sha256 | |
318 | (base32 | |
41770337 | 319 | "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53")))) |
7357fcf2 | 320 | (build-system python-build-system) |
e877f4d0 JL |
321 | (arguments |
322 | `(#:phases | |
323 | (modify-phases %standard-phases | |
324 | (add-before 'build 'fix-pillow | |
325 | (lambda _ | |
326 | ;; pillow's version is not in PIL.Image.VERSION anymore | |
327 | (substitute* "nml/version_info.py" | |
328 | (("from PIL import Image") "import PIL") | |
329 | (("Image.VERSION") "PIL.__version__")) | |
330 | #t))))) | |
7357fcf2 KK |
331 | (propagated-inputs |
332 | `(("python-pillow" ,python-pillow) | |
333 | ("python-ply" ,python-ply))) | |
df0fd7bf | 334 | (home-page "https://dev.openttdcoop.org/projects/nml") |
7357fcf2 KK |
335 | (synopsis "NML compiler") |
336 | (description | |
a7cbe727 | 337 | "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of |
7357fcf2 KK |
338 | compiling NML files (along with their associated language, sound and graphic |
339 | files) into @file{.grf} and/or @file{.nfo} files.") | |
340 | (license license:gpl2+))) | |
341 | ||
45f8e7f7 KK |
342 | (define-public python-sge-pygame |
343 | (package | |
344 | (name "python-sge-pygame") | |
b1d1a10c | 345 | (version "1.5.1") |
45f8e7f7 KK |
346 | (source |
347 | (origin | |
348 | (method url-fetch) | |
7f652029 KK |
349 | (uri (string-append "mirror://savannah/stellarengine/" |
350 | (version-major+minor version) "/sge-pygame-" | |
351 | version ".tar.gz")) | |
352 | (file-name (string-append name "-" version ".tar.gz")) | |
45f8e7f7 KK |
353 | (sha256 |
354 | (base32 | |
b1d1a10c | 355 | "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd")))) |
45f8e7f7 KK |
356 | (build-system python-build-system) |
357 | (propagated-inputs | |
358 | `(("python-pygame" ,python-pygame) | |
81353514 KK |
359 | ("python-six" ,python-six) |
360 | ("python-uniseg" ,python-uniseg))) | |
45f8e7f7 KK |
361 | (home-page "http://stellarengine.nongnu.org") |
362 | (synopsis "2D game engine for Python") | |
363 | (description | |
364 | "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a | |
ffbe2dc1 | 365 | general-purpose 2D game engine. It takes care of several details for you so |
45f8e7f7 KK |
366 | you can focus on the game itself. This makes more rapid game development |
367 | possible, and it also makes the SGE easy to learn.") | |
368 | (license license:lgpl3+))) | |
369 | ||
370 | (define-public python2-sge-pygame | |
371 | (package-with-python2 python-sge-pygame)) | |
372 | ||
1b775fd1 KK |
373 | (define-public python-tmx |
374 | (package | |
375 | (name "python-tmx") | |
95c1324a | 376 | (version "1.10") |
1b775fd1 KK |
377 | (source |
378 | (origin | |
379 | (method url-fetch) | |
be4d26f5 KK |
380 | (uri (string-append "mirror://savannah/python-tmx/" |
381 | (version-major+minor version) "/tmx-" | |
1b775fd1 KK |
382 | version ".tar.gz")) |
383 | (sha256 | |
384 | (base32 | |
95c1324a | 385 | "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0")))) |
1b775fd1 KK |
386 | (build-system python-build-system) |
387 | (propagated-inputs | |
388 | `(("python-six" ,python-six))) | |
389 | (home-page "http://python-tmx.nongnu.org") | |
390 | (synopsis "Python library for the @code{Tiled} TMX format") | |
391 | (description | |
392 | "Python TMX reads and writes the @code{Tiled} TMX format in a simple way. | |
393 | This is useful for map editors or generic level editors, and it's also useful | |
394 | for using a map editor or generic level editor like Tiled to edit your game's | |
395 | levels.") | |
396 | (license (list license:asl2.0 | |
397 | ;; Documentation (only available in the source tarball) is | |
398 | ;; under the CC0 license. | |
399 | license:cc0)))) | |
400 | ||
401 | (define-public python2-tmx | |
402 | (let ((python2-tmx (package-with-python2 python-tmx))) | |
403 | (package | |
404 | (inherit python2-tmx) | |
405 | (propagated-inputs | |
406 | `(("python2-pathlib" ,python2-pathlib) | |
407 | ,@(package-propagated-inputs python2-tmx)))))) | |
408 | ||
e99039b5 KK |
409 | (define-public python-xsge |
410 | (package | |
411 | (name "python-xsge") | |
6e92fba4 | 412 | (version "2018.02.26") |
e99039b5 KK |
413 | (source (origin |
414 | (method url-fetch) | |
795f3a00 | 415 | (uri (string-append "mirror://savannah/xsge/xsge/xsge-" |
e99039b5 KK |
416 | version ".tar.gz")) |
417 | (sha256 | |
418 | (base32 | |
6e92fba4 | 419 | "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40")))) |
e99039b5 KK |
420 | (build-system python-build-system) |
421 | (arguments | |
422 | '(#:phases | |
423 | (modify-phases %standard-phases | |
424 | ;; xSGE's setup.py script does not support one of the Python build | |
425 | ;; system's default flags, "--single-version-externally-managed". | |
426 | (replace 'install | |
427 | (lambda* (#:key outputs #:allow-other-keys) | |
6e92fba4 KK |
428 | (invoke "python" "setup.py" "install" |
429 | (string-append "--prefix=" (assoc-ref outputs "out")) | |
430 | "--root=/")))) | |
e99039b5 KK |
431 | #:tests? #f)) ; no check target |
432 | (propagated-inputs | |
433 | `(("python-sge-pygame" ,python-sge-pygame) | |
434 | ("python-pygame" ,python-pygame) | |
435 | ("python-six" ,python-six) | |
436 | ("python-tmx" ,python-tmx))) | |
437 | (home-page "http://xsge.nongnu.org") | |
438 | (synopsis "Extensions for the SGE Game Engine") | |
439 | (description | |
440 | "xSGE is a collection of modules that make doing certain tasks with the SGE | |
441 | Game Engine easier. In addition to SGE's conveniences, the user has access to a | |
442 | GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format | |
443 | support.") | |
444 | (license license:gpl3+))) | |
445 | ||
446 | (define-public python2-xsge | |
447 | (package-with-python2 python-xsge)) | |
448 | ||
b0910aad DT |
449 | (define-public tiled |
450 | (package | |
451 | (name "tiled") | |
b66f2211 | 452 | (version "1.2.5") |
b0910aad | 453 | (source (origin |
902068b4 RW |
454 | (method git-fetch) |
455 | (uri (git-reference | |
456 | (url "https://github.com/bjorn/tiled.git") | |
457 | (commit (string-append "v" version)))) | |
458 | (file-name (git-file-name name version)) | |
b0910aad DT |
459 | (sha256 |
460 | (base32 | |
b66f2211 | 461 | "14v2zfka2y3h0r0biw1rl59585lji5074x958s4xnb352jm5h9b9")))) |
b0910aad | 462 | (build-system gnu-build-system) |
864cc7ef RW |
463 | (inputs |
464 | `(("qtbase" ,qtbase) | |
465 | ("qtsvg" ,qtsvg) | |
466 | ("zlib" ,zlib))) | |
467 | (native-inputs | |
468 | `(("qttools" ,qttools))) | |
b0910aad DT |
469 | (arguments |
470 | '(#:phases | |
d06fc008 EF |
471 | (modify-phases %standard-phases |
472 | (replace 'configure | |
864cc7ef RW |
473 | (lambda* (#:key inputs outputs #:allow-other-keys) |
474 | (substitute* "translations/translations.pro" | |
475 | (("LRELEASE =.*") | |
476 | (string-append "LRELEASE = " | |
477 | (assoc-ref inputs "qttools") | |
478 | "/bin/lrelease\n"))) | |
d06fc008 | 479 | (let ((out (assoc-ref outputs "out"))) |
9dafb647 KK |
480 | (invoke "qmake" |
481 | (string-append "PREFIX=" out)))))))) | |
88b028f3 | 482 | (home-page "https://www.mapeditor.org/") |
b0910aad DT |
483 | (synopsis "Tile map editor") |
484 | (description | |
485 | "Tiled is a general purpose tile map editor. It is meant to be used for | |
486 | editing maps of any tile-based game, be it an RPG, a platformer or a Breakout | |
487 | clone.") | |
488 | ||
489 | ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is | |
490 | ;; under BSD-2. | |
491 | (license license:gpl2+))) | |
5809ffcc DT |
492 | |
493 | (define-public sfml | |
494 | (package | |
495 | (name "sfml") | |
9ac59ad3 | 496 | (version "2.5.1") |
5809ffcc | 497 | (source (origin |
95f6adae | 498 | (method git-fetch) |
7d1b5022 RW |
499 | ;; Do not fetch the archives from |
500 | ;; http://mirror0.sfml-dev.org/files/ because files there seem | |
501 | ;; to be changed in place. | |
95f6adae TGR |
502 | (uri (git-reference |
503 | (url "https://github.com/SFML/SFML.git") | |
504 | (commit version))) | |
505 | (file-name (git-file-name name version)) | |
5809ffcc DT |
506 | (sha256 |
507 | (base32 | |
9ac59ad3 | 508 | "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay")) |
67c127c9 MB |
509 | (modules '((guix build utils))) |
510 | (snippet | |
511 | '(begin | |
512 | ;; Ensure system libraries are used. | |
513 | (delete-file-recursively "extlibs") | |
514 | #t)))) | |
5809ffcc DT |
515 | (build-system cmake-build-system) |
516 | (arguments | |
a6e25a50 | 517 | '(#:configure-flags |
0bc27248 MB |
518 | (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE" |
519 | "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig") | |
a6e25a50 | 520 | #:tests? #f)) ; no tests |
0bc27248 MB |
521 | (native-inputs |
522 | `(("pkg-config" ,pkg-config))) | |
5809ffcc DT |
523 | (inputs |
524 | `(("mesa" ,mesa) | |
525 | ("glew" ,glew) | |
526 | ("libx11" ,libx11) | |
240f2785 | 527 | ("xcb-util-image" ,xcb-util-image) |
5809ffcc DT |
528 | ("libxrandr" ,libxrandr) |
529 | ("eudev" ,eudev) | |
5809ffcc | 530 | ("libjpeg" ,libjpeg) |
67c127c9 MB |
531 | ("libsndfile" ,libsndfile) |
532 | ("stb-image" ,stb-image) | |
533 | ("stb-image-write" ,stb-image-write))) | |
0bc27248 MB |
534 | (propagated-inputs |
535 | ;; In Requires.private of pkg-config files. | |
536 | `(("flac" ,flac) | |
537 | ("freetype" ,freetype) | |
538 | ("libvorbis" ,libvorbis) | |
5809ffcc | 539 | ("openal" ,openal))) |
167f0e82 | 540 | (home-page "https://www.sfml-dev.org") |
5809ffcc DT |
541 | (synopsis "Simple and Fast Multimedia Library") |
542 | (description | |
543 | "SFML provides a simple interface to the various computer components, | |
544 | to ease the development of games and multimedia applications. It is composed | |
545 | of five modules: system, window, graphics, audio and network.") | |
546 | (license license:zlib))) | |
d620ea88 DT |
547 | |
548 | (define-public sfxr | |
549 | (package | |
550 | (name "sfxr") | |
551 | (version "1.2.1") | |
552 | (source (origin | |
553 | (method url-fetch) | |
554 | (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) | |
555 | (sha256 | |
556 | (base32 | |
557 | "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) | |
558 | (build-system gnu-build-system) | |
559 | (arguments | |
560 | `(#:phases (modify-phases %standard-phases | |
561 | (delete 'configure) ; no configure script | |
562 | (add-before 'build 'patch-makefile | |
563 | (lambda* (#:key outputs #:allow-other-keys) | |
564 | (let ((out (assoc-ref outputs "out"))) | |
565 | (substitute* "Makefile" | |
566 | (("\\$\\(DESTDIR\\)/usr") out)) | |
567 | (substitute* "main.cpp" | |
568 | (("/usr/share") | |
569 | (string-append out "/share"))) | |
570 | #t)))) | |
571 | #:tests? #f)) ; no tests | |
572 | (native-inputs | |
573 | `(("pkg-config" ,pkg-config) | |
574 | ("desktop-file-utils" ,desktop-file-utils))) | |
575 | (inputs | |
576 | `(("sdl" ,sdl) | |
577 | ("gtk+" ,gtk+))) | |
578 | (synopsis "Simple sound effect generator") | |
579 | (description "Sfxr is a tool for quickly generating simple sound effects. | |
580 | Originally created for use in video game prototypes, it can generate random | |
581 | sounds from presets such as \"explosion\" or \"powerup\".") | |
582 | (home-page "http://www.drpetter.se/project_sfxr.html") | |
583 | (license license:expat))) | |
0f6139b1 AK |
584 | |
585 | (define-public physfs | |
586 | (package | |
587 | (name "physfs") | |
d00a8b84 | 588 | (version "3.0.2") |
0f6139b1 AK |
589 | (source (origin |
590 | (method url-fetch) | |
591 | (uri (string-append | |
167f0e82 | 592 | "https://icculus.org/physfs/downloads/physfs-" |
0f6139b1 AK |
593 | version ".tar.bz2")) |
594 | (file-name (string-append name "-" version ".tar.gz")) | |
595 | (sha256 | |
596 | (base32 | |
d00a8b84 | 597 | "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h")))) |
0f6139b1 AK |
598 | (build-system cmake-build-system) |
599 | (arguments | |
08e977d2 MB |
600 | '(#:tests? #f ; no check target |
601 | #:phases (modify-phases %standard-phases | |
602 | (add-after 'unpack 'patch-CMakeLists.txt | |
603 | (lambda _ | |
604 | (substitute* "CMakeLists.txt" | |
605 | ;; XXX: For some reason CMakeLists.txt disables | |
606 | ;; RUNPATH manipulation when the compiler is GCC. | |
607 | (("CMAKE_COMPILER_IS_GNUCC") "FALSE")) | |
608 | #t))))) | |
0f6139b1 AK |
609 | (inputs |
610 | `(("zlib" ,zlib))) | |
611 | (native-inputs | |
612 | `(("doxygen" ,doxygen))) | |
167f0e82 | 613 | (home-page "https://icculus.org/physfs") |
0f6139b1 AK |
614 | (synopsis "File system abstraction library") |
615 | (description | |
616 | "PhysicsFS is a library to provide abstract access to various archives. | |
617 | It is intended for use in video games. For security, no file writing done | |
618 | through the PhysicsFS API can leave a defined @emph{write directory}. For | |
619 | file reading, a @emph{search path} with archives and directories is defined, | |
620 | and it becomes a single, transparent hierarchical file system. So archive | |
621 | files can be accessed in the same way as you access files directly on a disk, | |
622 | and it makes it easy to ship a new archive that will override a previous | |
623 | archive on a per-file basis.") | |
624 | (license license:zlib))) | |
83a4a70b DT |
625 | |
626 | (define-public love | |
627 | (package | |
628 | (name "love") | |
dd88c89e | 629 | (version "11.3") |
83a4a70b DT |
630 | (source (origin |
631 | (method url-fetch) | |
632 | (uri (string-append "https://bitbucket.org/rude/love/downloads/" | |
633 | "love-" version "-linux-src.tar.gz")) | |
634 | (sha256 | |
635 | (base32 | |
dd88c89e | 636 | "0m8lvlabmcchskx4qpzkdlsm44360f3j0q3vvvj2388cfnvhv7v4")))) |
83a4a70b DT |
637 | (build-system gnu-build-system) |
638 | (native-inputs | |
639 | `(("pkg-config" ,pkg-config))) | |
640 | (inputs | |
641 | `(("devil" ,devil) | |
642 | ("freetype" ,freetype) | |
643 | ("libmodplug" ,libmodplug) | |
05d48c52 | 644 | ("libtheora" ,libtheora) |
83a4a70b DT |
645 | ("libvorbis" ,libvorbis) |
646 | ("luajit" ,luajit) | |
647 | ("mesa" ,mesa) | |
648 | ("mpg123" ,mpg123) | |
649 | ("openal" ,openal) | |
650 | ("physfs" ,physfs) | |
651 | ("sdl2" ,sdl2) | |
652 | ("zlib" ,zlib))) | |
653 | (synopsis "2D game framework for Lua") | |
654 | (description "LÖVE is a framework for making 2D games in the Lua | |
655 | programming language.") | |
656 | (home-page "https://love2d.org/") | |
657 | (license license:zlib))) | |
154f6156 | 658 | |
328dd9b7 JC |
659 | (define-public love-nuklear |
660 | (let ((version "v2.6") | |
661 | (commit "fef4e00a602efb16c57ae962850b6e7a01f7a29a")) | |
662 | (package | |
663 | (name "love-nuklear") | |
664 | (version (git-version version "1" commit)) | |
665 | (source (origin | |
666 | (method git-fetch) | |
667 | (uri (git-reference | |
668 | (url "https://github.com/keharriso/love-nuklear/") | |
669 | (commit commit) | |
670 | (recursive? #t))) | |
671 | ;; NOTE: the HEAD of the Nuklear git-submodule is at commit | |
672 | ;; "adc52d710fe3c87194b99f540c53e82eb75c2521" of Oct 1 2019 | |
673 | (file-name (git-file-name name version)) | |
674 | (sha256 | |
675 | (base32 | |
676 | "15qmy8mfwkxy2x9rmxs6f9cyvjvwwj6yf78bs863xmc56dmjzzbn")))) | |
677 | (build-system cmake-build-system) | |
678 | (arguments | |
679 | `(#:build-type "Release" | |
680 | #:tests? #f)) | |
681 | (inputs | |
682 | `(("luajit" ,luajit))) | |
683 | (synopsis "Lightweight immediate mode GUI for LÖVE games") | |
684 | (description "LÖVE is a Lua framework for making 2D games. Nuklear | |
685 | is a minimal state immediate mode graphical user interface toolkit. This | |
686 | package is the Nuklear bindings for LÖVE created by Kevin Harrison.") | |
687 | (home-page "https://github.com/keharriso/love-nuklear/") | |
688 | (license license:expat)))) | |
689 | ||
154f6156 DT |
690 | (define-public allegro-4 |
691 | (package | |
692 | (name "allegro") | |
b2cf5597 | 693 | (version "4.4.3") |
154f6156 DT |
694 | (source (origin |
695 | (method url-fetch) | |
3a12e21c EF |
696 | (uri (string-append "https://github.com/liballeg/allegro5/" |
697 | "releases/download/" version "/allegro-" | |
698 | version ".tar.gz")) | |
154f6156 DT |
699 | (sha256 |
700 | (base32 | |
b2cf5597 | 701 | "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y")))) |
154f6156 DT |
702 | (build-system cmake-build-system) |
703 | (arguments | |
704 | '(#:phases | |
705 | (modify-phases %standard-phases | |
706 | (add-after 'unpack 'patch-build-system | |
707 | (lambda _ | |
708 | ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE | |
709 | ;; via a command line option doesn't work because it is | |
710 | ;; unconditionally clobbered in the build script. | |
711 | (substitute* '("CMakeLists.txt") | |
712 | (("ADDON_LINKAGE STATIC") | |
713 | "ADDON_LINKAGE SHARED")) | |
714 | #t))))) | |
715 | (inputs | |
716 | `(("glu" ,glu) | |
717 | ("libpng" ,libpng) | |
718 | ("libvorbis" ,libvorbis) | |
719 | ("mesa" ,mesa) | |
720 | ("zlib" ,zlib))) | |
721 | (synopsis "Game programming library") | |
722 | (description "Allegro is a library mainly aimed at video game and | |
723 | multimedia programming. It handles common, low-level tasks such as creating | |
724 | windows, accepting user input, loading data, drawing images, playing sounds, | |
725 | etc.") | |
726 | (home-page "http://liballeg.org") | |
727 | (license license:giftware))) | |
2a068aec | 728 | |
19d311b4 RW |
729 | (define-public allegro |
730 | (package | |
731 | (name "allegro") | |
49405aaf | 732 | (version "5.2.5.0") |
19d311b4 RW |
733 | (source (origin |
734 | (method url-fetch) | |
3a12e21c EF |
735 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
736 | "/download/" version "/allegro-" | |
b15a020d | 737 | version ".tar.gz")) |
19d311b4 RW |
738 | (sha256 |
739 | (base32 | |
49405aaf | 740 | "06dpkfnac8w3pq36834nn2iij3ajz6prladqd0w92lq39aiqv5jr")))) |
19d311b4 | 741 | (build-system cmake-build-system) |
49405aaf | 742 | (arguments `(#:tests? #f)) ; there are no tests |
19d311b4 RW |
743 | (inputs |
744 | ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb | |
745 | `(("flac" ,flac) | |
746 | ("freetype" ,freetype) | |
747 | ("glu" ,glu) | |
748 | ("gtk" ,gtk+-2) | |
749 | ("libjpeg" ,libjpeg) | |
750 | ("libpng" ,libpng) | |
751 | ("libtheora" ,libtheora) | |
752 | ("libvorbis" ,libvorbis) | |
753 | ("libxcursor" ,libxcursor) | |
754 | ("libxinerama" ,libxinerama) | |
755 | ("libxrandr" ,libxrandr) | |
756 | ("mesa" ,mesa) | |
757 | ("openal" ,openal) | |
758 | ("physfs" ,physfs) | |
759 | ("zlib" ,zlib))) | |
760 | (native-inputs | |
761 | `(("pkg-config" ,pkg-config))) | |
762 | (synopsis "Game programming library") | |
763 | (description "Allegro is a library mainly aimed at video game and | |
764 | multimedia programming. It handles common, low-level tasks such as creating | |
765 | windows, accepting user input, loading data, drawing images, playing sounds, | |
766 | etc.") | |
767 | (home-page "http://liballeg.org") | |
768 | (license license:bsd-3))) | |
769 | ||
cdf8f391 RW |
770 | (define-public allegro-5.0 |
771 | (package (inherit allegro) | |
772 | (name "allegro") | |
773 | (version "5.0.11") | |
774 | (source (origin | |
775 | (method url-fetch) | |
3a12e21c EF |
776 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
777 | "/download/" version "/allegro-" | |
778 | (if (equal? "0" (string-take-right version 1)) | |
779 | (string-drop-right version 2) | |
780 | version) | |
781 | ".tar.gz")) | |
0109b89c EF |
782 | (patches (search-patches |
783 | "allegro-mesa-18.2.5-and-later.patch")) | |
cdf8f391 RW |
784 | (sha256 |
785 | (base32 | |
786 | "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) | |
787 | ||
2a068aec DT |
788 | (define-public aseprite |
789 | (package | |
790 | (name "aseprite") | |
82654d95 | 791 | (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL. |
ff4dc16e | 792 | ;; TODO: Unbundle third party software. |
2a068aec | 793 | (source (origin |
ff4dc16e MB |
794 | (method url-fetch/zipbomb) |
795 | (uri (string-append "https://github.com/aseprite/aseprite" | |
796 | "/releases/download/v" version | |
797 | "/Aseprite-v" version "-Source.zip")) | |
2a068aec DT |
798 | (sha256 |
799 | (base32 | |
82654d95 | 800 | "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv")))) |
2a068aec DT |
801 | (build-system cmake-build-system) |
802 | (arguments | |
803 | '(#:configure-flags | |
804 | ;; Use shared libraries instead of building bundled source. | |
805 | (list "-DWITH_WEBP_SUPPORT=1" | |
806 | "-DUSE_SHARED_CURL=1" | |
807 | "-DUSE_SHARED_GIFLIB=1" | |
808 | "-DUSE_SHARED_JPEGLIB=1" | |
809 | "-DUSE_SHARED_ZLIB=1" | |
810 | "-DUSE_SHARED_LIBPNG=1" | |
811 | "-DUSE_SHARED_LIBLOADPNG=1" | |
812 | "-DUSE_SHARED_LIBWEBP=1" | |
813 | "-DUSE_SHARED_TINYXML=1" | |
814 | "-DUSE_SHARED_PIXMAN=1" | |
815 | "-DUSE_SHARED_FREETYPE=1" | |
816 | "-DUSE_SHARED_ALLEGRO4=1" | |
817 | "-DENABLE_UPDATER=0" ; no auto-updates | |
818 | (string-append "-DFREETYPE_INCLUDE_DIR=" | |
819 | (assoc-ref %build-inputs "freetype") | |
de1d68a2 | 820 | "/include/freetype2")))) |
2a068aec DT |
821 | (native-inputs |
822 | `(("pkg-config" ,pkg-config))) | |
823 | ;; TODO: Use a patched Allegro 4 that supports window resizing. This | |
824 | ;; patched version is bundled with Aseprite, but the patches should be | |
825 | ;; extracted and applied on top of a standalone Allegro 4 package. | |
826 | (inputs | |
827 | `(("allegro" ,allegro-4) | |
828 | ("curl" ,curl) | |
829 | ("freetype" ,freetype) | |
830 | ("giflib" ,giflib) | |
831 | ("libjpeg" ,libjpeg) | |
832 | ("libpng" ,libpng) | |
833 | ("libwebp" ,libwebp) | |
834 | ("libx11" ,libx11) | |
835 | ("libxext" ,libxext) | |
836 | ("libxxf86vm" ,libxxf86vm) | |
837 | ("pixman" ,pixman) | |
838 | ("tinyxml" ,tinyxml) | |
839 | ("zlib" ,zlib))) | |
840 | (synopsis "Animated sprite editor and pixel art tool") | |
841 | (description "Aseprite is a tool for creating 2D pixel art for video | |
842 | games. In addition to basic pixel editing features, Aseprite can assist in | |
843 | the creation of animations, tiled graphics, texture atlases, and more.") | |
167f0e82 | 844 | (home-page "https://www.aseprite.org/") |
2a068aec | 845 | (license license:gpl2+))) |
966dff3b KY |
846 | |
847 | (define-public qqwing | |
848 | (package | |
849 | (name "qqwing") | |
850 | (version "1.3.4") | |
851 | (source (origin | |
852 | (method url-fetch) | |
853 | (uri (string-append | |
854 | "https://qqwing.com/" | |
855 | name "-" version ".tar.gz")) | |
856 | (sha256 | |
857 | (base32 | |
858 | "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp")))) | |
859 | (build-system gnu-build-system) | |
860 | (native-inputs | |
861 | `(("pkg-config" ,pkg-config))) | |
862 | (home-page "https://qqwing.com/") | |
863 | (synopsis "Sudoku puzzle solver and generator") | |
864 | (description | |
865 | "QQWing is a Sudoku puzzle generator and solver. | |
866 | It offers the following features: | |
867 | @enumerate | |
868 | @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds. | |
869 | @item Uses logic. Uses as many solve techniques as possible when solving | |
870 | puzzles rather than guessing. | |
871 | @item Rates puzzles. Most generators don't give an indication of the difficulty | |
872 | of a Sudoku puzzle. QQwing does. | |
873 | @item Can print solve instructions for any puzzle. | |
874 | @item Customizable output style, including a CSV style that is easy to | |
875 | import into a database. | |
876 | @end enumerate") | |
877 | (license license:gpl2+))) | |
d2cc38b7 KK |
878 | |
879 | (define-public quesoglc | |
880 | (package | |
881 | (name "quesoglc") | |
882 | (version "0.7.2") | |
883 | (source (origin | |
884 | (method url-fetch) | |
885 | (uri (string-append "mirror://sourceforge/" name "/" version "/" | |
886 | name "-" version "-free.tar.bz2")) | |
887 | (sha256 | |
888 | (base32 | |
889 | "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks")))) | |
890 | (build-system gnu-build-system) | |
891 | (native-inputs `(("pkg-config" ,pkg-config))) | |
892 | (inputs `(("fontconfig" ,fontconfig) | |
893 | ("freeglute" ,freeglut) | |
894 | ("fribidi" ,fribidi) | |
895 | ("glew" ,glew))) | |
896 | (home-page "http://quesoglc.sourceforge.net") | |
897 | (synopsis "Implementation of the OpenGL Character Renderer (GLC)") | |
898 | (description | |
899 | "The OpenGL Character Renderer (GLC) is a state machine that provides | |
900 | OpenGL programs with character rendering services via an application programming | |
901 | interface (API).") | |
902 | (license (list license:expat license:lgpl2.1+)))) | |
4bc37bf0 KK |
903 | |
904 | (define-public python-pygame | |
905 | (package | |
906 | (name "python-pygame") | |
a9db93c1 | 907 | (version "1.9.4") |
4bc37bf0 KK |
908 | (source (origin |
909 | (method url-fetch) | |
052f75da | 910 | (uri (pypi-uri "pygame" version)) |
4bc37bf0 KK |
911 | (sha256 |
912 | (base32 | |
a9db93c1 | 913 | "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh")))) |
4bc37bf0 KK |
914 | (build-system python-build-system) |
915 | (arguments | |
a9db93c1 | 916 | `(#:tests? #f ; tests require pygame to be installed first |
4bc37bf0 KK |
917 | #:phases |
918 | (modify-phases %standard-phases | |
919 | ;; Set the paths to the dependencies manually because | |
920 | ;; the configure script does not allow passing them as | |
921 | ;; parameters. This also means we can skip the configure | |
922 | ;; phase. | |
923 | (add-before 'build 'set-library-paths | |
924 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
925 | (let ((sdl-ref (assoc-ref inputs "sdl")) | |
926 | (font-ref (assoc-ref inputs "sdl-ttf")) | |
927 | (image-ref (assoc-ref inputs "sdl-image")) | |
928 | (mixer-ref (assoc-ref inputs "sdl-mixer")) | |
929 | (smpeg-ref (assoc-ref inputs "libsmpeg")) | |
930 | (png-ref (assoc-ref inputs "libpng")) | |
931 | (jpeg-ref (assoc-ref inputs "libjpeg")) | |
052f75da | 932 | (freetype-ref (assoc-ref inputs "freetype")) |
4bc37bf0 KK |
933 | (v4l-ref (assoc-ref inputs "v4l-utils")) |
934 | (out-ref (assoc-ref outputs "out"))) | |
935 | (substitute* "Setup.in" | |
936 | (("SDL = -I/usr/include/SDL") | |
937 | (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) | |
938 | (substitute* "Setup.in" | |
939 | (("FONT = -lSDL_ttf") | |
940 | (string-append "FONT = -I" font-ref "/include/SDL -L" | |
a9db93c1 | 941 | font-ref "/lib -lSDL_ttf"))) |
4bc37bf0 KK |
942 | (substitute* "Setup.in" |
943 | (("IMAGE = -lSDL_image") | |
944 | (string-append "IMAGE = -I" image-ref "/include/SDL -L" | |
a9db93c1 | 945 | image-ref "/lib -lSDL_image"))) |
4bc37bf0 KK |
946 | (substitute* "Setup.in" |
947 | (("MIXER = -lSDL_mixer") | |
948 | (string-append "MIXER = -I" mixer-ref "/include/SDL -L" | |
a9db93c1 | 949 | mixer-ref "/lib -lSDL_mixer"))) |
4bc37bf0 KK |
950 | (substitute* "Setup.in" |
951 | (("SMPEG = -lsmpeg") | |
952 | (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" | |
a9db93c1 | 953 | smpeg-ref "/lib -lsmpeg"))) |
4bc37bf0 KK |
954 | (substitute* "Setup.in" |
955 | (("PNG = -lpng") | |
956 | (string-append "PNG = -I" png-ref "/include -L" | |
a9db93c1 | 957 | png-ref "/lib -lpng"))) |
4bc37bf0 KK |
958 | (substitute* "Setup.in" |
959 | (("JPEG = -ljpeg") | |
960 | (string-append "JPEG = -I" jpeg-ref "/include -L" | |
961 | jpeg-ref "/lib -ljpeg"))) | |
052f75da DM |
962 | |
963 | (substitute* "Setup.in" | |
964 | (("FREETYPE = -lfreetype") | |
965 | (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" | |
966 | freetype-ref "/lib -lfreetype"))) | |
967 | ||
4bc37bf0 KK |
968 | (substitute* "Setup.in" |
969 | (("^pypm") "#pypm")) | |
4bc37bf0 KK |
970 | ;; Create a path to a header file provided by v4l-utils. |
971 | (system* "mkdir" "linux") | |
972 | (system* "ln" "--symbolic" | |
973 | (string-append v4l-ref "/include/libv4l1-videodev.h") | |
974 | "linux/videodev.h") | |
975 | (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) | |
4bc37bf0 | 976 | (inputs |
052f75da DM |
977 | `(("freetype" ,freetype) |
978 | ("sdl" ,sdl) | |
4bc37bf0 KK |
979 | ("sdl-image" ,sdl-image) |
980 | ("sdl-mixer" ,sdl-mixer) | |
981 | ("sdl-ttf" ,sdl-ttf) | |
982 | ("sdl-gfx" ,sdl-gfx) | |
983 | ("libjpeg" ,libjpeg) | |
984 | ("libpng" ,libpng) | |
985 | ("libX11" ,libx11) | |
986 | ("libsmpeg" ,libsmpeg) | |
987 | ("portmidi" ,portmidi) | |
988 | ("v4l-utils" ,v4l-utils))) | |
167f0e82 | 989 | (home-page "https://www.pygame.org") |
4bc37bf0 KK |
990 | (synopsis "SDL wrapper for Python") |
991 | (description "Pygame is a set of Python modules designed for writing games. | |
992 | Pygame adds functionality on top of the excellent SDL library. This allows you | |
993 | to create fully featured games and multimedia programs in the python language.") | |
994 | (license (list license:bsd-2 | |
995 | ;; python numeric license as listed by Debian looks like | |
996 | ;; an Expat-style license with a warranty disclaimer for | |
997 | ;; the U.S. government and the University of California. | |
998 | license:expat | |
999 | license:lgpl2.0+ | |
1000 | license:lgpl2.1+ | |
1001 | license:gpl3+ | |
1002 | license:psfl | |
1003 | license:public-domain | |
1004 | license:lgpl2.1+)))) | |
052f75da DM |
1005 | |
1006 | (define-public python2-pygame | |
1007 | (package-with-python2 python-pygame)) | |
68c6110c | 1008 | |
8476e585 CY |
1009 | (define-public python2-pygame-sdl2 |
1010 | (let ((real-version "2.1.0") | |
1011 | (renpy-version "7.3.5")) | |
1012 | (package | |
1013 | (inherit python2-pygame) | |
1014 | (name "python2-pygame-sdl2") | |
1015 | (version (string-append real-version "-for-renpy-" renpy-version)) | |
1016 | (source | |
1017 | (origin | |
1018 | (method url-fetch) | |
1019 | (uri (string-append "https://www.renpy.org/dl/" renpy-version | |
1020 | "/pygame_sdl2-" version ".tar.gz")) | |
1021 | (sha256 (base32 "1bmr7j9mlsc4czpgw70ld15ymyp4wxrk9hdsqad40wjwdxvvg2dr")))) | |
1022 | (build-system python-build-system) | |
1023 | (arguments | |
1024 | `(#:tests? #f ; tests require pygame to be installed first | |
1025 | #:python ,python-2 | |
1026 | #:phases | |
1027 | (modify-phases %standard-phases | |
1028 | (add-after 'set-paths 'set-sdl-vars | |
1029 | (lambda* (#:key inputs #:allow-other-keys) | |
1030 | (setenv "PYGAME_SDL2_CFLAGS" | |
1031 | (string-append "-I" | |
1032 | (assoc-ref inputs "sdl-union") | |
1033 | "/include/SDL2 -D_REENTRANT")) | |
1034 | (setenv "PYGAME_SDL2_LDFLAGS" | |
1035 | (string-append "-L" | |
1036 | (assoc-ref inputs "sdl-union") | |
1037 | "/lib -Wl,-rpath," | |
1038 | (assoc-ref inputs "sdl-union") | |
1039 | "/lib -Wl,--enable-new-dtags -lSDL2")) | |
1040 | #t)) | |
1041 | (add-before 'build 'drop-generated-files | |
1042 | (lambda args | |
1043 | (delete-file-recursively "gen") | |
1044 | (delete-file-recursively "gen3") | |
1045 | #t))))) | |
1046 | (inputs | |
1047 | `(("sdl-union" | |
1048 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
1049 | (native-inputs | |
1050 | `(("python2-cython" ,python2-cython))) | |
1051 | (home-page "http://www.renpy.org/") | |
1052 | (synopsis "Reimplementation of the Pygame API using SDL2") | |
1053 | (description "Pygame_SDL2 reimplements the Pygame API using SDL2, | |
1054 | staying close to the original, but also adding some SDL2-specific features. | |
1055 | While it aims to be used as a drop-in replacement, it appears to be | |
1056 | developed mainly for Ren'py.") | |
1057 | (license (list license:lgpl2.1 license:zlib))))) | |
1058 | ||
1059 | (define-public python2-renpy | |
1060 | (package | |
1061 | (name "python2-renpy") | |
1062 | (version "7.3.5") | |
1063 | (source | |
1064 | (origin | |
1065 | (method url-fetch) | |
1066 | (uri (string-append "https://www.renpy.org/dl/" version | |
1067 | "/renpy-" version "-source.tar.bz2")) | |
1068 | (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) | |
1069 | (build-system python-build-system) | |
1070 | (arguments | |
1071 | `(#:tests? #f ; Ren'py doesn't seem to package tests | |
1072 | #:python ,python-2 | |
1073 | #:phases | |
1074 | (modify-phases %standard-phases | |
1075 | (add-after 'unpack 'fix-commands | |
1076 | (lambda _ | |
1077 | (substitute* "renpy/editor.py" | |
1078 | (("xdg-open") | |
1079 | (which "xdg-open"))) | |
1080 | #t)) | |
1081 | (add-after 'set-paths 'set-build-vars | |
1082 | (lambda* (#:key inputs #:allow-other-keys) | |
1083 | (setenv "RENPY_CYTHON" | |
1084 | (string-append (assoc-ref inputs "python2-cython") | |
1085 | "/bin/cython")) | |
1086 | (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":")) | |
1087 | #t)) | |
1088 | (replace 'build | |
1089 | (lambda args | |
1090 | (apply | |
1091 | (lambda* (build-root #:key inputs outputs #:allow-other-keys) | |
1092 | ;; The "module" subdirectory contains a python (really cython) | |
1093 | ;; project, which is built using a script, that is thankfully | |
1094 | ;; named "setup.py". | |
1095 | (chdir "module") | |
1096 | (apply (assoc-ref %standard-phases 'build) args) | |
1097 | ;; the above causes renpy.__init__ to be compiled but does not | |
1098 | ;; compile anything else, hence we do that here | |
1099 | (chdir build-root) | |
1100 | (delete-file "renpy/__init__.pyc") | |
1101 | (invoke "python" "-m" "compileall" "renpy")) | |
1102 | (getcwd) args) | |
1103 | #t)) | |
1104 | (replace 'install | |
1105 | (lambda args | |
1106 | (apply | |
1107 | (lambda* (build-root #:key inputs outputs #:allow-other-keys) | |
1108 | ;; Again, we have to wrap the module installation. | |
1109 | ;; Additionally, we want to install the python code | |
1110 | ;; (both source and compiled) in the same directory. | |
1111 | (let* ((out (assoc-ref outputs "out")) | |
1112 | (site (string-append "/lib/python" | |
1113 | ,(version-major+minor | |
1114 | (package-version python-2)) | |
1115 | "/site-packages"))) | |
1116 | (chdir "module") | |
1117 | (apply (assoc-ref %standard-phases 'install) args) | |
1118 | (chdir build-root) | |
1119 | (copy-recursively "renpy" | |
1120 | (string-append out site "/renpy")))) | |
1121 | (getcwd) args) | |
1122 | #t))))) | |
1123 | (inputs | |
1124 | `(("ffmpeg" ,ffmpeg) | |
1125 | ("freetype" ,freetype) | |
1126 | ("glew" ,glew) | |
1127 | ("libpng" ,libpng) | |
1128 | ("python2-pygame" ,python2-pygame-sdl2) | |
1129 | ("sdl-union" | |
1130 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
1131 | (native-inputs | |
1132 | `(("python2-cython" ,python2-cython) | |
1133 | ("xdg-utils" ,xdg-utils))) | |
1134 | (home-page "http://www.renpy.org/") | |
1135 | (synopsis "Ren'py python module") | |
1136 | (description "This package contains the shared libraries and Python | |
1137 | modules of Ren'py.") | |
1138 | (license license:expat))) | |
1139 | ||
1140 | (define-public renpy | |
1141 | (package | |
1142 | (inherit python2-renpy) | |
1143 | (name "renpy") | |
1144 | (version "7.3.5") | |
1145 | (build-system python-build-system) | |
1146 | (arguments | |
1147 | `(#:tests? #f ; see python2-renpy | |
1148 | #:python ,python-2 | |
1149 | #:phases | |
1150 | (modify-phases %standard-phases | |
1151 | (add-after 'unpack 'fix-commands | |
1152 | (lambda* (#:key outputs #:allow-other-keys) | |
1153 | (substitute* "launcher/game/choose_directory.rpy" | |
1154 | (("/usr/bin/python") (which "python2"))) | |
1155 | (substitute* "launcher/game/front_page.rpy" | |
1156 | (("xdg-open") | |
1157 | (which "xdg-open"))) | |
1158 | (substitute* "launcher/game/project.rpy" | |
1159 | (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]") | |
1160 | (string-append "cmd = [ \"" (assoc-ref outputs "out") | |
1161 | "/bin/renpy\" ]")) | |
1162 | ;; Projects are still created in the usual style, so we need | |
1163 | ;; to adjust the path. | |
1164 | (("cmd.append\\(self.path\\)") | |
1165 | "cmd.append(self.path + \"/game\")")) | |
1166 | #t)) | |
1167 | (add-after 'unpack 'drop-game-from-paths | |
1168 | (lambda _ | |
1169 | (substitute* (list "launcher/game/gui7.rpy" | |
1170 | "launcher/game/gui7/images.py") | |
1171 | ((", \"game\",") ",")) | |
1172 | #t)) | |
1173 | (add-before 'build 'start-xserver | |
1174 | (lambda* (#:key inputs #:allow-other-keys) | |
1175 | (let ((xorg-server (assoc-ref inputs "xorg-server"))) | |
1176 | (setenv "HOME" (getcwd)) | |
1177 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
1178 | (setenv "DISPLAY" ":1") | |
1179 | #t))) | |
1180 | (replace 'build | |
1181 | (lambda _ | |
1182 | (invoke "python" "renpy.py" "launcher" "quit") | |
1183 | (invoke "python" "renpy.py" "the_question" "quit") | |
1184 | (invoke "python" "renpy.py" "tutorial" "quit") | |
1185 | #t)) | |
1186 | (replace 'install | |
1187 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1188 | ;; Here we install our custom renpy program. | |
1189 | ;; After finishing this step, "out" will have the following: | |
1190 | ;; |-- bin/renpy | |
1191 | ;; `-- share/renpy ; i.e. path_to_renpy_base() | |
1192 | ;; `-- common | |
1193 | ;; | |
1194 | ;; Note that common is also a de facto unused directory in | |
1195 | ;; python2-renpy. On other systems, renpy_base would point to | |
1196 | ;; site-packages or even somewhere in /opt. | |
1197 | ;; The former approach is not as straightforward as it seems | |
1198 | ;; -- it causes renpy to load files twice for some weird reason -- | |
1199 | ;; and the latter is impossible on Guix. Hence the detour through | |
1200 | ;; share/renpy and the custom renpy program. | |
1201 | ;; | |
1202 | ;; As a convention, other games should be installed as | |
1203 | ;; subdirectories of share/renpy in their respective outputs as | |
1204 | ;; well. This differs from the traditional layout, which is | |
1205 | ;; roughly the following: | |
1206 | ;; `-- Super Awesome Game | |
1207 | ;; |-- game ; <- the folder we actually want | |
1208 | ;; |-- lib ; compiled renpy module and dependencies | |
1209 | ;; |-- renpy ; Ren'py python code (source + compiled) | |
1210 | ;; |-- Super Awesome Game.py | |
1211 | ;; `-- Super Awesome Game.sh | |
1212 | (let* ((out (assoc-ref outputs "out")) | |
1213 | (bin/renpy (string-append out "/bin/renpy"))) | |
1214 | (mkdir-p (string-append out "/bin")) | |
1215 | (copy-recursively "renpy/common" | |
1216 | (string-append out "/share/renpy/common")) | |
1217 | (copy-recursively "gui" | |
1218 | (string-append out "/share/renpy/gui")) | |
1219 | ||
1220 | (call-with-output-file bin/renpy | |
1221 | (lambda (port) | |
1222 | (format port "#!~a~%" (which "python2")) | |
1223 | (format port " | |
1224 | from __future__ import print_function | |
1225 | ||
1226 | import os | |
1227 | import sys | |
1228 | import warnings | |
1229 | ||
1230 | def path_to_common(renpy_base): | |
1231 | return renpy_base + \"/common\" | |
1232 | ||
1233 | def path_to_saves(gamedir, save_directory=None): | |
1234 | import renpy # @UnresolvedImport | |
1235 | ||
1236 | if save_directory is None: | |
1237 | save_directory = renpy.config.save_directory | |
1238 | save_directory = renpy.exports.fsencode(save_directory) | |
1239 | ||
1240 | if not save_directory: | |
1241 | return gamedir + \"/saves\" | |
1242 | ||
1243 | return os.path.expanduser(\"~~/.renpy/\" + save_directory) | |
1244 | ||
1245 | def path_to_renpy_base(): | |
1246 | return \"~a\" | |
1247 | ||
1248 | def main(): | |
1249 | renpy_base = path_to_renpy_base() | |
1250 | try: | |
1251 | import renpy.bootstrap | |
1252 | import renpy.arguments | |
1253 | except ImportError: | |
1254 | print(\"\"\"Could not import renpy.bootstrap. | |
1255 | Please ensure you decompressed Ren'Py correctly, preserving the directory | |
1256 | structure.\"\"\", file=sys.stderr) | |
1257 | raise | |
1258 | ||
1259 | args = renpy.arguments.bootstrap() | |
1260 | if not args.basedir: | |
1261 | print(\"\"\"This Ren'py requires a basedir to launch. | |
1262 | The basedir is the directory, in which .rpy files live -- usually the 'game' | |
1263 | subdirectory of a game packaged by Ren'py. | |
1264 | ||
1265 | If you want the Ren'py launcher, use renpy-launcher instead.\"\"\", | |
1266 | file=sys.stderr) | |
1267 | sys.exit() | |
1268 | ||
1269 | renpy.bootstrap.bootstrap(renpy_base) | |
1270 | ||
1271 | if __name__ == \"__main__\": | |
1272 | main() | |
1273 | " | |
1274 | (string-append out "/share/renpy")))) | |
1275 | (chmod bin/renpy #o755) | |
1276 | #t))) | |
1277 | ||
1278 | (add-after 'install 'install-games | |
1279 | (lambda* (#:key outputs #:allow-other-keys) | |
1280 | (define renpy (assoc-ref outputs "out")) | |
1281 | ;; TODO: We should offer a renpy-build-system to make the | |
1282 | ;; installation of Ren'py games easier. | |
1283 | (define* (install-renpy-game #:key output game name (renpy renpy) | |
1284 | #:allow-other-keys) | |
1285 | (let* ((name (or name (basename game))) | |
1286 | (launcher (string-append output "/bin/renpy-" name)) | |
1287 | (share (string-append output "/share/renpy/" name))) | |
1288 | (copy-recursively (string-append game "/game") share) | |
1289 | (mkdir-p (string-append output "/bin")) | |
1290 | (with-output-to-file launcher | |
1291 | (lambda () | |
1292 | (format #t | |
1293 | "#!~a~%~a ~a \"$@\"" | |
1294 | (which "bash") | |
1295 | (string-append renpy "/bin/renpy") | |
1296 | share))) | |
1297 | (chmod launcher #o755))) | |
1298 | ||
1299 | (install-renpy-game #:output (assoc-ref outputs "out") | |
1300 | #:game "launcher") | |
1301 | ||
1302 | (install-renpy-game #:output (assoc-ref outputs "the-question") | |
1303 | #:game "the_question" | |
1304 | #:name "the-question") | |
1305 | ||
1306 | (install-renpy-game #:output (assoc-ref outputs "tutorial") | |
1307 | #:game "tutorial") | |
1308 | #t)) | |
1309 | (replace 'wrap | |
1310 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1311 | (wrap-program (string-append (assoc-ref outputs "out") | |
1312 | "/bin/renpy") | |
1313 | `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) | |
1314 | #t))))) | |
1315 | (inputs | |
1316 | `(("python2-tkinter" ,python-2 "tk") | |
1317 | ("python2-pygame" ,python2-pygame-sdl2) | |
1318 | ("python2-renpy" ,python2-renpy) | |
1319 | ("xorg-server" ,xorg-server))) | |
1320 | (outputs | |
1321 | (list "out" "tutorial" "the-question")) | |
1322 | (home-page "http://www.renpy.org/") | |
1323 | (synopsis "Visual Novel Engine") | |
1324 | (description "Ren'Py is a visual novel engine that helps you use words, | |
1325 | images, and sounds to tell interactive stories that run on computers and | |
1326 | mobile devices. These can be both visual novels and life simulation games. | |
1327 | The easy to learn script language allows anyone to efficiently write large | |
1328 | visual novels, while its Python scripting is enough for complex simulation | |
1329 | games.") | |
1330 | (license license:expat))) | |
1331 | ||
68c6110c DT |
1332 | (define-public grafx2 |
1333 | (package | |
1334 | (name "grafx2") | |
1335 | (version "2.4") | |
1336 | (source (origin | |
1337 | (method url-fetch) | |
1338 | ;; XXX: There is no URL that contains the version. :( | |
1339 | (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21") | |
1340 | (sha256 | |
1341 | (base32 | |
1342 | "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q")))) | |
1343 | (build-system gnu-build-system) | |
1344 | (arguments | |
1345 | '(#:phases | |
1346 | (modify-phases %standard-phases | |
1347 | (delete 'configure) ; no configure script | |
1348 | (add-before 'build 'change-to-src-directory | |
1349 | (lambda _ | |
1350 | (chdir "src") | |
1351 | #t))) | |
1352 | #:make-flags | |
1353 | ;; SDL header files are referenced without the preceeding "SDL/". | |
1354 | (list (string-append "CFLAGS=-I" | |
1355 | (assoc-ref %build-inputs "sdl-union") | |
1356 | "/include/SDL") | |
1357 | (string-append "prefix=" | |
1358 | (assoc-ref %outputs "out"))) | |
1359 | #:tests? #f)) ; no check target | |
1360 | (native-inputs | |
1361 | `(("pkg-config" ,pkg-config))) | |
1362 | (inputs | |
1363 | `(("libpng" ,libpng) | |
1364 | ("lua" ,lua-5.1) | |
1365 | ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf))))) | |
1366 | (synopsis "Bitmap paint program") | |
1367 | (description "GrafX2 is a bitmap paint program inspired by the Amiga | |
7432d3ae | 1368 | programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it |
68c6110c DT |
1369 | includes a very large number of tools and effects that make it particularly |
1370 | suitable for pixel art, game graphics, and generally any detailed graphics | |
1371 | painted with a mouse.") | |
1372 | (home-page "http://pulkomandy.tk/projects/GrafX2") | |
1373 | (license license:gpl2))) ; GPLv2 only | |
c608fe8c MR |
1374 | |
1375 | (define-public ois | |
1376 | (package | |
1377 | (name "ois") | |
006345c1 | 1378 | (version "1.5") |
c608fe8c MR |
1379 | (source |
1380 | (origin | |
c608fe8c MR |
1381 | (method git-fetch) |
1382 | (uri (git-reference | |
1383 | (url "https://github.com/wgois/OIS.git") | |
006345c1 TGR |
1384 | (commit (string-append "v" version)))) |
1385 | (file-name (git-file-name name version)) | |
c608fe8c | 1386 | (sha256 |
006345c1 TGR |
1387 | (base32 "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa")))) |
1388 | (build-system cmake-build-system) | |
1389 | (arguments | |
1390 | `(#:tests? #f)) ; no test suite | |
c608fe8c | 1391 | (inputs |
006345c1 | 1392 | `(("libx11" ,libx11))) |
c608fe8c MR |
1393 | (synopsis "Object Oriented Input System") |
1394 | (description | |
1395 | "Cross Platform Object Oriented Input Lib System is a cross platform, | |
1396 | simple solution for using all kinds of Input Devices (Keyboards, Mice, | |
1397 | Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very | |
1398 | robust and compatible with many systems and operating systems.") | |
1399 | (home-page "https://github.com/wgois/OIS") | |
1400 | (license license:zlib))) | |
42d0d13d MR |
1401 | |
1402 | (define-public mygui | |
1403 | (package | |
1404 | (name "mygui") | |
1405 | (version "3.2.2") | |
1406 | (source | |
1407 | (origin | |
47f4d5d3 PN |
1408 | (method git-fetch) |
1409 | (uri (git-reference | |
1410 | (url "https://github.com/MyGUI/mygui") | |
1411 | (commit (string-append "MyGUI" version)))) | |
1412 | (file-name (git-file-name name version)) | |
42d0d13d MR |
1413 | (sha256 |
1414 | (base32 | |
47f4d5d3 | 1415 | "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw")))) |
42d0d13d MR |
1416 | (build-system cmake-build-system) |
1417 | (arguments | |
1418 | '(#:tests? #f ; No test target | |
1419 | #:configure-flags | |
1420 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1421 | (string-append "-DOGRE_INCLUDE_DIR=" | |
1422 | (assoc-ref %build-inputs "ogre") | |
47f4d5d3 PN |
1423 | "/include/OGRE") |
1424 | ;; Demos and tools are Windows-specific: | |
1425 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1426 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1427 | "-DMYGUI_BUILD_TOOLS=FALSE"))) | |
42d0d13d MR |
1428 | (native-inputs |
1429 | `(("boost" ,boost) | |
1430 | ("doxygen" ,doxygen) | |
1431 | ("pkg-config" ,pkg-config))) | |
1432 | (inputs | |
1433 | `(("font-dejavu" ,font-dejavu) | |
1434 | ("freetype" ,freetype) | |
1435 | ("graphviz" ,graphviz) | |
1436 | ("libx11" ,libx11) | |
1437 | ("ogre" ,ogre) | |
1438 | ("ois" ,ois))) | |
1439 | (synopsis "Fast, flexible and simple GUI") | |
1440 | (description | |
1441 | "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games | |
1442 | and 3D applications. The main goals of mygui are: speed, flexibility and ease | |
1443 | of use.") | |
1444 | (home-page "http://mygui.info/") | |
1445 | (license license:expat))) | |
e9a599cd | 1446 | |
9fd50db3 PN |
1447 | (define-public mygui-gl |
1448 | ;; Closure size is reduced by some 800 MiB. | |
1449 | (package | |
1450 | (inherit mygui) | |
1451 | (name "mygui-gl") | |
1452 | (version "3.2.2") | |
1453 | (arguments | |
1454 | (substitute-keyword-arguments (package-arguments mygui) | |
1455 | ((#:configure-flags _) | |
1456 | `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL. | |
1457 | ;; We can't reuse the flags because of the mention to Ogre. | |
1458 | (list "-DMYGUI_INSTALL_DOCS=TRUE" | |
1459 | ;; Demos and tools are Windows-specific: | |
1460 | ;; https://github.com/MyGUI/mygui/issues/24. | |
1461 | "-DMYGUI_BUILD_DEMOS=FALSE" | |
1462 | "-DMYGUI_BUILD_TOOLS=FALSE"))))) | |
1463 | (inputs | |
1464 | `(("mesa" ,mesa) | |
1465 | ("glu" ,glu) | |
1466 | ,@(fold alist-delete (package-inputs mygui) | |
1467 | '("ogre")))) | |
1468 | (synopsis "Fast, flexible and simple GUI (OpenGL backend)"))) | |
1469 | ||
e9a599cd MR |
1470 | (define-public openmw |
1471 | (package | |
1472 | (name "openmw") | |
6bc30a57 | 1473 | (version "0.45.0") |
e9a599cd MR |
1474 | (source |
1475 | (origin | |
8b1f8f64 AK |
1476 | (method url-fetch) |
1477 | (uri | |
1478 | (string-append "https://github.com/OpenMW/openmw/archive/" | |
37bf216d | 1479 | "openmw-" version ".tar.gz")) |
e9a599cd MR |
1480 | (sha256 |
1481 | (base32 | |
6bc30a57 | 1482 | "0r0wgvv1faan8z8lbply8lks4hcnppifjrcz04l5zvq6yiqzjg5n")))) |
e9a599cd MR |
1483 | (build-system cmake-build-system) |
1484 | (arguments | |
1485 | `(#:tests? #f ; No test target | |
1486 | #:configure-flags | |
1487 | (list "-DDESIRED_QT_VERSION=5"))) | |
1488 | (native-inputs | |
1489 | `(("boost" ,boost) | |
1490 | ("doxygen" ,doxygen) | |
1491 | ("pkg-config" ,pkg-config))) | |
1492 | (inputs | |
1493 | `(("bullet" ,bullet) | |
1494 | ("ffmpeg" ,ffmpeg) | |
1495 | ("libxt" ,libxt) | |
0655c16e | 1496 | ("mygui" ,mygui-gl) ; OpenMW does not need Ogre. |
e9a599cd | 1497 | ("openal" ,openal) |
f95ec65b | 1498 | ("openscenegraph" ,openmw-openscenegraph) |
e9a599cd MR |
1499 | ("qtbase" ,qtbase) |
1500 | ("sdl" ,sdl2) | |
1501 | ("unshield" ,unshield))) | |
5a80c15c | 1502 | (synopsis "Re-implementation of the RPG Morrowind engine") |
e9a599cd | 1503 | (description |
5a80c15c RW |
1504 | "OpenMW is a game engine which reimplements and extends the one that runs |
1505 | the 2002 open-world RPG Morrowind. The engine comes with its own editor, | |
1506 | called OpenMW-CS which allows the user to edit or create their own original | |
1507 | games.") | |
e9a599cd | 1508 | (home-page "https://openmw.org") |
8b1f8f64 | 1509 | (license license:gpl3))) |
194b4e7d PM |
1510 | |
1511 | (define-public godot | |
1512 | (package | |
1513 | (name "godot") | |
fc346e30 | 1514 | (version "3.0.6") |
194b4e7d | 1515 | (source (origin |
39f516cb TGR |
1516 | (method git-fetch) |
1517 | (uri (git-reference | |
1518 | (url "https://github.com/godotengine/godot") | |
1519 | (commit (string-append version "-stable")))) | |
1520 | (file-name (git-file-name name version)) | |
194b4e7d | 1521 | (sha256 |
9766c6e2 | 1522 | (base32 |
fc346e30 | 1523 | "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf")) |
5b8d2ace MB |
1524 | (modules '((guix build utils))) |
1525 | (snippet | |
1526 | '(begin | |
1527 | ;; Drop libraries that we take from Guix. Note that some | |
1528 | ;; of these may be modified; see "thirdparty/README.md". | |
1529 | (with-directory-excursion "thirdparty" | |
1530 | (for-each delete-file-recursively | |
1531 | '("freetype" | |
1532 | "libogg" | |
1533 | "libpng" | |
1534 | "libtheora" | |
1535 | "libvorbis" | |
1536 | "libvpx" | |
1537 | "libwebp" | |
1538 | "openssl" | |
1539 | "opus" | |
1540 | "zlib")) | |
1541 | #t))))) | |
92b51d12 | 1542 | (build-system scons-build-system) |
194b4e7d | 1543 | (arguments |
92b51d12 AI |
1544 | `(#:scons ,scons-python2 |
1545 | #:scons-flags (list "platform=x11" | |
d6e8a84e EF |
1546 | ,@(if (string-prefix? "aarch64" (or (%current-target-system) |
1547 | (%current-system))) | |
1548 | `("CCFLAGS=-DNO_THREADS") | |
1549 | '()) | |
92b51d12 AI |
1550 | ;; Avoid using many of the bundled libs. |
1551 | ;; Note: These options can be found in the SConstruct file. | |
1552 | "builtin_freetype=no" | |
1553 | "builtin_glew=no" | |
1554 | "builtin_libmpdec=no" | |
1555 | "builtin_libogg=no" | |
1556 | "builtin_libpng=no" | |
1557 | "builtin_libtheora=no" | |
1558 | "builtin_libvorbis=no" | |
5b8d2ace | 1559 | "builtin_libvpx=no" |
92b51d12 AI |
1560 | "builtin_libwebp=no" |
1561 | "builtin_openssl=no" | |
1562 | "builtin_opus=no" | |
1563 | "builtin_zlib=no") | |
1564 | #:tests? #f ; There are no tests | |
194b4e7d PM |
1565 | #:phases |
1566 | (modify-phases %standard-phases | |
194b4e7d PM |
1567 | (add-after 'unpack 'scons-use-env |
1568 | (lambda _ | |
1569 | ;; Scons does not use the environment variables by default, | |
1570 | ;; but this substitution makes it do so. | |
1571 | (substitute* "SConstruct" | |
1572 | (("env_base = Environment\\(tools=custom_tools\\)") | |
1573 | (string-append | |
1574 | "env_base = Environment(tools=custom_tools)\n" | |
1575 | "env_base = Environment(ENV=os.environ)"))) | |
1576 | #t)) | |
194b4e7d PM |
1577 | (replace 'install |
1578 | (lambda* (#:key outputs #:allow-other-keys) | |
1579 | (let* ((out (assoc-ref outputs "out")) | |
1580 | (bin (string-append out "/bin"))) | |
1581 | (with-directory-excursion "bin" | |
1582 | (if (file-exists? "godot.x11.tools.64") | |
1583 | (rename-file "godot.x11.tools.64" "godot") | |
1584 | (rename-file "godot.x11.tools.32" "godot")) | |
7da5db8e TGR |
1585 | (install-file "godot" bin)) |
1586 | #t))) | |
194b4e7d PM |
1587 | (add-after 'install 'install-godot-desktop |
1588 | (lambda* (#:key outputs #:allow-other-keys) | |
1589 | (let* ((out (assoc-ref outputs "out")) | |
1590 | (desktop (string-append out "/share/applications")) | |
1591 | (icon-dir (string-append out "/share/pixmaps"))) | |
194b4e7d PM |
1592 | (rename-file "icon.png" "godot.png") |
1593 | (install-file "godot.png" icon-dir) | |
7da5db8e | 1594 | (mkdir-p desktop) |
194b4e7d PM |
1595 | (with-output-to-file |
1596 | (string-append desktop "/godot.desktop") | |
1597 | (lambda _ | |
1598 | (format #t | |
1599 | "[Desktop Entry]~@ | |
1600 | Name=godot~@ | |
1601 | Comment=The godot game engine~@ | |
1602 | Exec=~a/bin/godot~@ | |
1603 | TryExec=~@*~a/bin/godot~@ | |
1604 | Icon=godot~@ | |
1605 | Type=Application~%" | |
1606 | out))) | |
1607 | #t)))))) | |
92b51d12 | 1608 | (native-inputs `(("pkg-config" ,pkg-config))) |
194b4e7d PM |
1609 | (inputs `(("alsa-lib" ,alsa-lib) |
1610 | ("freetype" ,freetype) | |
1611 | ("glew" ,glew) | |
1612 | ("glu" ,glu) | |
1613 | ("libtheora" ,libtheora) | |
1614 | ("libvorbis" ,libvorbis) | |
5b8d2ace | 1615 | ("libvpx" ,libvpx) |
194b4e7d PM |
1616 | ("libwebp" ,libwebp) |
1617 | ("libx11" ,libx11) | |
1618 | ("libxcursor" ,libxcursor) | |
9766c6e2 | 1619 | ("libxi" ,libxi) |
194b4e7d PM |
1620 | ("libxinerama" ,libxinerama) |
1621 | ("libxrandr" ,libxrandr) | |
1622 | ("mesa" ,mesa) | |
1623 | ("openssl" ,openssl) | |
1624 | ("opusfile" ,opusfile) | |
92b51d12 | 1625 | ("pulseaudio" ,pulseaudio))) |
194b4e7d PM |
1626 | (home-page "https://godotengine.org/") |
1627 | (synopsis "Advanced 2D and 3D game engine") | |
1628 | (description | |
1629 | "Godot is an advanced multi-platform game engine written in C++. If | |
1630 | features design tools such as a visual editor, can import 3D models and | |
1631 | provide high-quality 3D rendering, it contains an animation editor, and can be | |
1632 | scripted in a Python-like language.") | |
1633 | (license license:expat))) | |
531003be | 1634 | |
1635 | (define-public eureka | |
1636 | (package | |
1637 | (name "eureka") | |
75f66e4a | 1638 | (version "1.24") |
531003be | 1639 | (source (origin |
1640 | (method url-fetch) | |
1641 | (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/" | |
1642 | version "/eureka-" | |
1643 | ;; version without dots e.g 1.21 => 121 | |
1644 | (string-join (string-split version #\.) "") | |
1645 | "-source.tar.gz")) | |
1646 | (sha256 | |
1647 | (base32 | |
75f66e4a | 1648 | "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v")))) |
531003be | 1649 | (build-system gnu-build-system) |
1650 | (arguments | |
1651 | '(#:tests? #f | |
1652 | #:make-flags | |
1653 | (let ((out (assoc-ref %outputs "out"))) | |
1654 | (list (string-append "PREFIX=" out))) | |
1655 | #:phases | |
1656 | (modify-phases %standard-phases | |
1657 | (delete 'configure) | |
1658 | (add-before 'build 'prepare-install-directories | |
1659 | (lambda* (#:key outputs #:allow-other-keys) | |
1660 | (let ((out (assoc-ref outputs "out"))) | |
1661 | (mkdir-p (string-append out "/bin")) | |
1662 | (mkdir-p (string-append out "/share")) | |
1663 | ||
1664 | (with-fluids ((%default-port-encoding #f)) | |
1665 | (substitute* "./src/main.cc" | |
1666 | (("/usr/local") out))) | |
1667 | ||
1668 | (substitute* "Makefile" | |
1669 | (("-o root") "")))))))) | |
1670 | (inputs `(("mesa" ,mesa) | |
1671 | ("libxft" ,libxft) | |
1672 | ("libxinerama" ,libxinerama) | |
1673 | ("libfontconfig" ,fontconfig) | |
1674 | ("libjpeg" ,libjpeg) | |
1675 | ("libpng" ,libpng) | |
1676 | ("fltk" ,fltk) | |
1677 | ("zlib" ,zlib))) | |
1678 | (native-inputs `(("pkg-config" ,pkg-config) | |
1679 | ("xdg-utils" ,xdg-utils))) | |
1680 | (synopsis "Doom map editor") | |
1681 | (description "Eureka is a map editor for the classic DOOM games, and a few | |
1682 | related games such as Heretic and Hexen. It comes with a 3d preview mode and | |
1683 | a 2D editor view.") | |
1684 | (home-page "http://eureka-editor.sourceforge.net/") | |
1685 | (license license:gpl2+))) | |
00fca594 RW |
1686 | |
1687 | (define-public guile-chickadee | |
1688 | (package | |
1689 | (name "guile-chickadee") | |
f6ea5237 | 1690 | (version "0.4.0") |
00fca594 RW |
1691 | (source (origin |
1692 | (method url-fetch) | |
1693 | (uri (string-append "https://files.dthompson.us/chickadee/" | |
1694 | "chickadee-" version ".tar.gz")) | |
1695 | (sha256 | |
1696 | (base32 | |
f6ea5237 | 1697 | "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l")))) |
00fca594 | 1698 | (build-system gnu-build-system) |
00fca594 RW |
1699 | (propagated-inputs |
1700 | `(("guile-opengl" ,guile-opengl) | |
1701 | ("guile-sdl2" ,guile-sdl2))) | |
1702 | (inputs | |
1703 | `(("guile" ,guile-2.2))) | |
1704 | (native-inputs | |
1705 | `(("pkg-config" ,pkg-config) | |
1706 | ("texinfo" ,texinfo))) | |
1707 | (home-page "https://dthompson.us/projects/chickadee.html") | |
1708 | (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL") | |
1709 | (description "Chickadee is a game development toolkit for Guile Scheme | |
1710 | built on top of SDL2 and OpenGL. Chickadee aims to provide all the features | |
1711 | that parenthetically inclined game developers need to make 2D (and eventually | |
1712 | 3D) games in Scheme, such as: | |
1713 | ||
1714 | @enumerate | |
1715 | @item extensible, fixed-timestep game loop | |
1716 | @item OpenGL-based rendering engine | |
1717 | @item keyboard, mouse, controller input | |
1718 | @item REPL-driven development model | |
1719 | @end enumerate\n") | |
1720 | (license license:gpl3+))) | |
4041fabb PN |
1721 | |
1722 | (define-public bennu-game-development | |
1723 | (package | |
1724 | (name "bennu-game-development") | |
1725 | (version "348") | |
1726 | (source (origin | |
1727 | (method svn-fetch) | |
1728 | (uri (svn-reference | |
1729 | (url "http://svn.code.sf.net/p/bennugd/code") | |
1730 | (revision (string->number version)))) | |
1731 | (file-name (string-append name "-" version)) | |
1732 | (sha256 | |
1733 | (base32 | |
edf1ce60 EF |
1734 | "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq")) |
1735 | (modules '((guix build utils))) | |
1736 | (snippet | |
1737 | '(begin | |
1738 | (delete-file-recursively "3rdparty") #t)))) | |
4041fabb PN |
1739 | (build-system gnu-build-system) |
1740 | (arguments | |
1741 | '(#:phases | |
1742 | (modify-phases %standard-phases | |
f0e4cfcb | 1743 | (add-after 'unpack 'patch-configure-to-use-openssl |
4041fabb PN |
1744 | (lambda* (#:key outputs #:allow-other-keys) |
1745 | (chdir "core") | |
1746 | (delete-file "configure") | |
1747 | (substitute* "configure.in" | |
1748 | (("i\\*86\\)") | |
f0e4cfcb | 1749 | "*) |
4041fabb PN |
1750 | COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\" |
1751 | COMMON_LDFLAGS=\"$COMMON_LDFLAGS\" | |
1752 | LIBSSL=\"crypto\" | |
1753 | USE_OPENSSL=yes | |
1754 | ;; | |
1755 | ||
f0e4cfcb EF |
1756 | i*86)")) |
1757 | #t))))) | |
4041fabb PN |
1758 | (inputs `(("openssl" ,openssl) |
1759 | ("zlib" ,zlib))) | |
1760 | (native-inputs `(("pkg-config" ,pkg-config) | |
1761 | ("autoconf" ,autoconf) | |
1762 | ("automake" ,automake) | |
1763 | ("libtool" ,libtool))) | |
1764 | (synopsis "Programming language to create games") | |
1765 | (description "Bennu Game Development, also known as bennudg, is a | |
1766 | programming language tailored at game development. It is the successor of | |
1767 | Fenix.") | |
1768 | (home-page "https://sourceforge.net/projects/bennugd/") | |
1769 | (license license:zlib))) | |
24c4b012 PN |
1770 | |
1771 | (define-public bennu-game-development-modules | |
1772 | (package | |
1773 | (inherit bennu-game-development) | |
1774 | (name "bennu-game-development-modules") | |
1775 | (arguments | |
1776 | '(#:phases | |
1777 | (modify-phases %standard-phases | |
1778 | (add-after 'unpack 'patch-conflicting-definitions | |
1779 | (lambda _ | |
1780 | (with-fluids ((%default-port-encoding #f)) | |
1781 | (substitute* "core/include/fmath.h" | |
1782 | (("extern fixed fmul\\( int x, int y \\);") "") | |
1783 | (("extern fixed fdiv\\( int x, int y \\);") ""))) | |
1784 | (chdir "modules")))))) | |
1785 | (inputs `(("zlib" ,zlib) | |
1786 | ("libpng" ,libpng) | |
1787 | ("openssl" ,openssl) | |
1788 | ("sdl-mixer" ,sdl-mixer) | |
1789 | ("bennu-game-development" ,bennu-game-development))) | |
0525864b | 1790 | (synopsis "Modules for the Bennu Game Development programming language") |
24c4b012 | 1791 | (description "This package contains a collection of modules for the Bennu |
0525864b | 1792 | Game Development programming language, from CD handling through SDL to |
24c4b012 | 1793 | joystick support."))) |
cd528946 RW |
1794 | |
1795 | (define-public plib | |
1796 | (package | |
1797 | (name "plib") | |
1798 | (version "1.8.5") | |
1799 | (source (origin | |
1800 | (method url-fetch) | |
1801 | (uri (string-append "http://plib.sourceforge.net/dist/" | |
1802 | "plib-" version ".tar.gz")) | |
1803 | (sha256 | |
1804 | (base32 | |
05f386f1 EF |
1805 | "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8")) |
1806 | (patches (search-patches "plib-CVE-2011-4620.patch" | |
1807 | "plib-CVE-2012-4552.patch")))) | |
cd528946 RW |
1808 | (build-system gnu-build-system) |
1809 | (inputs | |
1810 | `(("mesa" ,mesa) | |
1811 | ("libxi" ,libxi) | |
1812 | ("libxmu" ,libxmu))) | |
1813 | (native-inputs | |
1814 | `(("pkg-config" ,pkg-config))) | |
1815 | (home-page "http://plib.sourceforge.net/") | |
1816 | (synopsis "Suite of portable game libraries") | |
1817 | (description "PLIB is a set of libraries that will permit programmers to | |
1818 | write games and other realtime interactive applications that are 100% portable | |
1819 | across a wide range of hardware and operating systems. PLIB includes sound | |
1820 | effects, music, a complete 3D engine, font rendering, a simple Windowing | |
1821 | library, a game scripting language, a GUI, networking, 3D math library and a | |
1822 | collection of handy utility functions. All are 100% portable across nearly | |
1823 | all modern computing platforms. Each library component is fairly independent | |
1824 | of the others") | |
1825 | (license license:lgpl2.0+))) | |
e4ff9dff PN |
1826 | |
1827 | (define-public ioquake3 | |
1828 | ;; We follow master since it seems that there won't be releases after 1.3.6. | |
1829 | (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0")) | |
1830 | (package | |
1831 | (name "ioquake3") | |
1832 | (version (git-version "1.3.6" "1" commit)) | |
1833 | (source | |
1834 | (origin | |
1835 | (method git-fetch) | |
1836 | (uri (git-reference | |
1837 | (url "https://github.com/ioquake/ioq3.git") | |
1838 | (commit commit))) | |
1839 | (file-name (git-file-name name version)) | |
1840 | (sha256 | |
1841 | (base32 | |
1842 | "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z")))) | |
1843 | (build-system gnu-build-system) | |
1844 | (inputs | |
1845 | `(("sdl2" ,sdl2) | |
1846 | ("libjpeg" ,libjpeg) | |
1847 | ("openal" ,openal) | |
1848 | ("curl" ,curl) | |
1849 | ("opusfile" ,opusfile) | |
1850 | ("opus" ,opus) | |
1851 | ("libvorbis" ,libvorbis) | |
1852 | ("freetype" ,freetype) | |
1853 | ("libogg" ,libogg))) | |
1854 | (native-inputs | |
1855 | `(("which" ,which) ; Else SDL_version.h won't be found. | |
1856 | ("pkg-config" ,pkg-config))) | |
1857 | (arguments | |
1858 | '(#:tests? #f ; No tests. | |
1859 | #:make-flags '("CC=gcc" | |
1860 | "USE_INTERNAL_LIBS=0" | |
1861 | "USE_FREETYPE=1" | |
1862 | "USE_RENDERER_DLOPEN=0" | |
1863 | "USE_OPENAL_DLOPEN=0" | |
1864 | "USE_CURL_DLOPEN=0") | |
1865 | #:phases | |
1866 | (modify-phases %standard-phases | |
1867 | (delete 'configure) | |
1868 | (replace 'install | |
1869 | (lambda* (#:key outputs #:allow-other-keys) | |
1870 | (invoke "make" "copyfiles" "CC=gcc" | |
1871 | "USE_INTERNAL_LIBS=0" | |
1872 | (string-append "COPYDIR=" | |
1873 | (assoc-ref outputs "out") | |
1874 | "/bin"))))))) | |
1875 | (home-page "https://ioquake3.org/") | |
1876 | (synopsis "FPS game engine based on Quake 3") | |
1877 | (description "ioquake3 is a free software first person shooter engine | |
1878 | based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to | |
1879 | the original, ioquake3 has been cleaned up, bugs have been fixed and features | |
1880 | added. The permanent goal is to create the open source Quake 3 distribution | |
1881 | upon which people base their games, ports to new platforms, and other | |
1882 | projects.") | |
e4ff9dff | 1883 | (license license:gpl2)))) |
545946f6 PN |
1884 | |
1885 | (define-public openvr | |
1886 | (package | |
1887 | (name "openvr") | |
1854a0ec | 1888 | (version "1.8.19") |
545946f6 PN |
1889 | (home-page "https://github.com/ValveSoftware/openvr/") |
1890 | (source | |
1891 | (origin | |
1892 | (method git-fetch) | |
1893 | (uri (git-reference | |
1894 | (url home-page) | |
1895 | (commit (string-append "v" version)))) | |
1896 | (file-name (git-file-name name version)) | |
1897 | (sha256 | |
1854a0ec | 1898 | (base32 "1b8cppvw6ib0kvx0vjq7jsk3plg1vh171w8xr230vjn05381wp52")))) |
545946f6 PN |
1899 | (build-system cmake-build-system) |
1900 | (arguments | |
1901 | ;; No tests. | |
1902 | '(#:tests? #f | |
1903 | #:configure-flags (list "-DBUILD_SHARED=1"))) | |
1904 | (synopsis "Virtual reality software development kit") | |
1905 | (description "OpenVR is an API and runtime that allows access to VR | |
1906 | hardware from multiple vendors without requiring that applications have | |
1907 | specific knowledge of the hardware they are targeting.") | |
1908 | (license license:bsd-3))) | |
7158fe4d PN |
1909 | |
1910 | (define-public fna | |
1911 | (package | |
1912 | (name "fna") | |
1913 | (version "19.12.01") | |
1914 | (source | |
1915 | (origin | |
1916 | (method git-fetch) | |
1917 | (uri (git-reference | |
1918 | (url "https://github.com/FNA-XNA/FNA.git") | |
1919 | (commit version))) | |
1920 | (file-name (git-file-name name version)) | |
1921 | (sha256 | |
1922 | (base32 "1vdyi9hac24fqcs8kpj6yk36bf5rrl4dvlvdd9fc701fawcf6lrr")))) | |
1923 | (build-system gnu-build-system) | |
1924 | (arguments | |
1925 | '(#:tests? #f ; No tests. | |
1926 | #:phases | |
1927 | (modify-phases %standard-phases | |
1928 | (add-after 'unpack 'link-dep-src | |
1929 | (lambda* (#:key inputs #:allow-other-keys) | |
1930 | (let ((sdl2 (assoc-ref inputs "sdl2-cs-src")) | |
1931 | (mojoshader (assoc-ref inputs "mojoshader-src")) | |
1932 | (faudio (assoc-ref inputs "faudio-src")) | |
1933 | (theorafile (assoc-ref inputs "theorafile-src"))) | |
1934 | (symlink (string-append sdl2 "/src") "lib/SDL2-CS/src") | |
1935 | (symlink (string-append mojoshader "/csharp") "lib/MojoShader/csharp") | |
1936 | (symlink (string-append faudio "/csharp") "lib/FAudio/csharp") | |
1937 | (symlink (string-append theorafile "/csharp") "lib/Theorafile/csharp")))) | |
1938 | (delete 'configure) | |
1939 | (replace 'build | |
1940 | (lambda _ | |
1941 | (invoke "make" "release"))) | |
1942 | (replace 'install | |
1943 | (lambda* (#:key outputs #:allow-other-keys) | |
1944 | (let ((out (assoc-ref outputs "out"))) | |
1945 | (install-file "bin/Release/FNA.dll" (string-append out "/lib")) | |
1946 | #t)))))) | |
1947 | (native-inputs | |
1948 | `(("mono" ,mono))) | |
1949 | (inputs `(("sdl2-cs-src" ,(package-source sdl2-cs)) | |
1950 | ("mojoshader-src" ,(package-source mojoshader-cs)) | |
1951 | ("faudio-src" ,(package-source faudio)) | |
1952 | ("theorafile-src" ,(package-source theorafile)))) | |
1953 | (home-page "https://fna-xna.github.io/") | |
1954 | (synopsis "Accuracy-focused XNA4 reimplementation") | |
1955 | (description "FNA is a Microsoft XNA Game Studio 4.0 reimplementation that | |
1956 | focuses solely on developing a fully accurate XNA4 runtime for the desktop.") | |
1957 | (license (list license:ms-pl ; FNA | |
1958 | license:lgpl2.1 ; LzxDecoder.cs | |
1959 | ;; Mono.Xna: | |
1960 | license:expat)))) | |
45c552ec NG |
1961 | |
1962 | (define-public libccd | |
1963 | (package | |
1964 | (name "libccd") | |
1965 | (version "2.1") | |
1966 | (source | |
1967 | (origin | |
1968 | (method git-fetch) | |
1969 | (uri (git-reference | |
1970 | (url "https://github.com/danfis/libccd.git") | |
1971 | (commit (string-append "v" version)))) | |
1972 | (file-name (git-file-name name version)) | |
1973 | (sha256 | |
1974 | (base32 "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc")))) | |
1975 | (build-system cmake-build-system) | |
1976 | (arguments | |
1977 | `(#:configure-flags '("-DBUILD_DOCUMENTATION=ON" | |
1978 | "-DBUILD_TESTING=ON" | |
1979 | "-DENABLE_DOUBLE_PRECISION=ON"))) | |
1980 | (native-inputs | |
1981 | `(("python-sphinx" ,python-sphinx))) | |
1982 | (home-page "https://github.com/danfis/libccd") | |
1983 | (synopsis "Library for collision detection between two convex shapes") | |
1984 | (description "@code{libccd} is library for a collision detection | |
1985 | between two convex shapes. @code{libccd} implements variation on | |
1986 | Gilbert–Johnson–Keerthi algorithm plus Expand Polytope Algorithm (EPA) | |
1987 | and also implements algorithm Minkowski Portal Refinement (MPR, | |
1988 | a.k.a. XenoCollide) as described in Game Programming Gems 7.") | |
1989 | (license license:expat))) | |
42399ad7 NG |
1990 | |
1991 | (define-public ode | |
1992 | (package | |
1993 | (name "ode") | |
1994 | (version "0.16") | |
1995 | (source | |
1996 | (origin | |
1997 | (method url-fetch) | |
1998 | (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/" | |
1999 | "ode-" version ".tar.gz")) | |
2000 | (sha256 | |
2001 | (base32 "09xzrarxwxcf6rdv5jsjfjh454jnn29dpcw3wh6ic50kkipvg8sb")) | |
2002 | (modules '((guix build utils))) | |
2003 | (snippet | |
2004 | '(begin | |
2005 | (delete-file-recursively "libccd") | |
2006 | #t)))) | |
2007 | (build-system cmake-build-system) | |
2008 | (arguments | |
2009 | `(#:configure-flags '("-DODE_WITH_LIBCCD_SYSTEM=ON") | |
2010 | #:phases | |
2011 | (modify-phases %standard-phases | |
2012 | (add-after 'unpack 'unbundle-libccd | |
2013 | (lambda _ | |
2014 | (substitute* "CMakeLists.txt" | |
2015 | (("configure_file\\(libccd/.*") "")) | |
2016 | #t))))) | |
2017 | (inputs | |
2018 | `(("glu" ,glu) | |
2019 | ("libccd" ,libccd) | |
2020 | ("mesa" ,mesa))) | |
2021 | (home-page "http://www.ode.org/") | |
2022 | (synopsis "High performance library for simulating rigid body dynamics") | |
2023 | (description "ODE is a high performance library for simulating | |
2024 | rigid body dynamics. It is fully featured, stable, mature and | |
2025 | platform independent with an easy to use C/C++ API. It has advanced | |
2026 | joint types and integrated collision detection with friction. ODE is | |
2027 | useful for simulating vehicles, objects in virtual reality | |
2028 | environments and virtual creatures. It is currently used in many | |
2029 | computer games, 3D authoring tools and simulation tools.") | |
2030 | ;; Software is dual-licensed. | |
2031 | (license (list license:lgpl2.1+ license:expat)))) |