gnu: Add sfml.
[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>
6cb89466
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)
b0910aad 21 #:use-module ((guix licenses) #:prefix license:)
6cb89466
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
b0910aad
DT
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages qt)
5809ffcc
DT
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))
6cb89466
37
38(define-public bullet
39 (package
40 (name "bullet")
41 (version "2.82-r2704")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
45 version ".tgz"))
46 (sha256
47 (base32
48 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
49 (build-system cmake-build-system)
50 (arguments '(#:tests? #f ; no 'test' target
51 #:configure-flags (list
52 (string-append
53 "-DCMAKE_CXX_FLAGS=-fPIC "
54 (or (getenv "CXXFLAGS") "")))))
55 (home-page "http://bulletphysics.org/")
56 (synopsis "3D physics engine library")
57 (description
58 "Bullet is a physics engine library usable for collision detection. It
59is used in some video games and movies.")
b0910aad
DT
60 (license license:zlib)))
61
62(define-public tiled
63 (package
64 (name "tiled")
7d24363f 65 (version "0.11.0")
b0910aad
DT
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
69 version ".tar.gz"))
f586c877 70 (file-name (string-append name "-" version ".tar.gz"))
b0910aad
DT
71 (sha256
72 (base32
7d24363f 73 "03a15vbzjfwc8dpifbjvd0gnr208mzmdkgs2nlc8zq6z0a4h4jqd"))))
b0910aad
DT
74 (build-system gnu-build-system)
75 (inputs `(("qt" ,qt)
76 ("zlib" ,zlib)))
77 (arguments
78 '(#:phases
79 (alist-replace
80 'configure
81 (lambda* (#:key outputs #:allow-other-keys)
82 (let ((out (assoc-ref outputs "out")))
83 (system* "qmake"
84 (string-append "PREFIX=" out))))
85 %standard-phases)))
86 (home-page "http://www.mapeditor.org/")
87 (synopsis "Tile map editor")
88 (description
89 "Tiled is a general purpose tile map editor. It is meant to be used for
90editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
91clone.")
92
93 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
94 ;; under BSD-2.
95 (license license:gpl2+)))
5809ffcc
DT
96
97(define-public sfml
98 (package
99 (name "sfml")
100 (version "2.2")
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "http://mirror0.sfml-dev.org/files/SFML-"
104 version "-sources.zip"))
105 (sha256
106 (base32
107 "1xhkvgyfbhqsjdmfbxvk729kdrzh7kdyagxa3bvpzi6z43mh1frd"))))
108 (build-system cmake-build-system)
109 (arguments
110 '(#:tests? #f)) ; no tests
111 (native-inputs
112 `(("unzip" ,unzip)))
113 (inputs
114 `(("mesa" ,mesa)
115 ("glew" ,glew)
116 ("libx11" ,libx11)
117 ("libxrandr" ,libxrandr)
118 ("eudev" ,eudev)
119 ("freetype" ,freetype)
120 ("libjpeg" ,libjpeg)
121 ("libsndfile" ,libsndfile)
122 ("openal" ,openal)))
123 (home-page "http://www.sfml-dev.org")
124 (synopsis "Simple and Fast Multimedia Library")
125 (description
126 "SFML provides a simple interface to the various computer components,
127to ease the development of games and multimedia applications. It is composed
128of five modules: system, window, graphics, audio and network.")
129 (license license:zlib)))