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