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