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