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