gnu: Remove ".git" from "https://github/…/….git".
[jackhill/guix/guix.git] / gnu / packages / education.scm
CommitLineData
2614de3c
DM
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
9e39ac41 3;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
b84257c0 4;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
3f19b268 5;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
a5215f17 6;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
f4167bda 7;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
8534c949 8;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
7adf6f1b 9;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
648ae621 10;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
2614de3c
DM
11;;;
12;;; This file is part of GNU Guix.
13;;;
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.
18;;;
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.
23;;;
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/>.
26
27(define-module (gnu packages education)
28 #:use-module (ice-9 regex)
29 #:use-module (gnu packages)
8534c949 30 #:use-module (gnu packages audio)
3cfd12f3
NG
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages bash)
2614de3c 33 #:use-module (gnu packages compression)
230e59da 34 #:use-module (gnu packages curl)
4f963be0 35 #:use-module (gnu packages databases)
7adf6f1b 36 #:use-module (gnu packages flex)
4f963be0 37 #:use-module (gnu packages fonts)
3cfd12f3 38 #:use-module (gnu packages freedesktop)
4f963be0 39 #:use-module (gnu packages game-development)
2614de3c 40 #:use-module (gnu packages gettext)
0ea179fd
RW
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
648ae621 43 #:use-module (gnu packages golang)
0ea179fd 44 #:use-module (gnu packages gtk)
34208bf5 45 #:use-module (gnu packages image)
3cfd12f3 46 #:use-module (gnu packages javascript)
d2c0a7a2 47 #:use-module (gnu packages kde)
b27aacbf 48 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
8534c949 49 #:use-module (gnu packages mp3)
7adf6f1b 50 #:use-module (gnu packages ncurses)
2614de3c 51 #:use-module (gnu packages perl)
0ea179fd
RW
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
8534c949
RS
54 #:use-module (gnu packages python-web)
55 #:use-module (gnu packages python-xyz)
3cfd12f3 56 #:use-module (gnu packages qt)
7adf6f1b 57 #:use-module (gnu packages readline)
0ea179fd 58 #:use-module (gnu packages sdl)
cd0322a3 59 #:use-module (gnu packages sqlite)
0ea179fd 60 #:use-module (gnu packages texinfo)
96ec4604 61 #:use-module (gnu packages tls)
8534c949 62 #:use-module (gnu packages video)
7e48e849 63 #:use-module (gnu packages xorg)
0ea179fd 64 #:use-module (gnu packages xml)
2614de3c
DM
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix download)
3cfd12f3 68 #:use-module (guix git-download)
2614de3c
DM
69 #:use-module (guix svn-download)
70 #:use-module (guix utils)
2614de3c 71 #:use-module (guix build-system cmake)
3cfd12f3 72 #:use-module (guix build-system gnu)
648ae621 73 #:use-module (guix build-system go)
3b2cf5c8 74 #:use-module (guix build-system python)
7d796d80 75 #:use-module (guix build-system qt)
3cfd12f3 76 #:use-module (guix build-system trivial)
2614de3c
DM
77 #:use-module (srfi srfi-1))
78
0ea179fd
RW
79(define-public gcompris
80 (package
81 (name "gcompris")
cdc827b3 82 (version "17.05")
0ea179fd
RW
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
86 version ".tar.bz2"))
87 (sha256
88 (base32
cdc827b3 89 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
0ea179fd
RW
90 (build-system gnu-build-system)
91 (arguments
92 `(#:configure-flags
93 ;; Use SDL mixer because otherwise GCompris would need an old version
94 ;; of Gstreamer.
95 (list "--enable-sdlmixer"
96 "LDFLAGS=-lgmodule-2.0")
97 #:phases
98 (modify-phases %standard-phases
99 (add-after 'set-paths 'set-sdl-paths
100 (lambda* (#:key inputs #:allow-other-keys)
101 (setenv "CPATH"
102 (string-append (assoc-ref inputs "sdl-mixer")
5ba856ab
MB
103 "/include/SDL:"
104 (or (getenv "CPATH") "")))
0ea179fd
RW
105 #t)))))
106 (inputs
107 `(("gtk+" ,gtk+-2)
108 ("librsvg" ,librsvg)
109 ("libxml2" ,libxml2)
110 ("sdl-mixer" ,sdl-mixer)
111 ("sqlite" ,sqlite)
112 ("glib:bin" ,glib)
113 ("python" ,python)))
114 (native-inputs
115 `(("intltool" ,intltool)
116 ("texinfo" ,texinfo)
117 ("texi2html" ,texi2html)
118 ("glib:bin" ,glib "bin")
119 ("pkg-config" ,pkg-config)))
09a3d34c 120 (home-page "https://gcompris.net")
0ea179fd
RW
121 (synopsis "Educational software suite")
122 (description "GCompris is an educational software suite comprising of
123numerous activities for children aged 2 to 10. Some of the activities are
124game orientated, but nonetheless still educational. Below you can find a list
125of categories with some of the activities available in that category.
126
127@enumerate
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, ...
135@end enumerate
136")
137 (license license:gpl3+)))
b84257c0 138
b27aacbf
EF
139(define-public gcompris-qt
140 (package
141 (name "gcompris-qt")
a5215f17 142 (version "0.98")
b27aacbf 143 (source
96ec4604
TGR
144 (origin
145 (method url-fetch)
146 (uri (string-append
147 "https://gcompris.net/download/qt/src/gcompris-qt-"
148 version ".tar.xz"))
149 (sha256
a5215f17 150 (base32 "1jmjykn0lpk0v6hs2flmch8v4da5bgxl891nav7szxw9l7aqnf4y"))))
b27aacbf
EF
151 (build-system cmake-build-system)
152 (arguments
5c105203
EF
153 `(#:phases
154 (modify-phases %standard-phases
668307c0
NG
155 (add-after 'unpack 'disable-failing-test
156 (lambda _
157 (substitute* "tests/core/CMakeLists.txt"
158 (("DownloadManagerTest\\.cpp") "#"))
159 #t))
7e48e849
EF
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")
164 "/bin/Xvfb :1 &"))
165 (setenv "DISPLAY" ":1")
166 #t))
5c105203
EF
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)
174 "/lib/qt5/plugins"))
175 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
176 `("QML2_IMPORT_PATH" ":" prefix
177 ,(map (lambda (label)
178 (string-append (assoc-ref inputs label)
179 "/lib/qt5/qml"))
180 '("qtdeclarative" "qtgraphicaleffects"
181 "qtmultimedia" "qtquickcontrols"))))
182 #t))))
7e48e849
EF
183 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
184 "-DBUILD_TESTING=TRUE")))
b27aacbf
EF
185 (native-inputs
186 `(("extra-cmake-modules" ,extra-cmake-modules)
187 ("gettext" ,gettext-minimal)
668307c0 188 ("kdoctools" ,kdoctools)
5c105203 189 ("perl" ,perl)
7e48e849 190 ("qttools" ,qttools)
ff337525 191 ("xorg-server" ,xorg-server-for-tests)))
b27aacbf 192 (inputs
96ec4604
TGR
193 `(("openssl" ,openssl)
194 ("python-2" ,python-2)
5c105203
EF
195 ("qtbase" ,qtbase)
196 ("qtdeclarative" ,qtdeclarative)
197 ("qtgraphicaleffects" ,qtgraphicaleffects)
198 ("qtmultimedia" ,qtmultimedia)
199 ("qtquickcontrols" ,qtquickcontrols)
200 ("qtsensors" ,qtsensors)
201 ("qtsvg" ,qtsvg)
202 ("qtxmlpatterns" ,qtxmlpatterns)))
203 (home-page "https://gcompris.net/index-en.html")
b27aacbf
EF
204 (synopsis "Educational games for small children")
205 (description
206 "Gcompris offers a large collection of educational games for small
207children, designed to be a unified interface to integrate more educational
208games. Language-oriented games contain vocabulary, sounds, and voices for
209many different languages.
210Currently available boards include:
211@enumerate
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, ...)
218@end enumerate\n")
219 (license license:gpl3+)))
220
b84257c0
HG
221(define-public tipp10
222 (package
223 (name "tipp10")
224 (version "2.1.0")
225 (source (origin
226 (method url-fetch)
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"))
231 (sha256
232 (base32
233 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
234 (patches (search-patches "tipp10-fix-compiling.patch"
235 "tipp10-remove-license-code.patch"))))
236 (build-system cmake-build-system)
237 (arguments
238 `(#:tests? #f ; packages has no tests
239 #:phases
240 (modify-phases %standard-phases
241 (add-after 'unpack 'disable-new-version-check
7cc98473
RW
242 (lambda _
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)"))
248 #t))
b84257c0 249 (replace 'configure
7cc98473
RW
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 "/")))
257 ;; Recreate Makefile
946e5e8a 258 (invoke "qmake")))))))
b84257c0
HG
259 (inputs
260 `(("qt4" ,qt-4)
261 ("sqlite" ,sqlite)))
262 (home-page "https://www.tipp10.com/")
263 (synopsis "Touch typing tutor")
9e39ac41
RW
264 (description "Tipp10 is a touch typing tutor. The ingenious thing about
265the software is its intelligence feature: characters that are mistyped are
266repeated more frequently. Beginners will find their way around right away so
267they can start practicing without a hitch.
b84257c0
HG
268
269Useful support functions and an extensive progress tracker, topical lessons
270and the ability to create your own practice lessons make learning to type
9e39ac41 271easy.")
b84257c0 272 (license license:gpl2)))
3cfd12f3
NG
273
274(define-public snap
275 (package
276 (name "snap")
a42d6a99 277 (version "6.0.0")
3cfd12f3
NG
278 (source
279 (origin
280 (method git-fetch)
281 (uri (git-reference
b0e7b699 282 (url "https://github.com/jmoenig/Snap")
458f410b 283 (commit (string-append "v" version))))
3cfd12f3
NG
284 (file-name (git-file-name name version))
285 (sha256
a42d6a99 286 (base32 "1j5hcnms12hpnl2ba7haf00l08rkpb5wpfsgax07p838q5dc7cam"))))
3cfd12f3
NG
287 (build-system trivial-build-system)
288 (arguments
289 `(#:modules ((guix build utils))
290 #:builder
291 (begin
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.
3a352a44 298 (with-directory-excursion (string-append share "/src")
3cfd12f3
NG
299 (delete-file "FileSaver.min.js")
300 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
301 "/share/javascript/FileSaver.min.js")
302 "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")
308 "/bin/sh"))
309 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
310 "/bin/xdg-open")))
311 (mkdir-p bin)
312 (call-with-output-file script
313 (lambda (port)
314 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
315 (chmod script #o555)))
316 #t)))
317 (inputs
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
324programming language. It is an extended reimplementation of Scratch (a
325project of the Lifelong Kindergarten Group at the MIT Media Lab) that
326allows you to Build Your Own Blocks. It also features first class
327lists, first class procedures, and continuations. These added
328capabilities make it suitable for a serious introduction to computer
329science for high school or college students.
330
331This package provides a @command{snap} executable calling @command{xdg-open}
332to open the application in a web browser, for offline usage.")
333 (license license:agpl3+)))
3b2cf5c8
NG
334
335(define-public toutenclic
336 (package
337 (name "toutenclic")
f5557bde 338 (version "7.00")
3b2cf5c8
NG
339 (source
340 (origin
341 (method url-fetch)
342 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
f5557bde 343 "ToutEnClic-" version "-src.zip"))
3b2cf5c8 344 (sha256
f5557bde 345 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
3b2cf5c8
NG
346 (build-system python-build-system)
347 (arguments
632c508c 348 `(#:tests? #f ; no tests
3b2cf5c8
NG
349 #:phases
350 (modify-phases %standard-phases
351 (delete 'build)
352 (replace 'install
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"))
f5557bde 357 (doc (string-append out "share/doc/" ,name "-" ,version))
3b2cf5c8 358 (bin (string-append out "/bin"))
f5557bde 359 (executable "toutenclic"))
3b2cf5c8
NG
360 ;; Install icon.
361 (install-file "toutenclic.png" pixmaps)
362 ;; Move files into "share/" directory.
f5557bde
NG
363 (for-each (lambda (f) (install-file f share))
364 (find-files "." "\\.py$"))
365 ;; Install documentation.
366 (install-file "ToutEnClic.pdf" doc)
3b2cf5c8
NG
367 ;; Create executable in "bin/".
368 (mkdir-p bin)
369 (with-directory-excursion bin
f5557bde 370 (symlink (string-append share "/" executable ".py")
3b2cf5c8
NG
371 executable)))
372 #t))
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")
380 (lambda (file)
381 (format file
382 "[Desktop Entry]~@
383 Name=ToutEnClic~@
384 Comment=For schooling without difference~@
f5557bde
NG
385 Exec=~a/bin/toutenclic~@
386 TryExec=~@*~a/bin/toutenclic~@
3b2cf5c8
NG
387 Terminal=false~@
388 Icon=toutenclic~@
389 Type=Application~%"
390 out)))
391 #t))))))
5359b601
MB
392 (native-inputs
393 `(("unzip" ,unzip)))
394 (inputs
395 `(("python-pyqt" ,python-pyqt)))
3b2cf5c8
NG
396 (synopsis "School tools for physically disabled children")
397 (description "ToutEnClic is intended to facilitate the schooling
398of physically disabled children in ordinary schools. It is both
399a multi-page virtual exercise book and a kit including pencil,
400scissors, glue, ruler, compass, protractor and square. A virtual
401keyboard is also available if the child does not have any other
402specialized device.")
403 (home-page "https://bipede.fr/contrib/")
404 (license license:gpl3)))
4f963be0
NG
405
406(define-public childsplay
407 (package
408 (name "childsplay")
409 (version "3.4")
410 (source (origin
411 (method url-fetch)
412 (uri (string-append
413 "mirror://sourceforge/schoolsplay/"
414 "childsplay-" version ".tgz"))
415 (sha256
416 (base32
417 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
418 (build-system python-build-system)
419 (arguments
420 `(#:python ,python-2
421 #:tests? #f
422 #:phases
423 (modify-phases %standard-phases
424 (add-after 'unpack 'unbundle-dejavu-font
425 (lambda* (#:key inputs #:allow-other-keys)
426 (let* ((dejavu-dir
427 (string-append (assoc-ref inputs "font-dejavu")
428 "/share/fonts/truetype"))
429 (dejavu-font
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"))
437 #t)))
438 (delete 'build)
439 (replace 'install
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)))
445 ;; Install icon.
446 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
447 ;; Install data.
448 (mkdir-p share)
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.
455 (mkdir-p doc)
456 (copy-recursively "docs" doc)
457 #t)))
458 (add-after 'install 'create-executable
459 (lambda* (#:key outputs inputs #:allow-other-keys)
460 (let* ((python (string-append (assoc-ref inputs "python")
461 "/bin/python"))
462 (out (assoc-ref outputs "out"))
463 (bin (string-append out "/bin"))
464 (executable (string-append bin "/childsplay")))
465 (mkdir-p bin)
466 (call-with-output-file executable
467 (lambda (file)
468 (format file
469 "~a ~a"
470 python
471 (string-append out "/share/childsplay/childsplay.py"))))
472 (chmod executable #o555)
473 #t)))
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")
481 (lambda (file)
482 (format file
483 "[Desktop Entry]~@
484 Name=Childsplay~@
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~@
490 Terminal=false~@
491 Icon=logo_cp.svg~@
492 Type=Application~@
493 Categories=Application;Game;Education;KidsGame;~@
494 Keywords=suite;children;games;young;educational;~%"
495 out)))
496 #t))))))
497 (inputs
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
503for young children. Childsplay can be used at home, kindergartens and
504pre-schools. Childsplay is a fun and safe way to let young children
505use the computer and at the same time teach them a little math,
506letters of the alphabet, spelling, eye-hand coordination, etc.")
507 (home-page "http://www.schoolsplay.org")
508 (license license:gpl3+)))
52e7295f 509
3450bb81
NG
510(define-public omnitux
511 (package
512 (name "omnitux")
513 (version "1.2.1")
514 (source
515 (origin
516 (method url-fetch)
517 (uri (string-append "mirror://sourceforge/omnitux/omnitux/"
518 "v" version "/omnitux-" version ".tar.bz2"))
519 (sha256
520 (base32 "1wmmmbzmxd0blhn00d4g91xwavnab143a31ca3i8hrqgzh6qz9w6"))
521 (modules '((guix build utils)))
522 (snippet
523 '(begin
524 ;; Remove pre-compiled .pyc files from source.
525 (for-each delete-file (find-files "bin" "\\.pyc$"))
526 #t))))
527 (build-system python-build-system)
528 (inputs
529 `(("python2-pygame" ,python2-pygame)
530 ("python2-pygtk" ,python2-pygtk)))
531 (arguments
532 `(#:tests? #f ;no test
533 #:python ,python-2
534 #:phases
535 (modify-phases %standard-phases
536 (delete 'build) ;no setup.py
537 (replace 'install
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")))
546 ;; Install data.
547 (install-file "omnitux.sh" data)
548 (for-each (lambda (d)
549 (copy-recursively d (string-append data "/" d)))
550 '("bin" "data"))
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")
555 "/bin/bash"))
556 (python (string-append (assoc-ref %build-inputs "python")
557 "/bin/python2")))
558 (mkdir-p bin)
559 (with-output-to-file script
560 (lambda ()
561 (format #t "#!~a~%" bash)
562 (format #t
563 "cd ~a; ~a menu.py~%"
564 (string-append data "/bin")
565 python)))
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")))
571 (mkdir-p apps)
572 (with-output-to-file (string-append apps "/omnitux.desktop")
573 (lambda _
574 (format #t
575 "[Desktop Entry]~@
576 Name=Omnitux~@
577 GenericName=Omnitux
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~@
581 Type=Application~@
582 Categories=Game;Education;~@
583 Terminal=false~@
584 Icon=Omnitux_logo.svg~@"
585 out))))
586 #t))))))
587 (home-page "http://omnitux.sourceforge.net/")
588 (synopsis "Educational activities based on multimedia elements")
589 (description "The project aims to provide various educational
590activities around multimedia elements (images, sounds, texts). Types
591of activities include:
592@itemize
593@item associations,
594@item items to place on a map or a schema,
595@item counting activities,
596@item puzzles,
597@item card faces to remember,
598@item find differences between two pictures,
599@item ...
600@end itemize
601
602Activities are available in English, French, German, Polish,
603Portuguese, Spanish and Italian.")
604 ;; Project's license is GPL3+, but multimedia elements are
605 ;; released under various licenses.
606 (license (list license:gpl3+
607 license:gpl2+
608 license:cc-by-sa2.0
609 license:cc-by-sa3.0
610 license:public-domain))))
611
52e7295f
NG
612(define-public fet
613 (package
614 (name "fet")
127f0f05 615 (version "5.45.1")
3e4cf41b
NG
616 (source
617 (origin
618 (method url-fetch)
619 (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
620 "fet-" version ".tar.bz2"))
621 (sha256
127f0f05 622 (base32 "1pg47jk6fw46fr7m32l1ypm1zyjfz1ik5f333ynqqr705f1c0ij5"))))
52e7295f
NG
623 (build-system gnu-build-system)
624 (arguments
625 `(#:phases
626 (modify-phases %standard-phases
627 (add-after 'unpack 'fix-hardcoded-directories
628 (lambda* (#:key outputs #:allow-other-keys)
629 (substitute* (list "fet.pro"
630 "src/src.pro"
631 "src/src-cl.pro"
632 "src/interface/fet.cpp")
633 (("/usr") (assoc-ref outputs "out")))
634 #t))
635 (replace 'configure
636 (lambda _ (invoke "qmake" "fet.pro"))))))
637 (inputs
638 `(("qtbase" ,qtbase)))
639 (home-page "https://www.lalescu.ro/liviu/fet/")
640 (synopsis "Timetabling software")
a5e47130
NG
641 (description
642 "FET is a program for automatically scheduling the timetable of a school,
643high-school or university. It uses a fast and efficient timetabling
644algorithm.
52e7295f 645
a5e47130
NG
646Usually, FET is able to solve a complicated timetable in maximum 5-20 minutes.
647For extremely difficult timetables, it may take a longer time, a matter of
648hours.")
52e7295f
NG
649 (license license:agpl3+)))
650
3f19b268
EF
651(define-public klavaro
652 (package
653 (name "klavaro")
58eea2eb 654 (version "3.10")
3f19b268
EF
655 (source
656 (origin
657 (method url-fetch)
658 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
659 version ".tar.bz2"))
660 (sha256
58eea2eb 661 (base32 "0jnzdrndiq6m0bwgid977z5ghp4q61clwdlzfpx4fd2ml5x3iq95"))))
3f19b268
EF
662 (build-system gnu-build-system)
663 (native-inputs
664 `(("intltool" ,intltool)
665 ("pkg-config" ,pkg-config)))
666 (inputs
667 `(("cairo" ,cairo)
668 ("curl" ,curl)
669 ("gtk+" ,gtk+)
670 ("pango" ,pango)))
671 (home-page "https://klavaro.sourceforge.io/en/index.html")
672 (synopsis "Touch typing tutor")
673 (description
674 "Klavaro is a simple tutor to teach correct typing, almost independently of
675language and very flexible regarding to new or unknown keyboard layouts.")
676 (license license:gpl3+)))
d2c0a7a2
EF
677
678(define-public ktouch
679 (package
680 (name "ktouch")
15ffff8b 681 (version "19.08.3")
d2c0a7a2
EF
682 (source
683 (origin
684 (method url-fetch)
685 (uri (string-append "mirror://kde/stable/applications/"
686 version "/src/ktouch-" version ".tar.xz"))
687 (sha256
688 (base32
15ffff8b 689 "0dqxb3xsjc2rwc9779l5fnr4crhq51bc8ln4azbgnnkzldvq6a4a"))))
7d796d80 690 (build-system qt-build-system)
d2c0a7a2 691 (arguments
7d796d80 692 `(#:phases
50bdf004 693 (modify-phases %standard-phases
d2c0a7a2
EF
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"))))
d2c0a7a2
EF
701 #t)))))
702 (native-inputs
703 `(("extra-cmake-modules" ,extra-cmake-modules)
704 ("kdoctools" ,kdoctools)
705 ("pkg-config" ,pkg-config)))
706 (inputs
707 `(("kcmutils" ,kcmutils)
708 ("kcompletion" ,kcompletion)
709 ("kconfig" ,kconfig)
710 ("kconfigwidgets" ,kconfigwidgets)
711 ("kcoreaddons" ,kcoreaddons)
712 ("kdeclarative" ,kdeclarative)
713 ("ki18n" ,ki18n)
714 ("kiconthemes" ,kiconthemes)
715 ("kitemviews" ,kitemviews)
716 ("kqtquickcharts" ,kqtquickcharts)
717 ("ktextwidgets" ,ktextwidgets)
718 ("kwidgetsaddons" ,kwidgetsaddons)
719 ("kwindowsystem" ,kwindowsystem)
720 ("kxmlgui" ,kxmlgui)
721 ("libxcb" ,libxcb)
722 ("libxkbfile" ,libxkbfile)
723 ("qtbase" ,qtbase)
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")
731 (description
732 "KTouch is an aid for learning how to type with speed and accuracy. It
733provides a sample text to type and indicates which fingers should be used for
734each key. A collection of lessons are included for a wide range of different
735languages and keyboard layouts, and typing statistics are used to dynamically
736adjust the level of difficulty.")
737 (license license:gpl2)))
34208bf5 738
8534c949
RS
739(define-public anki
740 (package
741 (name "anki")
742 ;; Later versions have dependencies on npm packages not yet in Guix.
743 (version "2.1.16")
744 (source
745 (origin
746 (method url-fetch)
747 (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-"
748 version "-source.tgz"))
749 (sha256
880a3165
RS
750 (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
751 (patches (search-patches "anki-mpv-args.patch"))))
8534c949
RS
752 (build-system gnu-build-system)
753 (arguments
754 `(#:make-flags (list (string-append "PREFIX=" %output))
755 #:tests? #f ;no check target
756 #:modules ((guix build gnu-build-system)
757 (guix build utils)
758 (ice-9 match))
759 #:phases
760 (modify-phases %standard-phases
761 (delete 'configure) ;no configure script
762 (add-after 'install 'wrap
763 (lambda* (#:key inputs outputs #:allow-other-keys)
764 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
765 ;; List of paths to the site-packages directories of Python
766 ;; library inputs.
767 (site-packages
768 (map (lambda (pyinput)
769 (string-append
770 (cdr pyinput)
771 "/lib/python"
772 ;; Calculate the python version to avoid breaking
773 ;; with future 3.X releases.
774 ,(version-major+minor
775 (package-version python-wrapper))
776 "/site-packages"))
777 (filter (match-lambda
778 ((label . _)
779 (string-prefix? "python-" label)))
780 inputs)))
781 (qtwebengineprocess
782 (string-append (assoc-ref inputs "qtwebengine")
783 "/lib/qt5/libexec/QtWebEngineProcess")))
784 ;; The program fails to find the QtWebEngineProcess program, so
785 ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
786 ;; wrapped to avoid declaring Python libraries as propagated
787 ;; inputs.
788 (for-each (lambda (program)
789 (wrap-program program
790 `("QTWEBENGINEPROCESS_PATH" =
791 (,qtwebengineprocess))
880a3165
RS
792 `("PATH" prefix (,(string-append
793 (assoc-ref inputs "mpv")
794 "/bin")))
8534c949
RS
795 `("PYTHONPATH" = ,site-packages)))
796 (find-files bin ".")))
797 #t)))))
798 (native-inputs
799 `(("xdg-utils" ,xdg-utils)))
800 (inputs
801 `(("lame" ,lame)
802 ("mpv" ,mpv)
803 ("python" ,python-wrapper)
804 ("python-beautifulsoup4" ,python-beautifulsoup4)
805 ("python-decorator" ,python-decorator)
806 ("python-distro" ,python-distro)
807 ("python-jsonschema" ,python-jsonschema)
808 ("python-markdown" ,python-markdown)
809 ("python-pyaudio" ,python-pyaudio)
810 ;; `python-pyqtwebengine' must precede `python-pyqt' in PYTHONPATH.
811 ("python-pyqtwebengine" ,python-pyqtwebengine)
812 ("python-pyqt" ,python-pyqt)
813 ("python-requests" ,python-requests)
814 ("python-send2trash" ,python-send2trash)
815 ("python-sip" ,python-sip)
816 ;; `qtwebengine' is included in `pyqtwebengine', included here for easy
817 ;; wrapping.
818 ("qtwebengine" ,qtwebengine)))
819 (home-page "https://apps.ankiweb.net/")
820 (synopsis "Powerful, intelligent flash cards")
821 (description "Anki is a program which makes remembering things
822easy. Because it's a lot more efficient than traditional study
823methods, you can either greatly decrease your time spent studying, or
824greatly increase the amount you learn.
825
826Anyone who needs to remember things in their daily life can benefit
827from Anki. Since it is content-agnostic and supports images, audio,
828videos and scientific markup (via LaTeX), the possibilities are
829endless. For example:
830@itemize
831@item Learning a language
832@item Studying for medical and law exams
833@item Memorizing people's names and faces
834@item Brushing up on geography
835@item Mastering long poems
836@item Even practicing guitar chords!
837@end itemize")
838 (license license:agpl3+)))
839
34208bf5
NG
840(define-public t4k-common
841 (package
842 (name "t4k-common")
843 (version "0.1.1")
844 (source
845 (origin
846 (method git-fetch)
847 (uri (git-reference
848 (url "https://github.com/tux4kids/t4kcommon")
849 (commit (string-append "upstream/" version))))
850 (file-name (git-file-name name version))
851 (sha256
852 (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
853 (patches
854 (search-patches "t4k-common-libpng16.patch"))))
855 (build-system cmake-build-system)
856 (arguments
857 `(#:tests? #f ;FIXME: cannot find how to run tests
858 #:phases
859 (modify-phases %standard-phases
860 (add-after 'set-paths 'set-sdl-paths
861 (lambda* (#:key inputs #:allow-other-keys)
862 (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
863 "/include/SDL:"
864 (or (getenv "CPATH") "")))))
865 (add-after 'unpack 'fix-andika-font-path
866 (lambda* (#:key inputs #:allow-other-keys)
867 (substitute* "src/t4k_sdl.c"
868 (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
869 (string-append (assoc-ref inputs "font-andika")
870 "/share/fonts/truetype")))
871 #t)))))
872 (native-inputs
873 `(("pkg-config" ,pkg-config)))
874 (inputs
875 `(("font-andika" ,font-sil-andika)
876 ("libpng" ,libpng)
877 ("librsvg" ,librsvg)
878 ("libxml2" ,libxml2)
879 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))))
880 (home-page "https://github.com/tux4kids/t4kcommon")
881 (synopsis "Library of code shared between TuxMath and TuxType")
882 (description "Tux4Kids-Common is a library of code shared between
883TuxMath and TuxType.")
884 (license license:gpl3+)))
8baaf51f
NG
885
886(define-public tuxmath
887 (package
888 (name "tuxmath")
889 (version "2.0.3")
890 (source
891 (origin
892 (method git-fetch)
893 (uri (git-reference
894 (url "https://github.com/tux4kids/tuxmath")
895 (commit (string-append "upstream/" version))))
896 (file-name (git-file-name name version))
897 (sha256
898 (base32 "1f1pz83w6d3mbik2h6xavfxmk5apxlngxbkh80x0m55lhniwkdxv"))
899 (modules '((guix build utils)))
900 ;; Unbundle fonts.
901 (snippet
902 `(begin
903 (for-each delete-file (find-files "data/fonts" "\\.ttf$"))
904 #t))))
905 (build-system gnu-build-system)
906 (arguments
907 `(#:tests? #f ;no test
908 #:phases
909 (modify-phases %standard-phases
910 (add-after 'set-paths 'set-sdl-paths
911 (lambda* (#:key inputs #:allow-other-keys)
912 (setenv "CPATH"
913 (string-append (assoc-ref inputs "sdl")
914 "/include/SDL:"
915 (or (getenv "CPATH") "")))
916 #t))
917 (add-after 'install 'install-desktop-file
918 (lambda* (#:key outputs #:allow-other-keys)
919 (let* ((out (assoc-ref outputs "out"))
920 (apps (string-append out "/share/applications"))
921 (pixmaps (string-append out "/share/pixmaps")))
922 (install-file "tuxmath.desktop" apps)
923 (for-each (lambda (f) (install-file f pixmaps))
924 (find-files "data/images/icons/"
925 "tuxmath\\.(png|ico|svg)$"))
926 #t))))))
927 (native-inputs
928 `(("pkg-config" ,pkg-config)))
929 (inputs
930 `(("librsvg" ,librsvg)
931 ("libxml2" ,libxml2)
932 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))
933 ("t4k-common" ,t4k-common)))
934 (home-page "https://github.com/tux4kids/tuxmath")
935 (synopsis "Educational math tutorial game")
936 (description "@emph{Tux, of Math Command} is an educational math
937tutorial game starring Tux, the Linux penguin, in which you play the
938part of Commander Tux, as he defends his friends from an attack of
939math equations. Comets are crashing towards the friendly penguins in
940their igloos, and you must destroy the comets by solving their
941equations.
942
943TuxMath also includes Factoroids, a game that gives practice in
944factoring numbers and simplifying fractions, as well as zapping rocks
945floating through space.")
946 (license license:gpl3+)))
7adf6f1b 947
948(define-public mdk
949 (package
950 (name "mdk")
951 (version "1.2.10")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (string-append "mirror://gnu/mdk/v1.2.10/mdk-"
956 version ".tar.gz"))
957 (sha256
958 (base32
959 "1rwcq2b5vvv7318j92nxc5dayj27dpfhzc4rjiv4ccvsc0x35x5h"))))
960 (build-system gnu-build-system)
961 (arguments
962 `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
963 (native-inputs
964 `(("flex" ,flex)
965 ("pkg-config" ,pkg-config)
966 ("intltool" ,intltool)
967 ("ncurses" ,ncurses)))
968 (inputs
969 `(("readline" ,readline)
970 ("glib" ,glib)
971 ("gtk+" ,gtk+)
972 ("pango" ,pango)
973 ("libglade" ,libglade)))
974 (home-page "https://www.gnu.org/software/mdk/")
975 (synopsis "Virtual development environment for Knuth's MIX")
976 (description
977 "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
978computer MIX and its assembly language MIXAL. MIX has a virtual CPU with
979standard features such as registers, memory cells, an overflow toggle,
980comparison flags, input-output devices, and a set of binary instructions.
981The package includes a compiler, a virtual machine, a GUI for the virtual
982machine, and more.")
983 (license license:gpl3+)))
648ae621
JK
984
985(define-public exercism
986 (package
987 (name "exercism")
988 (version "3.0.13")
989 (source
990 (origin
991 (method git-fetch)
992 (uri (git-reference
993 (url "https://github.com/exercism/cli")
994 (commit (string-append "v" version))))
995 (file-name (git-file-name name version))
996 (sha256
997 (base32
998 "17gvz9a0sn4p36hf4l77bxhhfipf4x998iay31layqwbnzmb4xy7"))
999 (patches (search-patches "exercism-disable-self-update.patch"))))
1000 (build-system go-build-system)
1001 (arguments
1002 `(#:import-path "github.com/exercism/cli/exercism"
4bc71b4e
JK
1003 #:unpack-path "github.com/exercism/cli"
1004 #:install-source? #f))
648ae621
JK
1005 (inputs
1006 `(("github.com/blang/semver" ,go-github-com-blang-semver)
1007 ("github.com/spf13/cobra" ,go-github-com-spf13-cobra)
1008 ("github.com/spf13/pflag" ,go-github-com-spf13-pflag)
1009 ("github.com/spf13/viper" ,go-github-com-spf13-viper)
1010 ("golang.org/x/net" ,go-golang-org-x-net)
1011 ("golang.org/x/text" ,go-golang-org-x-text)))
1012 (home-page "https://exercism.io")
1013 (synopsis "Mentored learning for programming languages")
1014 (description "Commandline client for exercism.io, a free service providing
1015mentored learning for programming languages.")
1016 (license license:expat)))