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