| 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 Ludovic Courtès <ludo@gnu.org> |
| 5 | ;;; Copyright © 2015 Alex Kost <alezost@gmail.com> |
| 6 | ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org> |
| 7 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
| 8 | ;;; Copyright © 2016, 2017 Kei Kebreau <kei@openmailbox.org> |
| 9 | ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> |
| 10 | ;;; Copyright © 2016 Julian Graham <joolean@gmail.com> |
| 11 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
| 12 | ;;; |
| 13 | ;;; This file is part of GNU Guix. |
| 14 | ;;; |
| 15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 16 | ;;; under the terms of the GNU General Public License as published by |
| 17 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 18 | ;;; your option) any later version. |
| 19 | ;;; |
| 20 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | ;;; GNU General Public License for more details. |
| 24 | ;;; |
| 25 | ;;; You should have received a copy of the GNU General Public License |
| 26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 27 | |
| 28 | (define-module (gnu packages game-development) |
| 29 | #:use-module ((guix licenses) #:prefix license:) |
| 30 | #:use-module (guix packages) |
| 31 | #:use-module (guix download) |
| 32 | #:use-module (guix git-download) |
| 33 | #:use-module (guix utils) |
| 34 | #:use-module (guix build-system cmake) |
| 35 | #:use-module (guix build-system gnu) |
| 36 | #:use-module (guix build-system python) |
| 37 | #:use-module (gnu packages) |
| 38 | #:use-module (gnu packages boost) |
| 39 | #:use-module (gnu packages curl) |
| 40 | #:use-module (gnu packages databases) |
| 41 | #:use-module (gnu packages documentation) |
| 42 | #:use-module (gnu packages fontutils) |
| 43 | #:use-module (gnu packages freedesktop) |
| 44 | #:use-module (gnu packages fribidi) |
| 45 | #:use-module (gnu packages glib) |
| 46 | #:use-module (gnu packages gnunet) |
| 47 | #:use-module (gnu packages guile) |
| 48 | #:use-module (gnu packages multiprecision) |
| 49 | #:use-module (gnu packages music) |
| 50 | #:use-module (gnu packages ncurses) |
| 51 | #:use-module (gnu packages python) |
| 52 | #:use-module (gnu packages qt) |
| 53 | #:use-module (gnu packages video) |
| 54 | #:use-module (gnu packages compression) |
| 55 | #:use-module (gnu packages gl) |
| 56 | #:use-module (gnu packages linux) |
| 57 | #:use-module (gnu packages xorg) |
| 58 | #:use-module (gnu packages xdisorg) |
| 59 | #:use-module (gnu packages fontutils) |
| 60 | #:use-module (gnu packages image) |
| 61 | #:use-module (gnu packages audio) |
| 62 | #:use-module (gnu packages pulseaudio) |
| 63 | #:use-module (gnu packages gnome) |
| 64 | #:use-module (gnu packages gtk) |
| 65 | #:use-module (gnu packages sdl) |
| 66 | #:use-module (gnu packages pkg-config) |
| 67 | #:use-module (gnu packages xiph) |
| 68 | #:use-module (gnu packages lua) |
| 69 | #:use-module (gnu packages mp3) |
| 70 | #:use-module (gnu packages xml)) |
| 71 | |
| 72 | (define-public bullet |
| 73 | (package |
| 74 | (name "bullet") |
| 75 | (version "2.86.1") |
| 76 | (source (origin |
| 77 | (method url-fetch) |
| 78 | (uri (string-append "https://github.com/bulletphysics/bullet3/" |
| 79 | "archive/" version ".tar.gz")) |
| 80 | (file-name (string-append name "-" version ".tar.gz")) |
| 81 | (sha256 |
| 82 | (base32 |
| 83 | "0nghzcl84p8di215p7xj0gy1hyy072hw2xk9cnmav9hv6bjb4n60")))) |
| 84 | (build-system cmake-build-system) |
| 85 | (arguments |
| 86 | '(#:configure-flags (list (string-append |
| 87 | "-DBUILD_SHARED_LIBS=ON " |
| 88 | "-DCMAKE_CXX_FLAGS=-fPIC " |
| 89 | (or (getenv "CXXFLAGS") ""))))) |
| 90 | (inputs |
| 91 | `(("glu" ,glu) |
| 92 | ("libx11" ,libx11) |
| 93 | ("mesa" ,mesa))) |
| 94 | (home-page "http://bulletphysics.org/") |
| 95 | (synopsis "3D physics engine library") |
| 96 | (description |
| 97 | "Bullet is a physics engine library usable for collision detection. It |
| 98 | is used in some video games and movies.") |
| 99 | (license license:zlib))) |
| 100 | |
| 101 | (define-public deutex |
| 102 | (package |
| 103 | (name "deutex") |
| 104 | (version "4.4.902") |
| 105 | (source (origin |
| 106 | (method url-fetch) |
| 107 | (uri (string-append "https://github.com/Doom-Utils/" name |
| 108 | "/archive/v" version ".tar.gz")) |
| 109 | (file-name (string-append name "-" version ".tar.gz")) |
| 110 | (sha256 |
| 111 | (base32 |
| 112 | "0rwz1yzgd539x4h25kzhar4q02xyxjwfrcpz4m8ixi312a82p7cn")))) |
| 113 | (build-system gnu-build-system) |
| 114 | (arguments |
| 115 | '(#:tests? #f ; no check target |
| 116 | #:phases |
| 117 | (modify-phases %standard-phases |
| 118 | ;; The provided configure script takes a restricted number of arguments. |
| 119 | (replace 'configure |
| 120 | (lambda* (#:key outputs #:allow-other-keys) |
| 121 | (zero? (system* "./configure" "--prefix" |
| 122 | (assoc-ref %outputs "out"))))) |
| 123 | ;; "make install" is broken for this package. |
| 124 | ;; Notably, the binaries overrwrite one another upon installation as |
| 125 | ;; they are all installed to the "bin" file in the output directory, |
| 126 | ;; and the manual page fails to install because the directory for the |
| 127 | ;; manual page is not created. |
| 128 | (replace 'install |
| 129 | (lambda* (#:key outputs #:allow-other-keys) |
| 130 | (let* ((out (assoc-ref %outputs "out")) |
| 131 | (bin (string-append out "/bin")) |
| 132 | (share (string-append out "/share"))) |
| 133 | (install-file "deusf" bin) |
| 134 | (install-file "deutex" bin) |
| 135 | (install-file "deutex.6" (string-append share "/man/man6"))) |
| 136 | #t))))) |
| 137 | (home-page "https://github.com/Doom-Utils/deutex") |
| 138 | (synopsis "WAD file composer for Doom and related games") |
| 139 | (description |
| 140 | "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be |
| 141 | used to extract the lumps of a wad and save them as individual files. |
| 142 | Conversely, it can also build a wad from separate files. When extracting a |
| 143 | lump to a file, it does not just copy the raw data, it converts it to an |
| 144 | appropriate format (such as PPM for graphics, Sun audio for samples, etc.). |
| 145 | Conversely, when it reads files for inclusion in pwads, it does the necessary |
| 146 | conversions (for example, from PPM to Doom picture format). In addition, |
| 147 | DeuTex has functions such as merging wads, etc.") |
| 148 | (license license:gpl2+))) |
| 149 | |
| 150 | (define-public grfcodec |
| 151 | (package |
| 152 | (name "grfcodec") |
| 153 | (version "6.0.6") |
| 154 | (source (origin |
| 155 | (method url-fetch) |
| 156 | (uri (string-append "http://binaries.openttd.org/extra/" |
| 157 | name "/" version "/" name "-" version |
| 158 | "-source.tar.xz")) |
| 159 | (sha256 |
| 160 | (base32 |
| 161 | "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk")))) |
| 162 | (build-system gnu-build-system) |
| 163 | (arguments |
| 164 | '(#:tests? #f ; no check target |
| 165 | #:phases |
| 166 | (modify-phases %standard-phases |
| 167 | (delete 'configure) ; no configure script |
| 168 | (replace 'install ; no install target |
| 169 | (lambda* (#:key outputs #:allow-other-keys) |
| 170 | (let* ((out (assoc-ref outputs "out")) |
| 171 | (bin (string-append out "/bin")) |
| 172 | (doc (string-append out "/share/doc")) |
| 173 | (man (string-append out "/share/man/man1"))) |
| 174 | (for-each (lambda (file) |
| 175 | (install-file file bin)) |
| 176 | '("grfcodec" "grfid" "grfstrip" "nforenum")) |
| 177 | (install-file "COPYING" doc) |
| 178 | (with-directory-excursion "docs" |
| 179 | (for-each (lambda (file) |
| 180 | (install-file (string-append file ".txt") doc)) |
| 181 | '("auto_correct" "commands" "grf" "grfcodec" "grftut" |
| 182 | "readme" "readme.rpn")) |
| 183 | (for-each (lambda (file) |
| 184 | (install-file file man)) |
| 185 | (find-files "." "\\.1")))) |
| 186 | #t))))) |
| 187 | (inputs |
| 188 | `(("boost" ,boost) |
| 189 | ("libpng" ,libpng) |
| 190 | ("zlib" ,zlib))) |
| 191 | (synopsis "GRF development tools") |
| 192 | (description |
| 193 | "The @dfn{Graphics Resource File} (GRF) development tools are a set of |
| 194 | tools for developing (New)GRFs. It includes a number of smaller programs, each |
| 195 | with a specific task: |
| 196 | @enumerate |
| 197 | @item @code{grfcodec} decodes and encodes GRF files for OpenTTD. |
| 198 | @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF. |
| 199 | @item @code{grfstrip} strips all sprites from a GRF. |
| 200 | @item @code{nforenum} checks NFO code for errors, making corrections when |
| 201 | necessary. |
| 202 | @end enumerate") |
| 203 | (home-page "http://dev.openttdcoop.org/projects/grfcodec") |
| 204 | ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2. |
| 205 | ;; NFORenum is under the GPL2+. |
| 206 | ;; The MD5 implementation contained in GRFID is under the zlib license. |
| 207 | (license (list license:gpl2 license:gpl2+ license:zlib)))) |
| 208 | |
| 209 | (define-public gzochi |
| 210 | (package |
| 211 | (name "gzochi") |
| 212 | (version "0.10.1") |
| 213 | (source (origin |
| 214 | (method url-fetch) |
| 215 | (uri (string-append "mirror://savannah/gzochi/gzochi-" |
| 216 | version ".tar.gz")) |
| 217 | (sha256 |
| 218 | (base32 |
| 219 | "166rawdal45kvanhvi0bkzy1d2pwf1p0lzslb287lcnm9vdw97yy")))) |
| 220 | (build-system gnu-build-system) |
| 221 | (arguments |
| 222 | '(#:phases (modify-phases %standard-phases |
| 223 | (add-before 'configure 'remove-Werror |
| 224 | (lambda _ |
| 225 | ;; We can't build with '-Werror', notably |
| 226 | ;; because deprecated functions of |
| 227 | ;; libmicrohttpd are being used. |
| 228 | (substitute* (find-files "." "^Makefile\\.in$") |
| 229 | (("-Werror") |
| 230 | "")) |
| 231 | #t))))) |
| 232 | (native-inputs `(("pkgconfig" ,pkg-config))) |
| 233 | (inputs `(("bdb" ,bdb) |
| 234 | ("glib" ,glib) |
| 235 | ("guile" ,guile-2.0) |
| 236 | ("libmicrohttpd" ,libmicrohttpd) |
| 237 | ("ncurses" ,ncurses) |
| 238 | ("sdl" ,sdl) |
| 239 | ("zlib" ,zlib))) |
| 240 | (home-page "http://www.nongnu.org/gzochi/") |
| 241 | (synopsis "Scalable middleware for multiplayer games") |
| 242 | (description |
| 243 | "gzochi is a framework for developing massively multiplayer online games. |
| 244 | A server container provides services to deployed games, which are written in |
| 245 | Guile Scheme, that abstract and simplify some of the most challenging and |
| 246 | error-prone aspects of online game development: Concurrency, data persistence, |
| 247 | and network communications. A very thin client library can be embedded to |
| 248 | provide connectivity for client applications written in any language.") |
| 249 | (license license:gpl3+))) |
| 250 | |
| 251 | (define-public nml |
| 252 | (package |
| 253 | (name "nml") |
| 254 | (version "0.4.4") |
| 255 | (source |
| 256 | (origin |
| 257 | (method url-fetch) |
| 258 | (uri (string-append "http://bundles.openttdcoop.org/nml/releases/" |
| 259 | version "/nml-" version ".tar.gz")) |
| 260 | (sha256 |
| 261 | (base32 |
| 262 | "0wk9ls5qyjwkra54rkj1gg94xbwzi7b84a5fh1ma1q7pbimi8rmg")))) |
| 263 | (build-system python-build-system) |
| 264 | (propagated-inputs |
| 265 | `(("python-pillow" ,python-pillow) |
| 266 | ("python-ply" ,python-ply))) |
| 267 | (home-page "http://dev.openttdcoop.org/projects/nml") |
| 268 | (synopsis "NML compiler") |
| 269 | (description |
| 270 | "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of |
| 271 | compiling NML files (along with their associated language, sound and graphic |
| 272 | files) into @file{.grf} and/or @file{.nfo} files.") |
| 273 | (license license:gpl2+))) |
| 274 | |
| 275 | (define-public python-sge-pygame |
| 276 | (package |
| 277 | (name "python-sge-pygame") |
| 278 | (version "1.5") |
| 279 | (source |
| 280 | (origin |
| 281 | (method url-fetch) |
| 282 | (uri (pypi-uri "sge-pygame" version)) |
| 283 | (sha256 |
| 284 | (base32 |
| 285 | "0g0n722md6nfayiqzadwf0dh821hzqv0alp4by0vjfwr1xzv49mc")))) |
| 286 | (build-system python-build-system) |
| 287 | (propagated-inputs |
| 288 | `(("python-pygame" ,python-pygame) |
| 289 | ("python-six" ,python-six) |
| 290 | ("python-uniseg" ,python-uniseg))) |
| 291 | (home-page "http://stellarengine.nongnu.org") |
| 292 | (synopsis "2D game engine for Python") |
| 293 | (description |
| 294 | "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a |
| 295 | general-purpose 2D game engine. It takes care of several details fro you so |
| 296 | you can focus on the game itself. This makes more rapid game development |
| 297 | possible, and it also makes the SGE easy to learn.") |
| 298 | (license license:lgpl3+))) |
| 299 | |
| 300 | (define-public python2-sge-pygame |
| 301 | (package-with-python2 python-sge-pygame)) |
| 302 | |
| 303 | (define-public python-tmx |
| 304 | (package |
| 305 | (name "python-tmx") |
| 306 | (version "1.9.1") |
| 307 | (source |
| 308 | (origin |
| 309 | (method url-fetch) |
| 310 | (uri (string-append "mirror://savannah/python-tmx/" |
| 311 | (version-major+minor version) "/tmx-" |
| 312 | version ".tar.gz")) |
| 313 | (sha256 |
| 314 | (base32 |
| 315 | "1is107sx3lr09dqjiyn10xqhyv5x54c2ryhys9mb9j3mxjbm227l")))) |
| 316 | (build-system python-build-system) |
| 317 | (propagated-inputs |
| 318 | `(("python-six" ,python-six))) |
| 319 | (home-page "http://python-tmx.nongnu.org") |
| 320 | (synopsis "Python library for the @code{Tiled} TMX format") |
| 321 | (description |
| 322 | "Python TMX reads and writes the @code{Tiled} TMX format in a simple way. |
| 323 | This is useful for map editors or generic level editors, and it's also useful |
| 324 | for using a map editor or generic level editor like Tiled to edit your game's |
| 325 | levels.") |
| 326 | (license (list license:asl2.0 |
| 327 | ;; Documentation (only available in the source tarball) is |
| 328 | ;; under the CC0 license. |
| 329 | license:cc0)))) |
| 330 | |
| 331 | (define-public python2-tmx |
| 332 | (let ((python2-tmx (package-with-python2 python-tmx))) |
| 333 | (package |
| 334 | (inherit python2-tmx) |
| 335 | (propagated-inputs |
| 336 | `(("python2-pathlib" ,python2-pathlib) |
| 337 | ,@(package-propagated-inputs python2-tmx)))))) |
| 338 | |
| 339 | (define-public python-xsge |
| 340 | (package |
| 341 | (name "python-xsge") |
| 342 | (version "2017.06.09") |
| 343 | (source (origin |
| 344 | (method url-fetch) |
| 345 | (uri (string-append "mirror://savannah/xsge/xsge-" |
| 346 | version ".tar.gz")) |
| 347 | (sha256 |
| 348 | (base32 |
| 349 | "1vy7c2y7ihvmggs93zgfv2h3049s384wid8a5snzrrba8bhbb89p")))) |
| 350 | (build-system python-build-system) |
| 351 | (arguments |
| 352 | '(#:phases |
| 353 | (modify-phases %standard-phases |
| 354 | ;; xSGE's setup.py script does not support one of the Python build |
| 355 | ;; system's default flags, "--single-version-externally-managed". |
| 356 | (replace 'install |
| 357 | (lambda* (#:key outputs #:allow-other-keys) |
| 358 | (zero? |
| 359 | (system* "python" "setup.py" "install" |
| 360 | (string-append "--prefix=" (assoc-ref outputs "out")) |
| 361 | "--root=/"))))) |
| 362 | #:tests? #f)) ; no check target |
| 363 | (propagated-inputs |
| 364 | `(("python-sge-pygame" ,python-sge-pygame) |
| 365 | ("python-pygame" ,python-pygame) |
| 366 | ("python-six" ,python-six) |
| 367 | ("python-tmx" ,python-tmx))) |
| 368 | (home-page "http://xsge.nongnu.org") |
| 369 | (synopsis "Extensions for the SGE Game Engine") |
| 370 | (description |
| 371 | "xSGE is a collection of modules that make doing certain tasks with the SGE |
| 372 | Game Engine easier. In addition to SGE's conveniences, the user has access to a |
| 373 | GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format |
| 374 | support.") |
| 375 | (license license:gpl3+))) |
| 376 | |
| 377 | (define-public python2-xsge |
| 378 | (package-with-python2 python-xsge)) |
| 379 | |
| 380 | (define-public tiled |
| 381 | (package |
| 382 | (name "tiled") |
| 383 | (version "1.0.1") |
| 384 | (source (origin |
| 385 | (method url-fetch) |
| 386 | (uri (string-append "https://github.com/bjorn/tiled/archive/v" |
| 387 | version ".tar.gz")) |
| 388 | (file-name (string-append name "-" version ".tar.gz")) |
| 389 | (sha256 |
| 390 | (base32 |
| 391 | "1y75jmpcf2lv8s3g9v3ghnrwvs2fc4ni7nx74csaylg1g04cwlq7")))) |
| 392 | (build-system gnu-build-system) |
| 393 | (inputs |
| 394 | `(("qtbase" ,qtbase) |
| 395 | ("qtsvg" ,qtsvg) |
| 396 | ("zlib" ,zlib))) |
| 397 | (native-inputs |
| 398 | `(("qttools" ,qttools))) |
| 399 | (arguments |
| 400 | '(#:phases |
| 401 | (modify-phases %standard-phases |
| 402 | (replace 'configure |
| 403 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 404 | (substitute* "translations/translations.pro" |
| 405 | (("LRELEASE =.*") |
| 406 | (string-append "LRELEASE = " |
| 407 | (assoc-ref inputs "qttools") |
| 408 | "/bin/lrelease\n"))) |
| 409 | (let ((out (assoc-ref outputs "out"))) |
| 410 | (system* "qmake" |
| 411 | (string-append "PREFIX=" out)))))))) |
| 412 | (home-page "http://www.mapeditor.org/") |
| 413 | (synopsis "Tile map editor") |
| 414 | (description |
| 415 | "Tiled is a general purpose tile map editor. It is meant to be used for |
| 416 | editing maps of any tile-based game, be it an RPG, a platformer or a Breakout |
| 417 | clone.") |
| 418 | |
| 419 | ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is |
| 420 | ;; under BSD-2. |
| 421 | (license license:gpl2+))) |
| 422 | |
| 423 | (define-public sfml |
| 424 | (package |
| 425 | (name "sfml") |
| 426 | (version "2.3.2") |
| 427 | (source (origin |
| 428 | (method url-fetch) |
| 429 | ;; Do not fetch the archives from |
| 430 | ;; http://mirror0.sfml-dev.org/files/ because files there seem |
| 431 | ;; to be changed in place. |
| 432 | (uri (string-append "https://github.com/SFML/SFML/archive/" |
| 433 | version ".tar.gz")) |
| 434 | (file-name (string-append name "-" version ".tar.gz")) |
| 435 | (sha256 |
| 436 | (base32 |
| 437 | "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm")))) |
| 438 | (build-system cmake-build-system) |
| 439 | (arguments |
| 440 | '(#:configure-flags |
| 441 | (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE") |
| 442 | #:tests? #f)) ; no tests |
| 443 | (inputs |
| 444 | `(("mesa" ,mesa) |
| 445 | ("glew" ,glew) |
| 446 | ("flac" ,flac) |
| 447 | ("libvorbis" ,libvorbis) |
| 448 | ("libx11" ,libx11) |
| 449 | ("xcb-util-image" ,xcb-util-image) |
| 450 | ("libxrandr" ,libxrandr) |
| 451 | ("eudev" ,eudev) |
| 452 | ("freetype" ,freetype) |
| 453 | ("libjpeg" ,libjpeg) |
| 454 | ("libsndfile" ,libsndfile) |
| 455 | ("openal" ,openal))) |
| 456 | (home-page "https://www.sfml-dev.org") |
| 457 | (synopsis "Simple and Fast Multimedia Library") |
| 458 | (description |
| 459 | "SFML provides a simple interface to the various computer components, |
| 460 | to ease the development of games and multimedia applications. It is composed |
| 461 | of five modules: system, window, graphics, audio and network.") |
| 462 | (license license:zlib))) |
| 463 | |
| 464 | (define-public sfxr |
| 465 | (package |
| 466 | (name "sfxr") |
| 467 | (version "1.2.1") |
| 468 | (source (origin |
| 469 | (method url-fetch) |
| 470 | (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) |
| 471 | (sha256 |
| 472 | (base32 |
| 473 | "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) |
| 474 | (build-system gnu-build-system) |
| 475 | (arguments |
| 476 | `(#:phases (modify-phases %standard-phases |
| 477 | (delete 'configure) ; no configure script |
| 478 | (add-before 'build 'patch-makefile |
| 479 | (lambda* (#:key outputs #:allow-other-keys) |
| 480 | (let ((out (assoc-ref outputs "out"))) |
| 481 | (substitute* "Makefile" |
| 482 | (("\\$\\(DESTDIR\\)/usr") out)) |
| 483 | (substitute* "main.cpp" |
| 484 | (("/usr/share") |
| 485 | (string-append out "/share"))) |
| 486 | #t)))) |
| 487 | #:tests? #f)) ; no tests |
| 488 | (native-inputs |
| 489 | `(("pkg-config" ,pkg-config) |
| 490 | ("desktop-file-utils" ,desktop-file-utils))) |
| 491 | (inputs |
| 492 | `(("sdl" ,sdl) |
| 493 | ("gtk+" ,gtk+))) |
| 494 | (synopsis "Simple sound effect generator") |
| 495 | (description "Sfxr is a tool for quickly generating simple sound effects. |
| 496 | Originally created for use in video game prototypes, it can generate random |
| 497 | sounds from presets such as \"explosion\" or \"powerup\".") |
| 498 | (home-page "http://www.drpetter.se/project_sfxr.html") |
| 499 | (license license:expat))) |
| 500 | |
| 501 | (define-public physfs |
| 502 | (package |
| 503 | (name "physfs") |
| 504 | (version "2.0.3") |
| 505 | (source (origin |
| 506 | (method url-fetch) |
| 507 | (uri (string-append |
| 508 | "https://icculus.org/physfs/downloads/physfs-" |
| 509 | version ".tar.bz2")) |
| 510 | (file-name (string-append name "-" version ".tar.gz")) |
| 511 | (sha256 |
| 512 | (base32 |
| 513 | "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na")))) |
| 514 | (build-system cmake-build-system) |
| 515 | (arguments |
| 516 | '(#:tests? #f)) ; no check target |
| 517 | (inputs |
| 518 | `(("zlib" ,zlib))) |
| 519 | (native-inputs |
| 520 | `(("doxygen" ,doxygen))) |
| 521 | (home-page "https://icculus.org/physfs") |
| 522 | (synopsis "File system abstraction library") |
| 523 | (description |
| 524 | "PhysicsFS is a library to provide abstract access to various archives. |
| 525 | It is intended for use in video games. For security, no file writing done |
| 526 | through the PhysicsFS API can leave a defined @emph{write directory}. For |
| 527 | file reading, a @emph{search path} with archives and directories is defined, |
| 528 | and it becomes a single, transparent hierarchical file system. So archive |
| 529 | files can be accessed in the same way as you access files directly on a disk, |
| 530 | and it makes it easy to ship a new archive that will override a previous |
| 531 | archive on a per-file basis.") |
| 532 | (license license:zlib))) |
| 533 | |
| 534 | (define-public love |
| 535 | (package |
| 536 | (name "love") |
| 537 | (version "0.10.2") |
| 538 | (source (origin |
| 539 | (method url-fetch) |
| 540 | (uri (string-append "https://bitbucket.org/rude/love/downloads/" |
| 541 | "love-" version "-linux-src.tar.gz")) |
| 542 | (sha256 |
| 543 | (base32 |
| 544 | "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj")))) |
| 545 | (build-system gnu-build-system) |
| 546 | (native-inputs |
| 547 | `(("pkg-config" ,pkg-config))) |
| 548 | (inputs |
| 549 | `(("devil" ,devil) |
| 550 | ("freetype" ,freetype) |
| 551 | ("libmodplug" ,libmodplug) |
| 552 | ("libtheora" ,libtheora) |
| 553 | ("libvorbis" ,libvorbis) |
| 554 | ("luajit" ,luajit) |
| 555 | ("mesa" ,mesa) |
| 556 | ("mpg123" ,mpg123) |
| 557 | ("openal" ,openal) |
| 558 | ("physfs" ,physfs) |
| 559 | ("sdl2" ,sdl2) |
| 560 | ("zlib" ,zlib))) |
| 561 | (synopsis "2D game framework for Lua") |
| 562 | (description "LÖVE is a framework for making 2D games in the Lua |
| 563 | programming language.") |
| 564 | (home-page "https://love2d.org/") |
| 565 | (license license:zlib))) |
| 566 | |
| 567 | (define-public allegro-4 |
| 568 | (package |
| 569 | (name "allegro") |
| 570 | (version "4.4.2") |
| 571 | (source (origin |
| 572 | (method url-fetch) |
| 573 | (uri (string-append "https://github.com/liballeg/allegro5/" |
| 574 | "releases/download/" version "/allegro-" |
| 575 | version ".tar.gz")) |
| 576 | (sha256 |
| 577 | (base32 |
| 578 | "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v")))) |
| 579 | (build-system cmake-build-system) |
| 580 | (arguments |
| 581 | '(#:phases |
| 582 | (modify-phases %standard-phases |
| 583 | (add-after 'unpack 'patch-build-system |
| 584 | (lambda _ |
| 585 | ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE |
| 586 | ;; via a command line option doesn't work because it is |
| 587 | ;; unconditionally clobbered in the build script. |
| 588 | (substitute* '("CMakeLists.txt") |
| 589 | (("ADDON_LINKAGE STATIC") |
| 590 | "ADDON_LINKAGE SHARED")) |
| 591 | #t))))) |
| 592 | (inputs |
| 593 | `(("glu" ,glu) |
| 594 | ("libpng" ,libpng) |
| 595 | ("libvorbis" ,libvorbis) |
| 596 | ("mesa" ,mesa) |
| 597 | ("zlib" ,zlib))) |
| 598 | (synopsis "Game programming library") |
| 599 | (description "Allegro is a library mainly aimed at video game and |
| 600 | multimedia programming. It handles common, low-level tasks such as creating |
| 601 | windows, accepting user input, loading data, drawing images, playing sounds, |
| 602 | etc.") |
| 603 | (home-page "http://liballeg.org") |
| 604 | (license license:giftware))) |
| 605 | |
| 606 | (define-public allegro |
| 607 | (package |
| 608 | (name "allegro") |
| 609 | (version "5.2.2.0") |
| 610 | (source (origin |
| 611 | (method url-fetch) |
| 612 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
| 613 | "/download/" version "/allegro-" |
| 614 | (if (equal? "0" (string-take-right version 1)) |
| 615 | (string-drop-right version 2) |
| 616 | version) |
| 617 | ".tar.gz")) |
| 618 | (sha256 |
| 619 | (base32 |
| 620 | "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2")))) |
| 621 | (build-system cmake-build-system) |
| 622 | (arguments `(#:tests? #f)) ; there are no tests |
| 623 | (inputs |
| 624 | ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb |
| 625 | `(("flac" ,flac) |
| 626 | ("freetype" ,freetype) |
| 627 | ("glu" ,glu) |
| 628 | ("gtk" ,gtk+-2) |
| 629 | ("libjpeg" ,libjpeg) |
| 630 | ("libpng" ,libpng) |
| 631 | ("libtheora" ,libtheora) |
| 632 | ("libvorbis" ,libvorbis) |
| 633 | ("libxcursor" ,libxcursor) |
| 634 | ("libxinerama" ,libxinerama) |
| 635 | ("libxrandr" ,libxrandr) |
| 636 | ("mesa" ,mesa) |
| 637 | ("openal" ,openal) |
| 638 | ("physfs" ,physfs) |
| 639 | ("zlib" ,zlib))) |
| 640 | (native-inputs |
| 641 | `(("pkg-config" ,pkg-config))) |
| 642 | (synopsis "Game programming library") |
| 643 | (description "Allegro is a library mainly aimed at video game and |
| 644 | multimedia programming. It handles common, low-level tasks such as creating |
| 645 | windows, accepting user input, loading data, drawing images, playing sounds, |
| 646 | etc.") |
| 647 | (home-page "http://liballeg.org") |
| 648 | (license license:bsd-3))) |
| 649 | |
| 650 | (define-public allegro-5.0 |
| 651 | (package (inherit allegro) |
| 652 | (name "allegro") |
| 653 | (version "5.0.11") |
| 654 | (source (origin |
| 655 | (method url-fetch) |
| 656 | (uri (string-append "https://github.com/liballeg/allegro5/releases" |
| 657 | "/download/" version "/allegro-" |
| 658 | (if (equal? "0" (string-take-right version 1)) |
| 659 | (string-drop-right version 2) |
| 660 | version) |
| 661 | ".tar.gz")) |
| 662 | (sha256 |
| 663 | (base32 |
| 664 | "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) |
| 665 | |
| 666 | (define-public aseprite |
| 667 | (package |
| 668 | (name "aseprite") |
| 669 | (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL. |
| 670 | ;; TODO: Unbundle third party software. |
| 671 | (source (origin |
| 672 | (method url-fetch/zipbomb) |
| 673 | (uri (string-append "https://github.com/aseprite/aseprite" |
| 674 | "/releases/download/v" version |
| 675 | "/Aseprite-v" version "-Source.zip")) |
| 676 | (sha256 |
| 677 | (base32 |
| 678 | "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv")))) |
| 679 | (build-system cmake-build-system) |
| 680 | (arguments |
| 681 | '(#:configure-flags |
| 682 | ;; Use shared libraries instead of building bundled source. |
| 683 | (list "-DWITH_WEBP_SUPPORT=1" |
| 684 | "-DUSE_SHARED_CURL=1" |
| 685 | "-DUSE_SHARED_GIFLIB=1" |
| 686 | "-DUSE_SHARED_JPEGLIB=1" |
| 687 | "-DUSE_SHARED_ZLIB=1" |
| 688 | "-DUSE_SHARED_LIBPNG=1" |
| 689 | "-DUSE_SHARED_LIBLOADPNG=1" |
| 690 | "-DUSE_SHARED_LIBWEBP=1" |
| 691 | "-DUSE_SHARED_TINYXML=1" |
| 692 | "-DUSE_SHARED_PIXMAN=1" |
| 693 | "-DUSE_SHARED_FREETYPE=1" |
| 694 | "-DUSE_SHARED_ALLEGRO4=1" |
| 695 | "-DENABLE_UPDATER=0" ; no auto-updates |
| 696 | (string-append "-DFREETYPE_INCLUDE_DIR=" |
| 697 | (assoc-ref %build-inputs "freetype") |
| 698 | "/include/freetype2")))) |
| 699 | (native-inputs |
| 700 | `(("pkg-config" ,pkg-config))) |
| 701 | ;; TODO: Use a patched Allegro 4 that supports window resizing. This |
| 702 | ;; patched version is bundled with Aseprite, but the patches should be |
| 703 | ;; extracted and applied on top of a standalone Allegro 4 package. |
| 704 | (inputs |
| 705 | `(("allegro" ,allegro-4) |
| 706 | ("curl" ,curl) |
| 707 | ("freetype" ,freetype) |
| 708 | ("giflib" ,giflib) |
| 709 | ("libjpeg" ,libjpeg) |
| 710 | ("libpng" ,libpng) |
| 711 | ("libwebp" ,libwebp) |
| 712 | ("libx11" ,libx11) |
| 713 | ("libxext" ,libxext) |
| 714 | ("libxxf86vm" ,libxxf86vm) |
| 715 | ("pixman" ,pixman) |
| 716 | ("tinyxml" ,tinyxml) |
| 717 | ("zlib" ,zlib))) |
| 718 | (synopsis "Animated sprite editor and pixel art tool") |
| 719 | (description "Aseprite is a tool for creating 2D pixel art for video |
| 720 | games. In addition to basic pixel editing features, Aseprite can assist in |
| 721 | the creation of animations, tiled graphics, texture atlases, and more.") |
| 722 | (home-page "https://www.aseprite.org/") |
| 723 | (license license:gpl2+))) |
| 724 | |
| 725 | (define-public qqwing |
| 726 | (package |
| 727 | (name "qqwing") |
| 728 | (version "1.3.4") |
| 729 | (source (origin |
| 730 | (method url-fetch) |
| 731 | (uri (string-append |
| 732 | "https://qqwing.com/" |
| 733 | name "-" version ".tar.gz")) |
| 734 | (sha256 |
| 735 | (base32 |
| 736 | "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp")))) |
| 737 | (build-system gnu-build-system) |
| 738 | (native-inputs |
| 739 | `(("pkg-config" ,pkg-config))) |
| 740 | (home-page "https://qqwing.com/") |
| 741 | (synopsis "Sudoku puzzle solver and generator") |
| 742 | (description |
| 743 | "QQWing is a Sudoku puzzle generator and solver. |
| 744 | It offers the following features: |
| 745 | @enumerate |
| 746 | @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds. |
| 747 | @item Uses logic. Uses as many solve techniques as possible when solving |
| 748 | puzzles rather than guessing. |
| 749 | @item Rates puzzles. Most generators don't give an indication of the difficulty |
| 750 | of a Sudoku puzzle. QQwing does. |
| 751 | @item Can print solve instructions for any puzzle. |
| 752 | @item Customizable output style, including a CSV style that is easy to |
| 753 | import into a database. |
| 754 | @end enumerate") |
| 755 | (license license:gpl2+))) |
| 756 | |
| 757 | (define-public quesoglc |
| 758 | (package |
| 759 | (name "quesoglc") |
| 760 | (version "0.7.2") |
| 761 | (source (origin |
| 762 | (method url-fetch) |
| 763 | (uri (string-append "mirror://sourceforge/" name "/" version "/" |
| 764 | name "-" version "-free.tar.bz2")) |
| 765 | (sha256 |
| 766 | (base32 |
| 767 | "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks")))) |
| 768 | (build-system gnu-build-system) |
| 769 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 770 | (inputs `(("fontconfig" ,fontconfig) |
| 771 | ("freeglute" ,freeglut) |
| 772 | ("fribidi" ,fribidi) |
| 773 | ("glew" ,glew))) |
| 774 | (home-page "http://quesoglc.sourceforge.net") |
| 775 | (synopsis "Implementation of the OpenGL Character Renderer (GLC)") |
| 776 | (description |
| 777 | "The OpenGL Character Renderer (GLC) is a state machine that provides |
| 778 | OpenGL programs with character rendering services via an application programming |
| 779 | interface (API).") |
| 780 | (license (list license:expat license:lgpl2.1+)))) |
| 781 | |
| 782 | (define-public python-pygame |
| 783 | (package |
| 784 | (name "python-pygame") |
| 785 | (version "1.9.3") |
| 786 | (source (origin |
| 787 | (method url-fetch) |
| 788 | (uri (pypi-uri "pygame" version)) |
| 789 | (sha256 |
| 790 | (base32 |
| 791 | "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m")))) |
| 792 | (build-system python-build-system) |
| 793 | (arguments |
| 794 | `(#:tests? #f ; Tests require pygame to be installed first. |
| 795 | #:phases |
| 796 | (modify-phases %standard-phases |
| 797 | ;; Set the paths to the dependencies manually because |
| 798 | ;; the configure script does not allow passing them as |
| 799 | ;; parameters. This also means we can skip the configure |
| 800 | ;; phase. |
| 801 | (add-before 'build 'set-library-paths |
| 802 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 803 | (let ((sdl-ref (assoc-ref inputs "sdl")) |
| 804 | (font-ref (assoc-ref inputs "sdl-ttf")) |
| 805 | (image-ref (assoc-ref inputs "sdl-image")) |
| 806 | (mixer-ref (assoc-ref inputs "sdl-mixer")) |
| 807 | (smpeg-ref (assoc-ref inputs "libsmpeg")) |
| 808 | (png-ref (assoc-ref inputs "libpng")) |
| 809 | (jpeg-ref (assoc-ref inputs "libjpeg")) |
| 810 | (freetype-ref (assoc-ref inputs "freetype")) |
| 811 | (v4l-ref (assoc-ref inputs "v4l-utils")) |
| 812 | (out-ref (assoc-ref outputs "out"))) |
| 813 | (substitute* "Setup.in" |
| 814 | (("SDL = -I/usr/include/SDL") |
| 815 | (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) |
| 816 | (substitute* "Setup.in" |
| 817 | (("FONT = -lSDL_ttf") |
| 818 | (string-append "FONT = -I" font-ref "/include/SDL -L" |
| 819 | font-ref "/lib -lSDL_ttf"))) |
| 820 | (substitute* "Setup.in" |
| 821 | (("IMAGE = -lSDL_image") |
| 822 | (string-append "IMAGE = -I" image-ref "/include/SDL -L" |
| 823 | image-ref "/lib -lSDL_image"))) |
| 824 | (substitute* "Setup.in" |
| 825 | (("MIXER = -lSDL_mixer") |
| 826 | (string-append "MIXER = -I" mixer-ref "/include/SDL -L" |
| 827 | mixer-ref "/lib -lSDL_mixer"))) |
| 828 | (substitute* "Setup.in" |
| 829 | (("SMPEG = -lsmpeg") |
| 830 | (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" |
| 831 | smpeg-ref "/lib -lsmpeg"))) |
| 832 | (substitute* "Setup.in" |
| 833 | (("PNG = -lpng") |
| 834 | (string-append "PNG = -I" png-ref "/include -L" |
| 835 | png-ref "/lib -lpng"))) |
| 836 | (substitute* "Setup.in" |
| 837 | (("JPEG = -ljpeg") |
| 838 | (string-append "JPEG = -I" jpeg-ref "/include -L" |
| 839 | jpeg-ref "/lib -ljpeg"))) |
| 840 | |
| 841 | (substitute* "Setup.in" |
| 842 | (("FREETYPE = -lfreetype") |
| 843 | (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" |
| 844 | freetype-ref "/lib -lfreetype"))) |
| 845 | |
| 846 | (substitute* "Setup.in" |
| 847 | (("^pypm") "#pypm")) |
| 848 | ;; Create a path to a header file provided by v4l-utils. |
| 849 | (system* "mkdir" "linux") |
| 850 | (system* "ln" "--symbolic" |
| 851 | (string-append v4l-ref "/include/libv4l1-videodev.h") |
| 852 | "linux/videodev.h") |
| 853 | (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) |
| 854 | (inputs |
| 855 | `(("freetype" ,freetype) |
| 856 | ("sdl" ,sdl) |
| 857 | ("sdl-image" ,sdl-image) |
| 858 | ("sdl-mixer" ,sdl-mixer) |
| 859 | ("sdl-ttf" ,sdl-ttf) |
| 860 | ("sdl-gfx" ,sdl-gfx) |
| 861 | ("libjpeg" ,libjpeg) |
| 862 | ("libpng" ,libpng) |
| 863 | ("libX11" ,libx11) |
| 864 | ("libsmpeg" ,libsmpeg) |
| 865 | ("portmidi" ,portmidi) |
| 866 | ("v4l-utils" ,v4l-utils))) |
| 867 | (home-page "https://www.pygame.org") |
| 868 | (synopsis "SDL wrapper for Python") |
| 869 | (description "Pygame is a set of Python modules designed for writing games. |
| 870 | Pygame adds functionality on top of the excellent SDL library. This allows you |
| 871 | to create fully featured games and multimedia programs in the python language.") |
| 872 | (license (list license:bsd-2 |
| 873 | ;; python numeric license as listed by Debian looks like |
| 874 | ;; an Expat-style license with a warranty disclaimer for |
| 875 | ;; the U.S. government and the University of California. |
| 876 | license:expat |
| 877 | license:lgpl2.0+ |
| 878 | license:lgpl2.1+ |
| 879 | license:gpl3+ |
| 880 | license:psfl |
| 881 | license:public-domain |
| 882 | license:lgpl2.1+)))) |
| 883 | |
| 884 | (define-public python2-pygame |
| 885 | (package-with-python2 python-pygame)) |
| 886 | |
| 887 | (define-public grafx2 |
| 888 | (package |
| 889 | (name "grafx2") |
| 890 | (version "2.4") |
| 891 | (source (origin |
| 892 | (method url-fetch) |
| 893 | ;; XXX: There is no URL that contains the version. :( |
| 894 | (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21") |
| 895 | (sha256 |
| 896 | (base32 |
| 897 | "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q")))) |
| 898 | (build-system gnu-build-system) |
| 899 | (arguments |
| 900 | '(#:phases |
| 901 | (modify-phases %standard-phases |
| 902 | (delete 'configure) ; no configure script |
| 903 | (add-before 'build 'change-to-src-directory |
| 904 | (lambda _ |
| 905 | (chdir "src") |
| 906 | #t))) |
| 907 | #:make-flags |
| 908 | ;; SDL header files are referenced without the preceeding "SDL/". |
| 909 | (list (string-append "CFLAGS=-I" |
| 910 | (assoc-ref %build-inputs "sdl-union") |
| 911 | "/include/SDL") |
| 912 | (string-append "prefix=" |
| 913 | (assoc-ref %outputs "out"))) |
| 914 | #:tests? #f)) ; no check target |
| 915 | (native-inputs |
| 916 | `(("pkg-config" ,pkg-config))) |
| 917 | (inputs |
| 918 | `(("libpng" ,libpng) |
| 919 | ("lua" ,lua-5.1) |
| 920 | ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf))))) |
| 921 | (synopsis "Bitmap paint program") |
| 922 | (description "GrafX2 is a bitmap paint program inspired by the Amiga |
| 923 | programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it |
| 924 | includes a very large number of tools and effects that make it particularly |
| 925 | suitable for pixel art, game graphics, and generally any detailed graphics |
| 926 | painted with a mouse.") |
| 927 | (home-page "http://pulkomandy.tk/projects/GrafX2") |
| 928 | (license license:gpl2))) ; GPLv2 only |