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