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