gnu: slepc: Set origin file-name.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
CommitLineData
6cb89466
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
f586c877 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
c24fff61
JG
4;;; Copyright © 2015 Julian Graham <joolean@gmail.com>
5;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
0f6139b1 6;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
154f6156 7;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
e8ea01d9 8;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6cb89466
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages game-development)
b0910aad 26 #:use-module ((guix licenses) #:prefix license:)
6cb89466
27 #:use-module (guix packages)
28 #:use-module (guix download)
2a068aec 29 #:use-module (guix git-download)
6cb89466 30 #:use-module (guix build-system cmake)
b0910aad
DT
31 #:use-module (guix build-system gnu)
32 #:use-module (gnu packages)
2a068aec 33 #:use-module (gnu packages curl)
c24fff61 34 #:use-module (gnu packages databases)
0f6139b1 35 #:use-module (gnu packages doxygen)
c24fff61
JG
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnunet)
38 #:use-module (gnu packages guile)
39 #:use-module (gnu packages multiprecision)
40 #:use-module (gnu packages ncurses)
b0910aad 41 #:use-module (gnu packages qt)
5809ffcc
DT
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages zip)
44 #:use-module (gnu packages gl)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages xorg)
2a068aec 47 #:use-module (gnu packages xdisorg)
5809ffcc
DT
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages audio)
d620ea88
DT
51 #:use-module (gnu packages pulseaudio)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages sdl)
240f2785 55 #:use-module (gnu packages pkg-config)
83a4a70b
DT
56 #:use-module (gnu packages xiph)
57 #:use-module (gnu packages lua)
2a068aec
DT
58 #:use-module (gnu packages mp3)
59 #:use-module (gnu packages xml))
6cb89466
60
61(define-public bullet
62 (package
63 (name "bullet")
64 (version "2.82-r2704")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
68 version ".tgz"))
69 (sha256
70 (base32
71 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
72 (build-system cmake-build-system)
73 (arguments '(#:tests? #f ; no 'test' target
74 #:configure-flags (list
75 (string-append
76 "-DCMAKE_CXX_FLAGS=-fPIC "
77 (or (getenv "CXXFLAGS") "")))))
78 (home-page "http://bulletphysics.org/")
79 (synopsis "3D physics engine library")
80 (description
81 "Bullet is a physics engine library usable for collision detection. It
82is used in some video games and movies.")
b0910aad
DT
83 (license license:zlib)))
84
c24fff61
JG
85(define-public gzochi
86 (package
87 (name "gzochi")
88 (version "0.9")
89 (source (origin
90 (method url-fetch)
91 (uri (string-append "mirror://savannah/gzochi/gzochi-"
92 version ".tar.gz"))
93 (sha256
94 (base32
95 "1nf8naqbc4hmhy99b8n70yswg9j71nh5mfpwwh6d8pdw5mp9b46a"))))
96 (build-system gnu-build-system)
97 (arguments
98 '(#:phases (modify-phases %standard-phases
99 (add-before 'configure 'remove-Werror
100 (lambda _
101 ;; We can't build with '-Werror', notably
102 ;; because deprecated functions of
103 ;; libmicrohttpd are being used.
104 (substitute* (find-files "." "^Makefile\\.in$")
105 (("-Werror")
106 ""))
107 #t)))))
108 (native-inputs `(("pkgconfig" ,pkg-config)))
109 (inputs `(("bdb" ,bdb)
110 ("glib" ,glib)
111 ("gmp" ,gmp)
112 ("guile" ,guile-2.0)
113 ("libmicrohttpd" ,libmicrohttpd)
114 ("ncurses" ,ncurses)
115 ("sdl" ,sdl)
116 ("zlib" ,zlib)))
117 (home-page "http://www.nongnu.org/gzochi/")
118 (synopsis "Scalable middleware for multiplayer games")
119 (description
120 "gzochi is a framework for developing massively multiplayer online games.
121A server container provides services to deployed games, which are written in
122Guile Scheme, that abstract and simplify some of the most challenging and
123error-prone aspects of online game development: Concurrency, data persistence,
124and network communications. A very thin client library can be embedded to
125provide connectivity for client applications written in any language.")
126 (license license:gpl3+)))
127
b0910aad
DT
128(define-public tiled
129 (package
130 (name "tiled")
e8ea01d9 131 (version "0.15.1")
b0910aad
DT
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
135 version ".tar.gz"))
f586c877 136 (file-name (string-append name "-" version ".tar.gz"))
b0910aad
DT
137 (sha256
138 (base32
e8ea01d9 139 "10bbjdv5r36229r1dqg32bxcj9yvpkx9jgs9v4s1qb71v856b15h"))))
b0910aad
DT
140 (build-system gnu-build-system)
141 (inputs `(("qt" ,qt)
142 ("zlib" ,zlib)))
143 (arguments
144 '(#:phases
d06fc008
EF
145 (modify-phases %standard-phases
146 (replace 'configure
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let ((out (assoc-ref outputs "out")))
149 (system* "qmake"
150 (string-append "PREFIX=" out))))))))
b0910aad
DT
151 (home-page "http://www.mapeditor.org/")
152 (synopsis "Tile map editor")
153 (description
154 "Tiled is a general purpose tile map editor. It is meant to be used for
155editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
156clone.")
157
158 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
159 ;; under BSD-2.
160 (license license:gpl2+)))
5809ffcc
DT
161
162(define-public sfml
163 (package
164 (name "sfml")
7d1b5022 165 (version "2.3.2")
5809ffcc
DT
166 (source (origin
167 (method url-fetch)
7d1b5022
RW
168 ;; Do not fetch the archives from
169 ;; http://mirror0.sfml-dev.org/files/ because files there seem
170 ;; to be changed in place.
171 (uri (string-append "https://github.com/SFML/SFML/archive/"
172 version ".tar.gz"))
173 (file-name (string-append name "-" version ".tar.gz"))
5809ffcc
DT
174 (sha256
175 (base32
7d1b5022 176 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
5809ffcc
DT
177 (build-system cmake-build-system)
178 (arguments
179 '(#:tests? #f)) ; no tests
5809ffcc
DT
180 (inputs
181 `(("mesa" ,mesa)
182 ("glew" ,glew)
240f2785
RW
183 ("flac" ,flac)
184 ("libvorbis" ,libvorbis)
5809ffcc 185 ("libx11" ,libx11)
240f2785 186 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
187 ("libxrandr" ,libxrandr)
188 ("eudev" ,eudev)
189 ("freetype" ,freetype)
190 ("libjpeg" ,libjpeg)
191 ("libsndfile" ,libsndfile)
192 ("openal" ,openal)))
193 (home-page "http://www.sfml-dev.org")
194 (synopsis "Simple and Fast Multimedia Library")
195 (description
196 "SFML provides a simple interface to the various computer components,
197to ease the development of games and multimedia applications. It is composed
198of five modules: system, window, graphics, audio and network.")
199 (license license:zlib)))
d620ea88
DT
200
201(define-public sfxr
202 (package
203 (name "sfxr")
204 (version "1.2.1")
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
208 (sha256
209 (base32
210 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
211 (build-system gnu-build-system)
212 (arguments
213 `(#:phases (modify-phases %standard-phases
214 (delete 'configure) ; no configure script
215 (add-before 'build 'patch-makefile
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let ((out (assoc-ref outputs "out")))
218 (substitute* "Makefile"
219 (("\\$\\(DESTDIR\\)/usr") out))
220 (substitute* "main.cpp"
221 (("/usr/share")
222 (string-append out "/share")))
223 #t))))
224 #:tests? #f)) ; no tests
225 (native-inputs
226 `(("pkg-config" ,pkg-config)
227 ("desktop-file-utils" ,desktop-file-utils)))
228 (inputs
229 `(("sdl" ,sdl)
230 ("gtk+" ,gtk+)))
231 (synopsis "Simple sound effect generator")
232 (description "Sfxr is a tool for quickly generating simple sound effects.
233Originally created for use in video game prototypes, it can generate random
234sounds from presets such as \"explosion\" or \"powerup\".")
235 (home-page "http://www.drpetter.se/project_sfxr.html")
236 (license license:expat)))
0f6139b1
AK
237
238(define-public physfs
239 (package
240 (name "physfs")
241 (version "2.0.3")
242 (source (origin
243 (method url-fetch)
244 (uri (string-append
245 "http://icculus.org/physfs/downloads/physfs-"
246 version ".tar.bz2"))
247 (file-name (string-append name "-" version ".tar.gz"))
248 (sha256
249 (base32
250 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
251 (build-system cmake-build-system)
252 (arguments
253 '(#:tests? #f)) ; no check target
254 (inputs
255 `(("zlib" ,zlib)))
256 (native-inputs
257 `(("doxygen" ,doxygen)))
258 (home-page "http://icculus.org/physfs")
259 (synopsis "File system abstraction library")
260 (description
261 "PhysicsFS is a library to provide abstract access to various archives.
262It is intended for use in video games. For security, no file writing done
263through the PhysicsFS API can leave a defined @emph{write directory}. For
264file reading, a @emph{search path} with archives and directories is defined,
265and it becomes a single, transparent hierarchical file system. So archive
266files can be accessed in the same way as you access files directly on a disk,
267and it makes it easy to ship a new archive that will override a previous
268archive on a per-file basis.")
269 (license license:zlib)))
83a4a70b
DT
270
271(define-public love
272 (package
273 (name "love")
05d48c52 274 (version "0.10.0")
83a4a70b
DT
275 (source (origin
276 (method url-fetch)
277 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
278 "love-" version "-linux-src.tar.gz"))
279 (sha256
280 (base32
05d48c52 281 "1r2n1nrw3hcdvy14fjbwz3l9swcy65v3lqwpj2frnkkcwncdz94p"))))
83a4a70b
DT
282 (build-system gnu-build-system)
283 (native-inputs
284 `(("pkg-config" ,pkg-config)))
285 (inputs
286 `(("devil" ,devil)
287 ("freetype" ,freetype)
288 ("libmodplug" ,libmodplug)
05d48c52 289 ("libtheora" ,libtheora)
83a4a70b
DT
290 ("libvorbis" ,libvorbis)
291 ("luajit" ,luajit)
292 ("mesa" ,mesa)
293 ("mpg123" ,mpg123)
294 ("openal" ,openal)
295 ("physfs" ,physfs)
296 ("sdl2" ,sdl2)
297 ("zlib" ,zlib)))
298 (synopsis "2D game framework for Lua")
299 (description "LÖVE is a framework for making 2D games in the Lua
300programming language.")
301 (home-page "https://love2d.org/")
302 (license license:zlib)))
154f6156
DT
303
304(define-public allegro-4
305 (package
306 (name "allegro")
307 (version "4.4.2")
308 (source (origin
309 (method url-fetch)
310 (uri (string-append "http://download.gna.org/allegro/allegro/"
311 version "/allegro-" version ".tar.gz"))
312 (sha256
313 (base32
314 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
315 (build-system cmake-build-system)
316 (arguments
317 '(#:phases
318 (modify-phases %standard-phases
319 (add-after 'unpack 'patch-build-system
320 (lambda _
321 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
322 ;; via a command line option doesn't work because it is
323 ;; unconditionally clobbered in the build script.
324 (substitute* '("CMakeLists.txt")
325 (("ADDON_LINKAGE STATIC")
326 "ADDON_LINKAGE SHARED"))
327 #t)))))
328 (inputs
329 `(("glu" ,glu)
330 ("libpng" ,libpng)
331 ("libvorbis" ,libvorbis)
332 ("mesa" ,mesa)
333 ("zlib" ,zlib)))
334 (synopsis "Game programming library")
335 (description "Allegro is a library mainly aimed at video game and
336multimedia programming. It handles common, low-level tasks such as creating
337windows, accepting user input, loading data, drawing images, playing sounds,
338etc.")
339 (home-page "http://liballeg.org")
340 (license license:giftware)))
2a068aec
DT
341
342(define-public aseprite
343 (package
344 (name "aseprite")
345 (version "1.1.1")
346 ;; The release tarball isn't good enough because it's missing some
347 ;; necessary code that is only in git submodules.
348 (source (origin
349 (method git-fetch)
350 (uri (git-reference
351 (url "https://github.com/aseprite/aseprite.git")
352 (commit "v1.1.1")
353 (recursive? #t)))
354 (sha256
355 (base32
356 "1yr0l3bc68lyrffrzxgw98zznv8yz5ldl98lyvp6s5grny4s4jyk"))))
357 (build-system cmake-build-system)
358 (arguments
359 '(#:configure-flags
360 ;; Use shared libraries instead of building bundled source.
361 (list "-DWITH_WEBP_SUPPORT=1"
362 "-DUSE_SHARED_CURL=1"
363 "-DUSE_SHARED_GIFLIB=1"
364 "-DUSE_SHARED_JPEGLIB=1"
365 "-DUSE_SHARED_ZLIB=1"
366 "-DUSE_SHARED_LIBPNG=1"
367 "-DUSE_SHARED_LIBLOADPNG=1"
368 "-DUSE_SHARED_LIBWEBP=1"
369 "-DUSE_SHARED_TINYXML=1"
370 "-DUSE_SHARED_PIXMAN=1"
371 "-DUSE_SHARED_FREETYPE=1"
372 "-DUSE_SHARED_ALLEGRO4=1"
373 "-DENABLE_UPDATER=0" ; no auto-updates
374 (string-append "-DFREETYPE_INCLUDE_DIR="
375 (assoc-ref %build-inputs "freetype")
376 "/include/freetype2"))
377 #:phases
378 (modify-phases %standard-phases
379 (add-after 'unpack 'patch-freetype-utils
380 (lambda _
381 ;; Fix C preprocessor include directive.
382 (substitute* '("src/app/util/freetype_utils.cpp")
383 (("freetype/") ""))
384 #t)))))
385 (native-inputs
386 `(("pkg-config" ,pkg-config)))
387 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
388 ;; patched version is bundled with Aseprite, but the patches should be
389 ;; extracted and applied on top of a standalone Allegro 4 package.
390 (inputs
391 `(("allegro" ,allegro-4)
392 ("curl" ,curl)
393 ("freetype" ,freetype)
394 ("giflib" ,giflib)
395 ("libjpeg" ,libjpeg)
396 ("libpng" ,libpng)
397 ("libwebp" ,libwebp)
398 ("libx11" ,libx11)
399 ("libxext" ,libxext)
400 ("libxxf86vm" ,libxxf86vm)
401 ("pixman" ,pixman)
402 ("tinyxml" ,tinyxml)
403 ("zlib" ,zlib)))
404 (synopsis "Animated sprite editor and pixel art tool")
405 (description "Aseprite is a tool for creating 2D pixel art for video
406games. In addition to basic pixel editing features, Aseprite can assist in
407the creation of animations, tiled graphics, texture atlases, and more.")
408 (home-page "http://www.aseprite.org/")
409 (license license:gpl2+)))