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