gnu: gtksourceview: Update to 3.24.10.
[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>
5c105203 5;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
96ec4604 6;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
3b2cf5c8 7;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
2614de3c
DM
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages education)
25 #:use-module (ice-9 regex)
26 #:use-module (gnu packages)
3cfd12f3
NG
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
2614de3c 29 #:use-module (gnu packages compression)
3cfd12f3 30 #:use-module (gnu packages freedesktop)
2614de3c 31 #:use-module (gnu packages gettext)
0ea179fd
RW
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gnome)
34 #:use-module (gnu packages gtk)
3cfd12f3 35 #:use-module (gnu packages javascript)
b27aacbf 36 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
2614de3c 37 #:use-module (gnu packages perl)
0ea179fd
RW
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
3cfd12f3 40 #:use-module (gnu packages qt)
0ea179fd 41 #:use-module (gnu packages sdl)
cd0322a3 42 #:use-module (gnu packages sqlite)
0ea179fd 43 #:use-module (gnu packages texinfo)
96ec4604 44 #:use-module (gnu packages tls)
7e48e849 45 #:use-module (gnu packages xorg)
0ea179fd 46 #:use-module (gnu packages xml)
2614de3c
DM
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix packages)
49 #:use-module (guix download)
3cfd12f3 50 #:use-module (guix git-download)
2614de3c
DM
51 #:use-module (guix svn-download)
52 #:use-module (guix utils)
2614de3c 53 #:use-module (guix build-system cmake)
3cfd12f3 54 #:use-module (guix build-system gnu)
3b2cf5c8 55 #:use-module (guix build-system python)
3cfd12f3 56 #:use-module (guix build-system trivial)
2614de3c
DM
57 #:use-module (srfi srfi-1))
58
0ea179fd
RW
59(define-public gcompris
60 (package
61 (name "gcompris")
cdc827b3 62 (version "17.05")
0ea179fd
RW
63 (source (origin
64 (method url-fetch)
65 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
66 version ".tar.bz2"))
67 (sha256
68 (base32
cdc827b3 69 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
0ea179fd
RW
70 (build-system gnu-build-system)
71 (arguments
72 `(#:configure-flags
73 ;; Use SDL mixer because otherwise GCompris would need an old version
74 ;; of Gstreamer.
75 (list "--enable-sdlmixer"
76 "LDFLAGS=-lgmodule-2.0")
77 #:phases
78 (modify-phases %standard-phases
79 (add-after 'set-paths 'set-sdl-paths
80 (lambda* (#:key inputs #:allow-other-keys)
81 (setenv "CPATH"
82 (string-append (assoc-ref inputs "sdl-mixer")
83 "/include/SDL"))
84 #t)))))
85 (inputs
86 `(("gtk+" ,gtk+-2)
87 ("librsvg" ,librsvg)
88 ("libxml2" ,libxml2)
89 ("sdl-mixer" ,sdl-mixer)
90 ("sqlite" ,sqlite)
91 ("glib:bin" ,glib)
92 ("python" ,python)))
93 (native-inputs
94 `(("intltool" ,intltool)
95 ("texinfo" ,texinfo)
96 ("texi2html" ,texi2html)
97 ("glib:bin" ,glib "bin")
98 ("pkg-config" ,pkg-config)))
99 (home-page "http://gcompris.net")
100 (synopsis "Educational software suite")
101 (description "GCompris is an educational software suite comprising of
102numerous activities for children aged 2 to 10. Some of the activities are
103game orientated, but nonetheless still educational. Below you can find a list
104of categories with some of the activities available in that category.
105
106@enumerate
107@item computer discovery: keyboard, mouse, different mouse gestures, ...
108@item arithmetic: table memory, enumeration, double entry table, mirror image, ...
109@item science: the canal lock, the water cycle, the submarine, electric simulation ...
110@item geography: place the country on the map
111@item games: chess, memory, connect 4, oware, sudoku ...
112@item reading: reading practice
113@item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
114@end enumerate
115")
116 (license license:gpl3+)))
b84257c0 117
b27aacbf
EF
118(define-public gcompris-qt
119 (package
120 (name "gcompris-qt")
96ec4604 121 (version "0.96")
b27aacbf 122 (source
96ec4604
TGR
123 (origin
124 (method url-fetch)
125 (uri (string-append
126 "https://gcompris.net/download/qt/src/gcompris-qt-"
127 version ".tar.xz"))
128 (sha256
129 (base32 "06483il59l46ny2w771sg45dgzjwv1ph7vidzzbj0wb8wbk2rg52"))))
b27aacbf
EF
130 (build-system cmake-build-system)
131 (arguments
5c105203
EF
132 `(#:phases
133 (modify-phases %standard-phases
7e48e849
EF
134 (add-before 'check 'start-xorg-server
135 (lambda* (#:key inputs #:allow-other-keys)
136 ;; The test suite requires a running X server.
137 (system (string-append (assoc-ref inputs "xorg-server")
138 "/bin/Xvfb :1 &"))
139 (setenv "DISPLAY" ":1")
140 #t))
5c105203
EF
141 (add-after 'install 'wrap-executable
142 (lambda* (#:key inputs outputs #:allow-other-keys)
143 (let ((out (assoc-ref outputs "out")))
144 (wrap-program (string-append out "/bin/gcompris-qt")
145 `("QT_PLUGIN_PATH" ":" prefix
146 ,(map (lambda (label)
147 (string-append (assoc-ref inputs label)
148 "/lib/qt5/plugins"))
149 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
150 `("QML2_IMPORT_PATH" ":" prefix
151 ,(map (lambda (label)
152 (string-append (assoc-ref inputs label)
153 "/lib/qt5/qml"))
154 '("qtdeclarative" "qtgraphicaleffects"
155 "qtmultimedia" "qtquickcontrols"))))
156 #t))))
7e48e849
EF
157 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
158 "-DBUILD_TESTING=TRUE")))
b27aacbf
EF
159 (native-inputs
160 `(("extra-cmake-modules" ,extra-cmake-modules)
161 ("gettext" ,gettext-minimal)
5c105203 162 ("perl" ,perl)
7e48e849
EF
163 ("qttools" ,qttools)
164 ("xorg-server" ,xorg-server)))
b27aacbf 165 (inputs
96ec4604
TGR
166 `(("openssl" ,openssl)
167 ("python-2" ,python-2)
5c105203
EF
168 ("qtbase" ,qtbase)
169 ("qtdeclarative" ,qtdeclarative)
170 ("qtgraphicaleffects" ,qtgraphicaleffects)
171 ("qtmultimedia" ,qtmultimedia)
172 ("qtquickcontrols" ,qtquickcontrols)
173 ("qtsensors" ,qtsensors)
174 ("qtsvg" ,qtsvg)
175 ("qtxmlpatterns" ,qtxmlpatterns)))
176 (home-page "https://gcompris.net/index-en.html")
b27aacbf
EF
177 (synopsis "Educational games for small children")
178 (description
179 "Gcompris offers a large collection of educational games for small
180children, designed to be a unified interface to integrate more educational
181games. Language-oriented games contain vocabulary, sounds, and voices for
182many different languages.
183Currently available boards include:
184@enumerate
185@item learning how to use a mouse and keyboard
186@item learning simple arithmetic
187@item learning how to read an analog clock
188@item recognize letters after hearing their names
189@item reading practice
190@item small games (memory games, jigsaw puzzles, ...)
191@end enumerate\n")
192 (license license:gpl3+)))
193
b84257c0
HG
194(define-public tipp10
195 (package
196 (name "tipp10")
197 (version "2.1.0")
198 (source (origin
199 (method url-fetch)
200 ;; guix download is not able to handle the download links on the
201 ;; home-page, which use '<meta http-equiv="refresh" …>'
202 (uri (string-append "mirror://debian/pool/main/"
203 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
204 (sha256
205 (base32
206 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
207 (patches (search-patches "tipp10-fix-compiling.patch"
208 "tipp10-remove-license-code.patch"))))
209 (build-system cmake-build-system)
210 (arguments
211 `(#:tests? #f ; packages has no tests
212 #:phases
213 (modify-phases %standard-phases
214 (add-after 'unpack 'disable-new-version-check
7cc98473
RW
215 (lambda _
216 ;; Make new version check to default to false.
217 ;; TODO: Remove the checkbox from the dialog and the check itself
218 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
219 (("settings.value(\"check_new_version\", true)")
220 "settings.value(\"check_new_version\", false)"))
221 #t))
b84257c0 222 (replace 'configure
7cc98473
RW
223 (lambda* (#:key outputs #:allow-other-keys)
224 (let ((out (assoc-ref outputs "out")))
225 ;; Make program honor $PREFIX
226 (substitute* "tipp10.pro"
227 (("\\.path = /usr/") (string-append ".path = " out "/")))
228 (substitute* "def/defines.h"
229 (("\"/usr/") (string-append "\"" out "/")))
230 ;; Recreate Makefile
946e5e8a 231 (invoke "qmake")))))))
b84257c0
HG
232 (inputs
233 `(("qt4" ,qt-4)
234 ("sqlite" ,sqlite)))
235 (home-page "https://www.tipp10.com/")
236 (synopsis "Touch typing tutor")
9e39ac41
RW
237 (description "Tipp10 is a touch typing tutor. The ingenious thing about
238the software is its intelligence feature: characters that are mistyped are
239repeated more frequently. Beginners will find their way around right away so
240they can start practicing without a hitch.
b84257c0
HG
241
242Useful support functions and an extensive progress tracker, topical lessons
243and the ability to create your own practice lessons make learning to type
9e39ac41 244easy.")
b84257c0 245 (license license:gpl2)))
3cfd12f3
NG
246
247(define-public snap
248 (package
249 (name "snap")
066d967f 250 (version "4.2.2.9")
3cfd12f3
NG
251 (source
252 (origin
253 (method git-fetch)
254 (uri (git-reference
3a352a44 255 (url "https://github.com/jmoenig/Snap.git")
3cfd12f3
NG
256 (commit version)))
257 (file-name (git-file-name name version))
258 (sha256
259 (base32
066d967f 260 "07qyhh4f8gr1fqyvxa2i6lkzaaa0vl12yzllgp81rdil8z8bi976"))))
3cfd12f3
NG
261 (build-system trivial-build-system)
262 (arguments
263 `(#:modules ((guix build utils))
264 #:builder
265 (begin
266 (use-modules (guix build utils))
267 (let* ((source (assoc-ref %build-inputs "source"))
268 (out (assoc-ref %outputs "out"))
269 (share (string-append out "/share/snap")))
270 (copy-recursively source share)
271 ;; Replace the sole minified file in the package.
3a352a44 272 (with-directory-excursion (string-append share "/src")
3cfd12f3
NG
273 (delete-file "FileSaver.min.js")
274 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
275 "/share/javascript/FileSaver.min.js")
276 "FileSaver.min.js"))
277 ;; Create a "snap" executable.
278 (let* ((bin (string-append out "/bin"))
279 (script (string-append bin "/snap"))
280 (snap (string-append share "/snap.html"))
281 (bash (string-append (assoc-ref %build-inputs "bash")
282 "/bin/sh"))
283 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
284 "/bin/xdg-open")))
285 (mkdir-p bin)
286 (call-with-output-file script
287 (lambda (port)
288 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
289 (chmod script #o555)))
290 #t)))
291 (inputs
292 `(("bash" ,bash-minimal)
293 ("js-filesaver" ,js-filesaver)
294 ("xdg-utils" ,xdg-utils)))
295 (home-page "https://snap.berkeley.edu")
296 (synopsis "Visual, blocks based programming language")
297 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
298programming language. It is an extended reimplementation of Scratch (a
299project of the Lifelong Kindergarten Group at the MIT Media Lab) that
300allows you to Build Your Own Blocks. It also features first class
301lists, first class procedures, and continuations. These added
302capabilities make it suitable for a serious introduction to computer
303science for high school or college students.
304
305This package provides a @command{snap} executable calling @command{xdg-open}
306to open the application in a web browser, for offline usage.")
307 (license license:agpl3+)))
3b2cf5c8
NG
308
309(define-public toutenclic
310 (package
311 (name "toutenclic")
312 (version "6.12")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (string-append "http://www.bipede.fr/downloads/logiciels/"
317 "ToutEnClic-" version ".tar.xz"))
318 (sha256
319 (base32
320 "1369m76fxmi2hgc2bbsq2jchcbh8q0qzml7600pqn8xiqrybvg9g"))))
321 (build-system python-build-system)
322 (arguments
323 `(#:tests? #f ;no test
324 #:phases
325 (modify-phases %standard-phases
326 (delete 'build)
327 (replace 'install
328 (lambda* (#:key outputs #:allow-other-keys)
329 (let* ((out (assoc-ref outputs "out"))
330 (share (string-append out "/share/toutenclic"))
331 (pixmaps (string-append out "/share/pixmaps"))
332 (bin (string-append out "/bin"))
333 (executable "toutenclic.py"))
334 ;; Install icon.
335 (install-file "toutenclic.png" pixmaps)
336 ;; Move files into "share/" directory.
337 (mkdir-p share)
338 (copy-recursively "." share)
339 ;; Create executable in "bin/".
340 (mkdir-p bin)
341 (with-directory-excursion bin
342 (symlink (string-append share "/" executable)
343 executable)))
344 #t))
345 (add-after 'install 'create-desktop-file
346 (lambda* (#:key outputs #:allow-other-keys)
347 (let* ((out (assoc-ref outputs "out"))
348 (applications (string-append out "/share/applications")))
349 (mkdir-p applications)
350 (call-with-output-file
351 (string-append applications "/toutenclic.desktop")
352 (lambda (file)
353 (format file
354 "[Desktop Entry]~@
355 Name=ToutEnClic~@
356 Comment=For schooling without difference~@
357 Exec=~a/bin/toutenclic.py~@
358 TryExec=~@*~a/bin/toutenclic.py~@
359 Terminal=false~@
360 Icon=toutenclic~@
361 Type=Application~%"
362 out)))
363 #t))))))
364 (inputs `(("python-pyqt" ,python-pyqt)))
365 (synopsis "School tools for physically disabled children")
366 (description "ToutEnClic is intended to facilitate the schooling
367of physically disabled children in ordinary schools. It is both
368a multi-page virtual exercise book and a kit including pencil,
369scissors, glue, ruler, compass, protractor and square. A virtual
370keyboard is also available if the child does not have any other
371specialized device.")
372 (home-page "https://bipede.fr/contrib/")
373 (license license:gpl3)))