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