games.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages games) |
20 | #:use-module (guix packages) |
21 | #:use-module (guix download) |
22 | #:use-module (guix git-download) |
23 | #:use-module (guix build-system cmake) |
24 | #:use-module (guix build-system gnu) |
25 | #:use-module (guix build-system trivial) |
26 | #:use-module ((guix licenses) #:prefix license:) |
27 | #:use-module (gnu packages) |
28 | #:use-module (gnu packages audio) |
29 | #:use-module (more packages boost) |
30 | #:use-module (gnu packages boost) |
31 | #:use-module (gnu packages check) |
32 | #:use-module (gnu packages compression) |
33 | #:use-module (gnu packages curl) |
34 | #:use-module (gnu packages databases) |
35 | #:use-module (gnu packages documentation) |
36 | #:use-module (gnu packages fontutils) |
37 | #:use-module (gnu packages fribidi) |
38 | #:use-module (gnu packages games) |
39 | #:use-module (gnu packages gl) |
40 | #:use-module (gnu packages gtk) |
41 | #:use-module (gnu packages image) |
42 | #:use-module (gnu packages lua) |
43 | #:use-module (more packages lua) |
44 | #:use-module (gnu packages ncurses) |
45 | #:use-module (gnu packages pcre) |
46 | #:use-module (gnu packages pkg-config) |
47 | #:use-module (gnu packages python) |
48 | #:use-module (more packages python) |
49 | #:use-module (gnu packages qt) |
50 | #:use-module (gnu packages sdl) |
51 | #:use-module (gnu packages tbb) |
52 | #:use-module (more packages tcl) |
53 | #:use-module (gnu packages tls) |
54 | #:use-module (gnu packages xiph) |
55 | #:use-module (gnu packages xml) |
56 | #:use-module (gnu packages xorg)) |
57 | |
58 | (define-public ogre3d |
59 | (package |
60 | (name "ogre3d") |
61 | (version "1.9.0") |
62 | (source (origin |
63 | (method url-fetch) |
64 | (uri (string-append |
65 | "https://bitbucket.org/sinbad/ogre/get/v" |
66 | (string-map (lambda (x) (if (char=? x #\.) #\- x)) version) |
67 | ".tar.gz")) |
68 | (file-name (string-append name "-" version ".tar.gz")) |
69 | (sha256 |
70 | (base32 |
71 | "0p8gyn293qn3iyiy1smfmjd9zpnjb8h2zgvff8778fwh0ylbmlpa")))) |
72 | (build-system cmake-build-system) |
73 | (native-inputs |
74 | `(("doxygen" ,doxygen))) |
75 | (inputs |
76 | `(("freetype" ,freetype) |
77 | ("boost" ,boost-fix) |
78 | ("sdl2" ,sdl2) |
79 | ("cppunit" ,cppunit) |
80 | ("freeimage" ,freeimage) |
81 | ("glu" ,glu) |
82 | ("libxt" ,libxt) |
83 | ("libxaw" ,libxaw) |
84 | ("libxxf86vm" ,libxxf86vm) |
85 | ("libxrandr" ,libxrandr) |
86 | ("mesa" ,mesa) |
87 | ("tbb" ,tbb) |
88 | ("tinyxml" ,tinyxml) |
89 | ("zziplib" ,zziplib))) |
90 | (arguments |
91 | `(#:tests? #f |
92 | #:configure-flags |
93 | (list (string-append "-DFREETYPE_FT2BUILD_INCLUDE_DIR=" |
94 | (assoc-ref %build-inputs "freetype") |
95 | "/include")) |
96 | #:phases |
97 | (modify-phases %standard-phases |
98 | (add-after 'build 'build-doc |
99 | (lambda* _ |
100 | (zero? (system* "make" "OgreDoc"))))))) |
101 | (home-page "http://www.ogre3d.org") |
102 | (synopsis "3D graphics engine") |
103 | (description "3D graphics engine") |
104 | (license license:expat))) |
105 | |
106 | (define-public cegui |
107 | (package |
108 | (name "cegui") |
109 | (version "0.8.7") |
110 | (source (origin |
111 | (method url-fetch) |
112 | (uri (string-append |
113 | "http://prdownloads.sourceforge.net/crayzedsgui/cegui-" |
114 | version ".tar.bz2")) |
115 | (sha256 |
116 | (base32 |
117 | "067562s71kfsnbp2zb2bmq8zj3jk96g5a4rcc5qc3n8nfyayhldk")))) |
118 | (build-system cmake-build-system) |
119 | (arguments |
120 | `(#:tests? #f)) |
121 | (native-inputs |
122 | `(("pkg-config" ,pkg-config))) |
123 | (inputs |
124 | `(("pcre" ,pcre) |
125 | ("gl" ,mesa) |
126 | ("freetype" ,freetype) |
127 | ("fribidi" ,fribidi) |
128 | ("glew" ,glew) |
129 | ("sdl2" ,sdl2) |
130 | ("irrlicht" ,irrlicht) |
131 | ("ogre" ,ogre3d) |
132 | ("epoxy" ,libepoxy) |
133 | ("expat" ,expat) |
134 | ("libxml2" ,libxml2) |
135 | ("freeimage" ,freeimage) |
136 | ("python" ,python) |
137 | ("lua" ,lua-5.1) |
138 | ("gtk" ,gtk+-2) |
139 | ("boost" ,boost-fix) |
140 | ("minizip" ,minizip) |
141 | ("tinyxml" ,tinyxml))) |
142 | (home-page "http://cegui.org.uk/") |
143 | (synopsis "Crazy Eddie's GUI system") |
144 | (description "Crazy Eddie's GUI System is a free library providing windowing |
145 | and widgets for graphics APIs / engines where such functionality is not natively |
146 | available, or severely lacking. The library is object-oriented, written in C++, |
147 | cross-platform, and targeted at game and application developers. Additionally, |
148 | it offers a WYSIWYG editor for creating layouts and imagesets.") |
149 | (license license:expat))) |
150 | |
151 | (define-public morji |
152 | (package |
153 | (name "morji") |
154 | (version "0.2") |
155 | (source (origin |
156 | (method url-fetch) |
157 | (uri (string-append |
158 | "https://bardinflor.perso.aquilenet.fr/morji/morji-" |
159 | version ".tar.gz")) |
160 | (sha256 |
161 | (base32 |
162 | "1mr1yq739n1x9y01azv88npi2vm7swbgh8aqj4r590bq5lqn8w62")))) |
163 | (build-system gnu-build-system) |
164 | (arguments |
165 | `(#:tests? #f; Tests don't run in our environment |
166 | #:phases |
167 | (modify-phases %standard-phases |
168 | (delete 'configure) |
169 | (delete 'build) |
170 | (replace 'install |
171 | (lambda* (#:key outputs #:allow-other-keys) |
172 | (zero? (system* "make" "install" |
173 | (string-append "PREFIX=" (assoc-ref outputs "out"))))))))) |
174 | (propagated-inputs |
175 | `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib. |
176 | ("sqlite" ,sqlite) |
177 | ("tcl" ,tcl-fix) |
178 | ("tcllib" ,tcllib-fix))) |
179 | (native-inputs |
180 | `(("expect" ,expect-fix))) |
181 | (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en") |
182 | (synopsis "Simple flashcard program for the terminal") |
183 | (description "Morji is a simple flashcard program for the terminal. It |
184 | uses a modified version of the SM2 algorithm taking inspiration from mnemosyne |
185 | and anki.") |
186 | (license license:isc))) |
187 | |
188 | (define-public cpptest |
189 | (package |
190 | (name "cpptest") |
191 | (version "1.1.2") |
192 | (source (origin |
193 | (method url-fetch) |
194 | (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-" |
195 | version "/cpptest-" version ".tar.gz")) |
196 | (sha256 |
197 | (base32 |
198 | "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy")))) |
199 | (build-system gnu-build-system) |
200 | (home-page "http://cpptest.sourceforge.net/") |
201 | (synopsis "") |
202 | (description "") |
203 | (license license:lgpl2.1))) |
204 | |
205 | (define-public khanat |
206 | (package |
207 | (name "khanat") |
208 | (version "3.0") |
209 | (source (origin |
210 | (method git-fetch) |
211 | (uri (git-reference |
212 | (url "https://git.khaganat.net/khaganat/khanat-code.git") |
213 | (commit "90d9f6da6c367312ea856e1b8df67ec9ef1959c7"))) |
214 | (sha256 |
215 | (base32 |
216 | "0wh4k6k4213pm4bbynlsnbvpcmqiliny19v9sffgd011pzywy7cp")))) |
217 | (build-system cmake-build-system) |
218 | (inputs |
219 | `(("boost" ,boost-fix) |
220 | ("cpptest" ,cpptest) |
221 | ("curl" ,curl) |
222 | ("giflib" ,giflib) |
223 | ("libfreetype" ,freetype) |
224 | ("libjpeg" ,libjpeg) |
225 | ("libpng" ,libpng) |
226 | ("libvorbis" ,libvorbis) |
227 | ("libxml2" ,libxml2) |
228 | ("lua" ,lua-5.1) |
229 | ("luabind" ,luabind) |
230 | ("mesa" ,mesa) |
231 | ("openal" ,openal) |
232 | ("openssl" ,openssl) |
233 | ("zlib" ,zlib))) |
234 | (arguments |
235 | `(#:out-of-source? #t |
236 | #:tests? #f |
237 | #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF" |
238 | "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF" |
239 | "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF" |
240 | "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF" |
241 | "-DWITH_STATIC_EXTERNAL=OFF") |
242 | #:phases |
243 | (modify-phases %standard-phases |
244 | (add-before 'configure 'chdir |
245 | (lambda _ |
246 | (chdir "code")))))) |
247 | (home-page "https://khaganat.net/") |
248 | (synopsis "") |
249 | (description "") |
250 | (license license:agpl3))) |
251 | |
252 | (define-public anki |
253 | (package |
254 | (name "anki") |
255 | ; the latest stable version requires qt4 webkit which we don't have because |
256 | ; of issues on arm and probably security reasons. |
257 | (version "2.1.0beta3") |
258 | (source (origin |
259 | (method url-fetch) |
260 | (uri (string-append "https://apps.ankiweb.net/downloads/beta/anki-" |
261 | version "-source.tgz")) |
262 | (sha256 |
263 | (base32 |
264 | "1iffc8l856j7c6r8s6y5f79fgf31d4halbhrwfc09zlkasvf9wqg")))) |
265 | (build-system gnu-build-system) |
266 | (propagated-inputs |
267 | `(("python" ,python) |
268 | ("pyaudio" ,python-pyaudio) |
269 | ("pyqt" ,python-pyqt) |
270 | ("sip" ,python-sip))) |
271 | (arguments |
272 | `(#:tests? #f |
273 | #:phases |
274 | (modify-phases %standard-phases |
275 | (delete 'configure) |
276 | (delete 'build) |
277 | (replace 'install |
278 | (lambda* (#:key inputs outputs #:allow-other-keys) |
279 | (let* ((output (assoc-ref outputs "out")) |
280 | (bindir (string-append output "/bin")) |
281 | (libdir (string-append output "/lib/python3.5/site-packages"))) |
282 | (for-each |
283 | (lambda (file) |
284 | (mkdir-p (dirname (string-append libdir "/" file))) |
285 | (copy-file file (string-append libdir "/" file))) |
286 | (append (find-files "anki" ".*\\.py") |
287 | (find-files "aqt" ".*\\.py"))) |
288 | (mkdir-p bindir) |
289 | (with-output-to-file (string-append bindir "/anki") |
290 | (lambda _ |
291 | (display |
292 | (string-append |
293 | "#!" (assoc-ref inputs "python") "/bin/python3\n" |
294 | "import aqt\n" |
295 | "aqt.run()\n")))) |
296 | (chmod (string-append bindir "/anki") #o755))))))) |
297 | (home-page "https://apps.ankiweb.net") |
298 | (synopsis "") |
299 | (description "") |
300 | (license license:gpl2))) |
301 |