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 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages education)
25 #:use-module (ice-9 regex)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages curl)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages fonts)
33 #:use-module (gnu packages freedesktop)
34 #:use-module (gnu packages game-development)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages javascript)
40 #:use-module (gnu packages kde)
41 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages qt)
46 #:use-module (gnu packages sdl)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages texinfo)
49 #:use-module (gnu packages tls)
50 #:use-module (gnu packages xorg)
51 #:use-module (gnu packages xml)
52 #:use-module ((guix licenses) #:prefix license:)
53 #:use-module (guix packages)
54 #:use-module (guix download)
55 #:use-module (guix git-download)
56 #:use-module (guix svn-download)
57 #:use-module (guix utils)
58 #:use-module (guix build-system cmake)
59 #:use-module (guix build-system gnu)
60 #:use-module (guix build-system python)
61 #:use-module (guix build-system qt)
62 #:use-module (guix build-system trivial)
63 #:use-module (srfi srfi-1))
65 (define-public gcompris
71 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
75 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
76 (build-system gnu-build-system)
79 ;; Use SDL mixer because otherwise GCompris would need an old version
81 (list "--enable-sdlmixer"
82 "LDFLAGS=-lgmodule-2.0")
84 (modify-phases %standard-phases
85 (add-after 'set-paths 'set-sdl-paths
86 (lambda* (#:key inputs #:allow-other-keys)
88 (string-append (assoc-ref inputs "sdl-mixer")
90 (or (getenv "CPATH") "")))
96 ("sdl-mixer" ,sdl-mixer)
101 `(("intltool" ,intltool)
103 ("texi2html" ,texi2html)
104 ("glib:bin" ,glib "bin")
105 ("pkg-config" ,pkg-config)))
106 (home-page "http://gcompris.net")
107 (synopsis "Educational software suite")
108 (description "GCompris is an educational software suite comprising of
109 numerous activities for children aged 2 to 10. Some of the activities are
110 game orientated, but nonetheless still educational. Below you can find a list
111 of categories with some of the activities available in that category.
114 @item computer discovery: keyboard, mouse, different mouse gestures, ...
115 @item arithmetic: table memory, enumeration, double entry table, mirror image, ...
116 @item science: the canal lock, the water cycle, the submarine, electric simulation ...
117 @item geography: place the country on the map
118 @item games: chess, memory, connect 4, oware, sudoku ...
119 @item reading: reading practice
120 @item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
123 (license license:gpl3+)))
125 (define-public gcompris-qt
133 "https://gcompris.net/download/qt/src/gcompris-qt-"
136 (base32 "06483il59l46ny2w771sg45dgzjwv1ph7vidzzbj0wb8wbk2rg52"))))
137 (build-system cmake-build-system)
140 (modify-phases %standard-phases
141 (add-before 'check 'start-xorg-server
142 (lambda* (#:key inputs #:allow-other-keys)
143 ;; The test suite requires a running X server.
144 (system (string-append (assoc-ref inputs "xorg-server")
146 (setenv "DISPLAY" ":1")
148 (add-after 'install 'wrap-executable
149 (lambda* (#:key inputs outputs #:allow-other-keys)
150 (let ((out (assoc-ref outputs "out")))
151 (wrap-program (string-append out "/bin/gcompris-qt")
152 `("QT_PLUGIN_PATH" ":" prefix
153 ,(map (lambda (label)
154 (string-append (assoc-ref inputs label)
156 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
157 `("QML2_IMPORT_PATH" ":" prefix
158 ,(map (lambda (label)
159 (string-append (assoc-ref inputs label)
161 '("qtdeclarative" "qtgraphicaleffects"
162 "qtmultimedia" "qtquickcontrols"))))
164 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
165 "-DBUILD_TESTING=TRUE")))
167 `(("extra-cmake-modules" ,extra-cmake-modules)
168 ("gettext" ,gettext-minimal)
171 ("xorg-server" ,xorg-server-for-tests)))
173 `(("openssl" ,openssl)
174 ("python-2" ,python-2)
176 ("qtdeclarative" ,qtdeclarative)
177 ("qtgraphicaleffects" ,qtgraphicaleffects)
178 ("qtmultimedia" ,qtmultimedia)
179 ("qtquickcontrols" ,qtquickcontrols)
180 ("qtsensors" ,qtsensors)
182 ("qtxmlpatterns" ,qtxmlpatterns)))
183 (home-page "https://gcompris.net/index-en.html")
184 (synopsis "Educational games for small children")
186 "Gcompris offers a large collection of educational games for small
187 children, designed to be a unified interface to integrate more educational
188 games. Language-oriented games contain vocabulary, sounds, and voices for
189 many different languages.
190 Currently available boards include:
192 @item learning how to use a mouse and keyboard
193 @item learning simple arithmetic
194 @item learning how to read an analog clock
195 @item recognize letters after hearing their names
196 @item reading practice
197 @item small games (memory games, jigsaw puzzles, ...)
199 (license license:gpl3+)))
201 (define-public tipp10
207 ;; guix download is not able to handle the download links on the
208 ;; home-page, which use '<meta http-equiv="refresh" …>'
209 (uri (string-append "mirror://debian/pool/main/"
210 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
213 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
214 (patches (search-patches "tipp10-fix-compiling.patch"
215 "tipp10-remove-license-code.patch"))))
216 (build-system cmake-build-system)
218 `(#:tests? #f ; packages has no tests
220 (modify-phases %standard-phases
221 (add-after 'unpack 'disable-new-version-check
223 ;; Make new version check to default to false.
224 ;; TODO: Remove the checkbox from the dialog and the check itself
225 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
226 (("settings.value(\"check_new_version\", true)")
227 "settings.value(\"check_new_version\", false)"))
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 ;; Make program honor $PREFIX
233 (substitute* "tipp10.pro"
234 (("\\.path = /usr/") (string-append ".path = " out "/")))
235 (substitute* "def/defines.h"
236 (("\"/usr/") (string-append "\"" out "/")))
238 (invoke "qmake")))))))
242 (home-page "https://www.tipp10.com/")
243 (synopsis "Touch typing tutor")
244 (description "Tipp10 is a touch typing tutor. The ingenious thing about
245 the software is its intelligence feature: characters that are mistyped are
246 repeated more frequently. Beginners will find their way around right away so
247 they can start practicing without a hitch.
249 Useful support functions and an extensive progress tracker, topical lessons
250 and the ability to create your own practice lessons make learning to type
252 (license license:gpl2)))
262 (url "https://github.com/jmoenig/Snap.git")
263 (commit (string-append "v" version))))
264 (file-name (git-file-name name version))
267 "05m3x8yc9a7x9hfkrz2bm3yqkc63cdb8v3yznkjqq04sfx5dfd04"))))
268 (build-system trivial-build-system)
270 `(#:modules ((guix build utils))
273 (use-modules (guix build utils))
274 (let* ((source (assoc-ref %build-inputs "source"))
275 (out (assoc-ref %outputs "out"))
276 (share (string-append out "/share/snap")))
277 (copy-recursively source share)
278 ;; Replace the sole minified file in the package.
279 (with-directory-excursion (string-append share "/src")
280 (delete-file "FileSaver.min.js")
281 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
282 "/share/javascript/FileSaver.min.js")
284 ;; Create a "snap" executable.
285 (let* ((bin (string-append out "/bin"))
286 (script (string-append bin "/snap"))
287 (snap (string-append share "/snap.html"))
288 (bash (string-append (assoc-ref %build-inputs "bash")
290 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
293 (call-with-output-file script
295 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
296 (chmod script #o555)))
299 `(("bash" ,bash-minimal)
300 ("js-filesaver" ,js-filesaver)
301 ("xdg-utils" ,xdg-utils)))
302 (home-page "https://snap.berkeley.edu")
303 (synopsis "Visual, blocks based programming language")
304 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
305 programming language. It is an extended reimplementation of Scratch (a
306 project of the Lifelong Kindergarten Group at the MIT Media Lab) that
307 allows you to Build Your Own Blocks. It also features first class
308 lists, first class procedures, and continuations. These added
309 capabilities make it suitable for a serious introduction to computer
310 science for high school or college students.
312 This package provides a @command{snap} executable calling @command{xdg-open}
313 to open the application in a web browser, for offline usage.")
314 (license license:agpl3+)))
316 (define-public toutenclic
323 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
324 "ToutEnClic-" version "-src.zip"))
326 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
327 (build-system python-build-system)
329 `(#:tests? #f ; no tests
331 (modify-phases %standard-phases
334 (lambda* (#:key outputs #:allow-other-keys)
335 (let* ((out (assoc-ref outputs "out"))
336 (share (string-append out "/share/toutenclic"))
337 (pixmaps (string-append out "/share/pixmaps"))
338 (doc (string-append out "share/doc/" ,name "-" ,version))
339 (bin (string-append out "/bin"))
340 (executable "toutenclic"))
342 (install-file "toutenclic.png" pixmaps)
343 ;; Move files into "share/" directory.
344 (for-each (lambda (f) (install-file f share))
345 (find-files "." "\\.py$"))
346 ;; Install documentation.
347 (install-file "ToutEnClic.pdf" doc)
348 ;; Create executable in "bin/".
350 (with-directory-excursion bin
351 (symlink (string-append share "/" executable ".py")
354 (add-after 'install 'create-desktop-file
355 (lambda* (#:key outputs #:allow-other-keys)
356 (let* ((out (assoc-ref outputs "out"))
357 (applications (string-append out "/share/applications")))
358 (mkdir-p applications)
359 (call-with-output-file
360 (string-append applications "/toutenclic.desktop")
365 Comment=For schooling without difference~@
366 Exec=~a/bin/toutenclic~@
367 TryExec=~@*~a/bin/toutenclic~@
373 (inputs `(("python-pyqt" ,python-pyqt)))
374 (synopsis "School tools for physically disabled children")
375 (description "ToutEnClic is intended to facilitate the schooling
376 of physically disabled children in ordinary schools. It is both
377 a multi-page virtual exercise book and a kit including pencil,
378 scissors, glue, ruler, compass, protractor and square. A virtual
379 keyboard is also available if the child does not have any other
380 specialized device.")
381 (home-page "https://bipede.fr/contrib/")
382 (license license:gpl3)))
384 (define-public childsplay
391 "mirror://sourceforge/schoolsplay/"
392 "childsplay-" version ".tgz"))
395 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
396 (build-system python-build-system)
401 (modify-phases %standard-phases
402 (add-after 'unpack 'unbundle-dejavu-font
403 (lambda* (#:key inputs #:allow-other-keys)
405 (string-append (assoc-ref inputs "font-dejavu")
406 "/share/fonts/truetype"))
408 (string-append dejavu-dir
409 "/DejaVuSansCondensed-Bold.ttf")))
410 (substitute* "SPConstants.py"
411 (("^(TTF(BOLD)? = ).*" _ prefix)
412 (string-append prefix "'" dejavu-font "'\n")))
413 (for-each (lambda (f) (delete-file f))
414 (find-files "lib/SPData" "DejaVu"))
418 (lambda* (#:key outputs #:allow-other-keys)
419 (let* ((out (assoc-ref outputs "out"))
420 (pixmaps (string-append out "/share/pixmaps"))
421 (share (string-append out "/share/childsplay"))
422 (doc (string-append out "/share/doc/" ,name "-",version)))
424 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
427 (for-each (lambda (f)
428 (copy-recursively f (string-append share "/" f)))
429 '("alphabet-sounds" "lib" "locale" "SPWidgets"))
430 (for-each (lambda (f) (install-file f share))
431 (find-files "." "\\.(py|dev|db)$"))
432 ;; Install documentation.
434 (copy-recursively "docs" doc)
436 (add-after 'install 'create-executable
437 (lambda* (#:key outputs inputs #:allow-other-keys)
438 (let* ((python (string-append (assoc-ref inputs "python")
440 (out (assoc-ref outputs "out"))
441 (bin (string-append out "/bin"))
442 (executable (string-append bin "/childsplay")))
444 (call-with-output-file executable
449 (string-append out "/share/childsplay/childsplay.py"))))
450 (chmod executable #o555)
452 (add-after 'install 'create-desktop-file
453 (lambda* (#:key outputs #:allow-other-keys)
454 (let* ((out (assoc-ref outputs "out"))
455 (applications (string-append out "/share/applications")))
456 (mkdir-p applications)
457 (call-with-output-file
458 (string-append applications "/childsplay.desktop")
463 Comment=Suite of educational games for young children~@
464 Comment[ca]=Conjunt de jocs educatius per a xiquets~@
465 Comment[es]=Conjunto de juegos educativos para niños~@
466 Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
467 Exec=~a/bin/childsplay.py~@
471 Categories=Application;Game;Education;KidsGame;~@
472 Keywords=suite;children;games;young;educational;~%"
476 `(("font-dejavu" ,font-dejavu)
477 ("pygame" ,python2-pygame)
478 ("sqlalchemy" ,python2-sqlalchemy)))
479 (synopsis "Suite of educational games for young children")
480 (description "Childsplay is a collection of educational activities
481 for young children. Childsplay can be used at home, kindergartens and
482 pre-schools. Childsplay is a fun and safe way to let young children
483 use the computer and at the same time teach them a little math,
484 letters of the alphabet, spelling, eye-hand coordination, etc.")
485 (home-page "http://www.schoolsplay.org")
486 (license license:gpl3+)))
494 (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
495 "fet-" version ".tar.bz2"))
498 "1dzlbhp42dxdxbcrjwrjl4kj65cibxgjqc3ir1w78yprikihdxca"))))
499 (build-system gnu-build-system)
502 (modify-phases %standard-phases
503 (add-after 'unpack 'fix-hardcoded-directories
504 (lambda* (#:key outputs #:allow-other-keys)
505 (substitute* (list "fet.pro"
508 "src/interface/fet.cpp")
509 (("/usr") (assoc-ref outputs "out")))
512 (lambda _ (invoke "qmake" "fet.pro"))))))
514 `(("qtbase" ,qtbase)))
515 (home-page "https://www.lalescu.ro/liviu/fet/")
516 (synopsis "Timetabling software")
517 (description "FET is a program for automatically scheduling the
518 timetable of a school, high-school or university. It uses a fast and
519 efficient timetabling algorithm.
521 Usually, FET is able to solve a complicated timetable in maximum 5-20
522 minutes. For simpler timetables, it may take a shorter time, under
523 5 minutes (in some cases, a matter of seconds). For extremely
524 difficult timetables, it may take a longer time, a matter of hours.")
525 (license license:agpl3+)))
527 (define-public klavaro
534 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
538 "12gml7h45b1w9s318h0d5wxw92h7pgajn2kh57j0ak9saq0yb0wr"))))
539 (build-system gnu-build-system)
541 `(("intltool" ,intltool)
542 ("pkg-config" ,pkg-config)))
548 (home-page "https://klavaro.sourceforge.io/en/index.html")
549 (synopsis "Touch typing tutor")
551 "Klavaro is a simple tutor to teach correct typing, almost independently of
552 language and very flexible regarding to new or unknown keyboard layouts.")
553 (license license:gpl3+)))
555 (define-public ktouch
562 (uri (string-append "mirror://kde/stable/applications/"
563 version "/src/ktouch-" version ".tar.xz"))
566 "0dqxb3xsjc2rwc9779l5fnr4crhq51bc8ln4azbgnnkzldvq6a4a"))))
567 (build-system qt-build-system)
570 (modify-phases %standard-phases
571 (add-after 'configure 'patch-makefiles
572 (lambda* (#:key inputs #:allow-other-keys)
573 (let ((qtdec (assoc-ref inputs "qtdeclarative")))
574 (substitute* '("src/CMakeFiles/ktouch_autogen.dir/build.make"
575 "src/CMakeFiles/ktouch.dir/build.make")
576 (("/gnu/store/.*qmlcachegen")
577 (string-append qtdec "/bin/qmlcachegen"))))
580 `(("extra-cmake-modules" ,extra-cmake-modules)
581 ("kdoctools" ,kdoctools)
582 ("pkg-config" ,pkg-config)))
584 `(("kcmutils" ,kcmutils)
585 ("kcompletion" ,kcompletion)
587 ("kconfigwidgets" ,kconfigwidgets)
588 ("kcoreaddons" ,kcoreaddons)
589 ("kdeclarative" ,kdeclarative)
591 ("kiconthemes" ,kiconthemes)
592 ("kitemviews" ,kitemviews)
593 ("kqtquickcharts" ,kqtquickcharts)
594 ("ktextwidgets" ,ktextwidgets)
595 ("kwidgetsaddons" ,kwidgetsaddons)
596 ("kwindowsystem" ,kwindowsystem)
599 ("libxkbfile" ,libxkbfile)
601 ("qtdeclarative" ,qtdeclarative)
602 ("qtgraphicaleffects" ,qtgraphicaleffects)
603 ("qtquickcontrols2" ,qtquickcontrols2)
604 ("qtx11extras" ,qtx11extras)
605 ("qtxmlpatterns" ,qtxmlpatterns)))
606 (home-page "https://edu.kde.org/ktouch/")
607 (synopsis "Touch typing tutor")
609 "KTouch is an aid for learning how to type with speed and accuracy. It
610 provides a sample text to type and indicates which fingers should be used for
611 each key. A collection of lessons are included for a wide range of different
612 languages and keyboard layouts, and typing statistics are used to dynamically
613 adjust the level of difficulty.")
614 (license license:gpl2)))