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> |
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 | |
99 | numerous activities for children aged 2 to 10. Some of the activities are | |
100 | game orientated, but nonetheless still educational. Below you can find a list | |
101 | of 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") | |
3619b261 | 118 | (version "0.95") |
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 | |
3619b261 | 127 | "1aaijjx2b7k1cyx59jhs64hlp1sppw1faa81qxl5lxc79vifrlrl")))) |
b27aacbf EF |
128 | (build-system cmake-build-system) |
129 | (arguments | |
5c105203 EF |
130 | `(#:phases |
131 | (modify-phases %standard-phases | |
132 | (add-after 'install 'wrap-executable | |
133 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
134 | (let ((out (assoc-ref outputs "out"))) | |
135 | (wrap-program (string-append out "/bin/gcompris-qt") | |
136 | `("QT_PLUGIN_PATH" ":" prefix | |
137 | ,(map (lambda (label) | |
138 | (string-append (assoc-ref inputs label) | |
139 | "/lib/qt5/plugins")) | |
140 | '("qtbase" "qtdeclarative" "qtmultimedia" "qtsvg"))) | |
141 | `("QML2_IMPORT_PATH" ":" prefix | |
142 | ,(map (lambda (label) | |
143 | (string-append (assoc-ref inputs label) | |
144 | "/lib/qt5/qml")) | |
145 | '("qtdeclarative" "qtgraphicaleffects" | |
146 | "qtmultimedia" "qtquickcontrols")))) | |
147 | #t)))) | |
148 | #:configure-flags (list "-DQML_BOX2D_MODULE=disabled") | |
b27aacbf EF |
149 | #:tests? #f)) ; no test target |
150 | (native-inputs | |
151 | `(("extra-cmake-modules" ,extra-cmake-modules) | |
152 | ("gettext" ,gettext-minimal) | |
5c105203 EF |
153 | ("perl" ,perl) |
154 | ("qttools" ,qttools))) | |
b27aacbf EF |
155 | (inputs |
156 | `(("python-2" ,python-2) | |
5c105203 EF |
157 | ("qtbase" ,qtbase) |
158 | ("qtdeclarative" ,qtdeclarative) | |
159 | ("qtgraphicaleffects" ,qtgraphicaleffects) | |
160 | ("qtmultimedia" ,qtmultimedia) | |
161 | ("qtquickcontrols" ,qtquickcontrols) | |
162 | ("qtsensors" ,qtsensors) | |
163 | ("qtsvg" ,qtsvg) | |
164 | ("qtxmlpatterns" ,qtxmlpatterns))) | |
165 | (home-page "https://gcompris.net/index-en.html") | |
b27aacbf EF |
166 | (synopsis "Educational games for small children") |
167 | (description | |
168 | "Gcompris offers a large collection of educational games for small | |
169 | children, designed to be a unified interface to integrate more educational | |
170 | games. Language-oriented games contain vocabulary, sounds, and voices for | |
171 | many different languages. | |
172 | Currently available boards include: | |
173 | @enumerate | |
174 | @item learning how to use a mouse and keyboard | |
175 | @item learning simple arithmetic | |
176 | @item learning how to read an analog clock | |
177 | @item recognize letters after hearing their names | |
178 | @item reading practice | |
179 | @item small games (memory games, jigsaw puzzles, ...) | |
180 | @end enumerate\n") | |
181 | (license license:gpl3+))) | |
182 | ||
b84257c0 HG |
183 | (define-public tipp10 |
184 | (package | |
185 | (name "tipp10") | |
186 | (version "2.1.0") | |
187 | (source (origin | |
188 | (method url-fetch) | |
189 | ;; guix download is not able to handle the download links on the | |
190 | ;; home-page, which use '<meta http-equiv="refresh" …>' | |
191 | (uri (string-append "mirror://debian/pool/main/" | |
192 | "t/tipp10/tipp10_2.1.0.orig.tar.gz")) | |
193 | (sha256 | |
194 | (base32 | |
195 | "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx")) | |
196 | (patches (search-patches "tipp10-fix-compiling.patch" | |
197 | "tipp10-remove-license-code.patch")))) | |
198 | (build-system cmake-build-system) | |
199 | (arguments | |
200 | `(#:tests? #f ; packages has no tests | |
201 | #:phases | |
202 | (modify-phases %standard-phases | |
203 | (add-after 'unpack 'disable-new-version-check | |
7cc98473 RW |
204 | (lambda _ |
205 | ;; Make new version check to default to false. | |
206 | ;; TODO: Remove the checkbox from the dialog and the check itself | |
207 | (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp") | |
208 | (("settings.value(\"check_new_version\", true)") | |
209 | "settings.value(\"check_new_version\", false)")) | |
210 | #t)) | |
b84257c0 | 211 | (replace 'configure |
7cc98473 RW |
212 | (lambda* (#:key outputs #:allow-other-keys) |
213 | (let ((out (assoc-ref outputs "out"))) | |
214 | ;; Make program honor $PREFIX | |
215 | (substitute* "tipp10.pro" | |
216 | (("\\.path = /usr/") (string-append ".path = " out "/"))) | |
217 | (substitute* "def/defines.h" | |
218 | (("\"/usr/") (string-append "\"" out "/"))) | |
219 | ;; Recreate Makefile | |
946e5e8a | 220 | (invoke "qmake"))))))) |
b84257c0 HG |
221 | (inputs |
222 | `(("qt4" ,qt-4) | |
223 | ("sqlite" ,sqlite))) | |
224 | (home-page "https://www.tipp10.com/") | |
225 | (synopsis "Touch typing tutor") | |
9e39ac41 RW |
226 | (description "Tipp10 is a touch typing tutor. The ingenious thing about |
227 | the software is its intelligence feature: characters that are mistyped are | |
228 | repeated more frequently. Beginners will find their way around right away so | |
229 | they can start practicing without a hitch. | |
b84257c0 HG |
230 | |
231 | Useful support functions and an extensive progress tracker, topical lessons | |
232 | and the ability to create your own practice lessons make learning to type | |
9e39ac41 | 233 | easy.") |
b84257c0 | 234 | (license license:gpl2))) |
3cfd12f3 NG |
235 | |
236 | (define-public snap | |
237 | (package | |
238 | (name "snap") | |
066d967f | 239 | (version "4.2.2.9") |
3cfd12f3 NG |
240 | (source |
241 | (origin | |
242 | (method git-fetch) | |
243 | (uri (git-reference | |
3a352a44 | 244 | (url "https://github.com/jmoenig/Snap.git") |
3cfd12f3 NG |
245 | (commit version))) |
246 | (file-name (git-file-name name version)) | |
247 | (sha256 | |
248 | (base32 | |
066d967f | 249 | "07qyhh4f8gr1fqyvxa2i6lkzaaa0vl12yzllgp81rdil8z8bi976")))) |
3cfd12f3 NG |
250 | (build-system trivial-build-system) |
251 | (arguments | |
252 | `(#:modules ((guix build utils)) | |
253 | #:builder | |
254 | (begin | |
255 | (use-modules (guix build utils)) | |
256 | (let* ((source (assoc-ref %build-inputs "source")) | |
257 | (out (assoc-ref %outputs "out")) | |
258 | (share (string-append out "/share/snap"))) | |
259 | (copy-recursively source share) | |
260 | ;; Replace the sole minified file in the package. | |
3a352a44 | 261 | (with-directory-excursion (string-append share "/src") |
3cfd12f3 NG |
262 | (delete-file "FileSaver.min.js") |
263 | (symlink (string-append (assoc-ref %build-inputs "js-filesaver") | |
264 | "/share/javascript/FileSaver.min.js") | |
265 | "FileSaver.min.js")) | |
266 | ;; Create a "snap" executable. | |
267 | (let* ((bin (string-append out "/bin")) | |
268 | (script (string-append bin "/snap")) | |
269 | (snap (string-append share "/snap.html")) | |
270 | (bash (string-append (assoc-ref %build-inputs "bash") | |
271 | "/bin/sh")) | |
272 | (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils") | |
273 | "/bin/xdg-open"))) | |
274 | (mkdir-p bin) | |
275 | (call-with-output-file script | |
276 | (lambda (port) | |
277 | (format port "#!~a\n~a '~a'" bash xdg-open snap))) | |
278 | (chmod script #o555))) | |
279 | #t))) | |
280 | (inputs | |
281 | `(("bash" ,bash-minimal) | |
282 | ("js-filesaver" ,js-filesaver) | |
283 | ("xdg-utils" ,xdg-utils))) | |
284 | (home-page "https://snap.berkeley.edu") | |
285 | (synopsis "Visual, blocks based programming language") | |
286 | (description "Snap! (formerly BYOB) is a visual, drag-and-drop | |
287 | programming language. It is an extended reimplementation of Scratch (a | |
288 | project of the Lifelong Kindergarten Group at the MIT Media Lab) that | |
289 | allows you to Build Your Own Blocks. It also features first class | |
290 | lists, first class procedures, and continuations. These added | |
291 | capabilities make it suitable for a serious introduction to computer | |
292 | science for high school or college students. | |
293 | ||
294 | This package provides a @command{snap} executable calling @command{xdg-open} | |
295 | to open the application in a web browser, for offline usage.") | |
296 | (license license:agpl3+))) |