gnu: webkitgtk: Update to 2.28.2.
[jackhill/guix/guix.git] / gnu / packages / education.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
3 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
5 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
8 ;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
9 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages education)
27 #:use-module (ice-9 regex)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages audio)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages bash)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages databases)
35 #:use-module (gnu packages flex)
36 #:use-module (gnu packages fonts)
37 #:use-module (gnu packages freedesktop)
38 #:use-module (gnu packages game-development)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages javascript)
45 #:use-module (gnu packages kde)
46 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
47 #:use-module (gnu packages mp3)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-web)
53 #:use-module (gnu packages python-xyz)
54 #:use-module (gnu packages qt)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages sdl)
57 #:use-module (gnu packages sqlite)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages video)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages xml)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (guix packages)
65 #:use-module (guix download)
66 #:use-module (guix git-download)
67 #:use-module (guix svn-download)
68 #:use-module (guix utils)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system python)
72 #:use-module (guix build-system qt)
73 #:use-module (guix build-system trivial)
74 #:use-module (srfi srfi-1))
75
76 (define-public gcompris
77 (package
78 (name "gcompris")
79 (version "17.05")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
83 version ".tar.bz2"))
84 (sha256
85 (base32
86 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
87 (build-system gnu-build-system)
88 (arguments
89 `(#:configure-flags
90 ;; Use SDL mixer because otherwise GCompris would need an old version
91 ;; of Gstreamer.
92 (list "--enable-sdlmixer"
93 "LDFLAGS=-lgmodule-2.0")
94 #:phases
95 (modify-phases %standard-phases
96 (add-after 'set-paths 'set-sdl-paths
97 (lambda* (#:key inputs #:allow-other-keys)
98 (setenv "CPATH"
99 (string-append (assoc-ref inputs "sdl-mixer")
100 "/include/SDL:"
101 (or (getenv "CPATH") "")))
102 #t)))))
103 (inputs
104 `(("gtk+" ,gtk+-2)
105 ("librsvg" ,librsvg)
106 ("libxml2" ,libxml2)
107 ("sdl-mixer" ,sdl-mixer)
108 ("sqlite" ,sqlite)
109 ("glib:bin" ,glib)
110 ("python" ,python)))
111 (native-inputs
112 `(("intltool" ,intltool)
113 ("texinfo" ,texinfo)
114 ("texi2html" ,texi2html)
115 ("glib:bin" ,glib "bin")
116 ("pkg-config" ,pkg-config)))
117 (home-page "http://gcompris.net")
118 (synopsis "Educational software suite")
119 (description "GCompris is an educational software suite comprising of
120 numerous activities for children aged 2 to 10. Some of the activities are
121 game orientated, but nonetheless still educational. Below you can find a list
122 of categories with some of the activities available in that category.
123
124 @enumerate
125 @item computer discovery: keyboard, mouse, different mouse gestures, ...
126 @item arithmetic: table memory, enumeration, double entry table, mirror image, ...
127 @item science: the canal lock, the water cycle, the submarine, electric simulation ...
128 @item geography: place the country on the map
129 @item games: chess, memory, connect 4, oware, sudoku ...
130 @item reading: reading practice
131 @item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
132 @end enumerate
133 ")
134 (license license:gpl3+)))
135
136 (define-public gcompris-qt
137 (package
138 (name "gcompris-qt")
139 (version "0.98")
140 (source
141 (origin
142 (method url-fetch)
143 (uri (string-append
144 "https://gcompris.net/download/qt/src/gcompris-qt-"
145 version ".tar.xz"))
146 (sha256
147 (base32 "1jmjykn0lpk0v6hs2flmch8v4da5bgxl891nav7szxw9l7aqnf4y"))))
148 (build-system cmake-build-system)
149 (arguments
150 `(#:phases
151 (modify-phases %standard-phases
152 (add-after 'unpack 'disable-failing-test
153 (lambda _
154 (substitute* "tests/core/CMakeLists.txt"
155 (("DownloadManagerTest\\.cpp") "#"))
156 #t))
157 (add-before 'check 'start-xorg-server
158 (lambda* (#:key inputs #:allow-other-keys)
159 ;; The test suite requires a running X server.
160 (system (string-append (assoc-ref inputs "xorg-server")
161 "/bin/Xvfb :1 &"))
162 (setenv "DISPLAY" ":1")
163 #t))
164 (add-after 'install 'wrap-executable
165 (lambda* (#:key inputs outputs #:allow-other-keys)
166 (let ((out (assoc-ref outputs "out")))
167 (wrap-program (string-append out "/bin/gcompris-qt")
168 `("QT_PLUGIN_PATH" ":" prefix
169 ,(map (lambda (label)
170 (string-append (assoc-ref inputs label)
171 "/lib/qt5/plugins"))
172 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
173 `("QML2_IMPORT_PATH" ":" prefix
174 ,(map (lambda (label)
175 (string-append (assoc-ref inputs label)
176 "/lib/qt5/qml"))
177 '("qtdeclarative" "qtgraphicaleffects"
178 "qtmultimedia" "qtquickcontrols"))))
179 #t))))
180 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
181 "-DBUILD_TESTING=TRUE")))
182 (native-inputs
183 `(("extra-cmake-modules" ,extra-cmake-modules)
184 ("gettext" ,gettext-minimal)
185 ("kdoctools" ,kdoctools)
186 ("perl" ,perl)
187 ("qttools" ,qttools)
188 ("xorg-server" ,xorg-server-for-tests)))
189 (inputs
190 `(("openssl" ,openssl)
191 ("python-2" ,python-2)
192 ("qtbase" ,qtbase)
193 ("qtdeclarative" ,qtdeclarative)
194 ("qtgraphicaleffects" ,qtgraphicaleffects)
195 ("qtmultimedia" ,qtmultimedia)
196 ("qtquickcontrols" ,qtquickcontrols)
197 ("qtsensors" ,qtsensors)
198 ("qtsvg" ,qtsvg)
199 ("qtxmlpatterns" ,qtxmlpatterns)))
200 (home-page "https://gcompris.net/index-en.html")
201 (synopsis "Educational games for small children")
202 (description
203 "Gcompris offers a large collection of educational games for small
204 children, designed to be a unified interface to integrate more educational
205 games. Language-oriented games contain vocabulary, sounds, and voices for
206 many different languages.
207 Currently available boards include:
208 @enumerate
209 @item learning how to use a mouse and keyboard
210 @item learning simple arithmetic
211 @item learning how to read an analog clock
212 @item recognize letters after hearing their names
213 @item reading practice
214 @item small games (memory games, jigsaw puzzles, ...)
215 @end enumerate\n")
216 (license license:gpl3+)))
217
218 (define-public tipp10
219 (package
220 (name "tipp10")
221 (version "2.1.0")
222 (source (origin
223 (method url-fetch)
224 ;; guix download is not able to handle the download links on the
225 ;; home-page, which use '<meta http-equiv="refresh" …>'
226 (uri (string-append "mirror://debian/pool/main/"
227 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
228 (sha256
229 (base32
230 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
231 (patches (search-patches "tipp10-fix-compiling.patch"
232 "tipp10-remove-license-code.patch"))))
233 (build-system cmake-build-system)
234 (arguments
235 `(#:tests? #f ; packages has no tests
236 #:phases
237 (modify-phases %standard-phases
238 (add-after 'unpack 'disable-new-version-check
239 (lambda _
240 ;; Make new version check to default to false.
241 ;; TODO: Remove the checkbox from the dialog and the check itself
242 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
243 (("settings.value(\"check_new_version\", true)")
244 "settings.value(\"check_new_version\", false)"))
245 #t))
246 (replace 'configure
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out")))
249 ;; Make program honor $PREFIX
250 (substitute* "tipp10.pro"
251 (("\\.path = /usr/") (string-append ".path = " out "/")))
252 (substitute* "def/defines.h"
253 (("\"/usr/") (string-append "\"" out "/")))
254 ;; Recreate Makefile
255 (invoke "qmake")))))))
256 (inputs
257 `(("qt4" ,qt-4)
258 ("sqlite" ,sqlite)))
259 (home-page "https://www.tipp10.com/")
260 (synopsis "Touch typing tutor")
261 (description "Tipp10 is a touch typing tutor. The ingenious thing about
262 the software is its intelligence feature: characters that are mistyped are
263 repeated more frequently. Beginners will find their way around right away so
264 they can start practicing without a hitch.
265
266 Useful support functions and an extensive progress tracker, topical lessons
267 and the ability to create your own practice lessons make learning to type
268 easy.")
269 (license license:gpl2)))
270
271 (define-public snap
272 (package
273 (name "snap")
274 (version "5.4.5")
275 (source
276 (origin
277 (method git-fetch)
278 (uri (git-reference
279 (url "https://github.com/jmoenig/Snap.git")
280 (commit (string-append "v" version))))
281 (file-name (git-file-name name version))
282 (sha256
283 (base32 "1z6dbcsgvxxs40p23qysfsk4vzpg8jlrr5pqfnjf8q3kpz1xvzxf"))))
284 (build-system trivial-build-system)
285 (arguments
286 `(#:modules ((guix build utils))
287 #:builder
288 (begin
289 (use-modules (guix build utils))
290 (let* ((source (assoc-ref %build-inputs "source"))
291 (out (assoc-ref %outputs "out"))
292 (share (string-append out "/share/snap")))
293 (copy-recursively source share)
294 ;; Replace the sole minified file in the package.
295 (with-directory-excursion (string-append share "/src")
296 (delete-file "FileSaver.min.js")
297 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
298 "/share/javascript/FileSaver.min.js")
299 "FileSaver.min.js"))
300 ;; Create a "snap" executable.
301 (let* ((bin (string-append out "/bin"))
302 (script (string-append bin "/snap"))
303 (snap (string-append share "/snap.html"))
304 (bash (string-append (assoc-ref %build-inputs "bash")
305 "/bin/sh"))
306 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
307 "/bin/xdg-open")))
308 (mkdir-p bin)
309 (call-with-output-file script
310 (lambda (port)
311 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
312 (chmod script #o555)))
313 #t)))
314 (inputs
315 `(("bash" ,bash-minimal)
316 ("js-filesaver" ,js-filesaver)
317 ("xdg-utils" ,xdg-utils)))
318 (home-page "https://snap.berkeley.edu")
319 (synopsis "Visual, blocks based programming language")
320 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
321 programming language. It is an extended reimplementation of Scratch (a
322 project of the Lifelong Kindergarten Group at the MIT Media Lab) that
323 allows you to Build Your Own Blocks. It also features first class
324 lists, first class procedures, and continuations. These added
325 capabilities make it suitable for a serious introduction to computer
326 science for high school or college students.
327
328 This package provides a @command{snap} executable calling @command{xdg-open}
329 to open the application in a web browser, for offline usage.")
330 (license license:agpl3+)))
331
332 (define-public toutenclic
333 (package
334 (name "toutenclic")
335 (version "7.00")
336 (source
337 (origin
338 (method url-fetch)
339 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
340 "ToutEnClic-" version "-src.zip"))
341 (sha256
342 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
343 (build-system python-build-system)
344 (arguments
345 `(#:tests? #f ; no tests
346 #:phases
347 (modify-phases %standard-phases
348 (delete 'build)
349 (replace 'install
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let* ((out (assoc-ref outputs "out"))
352 (share (string-append out "/share/toutenclic"))
353 (pixmaps (string-append out "/share/pixmaps"))
354 (doc (string-append out "share/doc/" ,name "-" ,version))
355 (bin (string-append out "/bin"))
356 (executable "toutenclic"))
357 ;; Install icon.
358 (install-file "toutenclic.png" pixmaps)
359 ;; Move files into "share/" directory.
360 (for-each (lambda (f) (install-file f share))
361 (find-files "." "\\.py$"))
362 ;; Install documentation.
363 (install-file "ToutEnClic.pdf" doc)
364 ;; Create executable in "bin/".
365 (mkdir-p bin)
366 (with-directory-excursion bin
367 (symlink (string-append share "/" executable ".py")
368 executable)))
369 #t))
370 (add-after 'install 'create-desktop-file
371 (lambda* (#:key outputs #:allow-other-keys)
372 (let* ((out (assoc-ref outputs "out"))
373 (applications (string-append out "/share/applications")))
374 (mkdir-p applications)
375 (call-with-output-file
376 (string-append applications "/toutenclic.desktop")
377 (lambda (file)
378 (format file
379 "[Desktop Entry]~@
380 Name=ToutEnClic~@
381 Comment=For schooling without difference~@
382 Exec=~a/bin/toutenclic~@
383 TryExec=~@*~a/bin/toutenclic~@
384 Terminal=false~@
385 Icon=toutenclic~@
386 Type=Application~%"
387 out)))
388 #t))))))
389 (inputs `(("python-pyqt" ,python-pyqt)))
390 (synopsis "School tools for physically disabled children")
391 (description "ToutEnClic is intended to facilitate the schooling
392 of physically disabled children in ordinary schools. It is both
393 a multi-page virtual exercise book and a kit including pencil,
394 scissors, glue, ruler, compass, protractor and square. A virtual
395 keyboard is also available if the child does not have any other
396 specialized device.")
397 (home-page "https://bipede.fr/contrib/")
398 (license license:gpl3)))
399
400 (define-public childsplay
401 (package
402 (name "childsplay")
403 (version "3.4")
404 (source (origin
405 (method url-fetch)
406 (uri (string-append
407 "mirror://sourceforge/schoolsplay/"
408 "childsplay-" version ".tgz"))
409 (sha256
410 (base32
411 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
412 (build-system python-build-system)
413 (arguments
414 `(#:python ,python-2
415 #:tests? #f
416 #:phases
417 (modify-phases %standard-phases
418 (add-after 'unpack 'unbundle-dejavu-font
419 (lambda* (#:key inputs #:allow-other-keys)
420 (let* ((dejavu-dir
421 (string-append (assoc-ref inputs "font-dejavu")
422 "/share/fonts/truetype"))
423 (dejavu-font
424 (string-append dejavu-dir
425 "/DejaVuSansCondensed-Bold.ttf")))
426 (substitute* "SPConstants.py"
427 (("^(TTF(BOLD)? = ).*" _ prefix)
428 (string-append prefix "'" dejavu-font "'\n")))
429 (for-each (lambda (f) (delete-file f))
430 (find-files "lib/SPData" "DejaVu"))
431 #t)))
432 (delete 'build)
433 (replace 'install
434 (lambda* (#:key outputs #:allow-other-keys)
435 (let* ((out (assoc-ref outputs "out"))
436 (pixmaps (string-append out "/share/pixmaps"))
437 (share (string-append out "/share/childsplay"))
438 (doc (string-append out "/share/doc/" ,name "-",version)))
439 ;; Install icon.
440 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
441 ;; Install data.
442 (mkdir-p share)
443 (for-each (lambda (f)
444 (copy-recursively f (string-append share "/" f)))
445 '("alphabet-sounds" "lib" "locale" "SPWidgets"))
446 (for-each (lambda (f) (install-file f share))
447 (find-files "." "\\.(py|dev|db)$"))
448 ;; Install documentation.
449 (mkdir-p doc)
450 (copy-recursively "docs" doc)
451 #t)))
452 (add-after 'install 'create-executable
453 (lambda* (#:key outputs inputs #:allow-other-keys)
454 (let* ((python (string-append (assoc-ref inputs "python")
455 "/bin/python"))
456 (out (assoc-ref outputs "out"))
457 (bin (string-append out "/bin"))
458 (executable (string-append bin "/childsplay")))
459 (mkdir-p bin)
460 (call-with-output-file executable
461 (lambda (file)
462 (format file
463 "~a ~a"
464 python
465 (string-append out "/share/childsplay/childsplay.py"))))
466 (chmod executable #o555)
467 #t)))
468 (add-after 'install 'create-desktop-file
469 (lambda* (#:key outputs #:allow-other-keys)
470 (let* ((out (assoc-ref outputs "out"))
471 (applications (string-append out "/share/applications")))
472 (mkdir-p applications)
473 (call-with-output-file
474 (string-append applications "/childsplay.desktop")
475 (lambda (file)
476 (format file
477 "[Desktop Entry]~@
478 Name=Childsplay~@
479 Comment=Suite of educational games for young children~@
480 Comment[ca]=Conjunt de jocs educatius per a xiquets~@
481 Comment[es]=Conjunto de juegos educativos para niños~@
482 Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
483 Exec=~a/bin/childsplay.py~@
484 Terminal=false~@
485 Icon=logo_cp.svg~@
486 Type=Application~@
487 Categories=Application;Game;Education;KidsGame;~@
488 Keywords=suite;children;games;young;educational;~%"
489 out)))
490 #t))))))
491 (inputs
492 `(("font-dejavu" ,font-dejavu)
493 ("pygame" ,python2-pygame)
494 ("sqlalchemy" ,python2-sqlalchemy)))
495 (synopsis "Suite of educational games for young children")
496 (description "Childsplay is a collection of educational activities
497 for young children. Childsplay can be used at home, kindergartens and
498 pre-schools. Childsplay is a fun and safe way to let young children
499 use the computer and at the same time teach them a little math,
500 letters of the alphabet, spelling, eye-hand coordination, etc.")
501 (home-page "http://www.schoolsplay.org")
502 (license license:gpl3+)))
503
504 (define-public omnitux
505 (package
506 (name "omnitux")
507 (version "1.2.1")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (string-append "mirror://sourceforge/omnitux/omnitux/"
512 "v" version "/omnitux-" version ".tar.bz2"))
513 (sha256
514 (base32 "1wmmmbzmxd0blhn00d4g91xwavnab143a31ca3i8hrqgzh6qz9w6"))
515 (modules '((guix build utils)))
516 (snippet
517 '(begin
518 ;; Remove pre-compiled .pyc files from source.
519 (for-each delete-file (find-files "bin" "\\.pyc$"))
520 #t))))
521 (build-system python-build-system)
522 (inputs
523 `(("python2-pygame" ,python2-pygame)
524 ("python2-pygtk" ,python2-pygtk)))
525 (arguments
526 `(#:tests? #f ;no test
527 #:python ,python-2
528 #:phases
529 (modify-phases %standard-phases
530 (delete 'build) ;no setup.py
531 (replace 'install
532 (lambda* (#:key outputs #:allow-other-keys)
533 (let* ((out (assoc-ref outputs "out"))
534 (share (string-append out "/share"))
535 (data (string-append share "/omnitux")))
536 ;; Install documentation.
537 (let ((doc (string-append share "/doc/" ,name "-" ,version)))
538 (for-each (lambda (f) (install-file f doc))
539 '("LICENSE.txt" "README.txt")))
540 ;; Install data.
541 (install-file "omnitux.sh" data)
542 (for-each (lambda (d)
543 (copy-recursively d (string-append data "/" d)))
544 '("bin" "data"))
545 ;; Install the launcher.
546 (let* ((bin (string-append out "/bin"))
547 (script (string-append bin "/omnitux"))
548 (bash (string-append (assoc-ref %build-inputs "bash")
549 "/bin/bash"))
550 (python (string-append (assoc-ref %build-inputs "python")
551 "/bin/python2")))
552 (mkdir-p bin)
553 (with-output-to-file script
554 (lambda ()
555 (format #t "#!~a~%" bash)
556 (format #t
557 "cd ~a; ~a menu.py~%"
558 (string-append data "/bin")
559 python)))
560 (chmod script #o755))
561 ;; Install icon and desktop file.
562 (let ((pixmaps (string-append share "/pixmaps")))
563 (install-file "data/default/icons/Omnitux_logo.svg" pixmaps))
564 (let ((apps (string-append out "/share/applications")))
565 (mkdir-p apps)
566 (with-output-to-file (string-append apps "/omnitux.desktop")
567 (lambda _
568 (format #t
569 "[Desktop Entry]~@
570 Name=Omnitux~@
571 GenericName=Omnitux
572 Comment=An educational game based on multimedia elements.~@
573 Comment[fr]=Un jeu ludo-éducatif basé sur des éléments multimédias.~@
574 Exec=~a/bin/omnitux~@
575 Type=Application~@
576 Categories=Game;Education;~@
577 Terminal=false~@
578 Icon=Omnitux_logo.svg~@"
579 out))))
580 #t))))))
581 (home-page "http://omnitux.sourceforge.net/")
582 (synopsis "Educational activities based on multimedia elements")
583 (description "The project aims to provide various educational
584 activities around multimedia elements (images, sounds, texts). Types
585 of activities include:
586 @itemize
587 @item associations,
588 @item items to place on a map or a schema,
589 @item counting activities,
590 @item puzzles,
591 @item card faces to remember,
592 @item find differences between two pictures,
593 @item ...
594 @end itemize
595
596 Activities are available in English, French, German, Polish,
597 Portuguese, Spanish and Italian.")
598 ;; Project's license is GPL3+, but multimedia elements are
599 ;; released under various licenses.
600 (license (list license:gpl3+
601 license:gpl2+
602 license:cc-by-sa2.0
603 license:cc-by-sa3.0
604 license:public-domain))))
605
606 (define-public fet
607 (package
608 (name "fet")
609 (version "5.44.0")
610 (source
611 (origin
612 (method url-fetch)
613 (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
614 "fet-" version ".tar.bz2"))
615 (sha256
616 (base32 "13q3b0g1zz885g15gir8fbalvix8sy42v1p429h0751490wq5c3h"))))
617 (build-system gnu-build-system)
618 (arguments
619 `(#:phases
620 (modify-phases %standard-phases
621 (add-after 'unpack 'fix-hardcoded-directories
622 (lambda* (#:key outputs #:allow-other-keys)
623 (substitute* (list "fet.pro"
624 "src/src.pro"
625 "src/src-cl.pro"
626 "src/interface/fet.cpp")
627 (("/usr") (assoc-ref outputs "out")))
628 #t))
629 (replace 'configure
630 (lambda _ (invoke "qmake" "fet.pro"))))))
631 (inputs
632 `(("qtbase" ,qtbase)))
633 (home-page "https://www.lalescu.ro/liviu/fet/")
634 (synopsis "Timetabling software")
635 (description "FET is a program for automatically scheduling the
636 timetable of a school, high-school or university. It uses a fast and
637 efficient timetabling algorithm.
638
639 Usually, FET is able to solve a complicated timetable in maximum 5-20
640 minutes. For simpler timetables, it may take a shorter time, under
641 5 minutes (in some cases, a matter of seconds). For extremely
642 difficult timetables, it may take a longer time, a matter of hours.")
643 (license license:agpl3+)))
644
645 (define-public klavaro
646 (package
647 (name "klavaro")
648 (version "3.09")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
653 version ".tar.bz2"))
654 (sha256
655 (base32
656 "12gml7h45b1w9s318h0d5wxw92h7pgajn2kh57j0ak9saq0yb0wr"))))
657 (build-system gnu-build-system)
658 (native-inputs
659 `(("intltool" ,intltool)
660 ("pkg-config" ,pkg-config)))
661 (inputs
662 `(("cairo" ,cairo)
663 ("curl" ,curl)
664 ("gtk+" ,gtk+)
665 ("pango" ,pango)))
666 (home-page "https://klavaro.sourceforge.io/en/index.html")
667 (synopsis "Touch typing tutor")
668 (description
669 "Klavaro is a simple tutor to teach correct typing, almost independently of
670 language and very flexible regarding to new or unknown keyboard layouts.")
671 (license license:gpl3+)))
672
673 (define-public ktouch
674 (package
675 (name "ktouch")
676 (version "19.08.3")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (string-append "mirror://kde/stable/applications/"
681 version "/src/ktouch-" version ".tar.xz"))
682 (sha256
683 (base32
684 "0dqxb3xsjc2rwc9779l5fnr4crhq51bc8ln4azbgnnkzldvq6a4a"))))
685 (build-system qt-build-system)
686 (arguments
687 `(#:phases
688 (modify-phases %standard-phases
689 (add-after 'configure 'patch-makefiles
690 (lambda* (#:key inputs #:allow-other-keys)
691 (let ((qtdec (assoc-ref inputs "qtdeclarative")))
692 (substitute* '("src/CMakeFiles/ktouch_autogen.dir/build.make"
693 "src/CMakeFiles/ktouch.dir/build.make")
694 (("/gnu/store/.*qmlcachegen")
695 (string-append qtdec "/bin/qmlcachegen"))))
696 #t)))))
697 (native-inputs
698 `(("extra-cmake-modules" ,extra-cmake-modules)
699 ("kdoctools" ,kdoctools)
700 ("pkg-config" ,pkg-config)))
701 (inputs
702 `(("kcmutils" ,kcmutils)
703 ("kcompletion" ,kcompletion)
704 ("kconfig" ,kconfig)
705 ("kconfigwidgets" ,kconfigwidgets)
706 ("kcoreaddons" ,kcoreaddons)
707 ("kdeclarative" ,kdeclarative)
708 ("ki18n" ,ki18n)
709 ("kiconthemes" ,kiconthemes)
710 ("kitemviews" ,kitemviews)
711 ("kqtquickcharts" ,kqtquickcharts)
712 ("ktextwidgets" ,ktextwidgets)
713 ("kwidgetsaddons" ,kwidgetsaddons)
714 ("kwindowsystem" ,kwindowsystem)
715 ("kxmlgui" ,kxmlgui)
716 ("libxcb" ,libxcb)
717 ("libxkbfile" ,libxkbfile)
718 ("qtbase" ,qtbase)
719 ("qtdeclarative" ,qtdeclarative)
720 ("qtgraphicaleffects" ,qtgraphicaleffects)
721 ("qtquickcontrols2" ,qtquickcontrols2)
722 ("qtx11extras" ,qtx11extras)
723 ("qtxmlpatterns" ,qtxmlpatterns)))
724 (home-page "https://edu.kde.org/ktouch/")
725 (synopsis "Touch typing tutor")
726 (description
727 "KTouch is an aid for learning how to type with speed and accuracy. It
728 provides a sample text to type and indicates which fingers should be used for
729 each key. A collection of lessons are included for a wide range of different
730 languages and keyboard layouts, and typing statistics are used to dynamically
731 adjust the level of difficulty.")
732 (license license:gpl2)))
733
734 (define-public anki
735 (package
736 (name "anki")
737 ;; Later versions have dependencies on npm packages not yet in Guix.
738 (version "2.1.16")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-"
743 version "-source.tgz"))
744 (sha256
745 (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
746 (patches (search-patches "anki-mpv-args.patch"))))
747 (build-system gnu-build-system)
748 (arguments
749 `(#:make-flags (list (string-append "PREFIX=" %output))
750 #:tests? #f ;no check target
751 #:modules ((guix build gnu-build-system)
752 (guix build utils)
753 (ice-9 match))
754 #:phases
755 (modify-phases %standard-phases
756 (delete 'configure) ;no configure script
757 (add-after 'install 'wrap
758 (lambda* (#:key inputs outputs #:allow-other-keys)
759 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
760 ;; List of paths to the site-packages directories of Python
761 ;; library inputs.
762 (site-packages
763 (map (lambda (pyinput)
764 (string-append
765 (cdr pyinput)
766 "/lib/python"
767 ;; Calculate the python version to avoid breaking
768 ;; with future 3.X releases.
769 ,(version-major+minor
770 (package-version python-wrapper))
771 "/site-packages"))
772 (filter (match-lambda
773 ((label . _)
774 (string-prefix? "python-" label)))
775 inputs)))
776 (qtwebengineprocess
777 (string-append (assoc-ref inputs "qtwebengine")
778 "/lib/qt5/libexec/QtWebEngineProcess")))
779 ;; The program fails to find the QtWebEngineProcess program, so
780 ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
781 ;; wrapped to avoid declaring Python libraries as propagated
782 ;; inputs.
783 (for-each (lambda (program)
784 (wrap-program program
785 `("QTWEBENGINEPROCESS_PATH" =
786 (,qtwebengineprocess))
787 `("PATH" prefix (,(string-append
788 (assoc-ref inputs "mpv")
789 "/bin")))
790 `("PYTHONPATH" = ,site-packages)))
791 (find-files bin ".")))
792 #t)))))
793 (native-inputs
794 `(("xdg-utils" ,xdg-utils)))
795 (inputs
796 `(("lame" ,lame)
797 ("mpv" ,mpv)
798 ("python" ,python-wrapper)
799 ("python-beautifulsoup4" ,python-beautifulsoup4)
800 ("python-decorator" ,python-decorator)
801 ("python-distro" ,python-distro)
802 ("python-jsonschema" ,python-jsonschema)
803 ("python-markdown" ,python-markdown)
804 ("python-pyaudio" ,python-pyaudio)
805 ;; `python-pyqtwebengine' must precede `python-pyqt' in PYTHONPATH.
806 ("python-pyqtwebengine" ,python-pyqtwebengine)
807 ("python-pyqt" ,python-pyqt)
808 ("python-requests" ,python-requests)
809 ("python-send2trash" ,python-send2trash)
810 ("python-sip" ,python-sip)
811 ;; `qtwebengine' is included in `pyqtwebengine', included here for easy
812 ;; wrapping.
813 ("qtwebengine" ,qtwebengine)))
814 (home-page "https://apps.ankiweb.net/")
815 (synopsis "Powerful, intelligent flash cards")
816 (description "Anki is a program which makes remembering things
817 easy. Because it's a lot more efficient than traditional study
818 methods, you can either greatly decrease your time spent studying, or
819 greatly increase the amount you learn.
820
821 Anyone who needs to remember things in their daily life can benefit
822 from Anki. Since it is content-agnostic and supports images, audio,
823 videos and scientific markup (via LaTeX), the possibilities are
824 endless. For example:
825 @itemize
826 @item Learning a language
827 @item Studying for medical and law exams
828 @item Memorizing people's names and faces
829 @item Brushing up on geography
830 @item Mastering long poems
831 @item Even practicing guitar chords!
832 @end itemize")
833 (license license:agpl3+)))
834
835 (define-public t4k-common
836 (package
837 (name "t4k-common")
838 (version "0.1.1")
839 (source
840 (origin
841 (method git-fetch)
842 (uri (git-reference
843 (url "https://github.com/tux4kids/t4kcommon")
844 (commit (string-append "upstream/" version))))
845 (file-name (git-file-name name version))
846 (sha256
847 (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
848 (patches
849 (search-patches "t4k-common-libpng16.patch"))))
850 (build-system cmake-build-system)
851 (arguments
852 `(#:tests? #f ;FIXME: cannot find how to run tests
853 #:phases
854 (modify-phases %standard-phases
855 (add-after 'set-paths 'set-sdl-paths
856 (lambda* (#:key inputs #:allow-other-keys)
857 (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
858 "/include/SDL:"
859 (or (getenv "CPATH") "")))))
860 (add-after 'unpack 'fix-andika-font-path
861 (lambda* (#:key inputs #:allow-other-keys)
862 (substitute* "src/t4k_sdl.c"
863 (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
864 (string-append (assoc-ref inputs "font-andika")
865 "/share/fonts/truetype")))
866 #t)))))
867 (native-inputs
868 `(("pkg-config" ,pkg-config)))
869 (inputs
870 `(("font-andika" ,font-sil-andika)
871 ("libpng" ,libpng)
872 ("librsvg" ,librsvg)
873 ("libxml2" ,libxml2)
874 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))))
875 (home-page "https://github.com/tux4kids/t4kcommon")
876 (synopsis "Library of code shared between TuxMath and TuxType")
877 (description "Tux4Kids-Common is a library of code shared between
878 TuxMath and TuxType.")
879 (license license:gpl3+)))
880
881 (define-public tuxmath
882 (package
883 (name "tuxmath")
884 (version "2.0.3")
885 (source
886 (origin
887 (method git-fetch)
888 (uri (git-reference
889 (url "https://github.com/tux4kids/tuxmath")
890 (commit (string-append "upstream/" version))))
891 (file-name (git-file-name name version))
892 (sha256
893 (base32 "1f1pz83w6d3mbik2h6xavfxmk5apxlngxbkh80x0m55lhniwkdxv"))
894 (modules '((guix build utils)))
895 ;; Unbundle fonts.
896 (snippet
897 `(begin
898 (for-each delete-file (find-files "data/fonts" "\\.ttf$"))
899 #t))))
900 (build-system gnu-build-system)
901 (arguments
902 `(#:tests? #f ;no test
903 #:phases
904 (modify-phases %standard-phases
905 (add-after 'set-paths 'set-sdl-paths
906 (lambda* (#:key inputs #:allow-other-keys)
907 (setenv "CPATH"
908 (string-append (assoc-ref inputs "sdl")
909 "/include/SDL:"
910 (or (getenv "CPATH") "")))
911 #t))
912 (add-after 'install 'install-desktop-file
913 (lambda* (#:key outputs #:allow-other-keys)
914 (let* ((out (assoc-ref outputs "out"))
915 (apps (string-append out "/share/applications"))
916 (pixmaps (string-append out "/share/pixmaps")))
917 (install-file "tuxmath.desktop" apps)
918 (for-each (lambda (f) (install-file f pixmaps))
919 (find-files "data/images/icons/"
920 "tuxmath\\.(png|ico|svg)$"))
921 #t))))))
922 (native-inputs
923 `(("pkg-config" ,pkg-config)))
924 (inputs
925 `(("librsvg" ,librsvg)
926 ("libxml2" ,libxml2)
927 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))
928 ("t4k-common" ,t4k-common)))
929 (home-page "https://github.com/tux4kids/tuxmath")
930 (synopsis "Educational math tutorial game")
931 (description "@emph{Tux, of Math Command} is an educational math
932 tutorial game starring Tux, the Linux penguin, in which you play the
933 part of Commander Tux, as he defends his friends from an attack of
934 math equations. Comets are crashing towards the friendly penguins in
935 their igloos, and you must destroy the comets by solving their
936 equations.
937
938 TuxMath also includes Factoroids, a game that gives practice in
939 factoring numbers and simplifying fractions, as well as zapping rocks
940 floating through space.")
941 (license license:gpl3+)))
942
943 (define-public mdk
944 (package
945 (name "mdk")
946 (version "1.2.10")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (string-append "mirror://gnu/mdk/v1.2.10/mdk-"
951 version ".tar.gz"))
952 (sha256
953 (base32
954 "1rwcq2b5vvv7318j92nxc5dayj27dpfhzc4rjiv4ccvsc0x35x5h"))))
955 (build-system gnu-build-system)
956 (arguments
957 `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
958 (native-inputs
959 `(("flex" ,flex)
960 ("pkg-config" ,pkg-config)
961 ("intltool" ,intltool)
962 ("ncurses" ,ncurses)))
963 (inputs
964 `(("readline" ,readline)
965 ("glib" ,glib)
966 ("gtk+" ,gtk+)
967 ("pango" ,pango)
968 ("libglade" ,libglade)))
969 (home-page "https://www.gnu.org/software/mdk/")
970 (synopsis "Virtual development environment for Knuth's MIX")
971 (description
972 "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
973 computer MIX and its assembly language MIXAL. MIX has a virtual CPU with
974 standard features such as registers, memory cells, an overflow toggle,
975 comparison flags, input-output devices, and a set of binary instructions.
976 The package includes a compiler, a virtual machine, a GUI for the virtual
977 machine, and more.")
978 (license license:gpl3+)))