guix-more/more/packages/games.scm

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 assembly)
29
  #:use-module (gnu packages audio)
30
  #:use-module (gnu packages base)
31
  #:use-module (gnu packages boost)
32
  #:use-module (gnu packages check)
33
  #:use-module (gnu packages compression)
34
  #:use-module (gnu packages curl)
35
  #:use-module (gnu packages databases)
36
  #:use-module (gnu packages documentation)
37
  #:use-module (gnu packages fontutils)
38
  #:use-module (gnu packages fribidi)
39
  #:use-module (gnu packages games)
40
  #:use-module (gnu packages gcc)
41
  #:use-module (gnu packages gl)
42
  #:use-module (gnu packages graphics)
43
  #:use-module (gnu packages gtk)
44
  #:use-module (gnu packages image)
45
  #:use-module (gnu packages lua)
46
  #:use-module (more packages lua)
47
  #:use-module (gnu packages llvm)
48
  #:use-module (gnu packages ncurses)
49
  #:use-module (gnu packages pcre)
50
  #:use-module (gnu packages pkg-config)
51
  #:use-module (gnu packages python)
52
  #:use-module (more packages python)
53
  #:use-module (gnu packages qt)
54
  #:use-module (gnu packages sdl)
55
  #:use-module (gnu packages tbb)
56
  #:use-module (more packages tcl)
57
  #:use-module (gnu packages tls)
58
  #:use-module (gnu packages xiph)
59
  #:use-module (gnu packages xml)
60
  #:use-module (gnu packages xorg))
