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