gnu: upower: Enable GObject introspection.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
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 Julian Graham <joolean@gmail.com>
5 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages game-development)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages doxygen)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gnunet)
34 #:use-module (gnu packages guile)
35 #:use-module (gnu packages multiprecision)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages zip)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages xorg)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages pulseaudio)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages sdl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages xiph))
52
53 (define-public bullet
54 (package
55 (name "bullet")
56 (version "2.82-r2704")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
60 version ".tgz"))
61 (sha256
62 (base32
63 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
64 (build-system cmake-build-system)
65 (arguments '(#:tests? #f ; no 'test' target
66 #:configure-flags (list
67 (string-append
68 "-DCMAKE_CXX_FLAGS=-fPIC "
69 (or (getenv "CXXFLAGS") "")))))
70 (home-page "http://bulletphysics.org/")
71 (synopsis "3D physics engine library")
72 (description
73 "Bullet is a physics engine library usable for collision detection. It
74 is used in some video games and movies.")
75 (license license:zlib)))
76
77 (define-public gzochi
78 (package
79 (name "gzochi")
80 (version "0.9")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append "mirror://savannah/gzochi/gzochi-"
84 version ".tar.gz"))
85 (sha256
86 (base32
87 "1nf8naqbc4hmhy99b8n70yswg9j71nh5mfpwwh6d8pdw5mp9b46a"))))
88 (build-system gnu-build-system)
89 (arguments
90 '(#:phases (modify-phases %standard-phases
91 (add-before 'configure 'remove-Werror
92 (lambda _
93 ;; We can't build with '-Werror', notably
94 ;; because deprecated functions of
95 ;; libmicrohttpd are being used.
96 (substitute* (find-files "." "^Makefile\\.in$")
97 (("-Werror")
98 ""))
99 #t)))))
100 (native-inputs `(("pkgconfig" ,pkg-config)))
101 (inputs `(("bdb" ,bdb)
102 ("glib" ,glib)
103 ("gmp" ,gmp)
104 ("guile" ,guile-2.0)
105 ("libmicrohttpd" ,libmicrohttpd)
106 ("ncurses" ,ncurses)
107 ("sdl" ,sdl)
108 ("zlib" ,zlib)))
109 (home-page "http://www.nongnu.org/gzochi/")
110 (synopsis "Scalable middleware for multiplayer games")
111 (description
112 "gzochi is a framework for developing massively multiplayer online games.
113 A server container provides services to deployed games, which are written in
114 Guile Scheme, that abstract and simplify some of the most challenging and
115 error-prone aspects of online game development: Concurrency, data persistence,
116 and network communications. A very thin client library can be embedded to
117 provide connectivity for client applications written in any language.")
118 (license license:gpl3+)))
119
120 (define-public tiled
121 (package
122 (name "tiled")
123 (version "0.13.1")
124 (source (origin
125 (method url-fetch)
126 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
127 version ".tar.gz"))
128 (file-name (string-append name "-" version ".tar.gz"))
129 (sha256
130 (base32
131 "057a5cna3vhznpl9hyql2sxz995aprv43r8wva89x4vdphxv04lm"))))
132 (build-system gnu-build-system)
133 (inputs `(("qt" ,qt)
134 ("zlib" ,zlib)))
135 (arguments
136 '(#:phases
137 (alist-replace
138 'configure
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let ((out (assoc-ref outputs "out")))
141 (system* "qmake"
142 (string-append "PREFIX=" out))))
143 %standard-phases)))
144 (home-page "http://www.mapeditor.org/")
145 (synopsis "Tile map editor")
146 (description
147 "Tiled is a general purpose tile map editor. It is meant to be used for
148 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
149 clone.")
150
151 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
152 ;; under BSD-2.
153 (license license:gpl2+)))
154
155 (define-public sfml
156 (package
157 (name "sfml")
158 (version "2.3.2")
159 (source (origin
160 (method url-fetch)
161 ;; Do not fetch the archives from
162 ;; http://mirror0.sfml-dev.org/files/ because files there seem
163 ;; to be changed in place.
164 (uri (string-append "https://github.com/SFML/SFML/archive/"
165 version ".tar.gz"))
166 (file-name (string-append name "-" version ".tar.gz"))
167 (sha256
168 (base32
169 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
170 (build-system cmake-build-system)
171 (arguments
172 '(#:tests? #f)) ; no tests
173 (inputs
174 `(("mesa" ,mesa)
175 ("glew" ,glew)
176 ("flac" ,flac)
177 ("libvorbis" ,libvorbis)
178 ("libx11" ,libx11)
179 ("xcb-util-image" ,xcb-util-image)
180 ("libxrandr" ,libxrandr)
181 ("eudev" ,eudev)
182 ("freetype" ,freetype)
183 ("libjpeg" ,libjpeg)
184 ("libsndfile" ,libsndfile)
185 ("openal" ,openal)))
186 (home-page "http://www.sfml-dev.org")
187 (synopsis "Simple and Fast Multimedia Library")
188 (description
189 "SFML provides a simple interface to the various computer components,
190 to ease the development of games and multimedia applications. It is composed
191 of five modules: system, window, graphics, audio and network.")
192 (license license:zlib)))
193
194 (define-public sfxr
195 (package
196 (name "sfxr")
197 (version "1.2.1")
198 (source (origin
199 (method url-fetch)
200 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
201 (sha256
202 (base32
203 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
204 (build-system gnu-build-system)
205 (arguments
206 `(#:phases (modify-phases %standard-phases
207 (delete 'configure) ; no configure script
208 (add-before 'build 'patch-makefile
209 (lambda* (#:key outputs #:allow-other-keys)
210 (let ((out (assoc-ref outputs "out")))
211 (substitute* "Makefile"
212 (("\\$\\(DESTDIR\\)/usr") out))
213 (substitute* "main.cpp"
214 (("/usr/share")
215 (string-append out "/share")))
216 #t))))
217 #:tests? #f)) ; no tests
218 (native-inputs
219 `(("pkg-config" ,pkg-config)
220 ("desktop-file-utils" ,desktop-file-utils)))
221 (inputs
222 `(("sdl" ,sdl)
223 ("gtk+" ,gtk+)))
224 (synopsis "Simple sound effect generator")
225 (description "Sfxr is a tool for quickly generating simple sound effects.
226 Originally created for use in video game prototypes, it can generate random
227 sounds from presets such as \"explosion\" or \"powerup\".")
228 (home-page "http://www.drpetter.se/project_sfxr.html")
229 (license license:expat)))
230
231 (define-public physfs
232 (package
233 (name "physfs")
234 (version "2.0.3")
235 (source (origin
236 (method url-fetch)
237 (uri (string-append
238 "http://icculus.org/physfs/downloads/physfs-"
239 version ".tar.bz2"))
240 (file-name (string-append name "-" version ".tar.gz"))
241 (sha256
242 (base32
243 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
244 (build-system cmake-build-system)
245 (arguments
246 '(#:tests? #f)) ; no check target
247 (inputs
248 `(("zlib" ,zlib)))
249 (native-inputs
250 `(("doxygen" ,doxygen)))
251 (home-page "http://icculus.org/physfs")
252 (synopsis "File system abstraction library")
253 (description
254 "PhysicsFS is a library to provide abstract access to various archives.
255 It is intended for use in video games. For security, no file writing done
256 through the PhysicsFS API can leave a defined @emph{write directory}. For
257 file reading, a @emph{search path} with archives and directories is defined,
258 and it becomes a single, transparent hierarchical file system. So archive
259 files can be accessed in the same way as you access files directly on a disk,
260 and it makes it easy to ship a new archive that will override a previous
261 archive on a per-file basis.")
262 (license license:zlib)))