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