gnu: msgpack: Update to 3.2.0.
[jackhill/guix/guix.git] / gnu / packages / education.scm
CommitLineData
2614de3c
DM
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
9e39ac41 3;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
b84257c0 4;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
5c105203 5;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
96ec4604 6;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
3b2cf5c8 7;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
2614de3c
DM
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages education)
25 #:use-module (ice-9 regex)
26 #:use-module (gnu packages)
3cfd12f3
NG
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
2614de3c 29 #:use-module (gnu packages compression)
4f963be0
NG
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages fonts)
3cfd12f3 32 #:use-module (gnu packages freedesktop)
4f963be0 33 #:use-module (gnu packages game-development)
2614de3c 34 #:use-module (gnu packages gettext)
0ea179fd
RW
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages gtk)
3cfd12f3 38 #:use-module (gnu packages javascript)
b27aacbf 39 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
2614de3c 40 #:use-module (gnu packages perl)
0ea179fd
RW
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages python)
3cfd12f3 43 #:use-module (gnu packages qt)
0ea179fd 44 #:use-module (gnu packages sdl)
cd0322a3 45 #:use-module (gnu packages sqlite)
0ea179fd 46 #:use-module (gnu packages texinfo)
96ec4604 47 #:use-module (gnu packages tls)
7e48e849 48 #:use-module (gnu packages xorg)
0ea179fd 49 #:use-module (gnu packages xml)
2614de3c
DM
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix packages)
52 #:use-module (guix download)
3cfd12f3 53 #:use-module (guix git-download)
2614de3c
DM
54 #:use-module (guix svn-download)
55 #:use-module (guix utils)
2614de3c 56 #:use-module (guix build-system cmake)
3cfd12f3 57 #:use-module (guix build-system gnu)
3b2cf5c8 58 #:use-module (guix build-system python)
3cfd12f3 59 #:use-module (guix build-system trivial)
2614de3c
DM
60 #:use-module (srfi srfi-1))
61
0ea179fd
RW
62(define-public gcompris
63 (package
64 (name "gcompris")
cdc827b3 65 (version "17.05")
0ea179fd
RW
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
69 version ".tar.bz2"))
70 (sha256
71 (base32
cdc827b3 72 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
0ea179fd
RW
73 (build-system gnu-build-system)
74 (arguments
75 `(#:configure-flags
76 ;; Use SDL mixer because otherwise GCompris would need an old version
77 ;; of Gstreamer.
78 (list "--enable-sdlmixer"
79 "LDFLAGS=-lgmodule-2.0")
80 #:phases
81 (modify-phases %standard-phases
82 (add-after 'set-paths 'set-sdl-paths
83 (lambda* (#:key inputs #:allow-other-keys)
84 (setenv "CPATH"
85 (string-append (assoc-ref inputs "sdl-mixer")
86 "/include/SDL"))
87 #t)))))
88 (inputs
89 `(("gtk+" ,gtk+-2)
90 ("librsvg" ,librsvg)
91 ("libxml2" ,libxml2)
92 ("sdl-mixer" ,sdl-mixer)
93 ("sqlite" ,sqlite)
94 ("glib:bin" ,glib)
95 ("python" ,python)))
96 (native-inputs
97 `(("intltool" ,intltool)
98 ("texinfo" ,texinfo)
99 ("texi2html" ,texi2html)
100 ("glib:bin" ,glib "bin")
101 ("pkg-config" ,pkg-config)))
102 (home-page "http://gcompris.net")
103 (synopsis "Educational software suite")
104 (description "GCompris is an educational software suite comprising of
105numerous activities for children aged 2 to 10. Some of the activities are
106game orientated, but nonetheless still educational. Below you can find a list
107of categories with some of the activities available in that category.
108
109@enumerate
110@item computer discovery: keyboard, mouse, different mouse gestures, ...
111@item arithmetic: table memory, enumeration, double entry table, mirror image, ...
112@item science: the canal lock, the water cycle, the submarine, electric simulation ...
113@item geography: place the country on the map
114@item games: chess, memory, connect 4, oware, sudoku ...
115@item reading: reading practice
116@item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
117@end enumerate
118")
119 (license license:gpl3+)))
b84257c0 120
b27aacbf
EF
121(define-public gcompris-qt
122 (package
123 (name "gcompris-qt")
96ec4604 124 (version "0.96")
b27aacbf 125 (source
96ec4604
TGR
126 (origin
127 (method url-fetch)
128 (uri (string-append
129 "https://gcompris.net/download/qt/src/gcompris-qt-"
130 version ".tar.xz"))
131 (sha256
132 (base32 "06483il59l46ny2w771sg45dgzjwv1ph7vidzzbj0wb8wbk2rg52"))))
b27aacbf
EF
133 (build-system cmake-build-system)
134 (arguments
5c105203
EF
135 `(#:phases
136 (modify-phases %standard-phases
7e48e849
EF
137 (add-before 'check 'start-xorg-server
138 (lambda* (#:key inputs #:allow-other-keys)
139 ;; The test suite requires a running X server.
140 (system (string-append (assoc-ref inputs "xorg-server")
141 "/bin/Xvfb :1 &"))
142 (setenv "DISPLAY" ":1")
143 #t))
5c105203
EF
144 (add-after 'install 'wrap-executable
145 (lambda* (#:key inputs outputs #:allow-other-keys)
146 (let ((out (assoc-ref outputs "out")))
147 (wrap-program (string-append out "/bin/gcompris-qt")
148 `("QT_PLUGIN_PATH" ":" prefix
149 ,(map (lambda (label)
150 (string-append (assoc-ref inputs label)
151 "/lib/qt5/plugins"))
152 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
153 `("QML2_IMPORT_PATH" ":" prefix
154 ,(map (lambda (label)
155 (string-append (assoc-ref inputs label)
156 "/lib/qt5/qml"))
157 '("qtdeclarative" "qtgraphicaleffects"
158 "qtmultimedia" "qtquickcontrols"))))
159 #t))))
7e48e849
EF
160 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
161 "-DBUILD_TESTING=TRUE")))
b27aacbf
EF
162 (native-inputs
163 `(("extra-cmake-modules" ,extra-cmake-modules)
164 ("gettext" ,gettext-minimal)
5c105203 165 ("perl" ,perl)
7e48e849
EF
166 ("qttools" ,qttools)
167 ("xorg-server" ,xorg-server)))
b27aacbf 168 (inputs
96ec4604
TGR
169 `(("openssl" ,openssl)
170 ("python-2" ,python-2)
5c105203
EF
171 ("qtbase" ,qtbase)
172 ("qtdeclarative" ,qtdeclarative)
173 ("qtgraphicaleffects" ,qtgraphicaleffects)
174 ("qtmultimedia" ,qtmultimedia)
175 ("qtquickcontrols" ,qtquickcontrols)
176 ("qtsensors" ,qtsensors)
177 ("qtsvg" ,qtsvg)
178 ("qtxmlpatterns" ,qtxmlpatterns)))
179 (home-page "https://gcompris.net/index-en.html")
b27aacbf
EF
180 (synopsis "Educational games for small children")
181 (description
182 "Gcompris offers a large collection of educational games for small
183children, designed to be a unified interface to integrate more educational
184games. Language-oriented games contain vocabulary, sounds, and voices for
185many different languages.
186Currently available boards include:
187@enumerate
188@item learning how to use a mouse and keyboard
189@item learning simple arithmetic
190@item learning how to read an analog clock
191@item recognize letters after hearing their names
192@item reading practice
193@item small games (memory games, jigsaw puzzles, ...)
194@end enumerate\n")
195 (license license:gpl3+)))
196
b84257c0
HG
197(define-public tipp10
198 (package
199 (name "tipp10")
200 (version "2.1.0")
201 (source (origin
202 (method url-fetch)
203 ;; guix download is not able to handle the download links on the
204 ;; home-page, which use '<meta http-equiv="refresh" …>'
205 (uri (string-append "mirror://debian/pool/main/"
206 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
207 (sha256
208 (base32
209 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
210 (patches (search-patches "tipp10-fix-compiling.patch"
211 "tipp10-remove-license-code.patch"))))
212 (build-system cmake-build-system)
213 (arguments
214 `(#:tests? #f ; packages has no tests
215 #:phases
216 (modify-phases %standard-phases
217 (add-after 'unpack 'disable-new-version-check
7cc98473
RW
218 (lambda _
219 ;; Make new version check to default to false.
220 ;; TODO: Remove the checkbox from the dialog and the check itself
221 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
222 (("settings.value(\"check_new_version\", true)")
223 "settings.value(\"check_new_version\", false)"))
224 #t))
b84257c0 225 (replace 'configure
7cc98473
RW
226 (lambda* (#:key outputs #:allow-other-keys)
227 (let ((out (assoc-ref outputs "out")))
228 ;; Make program honor $PREFIX
229 (substitute* "tipp10.pro"
230 (("\\.path = /usr/") (string-append ".path = " out "/")))
231 (substitute* "def/defines.h"
232 (("\"/usr/") (string-append "\"" out "/")))
233 ;; Recreate Makefile
946e5e8a 234 (invoke "qmake")))))))
b84257c0
HG
235 (inputs
236 `(("qt4" ,qt-4)
237 ("sqlite" ,sqlite)))
238 (home-page "https://www.tipp10.com/")
239 (synopsis "Touch typing tutor")
9e39ac41
RW
240 (description "Tipp10 is a touch typing tutor. The ingenious thing about
241the software is its intelligence feature: characters that are mistyped are
242repeated more frequently. Beginners will find their way around right away so
243they can start practicing without a hitch.
b84257c0
HG
244
245Useful support functions and an extensive progress tracker, topical lessons
246and the ability to create your own practice lessons make learning to type
9e39ac41 247easy.")
b84257c0 248 (license license:gpl2)))
3cfd12f3
NG
249
250(define-public snap
251 (package
252 (name "snap")
3c2bbbb0 253 (version "5.0.1")
3cfd12f3
NG
254 (source
255 (origin
256 (method git-fetch)
257 (uri (git-reference
3a352a44 258 (url "https://github.com/jmoenig/Snap.git")
458f410b 259 (commit (string-append "v" version))))
3cfd12f3
NG
260 (file-name (git-file-name name version))
261 (sha256
262 (base32
3c2bbbb0 263 "0ic0xgal19yazbd1kffmbjhiicvvlw5clj48lj80mksa2lgvnzna"))))
3cfd12f3
NG
264 (build-system trivial-build-system)
265 (arguments
266 `(#:modules ((guix build utils))
267 #:builder
268 (begin
269 (use-modules (guix build utils))
270 (let* ((source (assoc-ref %build-inputs "source"))
271 (out (assoc-ref %outputs "out"))
272 (share (string-append out "/share/snap")))
273 (copy-recursively source share)
274 ;; Replace the sole minified file in the package.
3a352a44 275 (with-directory-excursion (string-append share "/src")
3cfd12f3
NG
276 (delete-file "FileSaver.min.js")
277 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
278 "/share/javascript/FileSaver.min.js")
279 "FileSaver.min.js"))
280 ;; Create a "snap" executable.
281 (let* ((bin (string-append out "/bin"))
282 (script (string-append bin "/snap"))
283 (snap (string-append share "/snap.html"))
284 (bash (string-append (assoc-ref %build-inputs "bash")
285 "/bin/sh"))
286 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
287 "/bin/xdg-open")))
288 (mkdir-p bin)
289 (call-with-output-file script
290 (lambda (port)
291 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
292 (chmod script #o555)))
293 #t)))
294 (inputs
295 `(("bash" ,bash-minimal)
296 ("js-filesaver" ,js-filesaver)
297 ("xdg-utils" ,xdg-utils)))
298 (home-page "https://snap.berkeley.edu")
299 (synopsis "Visual, blocks based programming language")
300 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
301programming language. It is an extended reimplementation of Scratch (a
302project of the Lifelong Kindergarten Group at the MIT Media Lab) that
303allows you to Build Your Own Blocks. It also features first class
304lists, first class procedures, and continuations. These added
305capabilities make it suitable for a serious introduction to computer
306science for high school or college students.
307
308This package provides a @command{snap} executable calling @command{xdg-open}
309to open the application in a web browser, for offline usage.")
310 (license license:agpl3+)))
3b2cf5c8
NG
311
312(define-public toutenclic
313 (package
314 (name "toutenclic")
f5557bde 315 (version "7.00")
3b2cf5c8
NG
316 (source
317 (origin
318 (method url-fetch)
319 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
f5557bde 320 "ToutEnClic-" version "-src.zip"))
3b2cf5c8 321 (sha256
f5557bde 322 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
3b2cf5c8
NG
323 (build-system python-build-system)
324 (arguments
632c508c 325 `(#:tests? #f ; no tests
3b2cf5c8
NG
326 #:phases
327 (modify-phases %standard-phases
328 (delete 'build)
329 (replace 'install
330 (lambda* (#:key outputs #:allow-other-keys)
331 (let* ((out (assoc-ref outputs "out"))
332 (share (string-append out "/share/toutenclic"))
333 (pixmaps (string-append out "/share/pixmaps"))
f5557bde 334 (doc (string-append out "share/doc/" ,name "-" ,version))
3b2cf5c8 335 (bin (string-append out "/bin"))
f5557bde 336 (executable "toutenclic"))
3b2cf5c8
NG
337 ;; Install icon.
338 (install-file "toutenclic.png" pixmaps)
339 ;; Move files into "share/" directory.
f5557bde
NG
340 (for-each (lambda (f) (install-file f share))
341 (find-files "." "\\.py$"))
342 ;; Install documentation.
343 (install-file "ToutEnClic.pdf" doc)
3b2cf5c8
NG
344 ;; Create executable in "bin/".
345 (mkdir-p bin)
346 (with-directory-excursion bin
f5557bde 347 (symlink (string-append share "/" executable ".py")
3b2cf5c8
NG
348 executable)))
349 #t))
350 (add-after 'install 'create-desktop-file
351 (lambda* (#:key outputs #:allow-other-keys)
352 (let* ((out (assoc-ref outputs "out"))
353 (applications (string-append out "/share/applications")))
354 (mkdir-p applications)
355 (call-with-output-file
356 (string-append applications "/toutenclic.desktop")
357 (lambda (file)
358 (format file
359 "[Desktop Entry]~@
360 Name=ToutEnClic~@
361 Comment=For schooling without difference~@
f5557bde
NG
362 Exec=~a/bin/toutenclic~@
363 TryExec=~@*~a/bin/toutenclic~@
3b2cf5c8
NG
364 Terminal=false~@
365 Icon=toutenclic~@
366 Type=Application~%"
367 out)))
368 #t))))))
369 (inputs `(("python-pyqt" ,python-pyqt)))
370 (synopsis "School tools for physically disabled children")
371 (description "ToutEnClic is intended to facilitate the schooling
372of physically disabled children in ordinary schools. It is both
373a multi-page virtual exercise book and a kit including pencil,
374scissors, glue, ruler, compass, protractor and square. A virtual
375keyboard is also available if the child does not have any other
376specialized device.")
377 (home-page "https://bipede.fr/contrib/")
378 (license license:gpl3)))
4f963be0
NG
379
380(define-public childsplay
381 (package
382 (name "childsplay")
383 (version "3.4")
384 (source (origin
385 (method url-fetch)
386 (uri (string-append
387 "mirror://sourceforge/schoolsplay/"
388 "childsplay-" version ".tgz"))
389 (sha256
390 (base32
391 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
392 (build-system python-build-system)
393 (arguments
394 `(#:python ,python-2
395 #:tests? #f
396 #:phases
397 (modify-phases %standard-phases
398 (add-after 'unpack 'unbundle-dejavu-font
399 (lambda* (#:key inputs #:allow-other-keys)
400 (let* ((dejavu-dir
401 (string-append (assoc-ref inputs "font-dejavu")
402 "/share/fonts/truetype"))
403 (dejavu-font
404 (string-append dejavu-dir
405 "/DejaVuSansCondensed-Bold.ttf")))
406 (substitute* "SPConstants.py"
407 (("^(TTF(BOLD)? = ).*" _ prefix)
408 (string-append prefix "'" dejavu-font "'\n")))
409 (for-each (lambda (f) (delete-file f))
410 (find-files "lib/SPData" "DejaVu"))
411 #t)))
412 (delete 'build)
413 (replace 'install
414 (lambda* (#:key outputs #:allow-other-keys)
415 (let* ((out (assoc-ref outputs "out"))
416 (pixmaps (string-append out "/share/pixmaps"))
417 (share (string-append out "/share/childsplay"))
418 (doc (string-append out "/share/doc/" ,name "-",version)))
419 ;; Install icon.
420 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
421 ;; Install data.
422 (mkdir-p share)
423 (for-each (lambda (f)
424 (copy-recursively f (string-append share "/" f)))
425 '("alphabet-sounds" "lib" "locale" "SPWidgets"))
426 (for-each (lambda (f) (install-file f share))
427 (find-files "." "\\.(py|dev|db)$"))
428 ;; Install documentation.
429 (mkdir-p doc)
430 (copy-recursively "docs" doc)
431 #t)))
432 (add-after 'install 'create-executable
433 (lambda* (#:key outputs inputs #:allow-other-keys)
434 (let* ((python (string-append (assoc-ref inputs "python")
435 "/bin/python"))
436 (out (assoc-ref outputs "out"))
437 (bin (string-append out "/bin"))
438 (executable (string-append bin "/childsplay")))
439 (mkdir-p bin)
440 (call-with-output-file executable
441 (lambda (file)
442 (format file
443 "~a ~a"
444 python
445 (string-append out "/share/childsplay/childsplay.py"))))
446 (chmod executable #o555)
447 #t)))
448 (add-after 'install 'create-desktop-file
449 (lambda* (#:key outputs #:allow-other-keys)
450 (let* ((out (assoc-ref outputs "out"))
451 (applications (string-append out "/share/applications")))
452 (mkdir-p applications)
453 (call-with-output-file
454 (string-append applications "/childsplay.desktop")
455 (lambda (file)
456 (format file
457 "[Desktop Entry]~@
458 Name=Childsplay~@
459 Comment=Suite of educational games for young children~@
460 Comment[ca]=Conjunt de jocs educatius per a xiquets~@
461 Comment[es]=Conjunto de juegos educativos para niños~@
462 Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
463 Exec=~a/bin/childsplay.py~@
464 Terminal=false~@
465 Icon=logo_cp.svg~@
466 Type=Application~@
467 Categories=Application;Game;Education;KidsGame;~@
468 Keywords=suite;children;games;young;educational;~%"
469 out)))
470 #t))))))
471 (inputs
472 `(("font-dejavu" ,font-dejavu)
473 ("pygame" ,python2-pygame)
474 ("sqlalchemy" ,python2-sqlalchemy)))
475 (synopsis "Suite of educational games for young children")
476 (description "Childsplay is a collection of educational activities
477for young children. Childsplay can be used at home, kindergartens and
478pre-schools. Childsplay is a fun and safe way to let young children
479use the computer and at the same time teach them a little math,
480letters of the alphabet, spelling, eye-hand coordination, etc.")
481 (home-page "http://www.schoolsplay.org")
482 (license license:gpl3+)))