gnu: Add t4k-common.
[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>
96ec4604 6;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
f4167bda 7;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
2614de3c
DM
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages education)
25 #:use-module (ice-9 regex)
26 #:use-module (gnu packages)
3cfd12f3
NG
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
2614de3c 29 #:use-module (gnu packages compression)
230e59da 30 #:use-module (gnu packages curl)
4f963be0
NG
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages fonts)
3cfd12f3 33 #:use-module (gnu packages freedesktop)
4f963be0 34 #:use-module (gnu packages game-development)
2614de3c 35 #:use-module (gnu packages gettext)
0ea179fd
RW
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
34208bf5 39 #:use-module (gnu packages image)
3cfd12f3 40 #:use-module (gnu packages javascript)
d2c0a7a2 41 #:use-module (gnu packages kde)
b27aacbf 42 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
2614de3c 43 #:use-module (gnu packages perl)
0ea179fd
RW
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
3cfd12f3 46 #:use-module (gnu packages qt)
0ea179fd 47 #:use-module (gnu packages sdl)
cd0322a3 48 #:use-module (gnu packages sqlite)
0ea179fd 49 #:use-module (gnu packages texinfo)
96ec4604 50 #:use-module (gnu packages tls)
7e48e849 51 #:use-module (gnu packages xorg)
0ea179fd 52 #:use-module (gnu packages xml)
2614de3c
DM
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix download)
3cfd12f3 56 #:use-module (guix git-download)
2614de3c
DM
57 #:use-module (guix svn-download)
58 #:use-module (guix utils)
2614de3c 59 #:use-module (guix build-system cmake)
3cfd12f3 60 #:use-module (guix build-system gnu)
3b2cf5c8 61 #:use-module (guix build-system python)
7d796d80 62 #:use-module (guix build-system qt)
3cfd12f3 63 #:use-module (guix build-system trivial)
2614de3c
DM
64 #:use-module (srfi srfi-1))
65
0ea179fd
RW
66(define-public gcompris
67 (package
68 (name "gcompris")
cdc827b3 69 (version "17.05")
0ea179fd
RW
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
73 version ".tar.bz2"))
74 (sha256
75 (base32
cdc827b3 76 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
0ea179fd
RW
77 (build-system gnu-build-system)
78 (arguments
79 `(#:configure-flags
80 ;; Use SDL mixer because otherwise GCompris would need an old version
81 ;; of Gstreamer.
82 (list "--enable-sdlmixer"
83 "LDFLAGS=-lgmodule-2.0")
84 #:phases
85 (modify-phases %standard-phases
86 (add-after 'set-paths 'set-sdl-paths
87 (lambda* (#:key inputs #:allow-other-keys)
88 (setenv "CPATH"
89 (string-append (assoc-ref inputs "sdl-mixer")
5ba856ab
MB
90 "/include/SDL:"
91 (or (getenv "CPATH") "")))
0ea179fd
RW
92 #t)))))
93 (inputs
94 `(("gtk+" ,gtk+-2)
95 ("librsvg" ,librsvg)
96 ("libxml2" ,libxml2)
97 ("sdl-mixer" ,sdl-mixer)
98 ("sqlite" ,sqlite)
99 ("glib:bin" ,glib)
100 ("python" ,python)))
101 (native-inputs
102 `(("intltool" ,intltool)
103 ("texinfo" ,texinfo)
104 ("texi2html" ,texi2html)
105 ("glib:bin" ,glib "bin")
106 ("pkg-config" ,pkg-config)))
107 (home-page "http://gcompris.net")
108 (synopsis "Educational software suite")
109 (description "GCompris is an educational software suite comprising of
110numerous activities for children aged 2 to 10. Some of the activities are
111game orientated, but nonetheless still educational. Below you can find a list
112of categories with some of the activities available in that category.
113
114@enumerate
115@item computer discovery: keyboard, mouse, different mouse gestures, ...
116@item arithmetic: table memory, enumeration, double entry table, mirror image, ...
117@item science: the canal lock, the water cycle, the submarine, electric simulation ...
118@item geography: place the country on the map
119@item games: chess, memory, connect 4, oware, sudoku ...
120@item reading: reading practice
121@item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
122@end enumerate
123")
124 (license license:gpl3+)))
b84257c0 125
b27aacbf
EF
126(define-public gcompris-qt
127 (package
128 (name "gcompris-qt")
96ec4604 129 (version "0.96")
b27aacbf 130 (source
96ec4604
TGR
131 (origin
132 (method url-fetch)
133 (uri (string-append
134 "https://gcompris.net/download/qt/src/gcompris-qt-"
135 version ".tar.xz"))
136 (sha256
137 (base32 "06483il59l46ny2w771sg45dgzjwv1ph7vidzzbj0wb8wbk2rg52"))))
b27aacbf
EF
138 (build-system cmake-build-system)
139 (arguments
5c105203
EF
140 `(#:phases
141 (modify-phases %standard-phases
7e48e849
EF
142 (add-before 'check 'start-xorg-server
143 (lambda* (#:key inputs #:allow-other-keys)
144 ;; The test suite requires a running X server.
145 (system (string-append (assoc-ref inputs "xorg-server")
146 "/bin/Xvfb :1 &"))
147 (setenv "DISPLAY" ":1")
148 #t))
5c105203
EF
149 (add-after 'install 'wrap-executable
150 (lambda* (#:key inputs outputs #:allow-other-keys)
151 (let ((out (assoc-ref outputs "out")))
152 (wrap-program (string-append out "/bin/gcompris-qt")
153 `("QT_PLUGIN_PATH" ":" prefix
154 ,(map (lambda (label)
155 (string-append (assoc-ref inputs label)
156 "/lib/qt5/plugins"))
157 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
158 `("QML2_IMPORT_PATH" ":" prefix
159 ,(map (lambda (label)
160 (string-append (assoc-ref inputs label)
161 "/lib/qt5/qml"))
162 '("qtdeclarative" "qtgraphicaleffects"
163 "qtmultimedia" "qtquickcontrols"))))
164 #t))))
7e48e849
EF
165 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
166 "-DBUILD_TESTING=TRUE")))
b27aacbf
EF
167 (native-inputs
168 `(("extra-cmake-modules" ,extra-cmake-modules)
169 ("gettext" ,gettext-minimal)
5c105203 170 ("perl" ,perl)
7e48e849 171 ("qttools" ,qttools)
ff337525 172 ("xorg-server" ,xorg-server-for-tests)))
b27aacbf 173 (inputs
96ec4604
TGR
174 `(("openssl" ,openssl)
175 ("python-2" ,python-2)
5c105203
EF
176 ("qtbase" ,qtbase)
177 ("qtdeclarative" ,qtdeclarative)
178 ("qtgraphicaleffects" ,qtgraphicaleffects)
179 ("qtmultimedia" ,qtmultimedia)
180 ("qtquickcontrols" ,qtquickcontrols)
181 ("qtsensors" ,qtsensors)
182 ("qtsvg" ,qtsvg)
183 ("qtxmlpatterns" ,qtxmlpatterns)))
184 (home-page "https://gcompris.net/index-en.html")
b27aacbf
EF
185 (synopsis "Educational games for small children")
186 (description
187 "Gcompris offers a large collection of educational games for small
188children, designed to be a unified interface to integrate more educational
189games. Language-oriented games contain vocabulary, sounds, and voices for
190many different languages.
191Currently available boards include:
192@enumerate
193@item learning how to use a mouse and keyboard
194@item learning simple arithmetic
195@item learning how to read an analog clock
196@item recognize letters after hearing their names
197@item reading practice
198@item small games (memory games, jigsaw puzzles, ...)
199@end enumerate\n")
200 (license license:gpl3+)))
201
b84257c0
HG
202(define-public tipp10
203 (package
204 (name "tipp10")
205 (version "2.1.0")
206 (source (origin
207 (method url-fetch)
208 ;; guix download is not able to handle the download links on the
209 ;; home-page, which use '<meta http-equiv="refresh" …>'
210 (uri (string-append "mirror://debian/pool/main/"
211 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
212 (sha256
213 (base32
214 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
215 (patches (search-patches "tipp10-fix-compiling.patch"
216 "tipp10-remove-license-code.patch"))))
217 (build-system cmake-build-system)
218 (arguments
219 `(#:tests? #f ; packages has no tests
220 #:phases
221 (modify-phases %standard-phases
222 (add-after 'unpack 'disable-new-version-check
7cc98473
RW
223 (lambda _
224 ;; Make new version check to default to false.
225 ;; TODO: Remove the checkbox from the dialog and the check itself
226 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
227 (("settings.value(\"check_new_version\", true)")
228 "settings.value(\"check_new_version\", false)"))
229 #t))
b84257c0 230 (replace 'configure
7cc98473
RW
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 ;; Make program honor $PREFIX
234 (substitute* "tipp10.pro"
235 (("\\.path = /usr/") (string-append ".path = " out "/")))
236 (substitute* "def/defines.h"
237 (("\"/usr/") (string-append "\"" out "/")))
238 ;; Recreate Makefile
946e5e8a 239 (invoke "qmake")))))))
b84257c0
HG
240 (inputs
241 `(("qt4" ,qt-4)
242 ("sqlite" ,sqlite)))
243 (home-page "https://www.tipp10.com/")
244 (synopsis "Touch typing tutor")
9e39ac41
RW
245 (description "Tipp10 is a touch typing tutor. The ingenious thing about
246the software is its intelligence feature: characters that are mistyped are
247repeated more frequently. Beginners will find their way around right away so
248they can start practicing without a hitch.
b84257c0
HG
249
250Useful support functions and an extensive progress tracker, topical lessons
251and the ability to create your own practice lessons make learning to type
9e39ac41 252easy.")
b84257c0 253 (license license:gpl2)))
3cfd12f3
NG
254
255(define-public snap
256 (package
257 (name "snap")
62ecae83 258 (version "5.4.5")
3cfd12f3
NG
259 (source
260 (origin
261 (method git-fetch)
262 (uri (git-reference
3a352a44 263 (url "https://github.com/jmoenig/Snap.git")
458f410b 264 (commit (string-append "v" version))))
3cfd12f3
NG
265 (file-name (git-file-name name version))
266 (sha256
62ecae83 267 (base32 "1z6dbcsgvxxs40p23qysfsk4vzpg8jlrr5pqfnjf8q3kpz1xvzxf"))))
3cfd12f3
NG
268 (build-system trivial-build-system)
269 (arguments
270 `(#:modules ((guix build utils))
271 #:builder
272 (begin
273 (use-modules (guix build utils))
274 (let* ((source (assoc-ref %build-inputs "source"))
275 (out (assoc-ref %outputs "out"))
276 (share (string-append out "/share/snap")))
277 (copy-recursively source share)
278 ;; Replace the sole minified file in the package.
3a352a44 279 (with-directory-excursion (string-append share "/src")
3cfd12f3
NG
280 (delete-file "FileSaver.min.js")
281 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
282 "/share/javascript/FileSaver.min.js")
283 "FileSaver.min.js"))
284 ;; Create a "snap" executable.
285 (let* ((bin (string-append out "/bin"))
286 (script (string-append bin "/snap"))
287 (snap (string-append share "/snap.html"))
288 (bash (string-append (assoc-ref %build-inputs "bash")
289 "/bin/sh"))
290 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
291 "/bin/xdg-open")))
292 (mkdir-p bin)
293 (call-with-output-file script
294 (lambda (port)
295 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
296 (chmod script #o555)))
297 #t)))
298 (inputs
299 `(("bash" ,bash-minimal)
300 ("js-filesaver" ,js-filesaver)
301 ("xdg-utils" ,xdg-utils)))
302 (home-page "https://snap.berkeley.edu")
303 (synopsis "Visual, blocks based programming language")
304 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
305programming language. It is an extended reimplementation of Scratch (a
306project of the Lifelong Kindergarten Group at the MIT Media Lab) that
307allows you to Build Your Own Blocks. It also features first class
308lists, first class procedures, and continuations. These added
309capabilities make it suitable for a serious introduction to computer
310science for high school or college students.
311
312This package provides a @command{snap} executable calling @command{xdg-open}
313to open the application in a web browser, for offline usage.")
314 (license license:agpl3+)))
3b2cf5c8
NG
315
316(define-public toutenclic
317 (package
318 (name "toutenclic")
f5557bde 319 (version "7.00")
3b2cf5c8
NG
320 (source
321 (origin
322 (method url-fetch)
323 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
f5557bde 324 "ToutEnClic-" version "-src.zip"))
3b2cf5c8 325 (sha256
f5557bde 326 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
3b2cf5c8
NG
327 (build-system python-build-system)
328 (arguments
632c508c 329 `(#:tests? #f ; no tests
3b2cf5c8
NG
330 #:phases
331 (modify-phases %standard-phases
332 (delete 'build)
333 (replace 'install
334 (lambda* (#:key outputs #:allow-other-keys)
335 (let* ((out (assoc-ref outputs "out"))
336 (share (string-append out "/share/toutenclic"))
337 (pixmaps (string-append out "/share/pixmaps"))
f5557bde 338 (doc (string-append out "share/doc/" ,name "-" ,version))
3b2cf5c8 339 (bin (string-append out "/bin"))
f5557bde 340 (executable "toutenclic"))
3b2cf5c8
NG
341 ;; Install icon.
342 (install-file "toutenclic.png" pixmaps)
343 ;; Move files into "share/" directory.
f5557bde
NG
344 (for-each (lambda (f) (install-file f share))
345 (find-files "." "\\.py$"))
346 ;; Install documentation.
347 (install-file "ToutEnClic.pdf" doc)
3b2cf5c8
NG
348 ;; Create executable in "bin/".
349 (mkdir-p bin)
350 (with-directory-excursion bin
f5557bde 351 (symlink (string-append share "/" executable ".py")
3b2cf5c8
NG
352 executable)))
353 #t))
354 (add-after 'install 'create-desktop-file
355 (lambda* (#:key outputs #:allow-other-keys)
356 (let* ((out (assoc-ref outputs "out"))
357 (applications (string-append out "/share/applications")))
358 (mkdir-p applications)
359 (call-with-output-file
360 (string-append applications "/toutenclic.desktop")
361 (lambda (file)
362 (format file
363 "[Desktop Entry]~@
364 Name=ToutEnClic~@
365 Comment=For schooling without difference~@
f5557bde
NG
366 Exec=~a/bin/toutenclic~@
367 TryExec=~@*~a/bin/toutenclic~@
3b2cf5c8
NG
368 Terminal=false~@
369 Icon=toutenclic~@
370 Type=Application~%"
371 out)))
372 #t))))))
373 (inputs `(("python-pyqt" ,python-pyqt)))
374 (synopsis "School tools for physically disabled children")
375 (description "ToutEnClic is intended to facilitate the schooling
376of physically disabled children in ordinary schools. It is both
377a multi-page virtual exercise book and a kit including pencil,
378scissors, glue, ruler, compass, protractor and square. A virtual
379keyboard is also available if the child does not have any other
380specialized device.")
381 (home-page "https://bipede.fr/contrib/")
382 (license license:gpl3)))
4f963be0
NG
383
384(define-public childsplay
385 (package
386 (name "childsplay")
387 (version "3.4")
388 (source (origin
389 (method url-fetch)
390 (uri (string-append
391 "mirror://sourceforge/schoolsplay/"
392 "childsplay-" version ".tgz"))
393 (sha256
394 (base32
395 "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
396 (build-system python-build-system)
397 (arguments
398 `(#:python ,python-2
399 #:tests? #f
400 #:phases
401 (modify-phases %standard-phases
402 (add-after 'unpack 'unbundle-dejavu-font
403 (lambda* (#:key inputs #:allow-other-keys)
404 (let* ((dejavu-dir
405 (string-append (assoc-ref inputs "font-dejavu")
406 "/share/fonts/truetype"))
407 (dejavu-font
408 (string-append dejavu-dir
409 "/DejaVuSansCondensed-Bold.ttf")))
410 (substitute* "SPConstants.py"
411 (("^(TTF(BOLD)? = ).*" _ prefix)
412 (string-append prefix "'" dejavu-font "'\n")))
413 (for-each (lambda (f) (delete-file f))
414 (find-files "lib/SPData" "DejaVu"))
415 #t)))
416 (delete 'build)
417 (replace 'install
418 (lambda* (#:key outputs #:allow-other-keys)
419 (let* ((out (assoc-ref outputs "out"))
420 (pixmaps (string-append out "/share/pixmaps"))
421 (share (string-append out "/share/childsplay"))
422 (doc (string-append out "/share/doc/" ,name "-",version)))
423 ;; Install icon.
424 (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
425 ;; Install data.
426 (mkdir-p share)
427 (for-each (lambda (f)
428 (copy-recursively f (string-append share "/" f)))
429 '("alphabet-sounds" "lib" "locale" "SPWidgets"))
430 (for-each (lambda (f) (install-file f share))
431 (find-files "." "\\.(py|dev|db)$"))
432 ;; Install documentation.
433 (mkdir-p doc)
434 (copy-recursively "docs" doc)
435 #t)))
436 (add-after 'install 'create-executable
437 (lambda* (#:key outputs inputs #:allow-other-keys)
438 (let* ((python (string-append (assoc-ref inputs "python")
439 "/bin/python"))
440 (out (assoc-ref outputs "out"))
441 (bin (string-append out "/bin"))
442 (executable (string-append bin "/childsplay")))
443 (mkdir-p bin)
444 (call-with-output-file executable
445 (lambda (file)
446 (format file
447 "~a ~a"
448 python
449 (string-append out "/share/childsplay/childsplay.py"))))
450 (chmod executable #o555)
451 #t)))
452 (add-after 'install 'create-desktop-file
453 (lambda* (#:key outputs #:allow-other-keys)
454 (let* ((out (assoc-ref outputs "out"))
455 (applications (string-append out "/share/applications")))
456 (mkdir-p applications)
457 (call-with-output-file
458 (string-append applications "/childsplay.desktop")
459 (lambda (file)
460 (format file
461 "[Desktop Entry]~@
462 Name=Childsplay~@
463 Comment=Suite of educational games for young children~@
464 Comment[ca]=Conjunt de jocs educatius per a xiquets~@
465 Comment[es]=Conjunto de juegos educativos para niños~@
466 Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
467 Exec=~a/bin/childsplay.py~@
468 Terminal=false~@
469 Icon=logo_cp.svg~@
470 Type=Application~@
471 Categories=Application;Game;Education;KidsGame;~@
472 Keywords=suite;children;games;young;educational;~%"
473 out)))
474 #t))))))
475 (inputs
476 `(("font-dejavu" ,font-dejavu)
477 ("pygame" ,python2-pygame)
478 ("sqlalchemy" ,python2-sqlalchemy)))
479 (synopsis "Suite of educational games for young children")
480 (description "Childsplay is a collection of educational activities
481for young children. Childsplay can be used at home, kindergartens and
482pre-schools. Childsplay is a fun and safe way to let young children
483use the computer and at the same time teach them a little math,
484letters of the alphabet, spelling, eye-hand coordination, etc.")
485 (home-page "http://www.schoolsplay.org")
486 (license license:gpl3+)))
52e7295f 487
3450bb81
NG
488(define-public omnitux
489 (package
490 (name "omnitux")
491 (version "1.2.1")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (string-append "mirror://sourceforge/omnitux/omnitux/"
496 "v" version "/omnitux-" version ".tar.bz2"))
497 (sha256
498 (base32 "1wmmmbzmxd0blhn00d4g91xwavnab143a31ca3i8hrqgzh6qz9w6"))
499 (modules '((guix build utils)))
500 (snippet
501 '(begin
502 ;; Remove pre-compiled .pyc files from source.
503 (for-each delete-file (find-files "bin" "\\.pyc$"))
504 #t))))
505 (build-system python-build-system)
506 (inputs
507 `(("python2-pygame" ,python2-pygame)
508 ("python2-pygtk" ,python2-pygtk)))
509 (arguments
510 `(#:tests? #f ;no test
511 #:python ,python-2
512 #:phases
513 (modify-phases %standard-phases
514 (delete 'build) ;no setup.py
515 (replace 'install
516 (lambda* (#:key outputs #:allow-other-keys)
517 (let* ((out (assoc-ref outputs "out"))
518 (share (string-append out "/share"))
519 (data (string-append share "/omnitux")))
520 ;; Install documentation.
521 (let ((doc (string-append share "/doc/" ,name "-" ,version)))
522 (for-each (lambda (f) (install-file f doc))
523 '("LICENSE.txt" "README.txt")))
524 ;; Install data.
525 (install-file "omnitux.sh" data)
526 (for-each (lambda (d)
527 (copy-recursively d (string-append data "/" d)))
528 '("bin" "data"))
529 ;; Install the launcher.
530 (let* ((bin (string-append out "/bin"))
531 (script (string-append bin "/omnitux"))
532 (bash (string-append (assoc-ref %build-inputs "bash")
533 "/bin/bash"))
534 (python (string-append (assoc-ref %build-inputs "python")
535 "/bin/python2")))
536 (mkdir-p bin)
537 (with-output-to-file script
538 (lambda ()
539 (format #t "#!~a~%" bash)
540 (format #t
541 "cd ~a; ~a menu.py~%"
542 (string-append data "/bin")
543 python)))
544 (chmod script #o755))
545 ;; Install icon and desktop file.
546 (let ((pixmaps (string-append share "/pixmaps")))
547 (install-file "data/default/icons/Omnitux_logo.svg" pixmaps))
548 (let ((apps (string-append out "/share/applications")))
549 (mkdir-p apps)
550 (with-output-to-file (string-append apps "/omnitux.desktop")
551 (lambda _
552 (format #t
553 "[Desktop Entry]~@
554 Name=Omnitux~@
555 GenericName=Omnitux
556 Comment=An educational game based on multimedia elements.~@
557 Comment[fr]=Un jeu ludo-éducatif basé sur des éléments multimédias.~@
558 Exec=~a/bin/omnitux~@
559 Type=Application~@
560 Categories=Game;Education;~@
561 Terminal=false~@
562 Icon=Omnitux_logo.svg~@"
563 out))))
564 #t))))))
565 (home-page "http://omnitux.sourceforge.net/")
566 (synopsis "Educational activities based on multimedia elements")
567 (description "The project aims to provide various educational
568activities around multimedia elements (images, sounds, texts). Types
569of activities include:
570@itemize
571@item associations,
572@item items to place on a map or a schema,
573@item counting activities,
574@item puzzles,
575@item card faces to remember,
576@item find differences between two pictures,
577@item ...
578@end itemize
579
580Activities are available in English, French, German, Polish,
581Portuguese, Spanish and Italian.")
582 ;; Project's license is GPL3+, but multimedia elements are
583 ;; released under various licenses.
584 (license (list license:gpl3+
585 license:gpl2+
586 license:cc-by-sa2.0
587 license:cc-by-sa3.0
588 license:public-domain))))
589
52e7295f
NG
590(define-public fet
591 (package
592 (name "fet")
3e4cf41b
NG
593 (version "5.42.3")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
598 "fet-" version ".tar.bz2"))
599 (sha256
600 (base32 "0z31i8kwd59c3hlq35qll61qhc3x63w330ss92glhp12iy0aja1y"))))
52e7295f
NG
601 (build-system gnu-build-system)
602 (arguments
603 `(#:phases
604 (modify-phases %standard-phases
605 (add-after 'unpack 'fix-hardcoded-directories
606 (lambda* (#:key outputs #:allow-other-keys)
607 (substitute* (list "fet.pro"
608 "src/src.pro"
609 "src/src-cl.pro"
610 "src/interface/fet.cpp")
611 (("/usr") (assoc-ref outputs "out")))
612 #t))
613 (replace 'configure
614 (lambda _ (invoke "qmake" "fet.pro"))))))
615 (inputs
616 `(("qtbase" ,qtbase)))
617 (home-page "https://www.lalescu.ro/liviu/fet/")
618 (synopsis "Timetabling software")
619 (description "FET is a program for automatically scheduling the
620timetable of a school, high-school or university. It uses a fast and
621efficient timetabling algorithm.
622
623Usually, FET is able to solve a complicated timetable in maximum 5-20
624minutes. For simpler timetables, it may take a shorter time, under
6255 minutes (in some cases, a matter of seconds). For extremely
626difficult timetables, it may take a longer time, a matter of hours.")
627 (license license:agpl3+)))
628
3f19b268
EF
629(define-public klavaro
630 (package
631 (name "klavaro")
632 (version "3.09")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
637 version ".tar.bz2"))
638 (sha256
639 (base32
640 "12gml7h45b1w9s318h0d5wxw92h7pgajn2kh57j0ak9saq0yb0wr"))))
641 (build-system gnu-build-system)
642 (native-inputs
643 `(("intltool" ,intltool)
644 ("pkg-config" ,pkg-config)))
645 (inputs
646 `(("cairo" ,cairo)
647 ("curl" ,curl)
648 ("gtk+" ,gtk+)
649 ("pango" ,pango)))
650 (home-page "https://klavaro.sourceforge.io/en/index.html")
651 (synopsis "Touch typing tutor")
652 (description
653 "Klavaro is a simple tutor to teach correct typing, almost independently of
654language and very flexible regarding to new or unknown keyboard layouts.")
655 (license license:gpl3+)))
d2c0a7a2
EF
656
657(define-public ktouch
658 (package
659 (name "ktouch")
15ffff8b 660 (version "19.08.3")
d2c0a7a2
EF
661 (source
662 (origin
663 (method url-fetch)
664 (uri (string-append "mirror://kde/stable/applications/"
665 version "/src/ktouch-" version ".tar.xz"))
666 (sha256
667 (base32
15ffff8b 668 "0dqxb3xsjc2rwc9779l5fnr4crhq51bc8ln4azbgnnkzldvq6a4a"))))
7d796d80 669 (build-system qt-build-system)
d2c0a7a2 670 (arguments
7d796d80 671 `(#:phases
50bdf004 672 (modify-phases %standard-phases
d2c0a7a2
EF
673 (add-after 'configure 'patch-makefiles
674 (lambda* (#:key inputs #:allow-other-keys)
675 (let ((qtdec (assoc-ref inputs "qtdeclarative")))
676 (substitute* '("src/CMakeFiles/ktouch_autogen.dir/build.make"
677 "src/CMakeFiles/ktouch.dir/build.make")
678 (("/gnu/store/.*qmlcachegen")
679 (string-append qtdec "/bin/qmlcachegen"))))
d2c0a7a2
EF
680 #t)))))
681 (native-inputs
682 `(("extra-cmake-modules" ,extra-cmake-modules)
683 ("kdoctools" ,kdoctools)
684 ("pkg-config" ,pkg-config)))
685 (inputs
686 `(("kcmutils" ,kcmutils)
687 ("kcompletion" ,kcompletion)
688 ("kconfig" ,kconfig)
689 ("kconfigwidgets" ,kconfigwidgets)
690 ("kcoreaddons" ,kcoreaddons)
691 ("kdeclarative" ,kdeclarative)
692 ("ki18n" ,ki18n)
693 ("kiconthemes" ,kiconthemes)
694 ("kitemviews" ,kitemviews)
695 ("kqtquickcharts" ,kqtquickcharts)
696 ("ktextwidgets" ,ktextwidgets)
697 ("kwidgetsaddons" ,kwidgetsaddons)
698 ("kwindowsystem" ,kwindowsystem)
699 ("kxmlgui" ,kxmlgui)
700 ("libxcb" ,libxcb)
701 ("libxkbfile" ,libxkbfile)
702 ("qtbase" ,qtbase)
703 ("qtdeclarative" ,qtdeclarative)
704 ("qtgraphicaleffects" ,qtgraphicaleffects)
705 ("qtquickcontrols2" ,qtquickcontrols2)
706 ("qtx11extras" ,qtx11extras)
707 ("qtxmlpatterns" ,qtxmlpatterns)))
708 (home-page "https://edu.kde.org/ktouch/")
709 (synopsis "Touch typing tutor")
710 (description
711 "KTouch is an aid for learning how to type with speed and accuracy. It
712provides a sample text to type and indicates which fingers should be used for
713each key. A collection of lessons are included for a wide range of different
714languages and keyboard layouts, and typing statistics are used to dynamically
715adjust the level of difficulty.")
716 (license license:gpl2)))
34208bf5
NG
717
718(define-public t4k-common
719 (package
720 (name "t4k-common")
721 (version "0.1.1")
722 (source
723 (origin
724 (method git-fetch)
725 (uri (git-reference
726 (url "https://github.com/tux4kids/t4kcommon")
727 (commit (string-append "upstream/" version))))
728 (file-name (git-file-name name version))
729 (sha256
730 (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
731 (patches
732 (search-patches "t4k-common-libpng16.patch"))))
733 (build-system cmake-build-system)
734 (arguments
735 `(#:tests? #f ;FIXME: cannot find how to run tests
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'set-paths 'set-sdl-paths
739 (lambda* (#:key inputs #:allow-other-keys)
740 (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
741 "/include/SDL:"
742 (or (getenv "CPATH") "")))))
743 (add-after 'unpack 'fix-andika-font-path
744 (lambda* (#:key inputs #:allow-other-keys)
745 (substitute* "src/t4k_sdl.c"
746 (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
747 (string-append (assoc-ref inputs "font-andika")
748 "/share/fonts/truetype")))
749 #t)))))
750 (native-inputs
751 `(("pkg-config" ,pkg-config)))
752 (inputs
753 `(("font-andika" ,font-sil-andika)
754 ("libpng" ,libpng)
755 ("librsvg" ,librsvg)
756 ("libxml2" ,libxml2)
757 ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))))
758 (home-page "https://github.com/tux4kids/t4kcommon")
759 (synopsis "Library of code shared between TuxMath and TuxType")
760 (description "Tux4Kids-Common is a library of code shared between
761TuxMath and TuxType.")
762 (license license:gpl3+)))