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