gnu: neofetch: Remove dead code.
[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>
946e5e8a 6;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3cfd12f3 7;;; Copyright © 2018 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)
0ea179fd 30 #:use-module (gnu packages databases)
3cfd12f3 31 #:use-module (gnu packages freedesktop)
2614de3c 32 #:use-module (gnu packages gettext)
0ea179fd
RW
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gnome)
35 #:use-module (gnu packages gtk)
3cfd12f3 36 #:use-module (gnu packages javascript)
b27aacbf 37 #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
2614de3c 38 #:use-module (gnu packages perl)
0ea179fd
RW
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages python)
3cfd12f3 41 #:use-module (gnu packages qt)
0ea179fd
RW
42 #:use-module (gnu packages sdl)
43 #:use-module (gnu packages texinfo)
44 #:use-module (gnu packages xml)
2614de3c
DM
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
3cfd12f3 48 #:use-module (guix git-download)
2614de3c
DM
49 #:use-module (guix svn-download)
50 #:use-module (guix utils)
2614de3c 51 #:use-module (guix build-system cmake)
3cfd12f3
NG
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system trivial)
2614de3c
DM
54 #:use-module (srfi srfi-1))
55
0ea179fd
RW
56(define-public gcompris
57 (package
58 (name "gcompris")
cdc827b3 59 (version "17.05")
0ea179fd
RW
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
63 version ".tar.bz2"))
64 (sha256
65 (base32
cdc827b3 66 "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
0ea179fd
RW
67 (build-system gnu-build-system)
68 (arguments
69 `(#:configure-flags
70 ;; Use SDL mixer because otherwise GCompris would need an old version
71 ;; of Gstreamer.
72 (list "--enable-sdlmixer"
73 "LDFLAGS=-lgmodule-2.0")
74 #:phases
75 (modify-phases %standard-phases
76 (add-after 'set-paths 'set-sdl-paths
77 (lambda* (#:key inputs #:allow-other-keys)
78 (setenv "CPATH"
79 (string-append (assoc-ref inputs "sdl-mixer")
80 "/include/SDL"))
81 #t)))))
82 (inputs
83 `(("gtk+" ,gtk+-2)
84 ("librsvg" ,librsvg)
85 ("libxml2" ,libxml2)
86 ("sdl-mixer" ,sdl-mixer)
87 ("sqlite" ,sqlite)
88 ("glib:bin" ,glib)
89 ("python" ,python)))
90 (native-inputs
91 `(("intltool" ,intltool)
92 ("texinfo" ,texinfo)
93 ("texi2html" ,texi2html)
94 ("glib:bin" ,glib "bin")
95 ("pkg-config" ,pkg-config)))
96 (home-page "http://gcompris.net")
97 (synopsis "Educational software suite")
98 (description "GCompris is an educational software suite comprising of
99numerous activities for children aged 2 to 10. Some of the activities are
100game orientated, but nonetheless still educational. Below you can find a list
101of categories with some of the activities available in that category.
102
103@enumerate
104@item computer discovery: keyboard, mouse, different mouse gestures, ...
105@item arithmetic: table memory, enumeration, double entry table, mirror image, ...
106@item science: the canal lock, the water cycle, the submarine, electric simulation ...
107@item geography: place the country on the map
108@item games: chess, memory, connect 4, oware, sudoku ...
109@item reading: reading practice
110@item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
111@end enumerate
112")
113 (license license:gpl3+)))
b84257c0 114
b27aacbf
EF
115(define-public gcompris-qt
116 (package
117 (name "gcompris-qt")
d53e5b36 118 (version "0.91")
b27aacbf
EF
119 (source
120 (origin
121 (method url-fetch)
122 (uri (string-append
5c105203 123 "https://gcompris.net/download/qt/src/gcompris-qt-"
b27aacbf
EF
124 version ".tar.xz"))
125 (sha256
126 (base32
d53e5b36 127 "09h098w9q79hnzla1pcpqlnnr6dbafm4q6zmdp7wlk11ym8n9kvg"))))
b27aacbf
EF
128 (build-system cmake-build-system)
129 (arguments
5c105203
EF
130 `(#:phases
131 (modify-phases %standard-phases
d53e5b36
EF
132 (add-after 'unpack 'patch-for-qt5.11
133 (lambda _
134 (substitute* "src/core/CMakeLists.txt"
135 (("qt5_use_modules") "target_link_libraries")
136 (("Qml Quick Gui Multimedia Network XmlPatterns Svg Xml Sensors Core")
137 "Qt5::Qml Qt5::Quick Qt5::Gui Qt5::Multimedia Qt5::Core Qt5::Svg Qt5::Xml Qt5::XmlPatterns Qt5::Sensors"))
138 #t))
5c105203
EF
139 (add-after 'install 'wrap-executable
140 (lambda* (#:key inputs outputs #:allow-other-keys)
141 (let ((out (assoc-ref outputs "out")))
142 (wrap-program (string-append out "/bin/gcompris-qt")
143 `("QT_PLUGIN_PATH" ":" prefix
144 ,(map (lambda (label)
145 (string-append (assoc-ref inputs label)
146 "/lib/qt5/plugins"))
147 '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg")))
148 `("QML2_IMPORT_PATH" ":" prefix
149 ,(map (lambda (label)
150 (string-append (assoc-ref inputs label)
151 "/lib/qt5/qml"))
152 '("qtdeclarative" "qtgraphicaleffects"
153 "qtmultimedia" "qtquickcontrols"))))
154 #t))))
155 #:configure-flags (list "-DQML_BOX2D_MODULE=disabled")
b27aacbf
EF
156 #:tests? #f)) ; no test target
157 (native-inputs
158 `(("extra-cmake-modules" ,extra-cmake-modules)
159 ("gettext" ,gettext-minimal)
5c105203
EF
160 ("perl" ,perl)
161 ("qttools" ,qttools)))
b27aacbf
EF
162 (inputs
163 `(("python-2" ,python-2)
5c105203
EF
164 ("qtbase" ,qtbase)
165 ("qtdeclarative" ,qtdeclarative)
166 ("qtgraphicaleffects" ,qtgraphicaleffects)
167 ("qtmultimedia" ,qtmultimedia)
168 ("qtquickcontrols" ,qtquickcontrols)
169 ("qtsensors" ,qtsensors)
170 ("qtsvg" ,qtsvg)
171 ("qtxmlpatterns" ,qtxmlpatterns)))
172 (home-page "https://gcompris.net/index-en.html")
b27aacbf
EF
173 (synopsis "Educational games for small children")
174 (description
175 "Gcompris offers a large collection of educational games for small
176children, designed to be a unified interface to integrate more educational
177games. Language-oriented games contain vocabulary, sounds, and voices for
178many different languages.
179Currently available boards include:
180@enumerate
181@item learning how to use a mouse and keyboard
182@item learning simple arithmetic
183@item learning how to read an analog clock
184@item recognize letters after hearing their names
185@item reading practice
186@item small games (memory games, jigsaw puzzles, ...)
187@end enumerate\n")
188 (license license:gpl3+)))
189
b84257c0
HG
190(define-public tipp10
191 (package
192 (name "tipp10")
193 (version "2.1.0")
194 (source (origin
195 (method url-fetch)
196 ;; guix download is not able to handle the download links on the
197 ;; home-page, which use '<meta http-equiv="refresh" …>'
198 (uri (string-append "mirror://debian/pool/main/"
199 "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
200 (sha256
201 (base32
202 "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
203 (patches (search-patches "tipp10-fix-compiling.patch"
204 "tipp10-remove-license-code.patch"))))
205 (build-system cmake-build-system)
206 (arguments
207 `(#:tests? #f ; packages has no tests
208 #:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'disable-new-version-check
7cc98473
RW
211 (lambda _
212 ;; Make new version check to default to false.
213 ;; TODO: Remove the checkbox from the dialog and the check itself
214 (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
215 (("settings.value(\"check_new_version\", true)")
216 "settings.value(\"check_new_version\", false)"))
217 #t))
b84257c0 218 (replace 'configure
7cc98473
RW
219 (lambda* (#:key outputs #:allow-other-keys)
220 (let ((out (assoc-ref outputs "out")))
221 ;; Make program honor $PREFIX
222 (substitute* "tipp10.pro"
223 (("\\.path = /usr/") (string-append ".path = " out "/")))
224 (substitute* "def/defines.h"
225 (("\"/usr/") (string-append "\"" out "/")))
226 ;; Recreate Makefile
946e5e8a 227 (invoke "qmake")))))))
b84257c0
HG
228 (inputs
229 `(("qt4" ,qt-4)
230 ("sqlite" ,sqlite)))
231 (home-page "https://www.tipp10.com/")
232 (synopsis "Touch typing tutor")
9e39ac41
RW
233 (description "Tipp10 is a touch typing tutor. The ingenious thing about
234the software is its intelligence feature: characters that are mistyped are
235repeated more frequently. Beginners will find their way around right away so
236they can start practicing without a hitch.
b84257c0
HG
237
238Useful support functions and an extensive progress tracker, topical lessons
239and the ability to create your own practice lessons make learning to type
9e39ac41 240easy.")
b84257c0 241 (license license:gpl2)))
3cfd12f3
NG
242
243(define-public snap
244 (package
245 (name "snap")
246 (version "4.1.2.7")
247 (source
248 (origin
249 (method git-fetch)
250 (uri (git-reference
251 (url "https://github.com/jmoenig/Snap--Build-Your-Own-Blocks.git")
252 (commit version)))
253 (file-name (git-file-name name version))
254 (sha256
255 (base32
256 "0cy3jhqqpmivqnfm9kmlnh3fhf3m3y4xqhikblk8vfjprh6vmcvd"))))
257 (build-system trivial-build-system)
258 (arguments
259 `(#:modules ((guix build utils))
260 #:builder
261 (begin
262 (use-modules (guix build utils))
263 (let* ((source (assoc-ref %build-inputs "source"))
264 (out (assoc-ref %outputs "out"))
265 (share (string-append out "/share/snap")))
266 (copy-recursively source share)
267 ;; Replace the sole minified file in the package.
268 (with-directory-excursion share
269 (delete-file "FileSaver.min.js")
270 (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
271 "/share/javascript/FileSaver.min.js")
272 "FileSaver.min.js"))
273 ;; Create a "snap" executable.
274 (let* ((bin (string-append out "/bin"))
275 (script (string-append bin "/snap"))
276 (snap (string-append share "/snap.html"))
277 (bash (string-append (assoc-ref %build-inputs "bash")
278 "/bin/sh"))
279 (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
280 "/bin/xdg-open")))
281 (mkdir-p bin)
282 (call-with-output-file script
283 (lambda (port)
284 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
285 (chmod script #o555)))
286 #t)))
287 (inputs
288 `(("bash" ,bash-minimal)
289 ("js-filesaver" ,js-filesaver)
290 ("xdg-utils" ,xdg-utils)))
291 (home-page "https://snap.berkeley.edu")
292 (synopsis "Visual, blocks based programming language")
293 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
294programming language. It is an extended reimplementation of Scratch (a
295project of the Lifelong Kindergarten Group at the MIT Media Lab) that
296allows you to Build Your Own Blocks. It also features first class
297lists, first class procedures, and continuations. These added
298capabilities make it suitable for a serious introduction to computer
299science for high school or college students.
300
301This package provides a @command{snap} executable calling @command{xdg-open}
302to open the application in a web browser, for offline usage.")
303 (license license:agpl3+)))