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 (gnu packages boost) |
30 | #:use-module (gnu packages check) |
31 | #:use-module (gnu packages compression) |
32 | #:use-module (gnu packages curl) |
33 | #:use-module (gnu packages databases) |
34 | #:use-module (gnu packages documentation) |
35 | #:use-module (gnu packages fontutils) |
36 | #:use-module (gnu packages fribidi) |
37 | #:use-module (gnu packages games) |
38 | #:use-module (gnu packages gl) |
39 | #:use-module (gnu packages graphics) |
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 cegui |
59 | (package |
60 | (name "cegui") |
61 | (version "0.8.7") |
62 | (source (origin |
63 | (method url-fetch) |
64 | (uri (string-append |
65 | "http://prdownloads.sourceforge.net/crayzedsgui/cegui-" |
66 | version ".tar.bz2")) |
67 | (sha256 |
68 | (base32 |
69 | "067562s71kfsnbp2zb2bmq8zj3jk96g5a4rcc5qc3n8nfyayhldk")))) |
70 | (build-system cmake-build-system) |
71 | (arguments |
72 | `(#:tests? #f)) |
73 | (native-inputs |
74 | `(("pkg-config" ,pkg-config))) |
75 | (inputs |
76 | `(("pcre" ,pcre) |
77 | ("gl" ,mesa) |
78 | ("freetype" ,freetype) |
79 | ("fribidi" ,fribidi) |
80 | ("glew" ,glew) |
81 | ("sdl2" ,sdl2) |
82 | ("irrlicht" ,irrlicht) |
83 | ("ogre" ,ogre) |
84 | ("epoxy" ,libepoxy) |
85 | ("expat" ,expat) |
86 | ("libxml2" ,libxml2) |
87 | ("freeimage" ,freeimage) |
88 | ("python" ,python) |
89 | ("lua" ,lua-5.1) |
90 | ("gtk" ,gtk+-2) |
91 | ("boost" ,boost) |
92 | ("minizip" ,minizip) |
93 | ("tinyxml" ,tinyxml))) |
94 | (home-page "http://cegui.org.uk/") |
95 | (synopsis "Crazy Eddie's GUI system") |
96 | (description "Crazy Eddie's GUI System is a free library providing windowing |
97 | and widgets for graphics APIs / engines where such functionality is not natively |
98 | available, or severely lacking. The library is object-oriented, written in C++, |
99 | cross-platform, and targeted at game and application developers. Additionally, |
100 | it offers a WYSIWYG editor for creating layouts and imagesets.") |
101 | (license license:expat))) |
102 | |
103 | (define-public morji |
104 | (package |
105 | (name "morji") |
106 | (version "0.3") |
107 | (source (origin |
108 | (method url-fetch) |
109 | (uri (string-append |
110 | "https://bardinflor.perso.aquilenet.fr/morji/morji-" |
111 | version ".tar.gz")) |
112 | (sha256 |
113 | (base32 |
114 | "1icpqn7ypg4jbbn222zvgdg96x0k1nb9rbcfr5ky86ldhly1flq2")))) |
115 | (build-system gnu-build-system) |
116 | (arguments |
117 | `(#:tests? #f; Tests don't run in our environment |
118 | #:phases |
119 | (modify-phases %standard-phases |
120 | (delete 'configure) |
121 | (delete 'build) |
122 | (replace 'install |
123 | (lambda* (#:key outputs #:allow-other-keys) |
124 | (zero? (system* "make" "install" |
125 | (string-append "PREFIX=" (assoc-ref outputs "out"))))))))) |
126 | (propagated-inputs |
127 | `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib. |
128 | ("sqlite" ,sqlite) |
129 | ("tcl" ,tcl-fix) |
130 | ("tcllib" ,tcllib-fix))) |
131 | (native-inputs |
132 | `(("expect" ,expect-fix))) |
133 | (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en") |
134 | (synopsis "Simple flashcard program for the terminal") |
135 | (description "Morji is a simple flashcard program for the terminal. It |
136 | uses a modified version of the SM2 algorithm taking inspiration from mnemosyne |
137 | and anki.") |
138 | (license license:isc))) |
139 | |
140 | (define-public cpptest |
141 | (package |
142 | (name "cpptest") |
143 | (version "1.1.2") |
144 | (source (origin |
145 | (method url-fetch) |
146 | (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-" |
147 | version "/cpptest-" version ".tar.gz")) |
148 | (sha256 |
149 | (base32 |
150 | "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy")))) |
151 | (build-system gnu-build-system) |
152 | (home-page "http://cpptest.sourceforge.net/") |
153 | (synopsis "") |
154 | (description "") |
155 | (license license:lgpl2.1))) |
156 | |
157 | (define-public khanat |
158 | (package |
159 | (name "khanat") |
160 | (version "3.0") |
161 | (source (origin |
162 | (method git-fetch) |
163 | (uri (git-reference |
164 | (url "https://git.khaganat.net/khaganat/khanat-code.git") |
165 | (commit "90d9f6da6c367312ea856e1b8df67ec9ef1959c7"))) |
166 | (sha256 |
167 | (base32 |
168 | "0wh4k6k4213pm4bbynlsnbvpcmqiliny19v9sffgd011pzywy7cp")))) |
169 | (build-system cmake-build-system) |
170 | (inputs |
171 | `(("boost" ,boost) |
172 | ("cpptest" ,cpptest) |
173 | ("curl" ,curl) |
174 | ("giflib" ,giflib) |
175 | ("libfreetype" ,freetype) |
176 | ("libjpeg" ,libjpeg) |
177 | ("libpng" ,libpng) |
178 | ("libvorbis" ,libvorbis) |
179 | ("libxml2" ,libxml2) |
180 | ("lua" ,lua-5.1) |
181 | ("luabind" ,luabind) |
182 | ("mesa" ,mesa) |
183 | ("openal" ,openal) |
184 | ("openssl" ,openssl) |
185 | ("zlib" ,zlib))) |
186 | (arguments |
187 | `(#:out-of-source? #t |
188 | #:tests? #f |
189 | #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF" |
190 | "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF" |
191 | "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF" |
192 | "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF" |
193 | "-DWITH_STATIC_EXTERNAL=OFF") |
194 | #:phases |
195 | (modify-phases %standard-phases |
196 | (add-before 'configure 'chdir |
197 | (lambda _ |
198 | (chdir "code")))))) |
199 | (home-page "https://khaganat.net/") |
200 | (synopsis "") |
201 | (description "") |
202 | (license license:agpl3))) |
203 | |
204 | (define-public anki |
205 | (package |
206 | (name "anki") |
207 | ; the latest stable version requires qt4 webkit which we don't have because |
208 | ; of issues on arm and probably security reasons. |
209 | (version "2.1.0beta25") |
210 | (source (origin |
211 | (method url-fetch) |
212 | (uri (string-append "https://apps.ankiweb.net/downloads/beta/anki-" |
213 | version "-source.tgz")) |
214 | (sha256 |
215 | (base32 |
216 | "1p42b395k3kny5c17na3sw95mya3cw2hg3nxyj3b3mdhwdcy677r")))) |
217 | (build-system gnu-build-system) |
218 | (propagated-inputs |
219 | `(("python" ,python) |
220 | ("python-pyaudio" ,python-pyaudio) |
221 | ("python-pyqt" ,python-pyqt) |
222 | ("python-sip" ,python-sip) |
223 | ("python-decorator" ,python-decorator))) |
224 | (arguments |
225 | `(#:tests? #f |
226 | #:phases |
227 | (modify-phases %standard-phases |
228 | (delete 'configure) |
229 | (delete 'build) |
230 | (replace 'install |
231 | (lambda* (#:key inputs outputs #:allow-other-keys) |
232 | (substitute* "anki/__init__.py" |
233 | (("< 6") "< 5")) |
234 | (substitute* "aqt/qt.py" |
235 | (("from PyQt5.QtWebEngineWidgets import QWebEnginePage") "")) |
236 | (let* ((output (assoc-ref outputs "out")) |
237 | (bindir (string-append output "/bin")) |
238 | (libdir (string-append output "/lib/python3.5/site-packages"))) |
239 | (for-each |
240 | (lambda (file) |
241 | (mkdir-p (dirname (string-append libdir "/" file))) |
242 | (copy-file file (string-append libdir "/" file))) |
243 | (append (find-files "anki" ".*\\.py") |
244 | (find-files "aqt" ".*\\.py"))) |
245 | (mkdir-p bindir) |
246 | (with-output-to-file (string-append bindir "/anki") |
247 | (lambda _ |
248 | (display |
249 | (string-append |
250 | "#!" (assoc-ref inputs "python") "/bin/python3\n" |
251 | "import aqt\n" |
252 | "aqt.run()\n")))) |
253 | (chmod (string-append bindir "/anki") #o755))))))) |
254 | (home-page "https://apps.ankiweb.net") |
255 | (synopsis "") |
256 | (description "") |
257 | (license license:gpl2))) |
258 |