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