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.1") |
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 | "18givlgh10cg0a3gs3747ihhfm4hyj056cr3x7vqhcnrx6vgy06i")))) |
163 | (build-system gnu-build-system) |
164 | (arguments |
165 | `(#:phases |
166 | (modify-phases %standard-phases |
167 | (delete 'configure) |
168 | (delete 'build) |
169 | (replace 'install |
170 | (lambda* (#:key outputs #:allow-other-keys) |
171 | (zero? (system* "make" "install" |
172 | (string-append "PREFIX=" (assoc-ref outputs "out")))))) |
173 | (replace 'check |
174 | (lambda _ |
175 | (zero? (system* "tclsh" "test_expect.tcl"))))))) |
176 | (propagated-inputs |
177 | `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib. |
178 | ("sqlite" ,sqlite) |
179 | ("tcl" ,tcl-fix) |
180 | ("tcllib" ,tcllib-fix))) |
181 | (native-inputs |
182 | `(("expect" ,expect-fix))) |
183 | (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en") |
184 | (synopsis "Simple flashcard program for the terminal") |
185 | (description "Morji is a simple flashcard program for the terminal. It |
186 | uses a modified version of the SM2 algorithm taking inspiration from mnemosyne |
187 | and anki.") |
188 | (license license:isc))) |
189 | |
190 | (define-public cpptest |
191 | (package |
192 | (name "cpptest") |
193 | (version "1.1.2") |
194 | (source (origin |
195 | (method url-fetch) |
196 | (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-" |
197 | version "/cpptest-" version ".tar.gz")) |
198 | (sha256 |
199 | (base32 |
200 | "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy")))) |
201 | (build-system gnu-build-system) |
202 | (home-page "http://cpptest.sourceforge.net/") |
203 | (synopsis "") |
204 | (description "") |
205 | (license license:lgpl2.1))) |
206 | |
207 | (define-public khanat |
208 | (package |
209 | (name "khanat") |
210 | (version "3.0") |
211 | (source (origin |
212 | (method git-fetch) |
213 | (uri (git-reference |
214 | (url "https://git.khaganat.net/khaganat/khanat-code.git") |
215 | (commit "90d9f6da6c367312ea856e1b8df67ec9ef1959c7"))) |
216 | (sha256 |
217 | (base32 |
218 | "0wh4k6k4213pm4bbynlsnbvpcmqiliny19v9sffgd011pzywy7cp")))) |
219 | (build-system cmake-build-system) |
220 | (inputs |
221 | `(("boost" ,boost-fix) |
222 | ("cpptest" ,cpptest) |
223 | ("curl" ,curl) |
224 | ("giflib" ,giflib) |
225 | ("libfreetype" ,freetype) |
226 | ("libjpeg" ,libjpeg) |
227 | ("libpng" ,libpng) |
228 | ("libvorbis" ,libvorbis) |
229 | ("libxml2" ,libxml2) |
230 | ("lua" ,lua-5.1) |
231 | ("luabind" ,luabind) |
232 | ("mesa" ,mesa) |
233 | ("openal" ,openal) |
234 | ("openssl" ,openssl) |
235 | ("zlib" ,zlib))) |
236 | (arguments |
237 | `(#:out-of-source? #t |
238 | #:tests? #f |
239 | #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF" |
240 | "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF" |
241 | "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF" |
242 | "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF" |
243 | "-DWITH_STATIC_EXTERNAL=OFF") |
244 | #:phases |
245 | (modify-phases %standard-phases |
246 | (add-before 'configure 'chdir |
247 | (lambda _ |
248 | (chdir "code")))))) |
249 | (home-page "https://khaganat.net/") |
250 | (synopsis "") |
251 | (description "") |
252 | (license license:agpl3))) |
253 | |
254 | (define-public anki |
255 | (package |
256 | (name "anki") |
257 | ; the latest stable version requires qt4 webkit which we don't have because |
258 | ; of issues on arm and probably security reasons. |
259 | (version "2.1.0beta3") |
260 | (source (origin |
261 | (method url-fetch) |
262 | (uri (string-append "https://apps.ankiweb.net/downloads/beta/anki-" |
263 | version "-source.tgz")) |
264 | (sha256 |
265 | (base32 |
266 | "1iffc8l856j7c6r8s6y5f79fgf31d4halbhrwfc09zlkasvf9wqg")))) |
267 | (build-system gnu-build-system) |
268 | (propagated-inputs |
269 | `(("python" ,python) |
270 | ("pyaudio" ,python-pyaudio) |
271 | ("pyqt" ,python-pyqt) |
272 | ("sip" ,python-sip))) |
273 | (arguments |
274 | `(#:tests? #f |
275 | #:phases |
276 | (modify-phases %standard-phases |
277 | (delete 'configure) |
278 | (delete 'build) |
279 | (replace 'install |
280 | (lambda* (#:key inputs outputs #:allow-other-keys) |
281 | (let* ((output (assoc-ref outputs "out")) |
282 | (bindir (string-append output "/bin")) |
283 | (libdir (string-append output "/lib/python3.5/site-packages"))) |
284 | (for-each |
285 | (lambda (file) |
286 | (mkdir-p (dirname (string-append libdir "/" file))) |
287 | (copy-file file (string-append libdir "/" file))) |
288 | (append (find-files "anki" ".*\\.py") |
289 | (find-files "aqt" ".*\\.py"))) |
290 | (mkdir-p bindir) |
291 | (with-output-to-file (string-append bindir "/anki") |
292 | (lambda _ |
293 | (display |
294 | (string-append |
295 | "#!" (assoc-ref inputs "python") "/bin/python3\n" |
296 | "import aqt\n" |
297 | "aqt.run()\n")))) |
298 | (chmod (string-append bindir "/anki") #o755))))))) |
299 | (home-page "https://apps.ankiweb.net") |
300 | (synopsis "") |
301 | (description "") |
302 | (license license:gpl2))) |
303 |