61
62
(define-public cegui
63
  (package
64
    (name "cegui")
65
    (version "0.8.7")
66
    (source (origin
67
              (method url-fetch)
68
              (uri (string-append
69
                     "http://prdownloads.sourceforge.net/crayzedsgui/cegui-"
70
                     version ".tar.bz2"))
71
              (sha256
72
               (base32
73
                "067562s71kfsnbp2zb2bmq8zj3jk96g5a4rcc5qc3n8nfyayhldk"))))
74
    (build-system cmake-build-system)
75
    (arguments
76
     `(#:tests? #f))
77
    (native-inputs
78
     `(("pkg-config" ,pkg-config)))
79
    (inputs
80
     `(("pcre" ,pcre)
81
       ("gl" ,mesa)
82
       ("freetype" ,freetype)
83
       ("fribidi" ,fribidi)
84
       ("glew" ,glew)
85
       ("sdl2" ,sdl2)
86
       ("irrlicht" ,irrlicht)
87
       ("ogre" ,ogre)
88
       ("epoxy" ,libepoxy)
89
       ("expat" ,expat)
90
       ("libxml2" ,libxml2)
91
       ("freeimage" ,freeimage)
92
       ("python" ,python)
93
       ("lua" ,lua-5.1)
94
       ("gtk" ,gtk+-2)
95
       ("boost" ,boost)
96
       ("minizip" ,minizip)
97
       ("tinyxml" ,tinyxml)))
98
    (home-page "http://cegui.org.uk/")
99
    (synopsis "Crazy Eddie's GUI system")
100
    (description "Crazy Eddie's GUI System is a free library providing windowing
101
and widgets for graphics APIs / engines where such functionality is not natively
102
available, or severely lacking.  The library is object-oriented, written in C++,
103
cross-platform, and targeted at game and application developers.  Additionally,
104
it offers a WYSIWYG editor for creating layouts and imagesets.")
105
    (license license:expat)))
106
107
(define-public morji
108
  (package
109
    (name "morji")
110
    (version "0.3")
111
    (source (origin
112
              (method url-fetch)
113
              (uri (string-append
114
                     "https://bardinflor.perso.aquilenet.fr/morji/morji-"
115
                     version ".tar.gz"))
116
              (sha256
117
               (base32
118
                "1icpqn7ypg4jbbn222zvgdg96x0k1nb9rbcfr5ky86ldhly1flq2"))))
119
    (build-system gnu-build-system)
120
    (arguments
121
     `(#:tests? #f; Tests don't run in our environment
122
       #:phases
123
       (modify-phases %standard-phases
124
         (delete 'configure)
125
         (delete 'build)
126
         (replace 'install
127
           (lambda* (#:key outputs #:allow-other-keys)
128
             (zero? (system* "make" "install"
129
                             (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
130
    (propagated-inputs
131
     `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib.
132
       ("sqlite" ,sqlite)
133
       ("tcl" ,tcl-fix)
134
       ("tcllib" ,tcllib-fix)))
135
    (native-inputs
136
     `(("expect" ,expect-fix)))
137
    (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en")
138
    (synopsis "Simple flashcard program for the terminal")
139
    (description "Morji is a simple flashcard program for the terminal.  It
140
uses a modified version of the SM2 algorithm taking inspiration from mnemosyne
141
and anki.")
142
    (license license:isc)))
143
144
(define-public cpptest
145
  (package
146
    (name "cpptest")
147
    (version "1.1.2")
148
    (source (origin
149
              (method url-fetch)
150
              (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-"
151
                                  version "/cpptest-" version ".tar.gz"))
152
              (sha256
153
               (base32
154
                "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy"))))
155
    (build-system gnu-build-system)
156
    (home-page "http://cpptest.sourceforge.net/")
157
    (synopsis "")
158
    (description "")
159
    (license license:lgpl2.1)))
160
161
(define-public khanat
162
  (package
163
    (name "khanat")
164
    (version "3.0")
165
    (source (origin
166
              (method git-fetch)
167
              (uri (git-reference
168
                     (url "https://git.khaganat.net/khaganat/mmorpg_khanat/khanat-opennel-code.git")
169
                     ;(commit "0ca90c49a5e1e6f8865ef15517bd25e388a2db96")))
170
                     (commit "302ee7e20ea93caded5d46637918ba0092f207fd")))
171
              (sha256
172
               (base32
173
                ;"1rfrk43ya8mx576ycs4rln67kdrci37ryixk7abf1cqjdrz7a883"))))
174
                "1w0bhspsgf3dg33xdyypc4rm935n6g5d7shid92jf4j6jb0cjahh"))))
175
    (build-system cmake-build-system)
176
    (inputs
177
     `(("boost" ,boost)
178
       ("cpptest" ,cpptest)
179
       ("curl" ,curl)
180
       ("giflib" ,giflib)
181
       ("libfreetype" ,freetype)
182
       ("libjpeg" ,libjpeg)
183
       ("libpng" ,libpng)
184
       ("libvorbis" ,libvorbis)
185
       ("libxml2" ,libxml2)
186
       ("lua" ,lua-5.1)
187
       ("luabind" ,luabind)
188
       ("mesa" ,mesa)
189
       ("openal" ,openal)
190
       ("openssl" ,openssl)
191
       ("zlib" ,zlib)))
192
    (arguments
193
     `(#:out-of-source? #t
194
       #:tests? #f
195
       #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF"
196
                               "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF"
197
                               "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF"
198
                               "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF"
199
                               "-DWITH_STATIC_EXTERNAL=OFF")
200
       #:phases
201
       (modify-phases %standard-phases
202
         (add-before 'configure 'chdir
203
           (lambda _
204
             (chdir "code")))
205
         (add-after 'install 'link-khanat
206
           (lambda* (#:key outputs #:allow-other-keys)
207
             (let* ((out (assoc-ref outputs "out"))
208
                    (game (string-append out "/games/khanat_client"))
209
                    (bin (string-append out "/bin/khanat_client")))
210
             (symlink game bin)))))))
211
    (home-page "https://khaganat.net/")
212
    (synopsis "")
213
    (description "")
214
    (license license:agpl3)))
215
216
(define-public anki
217
  (package
218
    (name "anki")
219
    ; the latest stable version requires qt4 webkit which we don't have because
220
    ; of issues on arm and probably security reasons.
221
    (version "2.1.0beta25")
222
    (source (origin
223
              (method url-fetch)
224
              (uri (string-append "https://apps.ankiweb.net/downloads/beta/anki-"
225
                                  version "-source.tgz"))
226
              (sha256
227
               (base32
228
                "1p42b395k3kny5c17na3sw95mya3cw2hg3nxyj3b3mdhwdcy677r"))))
229
    (build-system gnu-build-system)
230
    (propagated-inputs
231
     `(("python" ,python)
232
       ("python-pyaudio" ,python-pyaudio)
233
       ("python-pyqt" ,python-pyqt)
234
       ("python-sip" ,python-sip)
235
       ("python-decorator" ,python-decorator)))
236
    (arguments
237
     `(#:tests? #f
238
       #:phases
239
       (modify-phases %standard-phases
240
         (delete 'configure)
241
         (delete 'build)
242
         (replace 'install
243
           (lambda* (#:key inputs outputs #:allow-other-keys)
244
             (substitute* "anki/__init__.py"
245
               (("< 6") "< 5"))
246
             (substitute* "aqt/qt.py"
247
               (("from PyQt5.QtWebEngineWidgets import QWebEnginePage") ""))
248
             (let* ((output (assoc-ref outputs "out"))
249
                    (bindir (string-append output "/bin"))
250
                    (libdir (string-append output "/lib/python3.5/site-packages")))
251
               (for-each
252
                 (lambda (file)
253
                   (mkdir-p (dirname (string-append libdir "/" file)))
254
                   (copy-file file (string-append libdir "/" file)))
255
                 (append (find-files "anki" ".*\\.py")
256
                         (find-files "aqt" ".*\\.py")))
257
               (mkdir-p bindir)
258
               (with-output-to-file (string-append bindir "/anki")
259
                 (lambda _
260
                   (display
261
                     (string-append
262
                       "#!" (assoc-ref inputs "python") "/bin/python3\n"
263
                       "import aqt\n"
264
                       "aqt.run()\n"))))
265
               (chmod (string-append bindir "/anki") #o755)))))))
266
    (home-page "https://apps.ankiweb.net")
267
    (synopsis "")
268
    (description "")
269
    (license license:gpl2)))
270
271
(define-public emojicode
272
  (package
273
    (name "emojicode")
274
    (version "0.5.4")
275
    (source (origin
276
              (method url-fetch)
277
              (uri (string-append "https://github.com/emojicode/emojicode/archive/v"
278
                                  version ".tar.gz"))
279
              (sha256
280
               (base32
281
                "1l3f4i0vh09x8dz5fl1f4mb8wlgmi0j2bhjkfzrnmbgp09hi8wsl"))))
282
    (build-system cmake-build-system)
283
    (arguments
284
     `(#:phases
285
       (modify-phases %standard-phases
286
         (add-before 'configure 'fixgcc7
287
           (lambda _
288
             (display (getenv "CXX_INCLUDE_PATH"))
289
             (setenv "CPATH" (getenv "C_INCLUDE_PATH"))
290
             (unsetenv "C_INCLUDE_PATH")
291
             (setenv "CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES" (getenv "CPATH"))
292
             (setenv "CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES" (getenv "CPATH")))))))
293
    (inputs
294
     `(("llvm" ,llvm)))
295
    (native-inputs
296
     `(("gcc" ,gcc-7)))
297
    (home-page "http://www.emojicode.org")
298
    (synopsis "World’s only programming language that’s bursting with emojis")
299
    (description "Emojicode is the only programming language consisting of
300
emojis.  Emojicode is a straightforward language to learn, whatever background
301
you have.")
302
    (license license:artistic2.0)))
303
304
(define-public torque3d
305
  (package
306
    (name "torque3d")
307
    (version "3.10.1")
308
    (source (origin
309
              (method url-fetch)
310
              (uri (string-append "https://github.com/GarageGames/Torque3D/archive/v"
311
                                  version ".tar.gz"))
312
              (file-name (string-append name "-" version ".tar.gz"))
313
              (sha256
314
               (base32
315
                "0qxaybdmir90ynfqs7l45di7vh0xa619abq53l9avj6yycihgw8b"))))
316
    (build-system cmake-build-system)
317
    (arguments
318
     `(#:configure-flags
319
       (list "-DTORQUE_APP_NAME=Torque3D")
320
       #:tests? #f))
321
    (inputs
322
     `(("gtk+" ,gtk+)
323
       ("libxft" ,libxft)
324
       ("openal" ,openal)))
325
    (native-inputs
326
     `(("nasm" ,nasm)
327
       ("pkg-config" ,pkg-config)))
328
    (home-page "http://torque3d.org/")
329
    (synopsis "Game engine")
330
    (description "")
331
    (license license:expat)))
332