1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
3 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
5 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
8 ;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
9 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
10 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages education)
28 #:use-module (ice-9 regex)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages audio)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages curl)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages fonts)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages game-development)
40 #:use-module (gnu packages gettext)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages golang)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages javascript)
47 #:use-module (gnu packages kde)
48 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
49 #:use-module (gnu packages mp3)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages python-web)
55 #:use-module (gnu packages python-xyz)
56 #:use-module (gnu packages qt)
57 #:use-module (gnu packages readline)
58 #:use-module (gnu packages sdl)
59 #:use-module (gnu packages sqlite)
60 #:use-module (gnu packages texinfo)
61 #:use-module (gnu packages tls)
62 #:use-module (gnu packages video)
63 #:use-module (gnu packages xorg)
64 #:use-module (gnu packages xml)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix git-download)
69 #:use-module (guix svn-download)
70 #:use-module (guix utils)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system go)
74 #:use-module (guix build-system python)
75 #:use-module (guix build-system qt)
76 #:use-module (guix build-system trivial)
77 #:use-module (srfi srfi-1))
79 (define-public gcompris
85 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
89 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
90 (build-system gnu-build-system)
93 ;; Use SDL mixer because otherwise GCompris would need an old version
95 (list "--enable-sdlmixer"
96 "LDFLAGS=-lgmodule-2.0")
98 (modify-phases %standard-phases
99 (add-after 'set-paths 'set-sdl-paths
100 (lambda* (#:key inputs #:allow-other-keys)
102 (string-append (assoc-ref inputs "sdl-mixer")
104 (or (getenv "CPATH") "")))
110 ("sdl-mixer" ,sdl-mixer)
115 `(("intltool" ,intltool)
117 ("texi2html" ,texi2html)
118 ("glib:bin" ,glib "bin")
119 ("pkg-config" ,pkg-config)))
120 (home-page "https://gcompris.net")
121 (synopsis "Educational software suite")
122 (description "GCompris is an educational software suite comprising of
123 numerous activities for children aged 2 to 10. Some of the activities are
124 game orientated, but nonetheless still educational. Below you can find a list
125 of categories with some of the activities available in that category.
128 @item computer discovery: keyboard, mouse, different mouse gestures, ...
129 @item arithmetic: table memory, enumeration, double entry table, mirror image, ...
130 @item science: the canal lock, the water cycle, the submarine, electric simulation ...
131 @item geography: place the country on the map
132 @item games: chess, memory, connect 4, oware, sudoku ...
133 @item reading: reading practice
134 @item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
137 (license license:gpl3+)))
139 (define-public gcompris-qt
147 "https://gcompris.net/download/qt/src/gcompris-qt-"
150 (base32 "1jmjykn0lpk0v6hs2flmch8v4da5bgxl891nav7szxw9l7aqnf4y"))))
151 (build-system cmake-build-system)
154 (modify-phases %standard-phases
155 (add-after 'unpack 'disable-failing-test
157 (substitute* "tests/core/CMakeLists.txt"
158 (("DownloadManagerTest\\.cpp") "#"))
160 (add-before 'check 'start-xorg-server
161 (lambda* (#:key inputs #:allow-other-keys)
162 ;; The test suite requires a running X server.
163 (system (string-append (assoc-ref inputs "xorg-server")
165 (setenv "DISPLAY" ":1")
167 (add-after 'install 'wrap-executable
168 (lambda* (#:key inputs outputs #:allow-other-keys)
169 (let ((out (assoc-ref outputs "out")))
170 (wrap-program (string-append out "/bin/gcompris-qt")
171 `("QT_PLUGIN_PATH" ":" prefix
172 ,(map (lambda (label)
173 (string-append (assoc-ref inputs label)
175 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
176 `("QML2_IMPORT_PATH" ":" prefix
177 ,(map (lambda (label)
178 (string-append (assoc-ref inputs label)
180 '("qtdeclarative" "qtgraphicaleffects"
181 "qtmultimedia" "qtquickcontrols"))))
183 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
184 "-DBUILD_TESTING=TRUE")))
186 `(("extra-cmake-modules" ,extra-cmake-modules)
187 ("gettext" ,gettext-minimal)
188 ("kdoctools" ,kdoctools)
191 ("xorg-server" ,xorg-server-for-tests)))
193 `(("openssl" ,openssl)
194 ("python-2" ,python-2)
196 ("qtdeclarative" ,qtdeclarative)
197 ("qtgraphicaleffects" ,qtgraphicaleffects)
198 ("qtmultimedia" ,qtmultimedia)
199 ("qtquickcontrols" ,qtquickcontrols)
200 ("qtsensors" ,qtsensors)
202 ("qtxmlpatterns" ,qtxmlpatterns)))
203 (home-page "https://gcompris.net/index-en.html")
204 (synopsis "Educational games for small children")
206 "Gcompris offers a large collection of educational games for small
207 children, designed to be a unified interface to integrate more educational
208 games. Language-oriented games contain vocabulary, sounds, and voices for
209 many different languages.
210 Currently available boards include:
212 @item learning how to use a mouse and keyboard
213 @item learning simple arithmetic
214 @item learning how to read an analog clock
215 @item recognize letters after hearing their names
216 @item reading practice
217 @item small games (memory games, jigsaw puzzles, ...)
219 (license license:gpl3+)))
221 (define-public tipp10
227 ;; guix download is not able to handle the download links on the
228 ;; home-page, which use '<meta http-equiv="refresh" …>'
229 (uri (string-append "mirror://debian/pool/main/"
230 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
233 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
234 (patches (search-patches "tipp10-fix-compiling.patch"
235 "tipp10-remove-license-code.patch"))))
236 (build-system cmake-build-system)
238 `(#:tests? #f ; packages has no tests
240 (modify-phases %standard-phases
241 (add-after 'unpack 'disable-new-version-check
243 ;; Make new version check to default to false.
244 ;; TODO: Remove the checkbox from the dialog and the check itself
245 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
246 (("settings.value(\"check_new_version\", true)")
247 "settings.value(\"check_new_version\", false)"))
250 (lambda* (#:key outputs #:allow-other-keys)
251 (let ((out (assoc-ref outputs "out")))
252 ;; Make program honor $PREFIX
253 (substitute* "tipp10.pro"
254 (("\\.path = /usr/") (string-append ".path = " out "/")))
255 (substitute* "def/defines.h"
256 (("\"/usr/") (string-append "\"" out "/")))
258 (invoke "qmake")))))))
262 (home-page "https://www.tipp10.com/")
263 (synopsis "Touch typing tutor")
264 (description "Tipp10 is a touch typing tutor. The ingenious thing about
265 the software is its intelligence feature: characters that are mistyped are
266 repeated more frequently. Beginners will find their way around right away so
267 they can start practicing without a hitch.
269 Useful support functions and an extensive progress tracker, topical lessons
270 and the ability to create your own practice lessons make learning to type
272 (license license:gpl2)))
282 (url "https://github.com/jmoenig/Snap")
283 (commit (string-append "v" version))))
284 (file-name (git-file-name name version))
286 (base32 "1j5hcnms12hpnl2ba7haf00l08rkpb5wpfsgax07p838q5dc7cam"))))
287 (build-system trivial-build-system)
289 `(#:modules ((guix build utils))
292 (use-modules (guix build utils))
293 (let* ((source (assoc-ref %build-inputs "source"))
294 (out (assoc-ref %outputs "out"))
295 (share (string-append out "/share/snap")))
296 (copy-recursively source share)
297 ;; Replace the sole minified file in the package.
298 (with-directory-excursion (string-append share "/src")
299 (delete-file "FileSaver.min.js")
300 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
301 "/share/javascript/FileSaver.min.js")
303 ;; Create a "snap" executable.
304 (let* ((bin (string-append out "/bin"))
305 (script (string-append bin "/snap"))
306 (snap (string-append share "/snap.html"))
307 (bash (string-append (assoc-ref %build-inputs "bash")
309 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
312 (call-with-output-file script
314 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
315 (chmod script #o555)))
318 `(("bash" ,bash-minimal)
319 ("js-filesaver" ,js-filesaver)
320 ("xdg-utils" ,xdg-utils)))
321 (home-page "https://snap.berkeley.edu")
322 (synopsis "Visual, blocks based programming language")
323 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
324 programming language. It is an extended reimplementation of Scratch (a
325 project of the Lifelong Kindergarten Group at the MIT Media Lab) that
326 allows you to Build Your Own Blocks. It also features first class
327 lists, first class procedures, and continuations. These added
328 capabilities make it suitable for a serious introduction to computer
329 science for high school or college students.
331 This package provides a @command{snap} executable calling @command{xdg-open}
332 to open the application in a web browser, for offline usage.")
333 (license license:agpl3+)))
335 (define-public toutenclic
342 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
343 "ToutEnClic-" version "-src.zip"))
345 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
346 (build-system python-build-system)
348 `(#:tests? #f ; no tests
350 (modify-phases %standard-phases
353 (lambda* (#:key outputs #:allow-other-keys)
354 (let* ((out (assoc-ref outputs "out"))
355 (share (string-append out "/share/toutenclic"))
356 (pixmaps (string-append out "/share/pixmaps"))
357 (doc (string-append out "share/doc/" ,name "-" ,version))
358 (bin (string-append out "/bin"))
359 (executable "toutenclic"))
361 (install-file "toutenclic.png" pixmaps)
362 ;; Move files into "share/" directory.
363 (for-each (lambda (f) (install-file f share))
364 (find-files "." "\\.py$"))
365 ;; Install documentation.
366 (install-file "ToutEnClic.pdf" doc)
367 ;; Create executable in "bin/".
369 (with-directory-excursion bin
370 (symlink (string-append share "/" executable ".py")
373 (add-after 'install 'create-desktop-file
374 (lambda* (#:key outputs #:allow-other-keys)
375 (let* ((out (assoc-ref outputs "out"))
376 (applications (string-append out "/share/applications")))
377 (mkdir-p applications)
378 (call-with-output-file
379 (string-append applications "/toutenclic.desktop")
384 Comment=For schooling without difference~@
385 Exec=~a/bin/toutenclic~@
386 TryExec=~@*~a/bin/toutenclic~@
395 `(("python-pyqt" ,python-pyqt)))
396 (synopsis "School tools for physically disabled children")
397 (description "ToutEnClic is intended to facilitate the schooling
398 of physically disabled children in ordinary schools. It is both
399 a multi-page virtual exercise book and a kit including pencil,
400 scissors, glue, ruler, compass, protractor and square. A virtual
401 keyboard is also available if the child does not have any other
402 specialized device.")
403 (home-page "https://bipede.fr/contrib/")
404 (license license:gpl3)))
406 (define-public childsplay
413 "mirror://sourceforge/schoolsplay/"
414 "childsplay-" version ".tgz"))
417 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
418 (build-system python-build-system)
423 (modify-phases %standard-phases
424 (add-after 'unpack 'unbundle-dejavu-font
425 (lambda* (#:key inputs #:allow-other-keys)
427 (string-append (assoc-ref inputs "font-dejavu")
428 "/share/fonts/truetype"))
430 (string-append dejavu-dir
431 "/DejaVuSansCondensed-Bold.ttf")))
432 (substitute* "SPConstants.py"
433 (("^(TTF(BOLD)? = ).*" _ prefix)
434 (string-append prefix "'" dejavu-font "'\n")))
435 (for-each (lambda (f) (delete-file f))
436 (find-files "lib/SPData" "DejaVu"))
440 (lambda* (#:key outputs #:allow-other-keys)
441 (let* ((out (assoc-ref outputs "out"))
442 (pixmaps (string-append out "/share/pixmaps"))
443 (share (string-append out "/share/childsplay"))
444 (doc (string-append out "/share/doc/" ,name "-",version)))
446 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
449 (for-each (lambda (f)
450 (copy-recursively f (string-append share "/" f)))
451 '("alphabet-sounds" "lib" "locale" "SPWidgets"))
452 (for-each (lambda (f) (install-file f share))
453 (find-files "." "\\.(py|dev|db)$"))
454 ;; Install documentation.
456 (copy-recursively "docs" doc)
458 (add-after 'install 'create-executable
459 (lambda* (#:key outputs inputs #:allow-other-keys)
460 (let* ((python (string-append (assoc-ref inputs "python")
462 (out (assoc-ref outputs "out"))
463 (bin (string-append out "/bin"))
464 (executable (string-append bin "/childsplay")))
466 (call-with-output-file executable
471 (string-append out "/share/childsplay/childsplay.py"))))
472 (chmod executable #o555)
474 (add-after 'install 'create-desktop-file
475 (lambda* (#:key outputs #:allow-other-keys)
476 (let* ((out (assoc-ref outputs "out"))
477 (applications (string-append out "/share/applications")))
478 (mkdir-p applications)
479 (call-with-output-file
480 (string-append applications "/childsplay.desktop")
485 Comment=Suite of educational games for young children~@
486 Comment[ca]=Conjunt de jocs educatius per a xiquets~@
487 Comment[es]=Conjunto de juegos educativos para niños~@
488 Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
489 Exec=~a/bin/childsplay.py~@
493 Categories=Application;Game;Education;KidsGame;~@
494 Keywords=suite;children;games;young;educational;~%"
498 `(("font-dejavu" ,font-dejavu)
499 ("pygame" ,python2-pygame)
500 ("sqlalchemy" ,python2-sqlalchemy)))
501 (synopsis "Suite of educational games for young children")
502 (description "Childsplay is a collection of educational activities
503 for young children. Childsplay can be used at home, kindergartens and
504 pre-schools. Childsplay is a fun and safe way to let young children
505 use the computer and at the same time teach them a little math,
506 letters of the alphabet, spelling, eye-hand coordination, etc.")
507 (home-page "http://www.schoolsplay.org")
508 (license license:gpl3+)))
510 (define-public omnitux
517 (uri (string-append "mirror://sourceforge/omnitux/omnitux/"
518 "v" version "/omnitux-" version ".tar.bz2"))
520 (base32 "1wmmmbzmxd0blhn00d4g91xwavnab143a31ca3i8hrqgzh6qz9w6"))
521 (modules '((guix build utils)))
524 ;; Remove pre-compiled .pyc files from source.
525 (for-each delete-file (find-files "bin" "\\.pyc$"))
527 (build-system python-build-system)
529 `(("python2-pygame" ,python2-pygame)
530 ("python2-pygtk" ,python2-pygtk)))
532 `(#:tests? #f ;no test
535 (modify-phases %standard-phases
536 (delete 'build) ;no setup.py
538 (lambda* (#:key outputs #:allow-other-keys)
539 (let* ((out (assoc-ref outputs "out"))
540 (share (string-append out "/share"))
541 (data (string-append share "/omnitux")))
542 ;; Install documentation.
543 (let ((doc (string-append share "/doc/" ,name "-" ,version)))
544 (for-each (lambda (f) (install-file f doc))
545 '("LICENSE.txt" "README.txt")))
547 (install-file "omnitux.sh" data)
548 (for-each (lambda (d)
549 (copy-recursively d (string-append data "/" d)))
551 ;; Install the launcher.
552 (let* ((bin (string-append out "/bin"))
553 (script (string-append bin "/omnitux"))
554 (bash (string-append (assoc-ref %build-inputs "bash")
556 (python (string-append (assoc-ref %build-inputs "python")
559 (with-output-to-file script
561 (format #t "#!~a~%" bash)
563 "cd ~a; ~a menu.py~%"
564 (string-append data "/bin")
566 (chmod script #o755))
567 ;; Install icon and desktop file.
568 (let ((pixmaps (string-append share "/pixmaps")))
569 (install-file "data/default/icons/Omnitux_logo.svg" pixmaps))
570 (let ((apps (string-append out "/share/applications")))
572 (with-output-to-file (string-append apps "/omnitux.desktop")
578 Comment=An educational game based on multimedia elements.~@
579 Comment[fr]=Un jeu ludo-éducatif basé sur des éléments multimédias.~@
580 Exec=~a/bin/omnitux~@
582 Categories=Game;Education;~@
584 Icon=Omnitux_logo.svg~@"
587 (home-page "http://omnitux.sourceforge.net/")
588 (synopsis "Educational activities based on multimedia elements")
589 (description "The project aims to provide various educational
590 activities around multimedia elements (images, sounds, texts). Types
591 of activities include:
594 @item items to place on a map or a schema,
595 @item counting activities,
597 @item card faces to remember,
598 @item find differences between two pictures,
602 Activities are available in English, French, German, Polish,
603 Portuguese, Spanish and Italian.")
604 ;; Project's license is GPL3+, but multimedia elements are
605 ;; released under various licenses.
606 (license (list license:gpl3+
610 license:public-domain))))
619 (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
620 "fet-" version ".tar.bz2"))
622 (base32 "1pg47jk6fw46fr7m32l1ypm1zyjfz1ik5f333ynqqr705f1c0ij5"))))
623 (build-system gnu-build-system)
626 (modify-phases %standard-phases
627 (add-after 'unpack 'fix-hardcoded-directories
628 (lambda* (#:key outputs #:allow-other-keys)
629 (substitute* (list "fet.pro"
632 "src/interface/fet.cpp")
633 (("/usr") (assoc-ref outputs "out")))
636 (lambda _ (invoke "qmake" "fet.pro"))))))
638 `(("qtbase" ,qtbase)))
639 (home-page "https://www.lalescu.ro/liviu/fet/")
640 (synopsis "Timetabling software")
642 "FET is a program for automatically scheduling the timetable of a school,
643 high-school or university. It uses a fast and efficient timetabling
646 Usually, FET is able to solve a complicated timetable in maximum 5-20 minutes.
647 For extremely difficult timetables, it may take a longer time, a matter of
649 (license license:agpl3+)))
651 (define-public klavaro
658 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
661 (base32 "0jnzdrndiq6m0bwgid977z5ghp4q61clwdlzfpx4fd2ml5x3iq95"))))
662 (build-system gnu-build-system)
664 `(("intltool" ,intltool)
665 ("pkg-config" ,pkg-config)))
671 (home-page "https://klavaro.sourceforge.io/en/index.html")
672 (synopsis "Touch typing tutor")
674 "Klavaro is a simple tutor to teach correct typing, almost independently of
675 language and very flexible regarding to new or unknown keyboard layouts.")
676 (license license:gpl3+)))
678 (define-public ktouch
685 (uri (string-append "mirror://kde/stable/applications/"
686 version "/src/ktouch-" version ".tar.xz"))
689 "0dqxb3xsjc2rwc9779l5fnr4crhq51bc8ln4azbgnnkzldvq6a4a"))))
690 (build-system qt-build-system)
693 (modify-phases %standard-phases
694 (add-after 'configure 'patch-makefiles
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((qtdec (assoc-ref inputs "qtdeclarative")))
697 (substitute* '("src/CMakeFiles/ktouch_autogen.dir/build.make"
698 "src/CMakeFiles/ktouch.dir/build.make")
699 (("/gnu/store/.*qmlcachegen")
700 (string-append qtdec "/bin/qmlcachegen"))))
703 `(("extra-cmake-modules" ,extra-cmake-modules)
704 ("kdoctools" ,kdoctools)
705 ("pkg-config" ,pkg-config)))
707 `(("kcmutils" ,kcmutils)
708 ("kcompletion" ,kcompletion)
710 ("kconfigwidgets" ,kconfigwidgets)
711 ("kcoreaddons" ,kcoreaddons)
712 ("kdeclarative" ,kdeclarative)
714 ("kiconthemes" ,kiconthemes)
715 ("kitemviews" ,kitemviews)
716 ("kqtquickcharts" ,kqtquickcharts)
717 ("ktextwidgets" ,ktextwidgets)
718 ("kwidgetsaddons" ,kwidgetsaddons)
719 ("kwindowsystem" ,kwindowsystem)
722 ("libxkbfile" ,libxkbfile)
724 ("qtdeclarative" ,qtdeclarative)
725 ("qtgraphicaleffects" ,qtgraphicaleffects)
726 ("qtquickcontrols2" ,qtquickcontrols2)
727 ("qtx11extras" ,qtx11extras)
728 ("qtxmlpatterns" ,qtxmlpatterns)))
729 (home-page "https://edu.kde.org/ktouch/")
730 (synopsis "Touch typing tutor")
732 "KTouch is an aid for learning how to type with speed and accuracy. It
733 provides a sample text to type and indicates which fingers should be used for
734 each key. A collection of lessons are included for a wide range of different
735 languages and keyboard layouts, and typing statistics are used to dynamically
736 adjust the level of difficulty.")
737 (license license:gpl2)))
742 ;; Later versions have dependencies on npm packages not yet in Guix.
747 (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-"
748 version "-source.tgz"))
750 (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
751 (patches (search-patches "anki-mpv-args.patch"))))
752 (build-system gnu-build-system)
754 `(#:make-flags (list (string-append "PREFIX=" %output))
755 #:tests? #f ;no check target
756 #:modules ((guix build gnu-build-system)
760 (modify-phases %standard-phases
761 (add-after 'unpack 'disable-update-check
762 ;; Don't ‘phone home’ unasked to check for updates.
764 (substitute* "aqt/update.py"
766 "throw.an.exception.instead"))
768 (delete 'configure) ;no configure script
769 (add-after 'install 'wrap
770 (lambda* (#:key inputs outputs #:allow-other-keys)
771 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
772 ;; List of paths to the site-packages directories of Python
775 (map (lambda (pyinput)
779 ;; Calculate the python version to avoid breaking
780 ;; with future 3.X releases.
781 ,(version-major+minor
782 (package-version python-wrapper))
784 (filter (match-lambda
786 (string-prefix? "python-" label)))
789 (string-append (assoc-ref inputs "qtwebengine")
790 "/lib/qt5/libexec/QtWebEngineProcess")))
791 ;; The program fails to find the QtWebEngineProcess program, so
792 ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
793 ;; wrapped to avoid declaring Python libraries as propagated
795 (for-each (lambda (program)
796 (wrap-program program
797 `("QTWEBENGINEPROCESS_PATH" =
798 (,qtwebengineprocess))
799 `("PATH" prefix (,(string-append
800 (assoc-ref inputs "mpv")
802 `("PYTHONPATH" = ,site-packages)))
803 (find-files bin ".")))
806 `(("xdg-utils" ,xdg-utils)))
810 ("python" ,python-wrapper)
811 ("python-beautifulsoup4" ,python-beautifulsoup4)
812 ("python-decorator" ,python-decorator)
813 ("python-distro" ,python-distro)
814 ("python-jsonschema" ,python-jsonschema)
815 ("python-markdown" ,python-markdown)
816 ("python-pyaudio" ,python-pyaudio)
817 ;; `python-pyqtwebengine' must precede `python-pyqt' in PYTHONPATH.
818 ("python-pyqtwebengine" ,python-pyqtwebengine)
819 ("python-pyqt" ,python-pyqt)
820 ("python-requests" ,python-requests)
821 ("python-send2trash" ,python-send2trash)
822 ("python-sip" ,python-sip)
823 ;; `qtwebengine' is included in `pyqtwebengine', included here for easy
825 ("qtwebengine" ,qtwebengine)))
826 (home-page "https://apps.ankiweb.net/")
827 (synopsis "Powerful, intelligent flash cards")
828 (description "Anki is a program which makes remembering things
829 easy. Because it's a lot more efficient than traditional study
830 methods, you can either greatly decrease your time spent studying, or
831 greatly increase the amount you learn.
833 Anyone who needs to remember things in their daily life can benefit
834 from Anki. Since it is content-agnostic and supports images, audio,
835 videos and scientific markup (via LaTeX), the possibilities are
836 endless. For example:
838 @item Learning a language
839 @item Studying for medical and law exams
840 @item Memorizing people's names and faces
841 @item Brushing up on geography
842 @item Mastering long poems
843 @item Even practicing guitar chords!
845 (license license:agpl3+)))
847 (define-public t4k-common
855 (url "https://github.com/tux4kids/t4kcommon")
856 (commit (string-append "upstream/" version))))
857 (file-name (git-file-name name version))
859 (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
861 (search-patches "t4k-common-libpng16.patch"))))
862 (build-system cmake-build-system)
864 `(#:tests? #f ;FIXME: cannot find how to run tests
866 (modify-phases %standard-phases
867 (add-after 'set-paths 'set-sdl-paths
868 (lambda* (#:key inputs #:allow-other-keys)
869 (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
871 (or (getenv "CPATH") "")))))
872 (add-after 'unpack 'fix-andika-font-path
873 (lambda* (#:key inputs #:allow-other-keys)
874 (substitute* "src/t4k_sdl.c"
875 (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
876 (string-append (assoc-ref inputs "font-andika")
877 "/share/fonts/truetype")))
880 `(("pkg-config" ,pkg-config)))
882 `(("font-andika" ,font-sil-andika)
886 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))))
887 (home-page "https://github.com/tux4kids/t4kcommon")
888 (synopsis "Library of code shared between TuxMath and TuxType")
889 (description "Tux4Kids-Common is a library of code shared between
890 TuxMath and TuxType.")
891 (license license:gpl3+)))
893 (define-public tuxmath
901 (url "https://github.com/tux4kids/tuxmath")
902 (commit (string-append "upstream/" version))))
903 (file-name (git-file-name name version))
905 (base32 "1f1pz83w6d3mbik2h6xavfxmk5apxlngxbkh80x0m55lhniwkdxv"))
906 (modules '((guix build utils)))
910 (for-each delete-file (find-files "data/fonts" "\\.ttf$"))
912 (build-system gnu-build-system)
914 `(#:tests? #f ;no test
916 (modify-phases %standard-phases
917 (add-after 'set-paths 'set-sdl-paths
918 (lambda* (#:key inputs #:allow-other-keys)
920 (string-append (assoc-ref inputs "sdl")
922 (or (getenv "CPATH") "")))
924 (add-after 'install 'install-desktop-file
925 (lambda* (#:key outputs #:allow-other-keys)
926 (let* ((out (assoc-ref outputs "out"))
927 (apps (string-append out "/share/applications"))
928 (pixmaps (string-append out "/share/pixmaps")))
929 (install-file "tuxmath.desktop" apps)
930 (for-each (lambda (f) (install-file f pixmaps))
931 (find-files "data/images/icons/"
932 "tuxmath\\.(png|ico|svg)$"))
935 `(("pkg-config" ,pkg-config)))
937 `(("librsvg" ,librsvg)
939 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))
940 ("t4k-common" ,t4k-common)))
941 (home-page "https://github.com/tux4kids/tuxmath")
942 (synopsis "Educational math tutorial game")
943 (description "@emph{Tux, of Math Command} is an educational math
944 tutorial game starring Tux, the Linux penguin, in which you play the
945 part of Commander Tux, as he defends his friends from an attack of
946 math equations. Comets are crashing towards the friendly penguins in
947 their igloos, and you must destroy the comets by solving their
950 TuxMath also includes Factoroids, a game that gives practice in
951 factoring numbers and simplifying fractions, as well as zapping rocks
952 floating through space.")
953 (license license:gpl3+)))
962 (uri (string-append "mirror://gnu/mdk/v1.2.10/mdk-"
966 "1rwcq2b5vvv7318j92nxc5dayj27dpfhzc4rjiv4ccvsc0x35x5h"))))
967 (build-system gnu-build-system)
969 `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
972 ("pkg-config" ,pkg-config)
973 ("intltool" ,intltool)
974 ("ncurses" ,ncurses)))
976 `(("readline" ,readline)
980 ("libglade" ,libglade)))
981 (home-page "https://www.gnu.org/software/mdk/")
982 (synopsis "Virtual development environment for Knuth's MIX")
984 "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
985 computer MIX and its assembly language MIXAL. MIX has a virtual CPU with
986 standard features such as registers, memory cells, an overflow toggle,
987 comparison flags, input-output devices, and a set of binary instructions.
988 The package includes a compiler, a virtual machine, a GUI for the virtual
990 (license license:gpl3+)))
992 (define-public exercism
1000 (url "https://github.com/exercism/cli")
1001 (commit (string-append "v" version))))
1002 (file-name (git-file-name name version))
1005 "17gvz9a0sn4p36hf4l77bxhhfipf4x998iay31layqwbnzmb4xy7"))
1006 (patches (search-patches "exercism-disable-self-update.patch"))))
1007 (build-system go-build-system)
1009 `(#:import-path "github.com/exercism/cli/exercism"
1010 #:unpack-path "github.com/exercism/cli"
1011 #:install-source? #f))
1013 `(("github.com/blang/semver" ,go-github-com-blang-semver)
1014 ("github.com/spf13/cobra" ,go-github-com-spf13-cobra)
1015 ("github.com/spf13/pflag" ,go-github-com-spf13-pflag)
1016 ("github.com/spf13/viper" ,go-github-com-spf13-viper)
1017 ("golang.org/x/net" ,go-golang-org-x-net)
1018 ("golang.org/x/text" ,go-golang-org-x-text)))
1019 (home-page "https://exercism.io")
1020 (synopsis "Mentored learning for programming languages")
1021 (description "Commandline client for exercism.io, a free service providing
1022 mentored learning for programming languages.")
1023 (license license:expat)))