Revert "PRELIMINARY: gnu: Add network-manager."
[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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages game-development)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages qt)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages zip)
30 #:use-module (gnu packages gl)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages xorg)
33 #:use-module (gnu packages fontutils)
34 #:use-module (gnu packages image)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages pulseaudio)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages sdl)
40 #:use-module (gnu packages pkg-config))
41
42 (define-public bullet
43 (package
44 (name "bullet")
45 (version "2.82-r2704")
46 (source (origin
47 (method url-fetch)
48 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
49 version ".tgz"))
50 (sha256
51 (base32
52 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
53 (build-system cmake-build-system)
54 (arguments '(#:tests? #f ; no 'test' target
55 #:configure-flags (list
56 (string-append
57 "-DCMAKE_CXX_FLAGS=-fPIC "
58 (or (getenv "CXXFLAGS") "")))))
59 (home-page "http://bulletphysics.org/")
60 (synopsis "3D physics engine library")
61 (description
62 "Bullet is a physics engine library usable for collision detection. It
63 is used in some video games and movies.")
64 (license license:zlib)))
65
66 (define-public tiled
67 (package
68 (name "tiled")
69 (version "0.11.0")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
73 version ".tar.gz"))
74 (file-name (string-append name "-" version ".tar.gz"))
75 (sha256
76 (base32
77 "03a15vbzjfwc8dpifbjvd0gnr208mzmdkgs2nlc8zq6z0a4h4jqd"))))
78 (build-system gnu-build-system)
79 (inputs `(("qt" ,qt)
80 ("zlib" ,zlib)))
81 (arguments
82 '(#:phases
83 (alist-replace
84 'configure
85 (lambda* (#:key outputs #:allow-other-keys)
86 (let ((out (assoc-ref outputs "out")))
87 (system* "qmake"
88 (string-append "PREFIX=" out))))
89 %standard-phases)))
90 (home-page "http://www.mapeditor.org/")
91 (synopsis "Tile map editor")
92 (description
93 "Tiled is a general purpose tile map editor. It is meant to be used for
94 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
95 clone.")
96
97 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
98 ;; under BSD-2.
99 (license license:gpl2+)))
100
101 (define-public sfml
102 (package
103 (name "sfml")
104 (version "2.2")
105 (source (origin
106 (method url-fetch)
107 (uri (string-append "http://mirror0.sfml-dev.org/files/SFML-"
108 version "-sources.zip"))
109 (sha256
110 (base32
111 "1xhkvgyfbhqsjdmfbxvk729kdrzh7kdyagxa3bvpzi6z43mh1frd"))))
112 (build-system cmake-build-system)
113 (arguments
114 '(#:tests? #f)) ; no tests
115 (native-inputs
116 `(("unzip" ,unzip)))
117 (inputs
118 `(("mesa" ,mesa)
119 ("glew" ,glew)
120 ("libx11" ,libx11)
121 ("libxrandr" ,libxrandr)
122 ("eudev" ,eudev)
123 ("freetype" ,freetype)
124 ("libjpeg" ,libjpeg)
125 ("libsndfile" ,libsndfile)
126 ("openal" ,openal)))
127 (home-page "http://www.sfml-dev.org")
128 (synopsis "Simple and Fast Multimedia Library")
129 (description
130 "SFML provides a simple interface to the various computer components,
131 to ease the development of games and multimedia applications. It is composed
132 of five modules: system, window, graphics, audio and network.")
133 (license license:zlib)))
134
135 (define-public sfxr
136 (package
137 (name "sfxr")
138 (version "1.2.1")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
142 (sha256
143 (base32
144 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
145 (build-system gnu-build-system)
146 (arguments
147 `(#:phases (modify-phases %standard-phases
148 (delete 'configure) ; no configure script
149 (add-before 'build 'patch-makefile
150 (lambda* (#:key outputs #:allow-other-keys)
151 (let ((out (assoc-ref outputs "out")))
152 (substitute* "Makefile"
153 (("\\$\\(DESTDIR\\)/usr") out))
154 (substitute* "main.cpp"
155 (("/usr/share")
156 (string-append out "/share")))
157 #t))))
158 #:tests? #f)) ; no tests
159 (native-inputs
160 `(("pkg-config" ,pkg-config)
161 ("desktop-file-utils" ,desktop-file-utils)))
162 (inputs
163 `(("sdl" ,sdl)
164 ("gtk+" ,gtk+)))
165 (synopsis "Simple sound effect generator")
166 (description "Sfxr is a tool for quickly generating simple sound effects.
167 Originally created for use in video game prototypes, it can generate random
168 sounds from presets such as \"explosion\" or \"powerup\".")
169 (home-page "http://www.drpetter.se/project_sfxr.html")
170 (license license:expat)))