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