education.scm 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
  3. ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
  4. ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
  5. ;;; Copyright © 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  7. ;;; Copyright © 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  8. ;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
  9. ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
  10. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  11. ;;; Copyright © 2020 Prafulla Giri <pratheblackdiamond@gmail.com>
  12. ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
  13. ;;;
  14. ;;; This file is part of GNU Guix.
  15. ;;;
  16. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  17. ;;; under the terms of the GNU General Public License as published by
  18. ;;; the Free Software Foundation; either version 3 of the License, or (at
  19. ;;; your option) any later version.
  20. ;;;
  21. ;;; GNU Guix is distributed in the hope that it will be useful, but
  22. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  23. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. ;;; GNU General Public License for more details.
  25. ;;;
  26. ;;; You should have received a copy of the GNU General Public License
  27. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  28. (define-module (gnu packages education)
  29. #:use-module (ice-9 regex)
  30. #:use-module (gnu packages)
  31. #:use-module (gnu packages audio)
  32. #:use-module (gnu packages base)
  33. #:use-module (gnu packages bash)
  34. #:use-module (gnu packages compression)
  35. #:use-module (gnu packages curl)
  36. #:use-module (gnu packages databases)
  37. #:use-module (gnu packages flex)
  38. #:use-module (gnu packages fonts)
  39. #:use-module (gnu packages fontutils)
  40. #:use-module (gnu packages freedesktop)
  41. #:use-module (gnu packages game-development)
  42. #:use-module (gnu packages gettext)
  43. #:use-module (gnu packages glib)
  44. #:use-module (gnu packages gnome)
  45. #:use-module (gnu packages golang)
  46. #:use-module (gnu packages gtk)
  47. #:use-module (gnu packages image)
  48. #:use-module (gnu packages javascript)
  49. #:use-module (gnu packages kde)
  50. #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
  51. #:use-module (gnu packages linux)
  52. #:use-module (gnu packages mp3)
  53. #:use-module (gnu packages ncurses)
  54. #:use-module (gnu packages pdf)
  55. #:use-module (gnu packages perl)
  56. #:use-module (gnu packages pkg-config)
  57. #:use-module (gnu packages python)
  58. #:use-module (gnu packages python-web)
  59. #:use-module (gnu packages python-xyz)
  60. #:use-module (gnu packages qt)
  61. #:use-module (gnu packages readline)
  62. #:use-module (gnu packages sdl)
  63. #:use-module (gnu packages sqlite)
  64. #:use-module (gnu packages texinfo)
  65. #:use-module (gnu packages tls)
  66. #:use-module (gnu packages video)
  67. #:use-module (gnu packages xiph)
  68. #:use-module (gnu packages xorg)
  69. #:use-module (gnu packages xml)
  70. #:use-module (guix gexp)
  71. #:use-module ((guix licenses) #:prefix license:)
  72. #:use-module (guix packages)
  73. #:use-module (guix download)
  74. #:use-module (guix git-download)
  75. #:use-module (guix svn-download)
  76. #:use-module (guix utils)
  77. #:use-module (guix build-system cmake)
  78. #:use-module (guix build-system gnu)
  79. #:use-module (guix build-system go)
  80. #:use-module (guix build-system python)
  81. #:use-module (guix build-system qt)
  82. #:use-module (guix build-system trivial)
  83. #:use-module (srfi srfi-1))
  84. (define-public gcompris
  85. (package
  86. (name "gcompris")
  87. (version "17.05")
  88. (source (origin
  89. (method url-fetch)
  90. (uri (string-append "http://gcompris.net/download/gtk/src/gcompris-"
  91. version ".tar.bz2"))
  92. (sha256
  93. (base32
  94. "18y483alb4r4vfmh80nnl0pah5gv0b8frcm6l1drb9njn5xlcpgc"))))
  95. (build-system gnu-build-system)
  96. (arguments
  97. `(#:configure-flags
  98. ;; Use SDL mixer because otherwise GCompris would need an old version
  99. ;; of Gstreamer.
  100. (list "--enable-sdlmixer"
  101. "LDFLAGS=-lgmodule-2.0")
  102. #:make-flags
  103. (list "CFLAGS=-fcommon")
  104. #:phases
  105. (modify-phases %standard-phases
  106. (add-after 'set-paths 'set-sdl-paths
  107. (lambda* (#:key inputs #:allow-other-keys)
  108. (setenv "CPATH"
  109. (string-append
  110. (search-input-directory inputs "include/SDL")
  111. ":" (or (getenv "CPATH") ""))))))))
  112. (inputs
  113. `(("gtk+" ,gtk+-2)
  114. ("librsvg" ,librsvg)
  115. ("libxml2" ,libxml2)
  116. ("sdl-mixer" ,sdl-mixer)
  117. ("sqlite" ,sqlite)
  118. ("glib:bin" ,glib)
  119. ("python" ,python)))
  120. (native-inputs
  121. `(("intltool" ,intltool)
  122. ("texinfo" ,texinfo)
  123. ("texi2html" ,texi2html)
  124. ("glib:bin" ,glib "bin")
  125. ("pkg-config" ,pkg-config)))
  126. (home-page "https://gcompris.net")
  127. (synopsis "Educational software suite")
  128. (description "GCompris is an educational software suite comprising of
  129. numerous activities for children aged 2 to 10. Some of the activities are
  130. game orientated, but nonetheless still educational. Below you can find a list
  131. of categories with some of the activities available in that category.
  132. @enumerate
  133. @item computer discovery: keyboard, mouse, different mouse gestures, ...
  134. @item arithmetic: table memory, enumeration, double entry table, mirror image, ...
  135. @item science: the canal lock, the water cycle, the submarine, electric simulation ...
  136. @item geography: place the country on the map
  137. @item games: chess, memory, connect 4, oware, sudoku ...
  138. @item reading: reading practice
  139. @item other: learn to tell time, puzzle of famous paintings, vector drawing, cartoon making, ...
  140. @end enumerate
  141. ")
  142. (license license:gpl3+)))
  143. (define-public gcompris-qt
  144. (package
  145. (name "gcompris-qt")
  146. (version "2.3")
  147. (source
  148. (origin
  149. (method url-fetch)
  150. (uri (string-append
  151. "mirror://kde/stable/gcompris/qt/src/gcompris-qt-"
  152. version ".tar.xz"))
  153. (sha256
  154. (base32 "0qncknaaf168anh4cjp7dqz6qzgx948kvgr32j2vga8mjakqn1aj"))))
  155. (build-system qt-build-system)
  156. (arguments
  157. `(#:phases
  158. (modify-phases %standard-phases
  159. (add-before 'check 'start-xorg-server
  160. (lambda* (#:key inputs #:allow-other-keys)
  161. ;; The test suite requires a running X server.
  162. (system "Xvfb :1 &")
  163. (setenv "DISPLAY" ":1")
  164. ;; The test suite wants to write to /homeless-shelter
  165. (setenv "HOME" (getcwd)))))
  166. #:configure-flags (list "-DQML_BOX2D_MODULE=disabled"
  167. "-DBUILD_TESTING=TRUE")))
  168. (native-inputs
  169. (list extra-cmake-modules
  170. gettext-minimal
  171. kdoctools
  172. perl
  173. qttools
  174. xorg-server-for-tests))
  175. (inputs
  176. (list openssl
  177. python-wrapper
  178. qtbase-5
  179. qtdeclarative
  180. qtgraphicaleffects
  181. qtmultimedia
  182. qtquickcontrols
  183. qtsensors
  184. qtsvg
  185. qtxmlpatterns))
  186. (home-page "https://gcompris.net/index-en.html")
  187. (synopsis "Educational games for small children")
  188. (description
  189. "Gcompris offers a large collection of educational games for small
  190. children, designed to be a unified interface to integrate more educational
  191. games. Language-oriented games contain vocabulary, sounds, and voices for
  192. many different languages.
  193. Currently available boards include:
  194. @enumerate
  195. @item learning how to use a mouse and keyboard
  196. @item learning simple arithmetic
  197. @item learning how to read an analog clock
  198. @item recognize letters after hearing their names
  199. @item reading practice
  200. @item small games (memory games, jigsaw puzzles, ...)
  201. @end enumerate")
  202. (license (list license:silofl1.1 ; bundled fonts
  203. license:agpl3+))))
  204. (define-public gotypist
  205. (let ((revision "0")
  206. (commit "03f8618f8e23acdaa94cda3bcf197da520db8dd4"))
  207. (package
  208. (name "gotypist")
  209. (version (git-version "0.0.0" revision commit))
  210. (source
  211. (origin
  212. (method git-fetch)
  213. (uri (git-reference
  214. (url "https://github.com/KappaDistributive/gotypist")
  215. (commit commit)))
  216. (file-name (git-file-name name version))
  217. (sha256
  218. (base32 "0sjndaspqfzffjxz388m384wqz5lzbiw4cwpi688k5aq7n05jh0f"))))
  219. (build-system go-build-system)
  220. (arguments
  221. `(#:unpack-path "github.com/KappaDistributive/gotypist"
  222. #:import-path "github.com/KappaDistributive/gotypist/v1"
  223. #:install-source? #f
  224. #:phases
  225. (modify-phases %standard-phases
  226. (add-before 'build 'install-data
  227. (lambda* (#:key import-path unpack-path outputs #:allow-other-keys)
  228. (let* ((out (assoc-ref outputs "out"))
  229. (data (string-append out "/share/gotypist/data")))
  230. (with-directory-excursion "src"
  231. (with-directory-excursion import-path
  232. (substitute* "lesson.go"
  233. (("\"data/")
  234. (format #f "\"~a/" data))))
  235. (with-directory-excursion unpack-path
  236. (mkdir-p data)
  237. (copy-recursively "data" data))))))
  238. (add-after 'install 'rename-executable
  239. (lambda* (#:key outputs #:allow-other-keys)
  240. (let* ((out (assoc-ref outputs "out"))
  241. (bin (string-append out "/bin")))
  242. (with-directory-excursion bin
  243. (rename-file "v1" "gotypist"))))))))
  244. (native-inputs
  245. (list go-github-com-gizak-termui go-github-com-stretchr-testify))
  246. (home-page "https://github.com/KappaDistributive/gotypist")
  247. (synopsis "Simple typing trainer for text terminals")
  248. (description
  249. "Gotypist is a simple typing tutor for text terminals, similar to
  250. gtypist but with no instruction. Hence it's best suited for people who already
  251. know how to touch type and wish to improve their typing accuracy and/or speed.
  252. You can provide your own lesson text, choose from the included samples, or ask
  253. @command{gotypist} to construct a random lesson from a fixed list of the most
  254. frequently used words in American English.")
  255. (license license:expat))))
  256. (define-public tipp10
  257. (package
  258. (name "tipp10")
  259. (version "2.1.0")
  260. (source (origin
  261. (method url-fetch)
  262. ;; guix download is not able to handle the download links on the
  263. ;; home-page, which use '<meta http-equiv="refresh" …>'
  264. (uri (string-append "mirror://debian/pool/main/"
  265. "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
  266. (sha256
  267. (base32
  268. "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
  269. ;; Apply patches in the order determined by Debian
  270. (patches (search-patches "tipp10-fix-compiling.patch"
  271. "tipp10-remove-license-code.patch"
  272. "tipp10-disable-downloader.patch"
  273. "tipp10-qt5.patch"))))
  274. (build-system cmake-build-system)
  275. (arguments
  276. `(#:tests? #f ; packages has no tests
  277. #:phases
  278. (modify-phases %standard-phases
  279. (add-after 'unpack 'disable-new-version-check
  280. (lambda _
  281. ;; Make new version check to default to false.
  282. ;; TODO: Remove the checkbox from the dialog and the check itself
  283. (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
  284. (("settings.value(\"check_new_version\", true)")
  285. "settings.value(\"check_new_version\", false)"))
  286. #t))
  287. (replace 'configure
  288. (lambda* (#:key outputs #:allow-other-keys)
  289. (let ((out (assoc-ref outputs "out")))
  290. ;; Make program honor $PREFIX
  291. (substitute* "tipp10.pro"
  292. (("\\.path = /usr/") (string-append ".path = " out "/")))
  293. (substitute* "def/defines.h"
  294. (("\"/usr/") (string-append "\"" out "/")))
  295. ;; Recreate Makefile
  296. (invoke "qmake")))))))
  297. (inputs
  298. (list qtbase-5 qtmultimedia))
  299. (home-page "https://www.tipp10.com/")
  300. (synopsis "Touch typing tutor")
  301. (description "Tipp10 is a touch typing tutor. The ingenious thing about
  302. the software is its intelligence feature: characters that are mistyped are
  303. repeated more frequently. Beginners will find their way around right away so
  304. they can start practicing without a hitch.
  305. Useful support functions and an extensive progress tracker, topical lessons
  306. and the ability to create your own practice lessons make learning to type
  307. easy.")
  308. (license license:gpl2)))
  309. (define-public snap
  310. (package
  311. (name "snap")
  312. (version "7.0.5")
  313. (source
  314. (origin
  315. (method git-fetch)
  316. (uri (git-reference
  317. (url "https://github.com/jmoenig/Snap")
  318. (commit (string-append "v" version))))
  319. (file-name (git-file-name name version))
  320. (sha256
  321. (base32 "13j52r810yijvkj85c356c342drc3947j28z3va7kz75mi26whsf"))))
  322. (build-system trivial-build-system)
  323. (arguments
  324. `(#:modules ((guix build utils))
  325. #:builder
  326. (begin
  327. (use-modules (guix build utils))
  328. (let* ((source (assoc-ref %build-inputs "source"))
  329. (out (assoc-ref %outputs "out"))
  330. (share (string-append out "/share/snap")))
  331. (copy-recursively source share)
  332. ;; Replace the sole minified file in the package.
  333. (with-directory-excursion (string-append share "/src")
  334. (delete-file "FileSaver.min.js")
  335. (symlink (search-input-file %build-inputs
  336. "/share/javascript/FileSaver.min.js")
  337. "FileSaver.min.js"))
  338. ;; Create a "snap" executable.
  339. (let* ((bin (string-append out "/bin"))
  340. (script (string-append bin "/snap"))
  341. (snap (string-append share "/snap.html"))
  342. (bash (search-input-file %build-inputs "/bin/sh"))
  343. (xdg-open (search-input-file %build-inputs
  344. "/bin/xdg-open")))
  345. (mkdir-p bin)
  346. (call-with-output-file script
  347. (lambda (port)
  348. (format port "#!~a\n~a '~a'" bash xdg-open snap)))
  349. (chmod script #o555))))))
  350. (inputs
  351. (list bash-minimal js-filesaver xdg-utils))
  352. (home-page "https://snap.berkeley.edu")
  353. (synopsis "Visual, blocks based programming language")
  354. (description "Snap! (formerly BYOB) is a visual, drag-and-drop
  355. programming language. It is an extended reimplementation of Scratch (a
  356. project of the Lifelong Kindergarten Group at the MIT Media Lab) that
  357. allows you to Build Your Own Blocks. It also features first class
  358. lists, first class procedures, and continuations. These added
  359. capabilities make it suitable for a serious introduction to computer
  360. science for high school or college students.
  361. This package provides a @command{snap} executable calling @command{xdg-open}
  362. to open the application in a web browser, for offline usage.")
  363. (license license:agpl3+)))
  364. (define-public toutenclic
  365. (package
  366. (name "toutenclic")
  367. (version "7.00")
  368. (source
  369. (origin
  370. (method url-fetch)
  371. (uri (list
  372. ;; XXX: Upstream does not exist anymore.
  373. (string-append "http://www.bipede.fr/downloads/logiciels/"
  374. "ToutEnClic-" version "-src.zip")
  375. (string-append "https://archive.org/download/tout-en-clic-" version
  376. "-src/ToutEnClic-" version "-src.zip")))
  377. (sha256
  378. (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
  379. (build-system python-build-system)
  380. (arguments
  381. `(#:tests? #f ; no tests
  382. #:phases
  383. (modify-phases %standard-phases
  384. (delete 'build)
  385. (replace 'install
  386. (lambda* (#:key outputs #:allow-other-keys)
  387. (let* ((out (assoc-ref outputs "out"))
  388. (share (string-append out "/share/toutenclic"))
  389. (pixmaps (string-append out "/share/pixmaps"))
  390. (doc (string-append out "share/doc/" ,name "-" ,version))
  391. (bin (string-append out "/bin"))
  392. (executable "toutenclic"))
  393. ;; Install icon.
  394. (install-file "toutenclic.png" pixmaps)
  395. ;; Move files into "share/" directory.
  396. (for-each (lambda (f) (install-file f share))
  397. (find-files "." "\\.py$"))
  398. ;; Install documentation.
  399. (install-file "ToutEnClic.pdf" doc)
  400. ;; Create executable in "bin/".
  401. (mkdir-p bin)
  402. (with-directory-excursion bin
  403. (symlink (string-append share "/" executable ".py")
  404. executable)))))
  405. (add-after 'install 'create-desktop-file
  406. (lambda* (#:key outputs #:allow-other-keys)
  407. (let* ((out (assoc-ref outputs "out"))
  408. (applications (string-append out "/share/applications")))
  409. (mkdir-p applications)
  410. (call-with-output-file
  411. (string-append applications "/toutenclic.desktop")
  412. (lambda (file)
  413. (format file
  414. "[Desktop Entry]~@
  415. Name=ToutEnClic~@
  416. Comment=For schooling without difference~@
  417. Exec=~a/bin/toutenclic~@
  418. TryExec=~@*~a/bin/toutenclic~@
  419. Terminal=false~@
  420. Icon=toutenclic~@
  421. Type=Application~%"
  422. out)))))))))
  423. (native-inputs
  424. (list unzip))
  425. (inputs
  426. (list python-pyqt))
  427. (synopsis "School tools for physically disabled children")
  428. (description "ToutEnClic is intended to facilitate the schooling
  429. of physically disabled children in ordinary schools. It is both
  430. a multi-page virtual exercise book and a kit including pencil,
  431. scissors, glue, ruler, compass, protractor and square. A virtual
  432. keyboard is also available if the child does not have any other
  433. specialized device.")
  434. (home-page "https://bipede.fr/contrib/")
  435. (license license:gpl3)))
  436. (define-public childsplay
  437. (package
  438. (name "childsplay")
  439. (version "3.4")
  440. (source (origin
  441. (method url-fetch)
  442. (uri (string-append
  443. "mirror://sourceforge/schoolsplay/"
  444. "childsplay-" version ".tgz"))
  445. (sha256
  446. (base32
  447. "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
  448. (build-system python-build-system)
  449. (arguments
  450. `(#:python ,python-2
  451. #:tests? #f
  452. #:phases
  453. (modify-phases %standard-phases
  454. (add-after 'unpack 'unbundle-dejavu-font
  455. (lambda* (#:key inputs #:allow-other-keys)
  456. (let* ((dejavu-dir
  457. (string-append (assoc-ref inputs "font-dejavu")
  458. "/share/fonts/truetype"))
  459. (dejavu-font
  460. (string-append dejavu-dir
  461. "/DejaVuSansCondensed-Bold.ttf")))
  462. (substitute* "SPConstants.py"
  463. (("^(TTF(BOLD)? = ).*" _ prefix)
  464. (string-append prefix "'" dejavu-font "'\n")))
  465. (for-each (lambda (f) (delete-file f))
  466. (find-files "lib/SPData" "DejaVu"))
  467. #t)))
  468. (delete 'build)
  469. (replace 'install
  470. (lambda* (#:key outputs #:allow-other-keys)
  471. (let* ((out (assoc-ref outputs "out"))
  472. (pixmaps (string-append out "/share/pixmaps"))
  473. (share (string-append out "/share/childsplay"))
  474. (doc (string-append out "/share/doc/" ,name "-",version)))
  475. ;; Install icon.
  476. (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
  477. ;; Install data.
  478. (mkdir-p share)
  479. (for-each (lambda (f)
  480. (copy-recursively f (string-append share "/" f)))
  481. '("alphabet-sounds" "lib" "locale" "SPWidgets"))
  482. (for-each (lambda (f) (install-file f share))
  483. (find-files "." "\\.(py|dev|db)$"))
  484. ;; Install documentation.
  485. (mkdir-p doc)
  486. (copy-recursively "docs" doc)
  487. #t)))
  488. (add-after 'install 'create-executable
  489. (lambda* (#:key outputs inputs #:allow-other-keys)
  490. (let* ((python (search-input-file inputs "/bin/python"))
  491. (out (assoc-ref outputs "out"))
  492. (bin (string-append out "/bin"))
  493. (executable (string-append bin "/childsplay")))
  494. (mkdir-p bin)
  495. (call-with-output-file executable
  496. (lambda (file)
  497. (format file
  498. "~a ~a"
  499. python
  500. (string-append out "/share/childsplay/childsplay.py"))))
  501. (chmod executable #o555)
  502. #t)))
  503. (add-after 'install 'create-desktop-file
  504. (lambda* (#:key outputs #:allow-other-keys)
  505. (let* ((out (assoc-ref outputs "out"))
  506. (applications (string-append out "/share/applications")))
  507. (mkdir-p applications)
  508. (call-with-output-file
  509. (string-append applications "/childsplay.desktop")
  510. (lambda (file)
  511. (format file
  512. "[Desktop Entry]~@
  513. Name=Childsplay~@
  514. Comment=Suite of educational games for young children~@
  515. Comment[ca]=Conjunt de jocs educatius per a xiquets~@
  516. Comment[es]=Conjunto de juegos educativos para niños~@
  517. Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
  518. Exec=~a/bin/childsplay~@
  519. Terminal=false~@
  520. Icon=logo_cp.svg~@
  521. Type=Application~@
  522. Categories=Application;Game;Education;KidsGame;~@
  523. Keywords=suite;children;games;young;educational;~%"
  524. out)))
  525. #t))))))
  526. (inputs
  527. `(("font-dejavu" ,font-dejavu)
  528. ("pygame" ,python2-pygame)
  529. ("sqlalchemy" ,python2-sqlalchemy)))
  530. (synopsis "Suite of educational games for young children")
  531. (description "Childsplay is a collection of educational activities
  532. for young children. Childsplay can be used at home, kindergartens and
  533. pre-schools. Childsplay is a fun and safe way to let young children
  534. use the computer and at the same time teach them a little math,
  535. letters of the alphabet, spelling, eye-hand coordination, etc.")
  536. (home-page "http://www.schoolsplay.org")
  537. (license license:gpl3+)))
  538. (define-public openboard
  539. ;; The last release builds from qtwebkit, which is planned for removal in
  540. ;; Guix, so use the latest commit of the 1.7-dev branch, which builds with
  541. ;; qtwebengine.
  542. (let ((commit "39e914f600d26565706f0e5b6ea2482b8b4038c7") ;1.6.2-rc0311
  543. (revision "1"))
  544. (package
  545. (name "openboard")
  546. (version (git-version "1.6.1" revision commit))
  547. (source
  548. (origin
  549. (method git-fetch)
  550. (uri (git-reference
  551. (url "https://github.com/OpenBoard-org/OpenBoard")
  552. (commit commit)))
  553. (file-name (git-file-name name version))
  554. (sha256
  555. (base32 "1763l5dywirzidzc93726dggf9819p47hh6a7p7dwzd1bfq1wb2q"))))
  556. (build-system qt-build-system)
  557. (arguments
  558. (list
  559. #:tests? #f ;no tests
  560. #:phases
  561. #~(modify-phases %standard-phases
  562. (add-after 'unpack 'set-initial-values
  563. ;; Remove useless "Check for updates" action from menu.
  564. ;; Also prevent pop-up window about importing Open Sankore
  565. ;; documents since we don't package OpenBoard-Importer.
  566. (lambda _
  567. (substitute* "src/core/UBSettings.cpp"
  568. (("(appHideCheckForSoftwareUpdate = .*?)false(\\);)" _ beg end)
  569. (string-append beg "true" end))
  570. (("(appLookForOpenSankoreInstall = .*?)true(\\);)" _ beg end)
  571. (string-append beg "false" end)))))
  572. (add-after 'unpack 'fix-build-error
  573. ;; XXX: `errorOpeningVirtualKeyboard' variable is only
  574. ;; defined when building for OSX. Yet,
  575. ;; "UBBoardController.cpp" relies on it unconditionally,
  576. ;; resulting in a build failure. Here, we get rid of
  577. ;; that variable, assuming it is always false (its
  578. ;; default value when building for OSX).
  579. (lambda _
  580. (substitute* "src/board/UBBoardController.cpp"
  581. (("if \\(!UBPlatformUtils::errorOpeningVirtualKeyboard\\)")
  582. ""))))
  583. (add-after 'unpack 'fix-hard-coded-env
  584. (lambda* (#:key inputs #:allow-other-keys)
  585. (substitute* "src/frameworks/UBPlatformUtils_linux.cpp"
  586. (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
  587. (add-after 'unpack 'fix-library-path
  588. (lambda* (#:key inputs #:allow-other-keys)
  589. (substitute* "OpenBoard.pro"
  590. (("/usr/include/quazip")
  591. (search-input-directory inputs "/include/quazip5"))
  592. (("/usr/include/poppler")
  593. (search-input-directory inputs "/include/poppler")))))
  594. (replace 'configure
  595. (lambda _
  596. (invoke "qmake" "OpenBoard.pro")))
  597. (replace 'install
  598. (lambda* (#:key inputs #:allow-other-keys)
  599. (let* ((share (string-append #$output "/share"))
  600. (openboard (string-append share "/openboard"))
  601. (i18n (string-append openboard "/i18n")))
  602. ;; Install data.
  603. (with-directory-excursion "resources"
  604. (for-each (lambda (directory)
  605. (let ((target
  606. (string-append openboard "/" directory)))
  607. (mkdir-p target)
  608. (copy-recursively directory target)))
  609. '("customizations" "etc" "library"))
  610. (mkdir-p i18n)
  611. (for-each (lambda (f)
  612. (install-file f i18n))
  613. (find-files "i18n" "\\.qm$")))
  614. ;; Install desktop file an icon.
  615. (install-file "resources/images/OpenBoard.png"
  616. (string-append share
  617. "/icons/hicolor/64x64/apps/"))
  618. (make-desktop-entry-file
  619. (string-append share "/applications/" #$name ".desktop")
  620. #:name "OpenBoard"
  621. #:comment "Interactive whiteboard application"
  622. #:exec "openboard %f"
  623. #:icon "OpenBoard"
  624. #:mime-type "application/ubz"
  625. #:categories '("Education"))
  626. ;; Install executable.
  627. (install-file "build/linux/release/product/OpenBoard" openboard)
  628. (let ((bin (string-append #$output "/bin")))
  629. (mkdir-p bin)
  630. (symlink (string-append openboard "/OpenBoard")
  631. (string-append bin "/openboard")))))))))
  632. (native-inputs
  633. (list qttools))
  634. (inputs
  635. (list alsa-lib
  636. coreutils-minimal ;for patched 'env' shebang
  637. ffmpeg
  638. freetype
  639. lame
  640. libass
  641. libfdk
  642. libressl
  643. libtheora
  644. libva
  645. libvorbis
  646. libvpx
  647. libx264
  648. opus
  649. poppler
  650. qtbase-5
  651. qtdeclarative
  652. qtmultimedia
  653. qtsvg
  654. qtwebchannel
  655. qtwebengine
  656. qtxmlpatterns
  657. quazip-0
  658. sdl
  659. zlib))
  660. (home-page "https://openboard.ch/")
  661. (synopsis "Interactive whiteboard for schools and universities")
  662. (description
  663. "OpenBoard is a teaching software for interactive whiteboard
  664. designed primarily for use in schools and universities. It can be
  665. used both with interactive whiteboards or in a dual-screen setup with
  666. a pen-tablet display and a beamer.")
  667. (license license:gpl3))))
  668. (define-public omnitux
  669. (package
  670. (name "omnitux")
  671. (version "1.2.1")
  672. (source
  673. (origin
  674. (method url-fetch)
  675. (uri (string-append "mirror://sourceforge/omnitux/omnitux/"
  676. "v" version "/omnitux-" version ".tar.bz2"))
  677. (sha256
  678. (base32 "1wmmmbzmxd0blhn00d4g91xwavnab143a31ca3i8hrqgzh6qz9w6"))
  679. (modules '((guix build utils)))
  680. (snippet
  681. '(begin
  682. ;; Remove pre-compiled .pyc files from source.
  683. (for-each delete-file (find-files "bin" "\\.pyc$"))
  684. #t))))
  685. (build-system python-build-system)
  686. (inputs
  687. (list python2-pygame python2-pygtk))
  688. (arguments
  689. `(#:tests? #f ;no test
  690. #:python ,python-2
  691. #:phases
  692. (modify-phases %standard-phases
  693. (delete 'build) ;no setup.py
  694. (replace 'install
  695. (lambda* (#:key outputs #:allow-other-keys)
  696. (let* ((out (assoc-ref outputs "out"))
  697. (share (string-append out "/share"))
  698. (data (string-append share "/omnitux")))
  699. ;; Install documentation.
  700. (let ((doc (string-append share "/doc/" ,name "-" ,version)))
  701. (for-each (lambda (f) (install-file f doc))
  702. '("LICENSE.txt" "README.txt")))
  703. ;; Install data.
  704. (install-file "omnitux.sh" data)
  705. (for-each (lambda (d)
  706. (copy-recursively d (string-append data "/" d)))
  707. '("bin" "data"))
  708. ;; Install the launcher.
  709. (let* ((bin (string-append out "/bin"))
  710. (script (string-append bin "/omnitux"))
  711. (bash (search-input-file %build-inputs "/bin/bash"))
  712. (python (search-input-file %build-inputs
  713. "/bin/python2")))
  714. (mkdir-p bin)
  715. (with-output-to-file script
  716. (lambda ()
  717. (format #t "#!~a~%" bash)
  718. (format #t
  719. "cd ~a; ~a menu.py~%"
  720. (string-append data "/bin")
  721. python)))
  722. (chmod script #o755))
  723. ;; Install icon and desktop file.
  724. (let ((pixmaps (string-append share "/pixmaps")))
  725. (install-file "data/default/icons/Omnitux_logo.svg" pixmaps))
  726. (let ((apps (string-append out "/share/applications")))
  727. (mkdir-p apps)
  728. (with-output-to-file (string-append apps "/omnitux.desktop")
  729. (lambda _
  730. (format #t
  731. "[Desktop Entry]~@
  732. Name=Omnitux~@
  733. GenericName=Omnitux
  734. Comment=An educational game based on multimedia elements.~@
  735. Comment[fr]=Un jeu ludo-éducatif basé sur des éléments multimédias.~@
  736. Exec=~a/bin/omnitux~@
  737. Type=Application~@
  738. Categories=Game;Education;~@
  739. Terminal=false~@
  740. Icon=Omnitux_logo.svg~@"
  741. out))))
  742. #t))))))
  743. (home-page "http://omnitux.sourceforge.net/")
  744. (synopsis "Educational activities based on multimedia elements")
  745. (description "The project aims to provide various educational
  746. activities around multimedia elements (images, sounds, texts). Types
  747. of activities include:
  748. @itemize
  749. @item associations,
  750. @item items to place on a map or a schema,
  751. @item counting activities,
  752. @item puzzles,
  753. @item card faces to remember,
  754. @item find differences between two pictures,
  755. @item ...
  756. @end itemize
  757. Activities are available in English, French, German, Polish,
  758. Portuguese, Spanish and Italian.")
  759. ;; Project's license is GPL3+, but multimedia elements are
  760. ;; released under various licenses.
  761. (license (list license:gpl3+
  762. license:gpl2+
  763. license:cc-by-sa2.0
  764. license:cc-by-sa3.0
  765. license:public-domain))))
  766. (define-public fet
  767. (package
  768. (name "fet")
  769. (version "6.2.2")
  770. (source
  771. (origin
  772. (method url-fetch)
  773. (uri (let ((directory "https://www.lalescu.ro/liviu/fet/download/")
  774. (base (string-append "fet-" version ".tar.bz2")))
  775. (list (string-append directory base)
  776. (string-append directory "old/" base))))
  777. (sha256
  778. (base32 "1x8m543n88iqprh4zccx1zcfm20balmh0h6syrbv03cszmkvfw07"))))
  779. (build-system gnu-build-system)
  780. (arguments
  781. `(#:phases
  782. (modify-phases %standard-phases
  783. (add-after 'unpack 'fix-hardcoded-directories
  784. (lambda* (#:key outputs #:allow-other-keys)
  785. (substitute* (list "fet.pro"
  786. "src/src.pro"
  787. "src/src-cl.pro"
  788. "src/interface/fet.cpp")
  789. (("/usr") (assoc-ref outputs "out")))))
  790. (replace 'configure
  791. (lambda _ (invoke "qmake" "fet.pro"))))))
  792. (inputs
  793. (list qtbase))
  794. (home-page "https://www.lalescu.ro/liviu/fet/")
  795. (synopsis "Timetabling software")
  796. (description
  797. "FET is a program for automatically scheduling the timetable of a school,
  798. high-school or university. It uses a fast and efficient timetabling
  799. algorithm.
  800. Usually, FET is able to solve a complicated timetable in maximum 5-20 minutes.
  801. For extremely difficult timetables, it may take a longer time, a matter of
  802. hours.")
  803. (license license:agpl3+)))
  804. (define-public klavaro
  805. (package
  806. (name "klavaro")
  807. (version "3.13")
  808. (source
  809. (origin
  810. (method url-fetch)
  811. (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
  812. version ".tar.bz2"))
  813. (sha256
  814. (base32 "0z6c3lqikk50mkz3ipm93l48qj7b98lxyip8y6ndg9y9k0z0n878"))))
  815. (build-system gnu-build-system)
  816. (native-inputs
  817. (list intltool pkg-config))
  818. (inputs
  819. (list cairo curl gtk+ gtkdatabox pango))
  820. (home-page "https://klavaro.sourceforge.io/en/index.html")
  821. (synopsis "Touch typing tutor")
  822. (description
  823. "Klavaro is a simple tutor to teach correct typing, almost independently of
  824. language and very flexible regarding to new or unknown keyboard layouts.")
  825. (license license:gpl3+)))
  826. (define-public ktouch
  827. (package
  828. (name "ktouch")
  829. (version "20.12.1")
  830. (source
  831. (origin
  832. (method url-fetch)
  833. (uri (string-append "mirror://kde/stable/release-service/"
  834. version "/src/ktouch-" version ".tar.xz"))
  835. (sha256
  836. (base32 "10lm2p8w26c9n6lhvw3301myfss0dq7hl7rawzb3hsy1lqvmvdib"))))
  837. (build-system qt-build-system)
  838. (native-inputs
  839. (list extra-cmake-modules kdoctools pkg-config))
  840. (inputs
  841. (list kcmutils
  842. kcompletion
  843. kconfig
  844. kconfigwidgets
  845. kcoreaddons
  846. kdeclarative
  847. ki18n
  848. kiconthemes
  849. kitemviews
  850. kqtquickcharts
  851. ktextwidgets
  852. kwidgetsaddons
  853. kwindowsystem
  854. kxmlgui
  855. libxcb
  856. libxkbfile
  857. qtbase-5
  858. qtdeclarative
  859. qtgraphicaleffects
  860. qtquickcontrols2
  861. qtx11extras
  862. qtxmlpatterns))
  863. (home-page "https://edu.kde.org/ktouch/")
  864. (synopsis "Touch typing tutor")
  865. (description
  866. "KTouch is an aid for learning how to type with speed and accuracy. It
  867. provides a sample text to type and indicates which fingers should be used for
  868. each key. A collection of lessons are included for a wide range of different
  869. languages and keyboard layouts, and typing statistics are used to dynamically
  870. adjust the level of difficulty.")
  871. (license license:gpl2)))
  872. (define-public kanatest
  873. ;; Latest release tarball is 0.4.8, which is really old and does not build
  874. ;; commit on sourceforge are not tagged, we take the latest
  875. (let ((commit "860e790a35f547cc96669f805d371a5ba3d8daff")
  876. (revision "0"))
  877. (package
  878. (name "kanatest")
  879. (version (git-version "0.4.10" revision commit))
  880. (source
  881. (origin
  882. (method git-fetch)
  883. (uri (git-reference
  884. (url "https://git.code.sf.net/p/kanatest/code")
  885. (commit commit)))
  886. (file-name (git-file-name name version))
  887. (sha256
  888. (base32 "0dz63m9p4ggzw0yb309qmgnl664qb5q268vaa3i9v0i8qsl66d78"))))
  889. (build-system gnu-build-system)
  890. (native-inputs
  891. (list gettext-minimal ; for msgfmt
  892. pkg-config))
  893. (inputs
  894. (list libxml2 gtk+))
  895. (home-page "https://kanatest.sourceforge.io/")
  896. (synopsis "Hiragana and Katakana simple flashcard tool")
  897. (description "Kanatest is a Japanese kana (Hiragana and Katakana) simple
  898. flashcard tool.
  899. During test the Kanatest displays randomly selected kana char (respecting mode
  900. and lesson) and waits for user answer expected as romaji equivalent. This
  901. process continues until all questions will be answered or all questions will
  902. be answered correctly (depends on options). At the end of test a short info
  903. about drilling time and correctness ratio is displayed. The results are
  904. stored and user can review his performance in any time.")
  905. (license license:gpl2+))))
  906. (define-public anki
  907. (package
  908. (name "anki")
  909. ;; Later versions have dependencies on npm packages not yet in Guix.
  910. (version "2.1.16")
  911. (source
  912. (origin
  913. (method url-fetch)
  914. (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-"
  915. version "-source.tgz"))
  916. (sha256
  917. (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
  918. (patches (search-patches "anki-mpv-args.patch"))))
  919. (build-system gnu-build-system)
  920. (arguments
  921. `(#:make-flags (list (string-append "PREFIX=" %output))
  922. #:tests? #f ;no check target
  923. #:modules ((guix build gnu-build-system)
  924. (guix build utils)
  925. (ice-9 match))
  926. #:phases
  927. (modify-phases %standard-phases
  928. (add-after 'unpack 'disable-update-check
  929. ;; Don't ‘phone home’ unasked to check for updates.
  930. (lambda _
  931. (substitute* "aqt/update.py"
  932. (("requests\\.post")
  933. "throw.an.exception.instead"))
  934. #t))
  935. (delete 'configure) ;no configure script
  936. (add-after 'install 'wrap
  937. (lambda* (#:key inputs outputs #:allow-other-keys)
  938. (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
  939. ;; List of paths to the site-packages directories of Python
  940. ;; library inputs.
  941. (site-packages
  942. (map (lambda (pyinput)
  943. (string-append
  944. (cdr pyinput)
  945. "/lib/python"
  946. ;; Calculate the python version to avoid breaking
  947. ;; with future 3.X releases.
  948. ,(version-major+minor
  949. (package-version python-wrapper))
  950. "/site-packages"))
  951. (filter (match-lambda
  952. ((label . _)
  953. (string-prefix? "python-" label)))
  954. inputs)))
  955. (qtwebengineprocess
  956. (search-input-file inputs
  957. "lib/qt5/libexec/QtWebEngineProcess")))
  958. ;; The program fails to find the QtWebEngineProcess program, so
  959. ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
  960. ;; wrapped to avoid declaring Python libraries as propagated
  961. ;; inputs.
  962. (for-each (lambda (program)
  963. (wrap-program program
  964. `("QTWEBENGINEPROCESS_PATH" =
  965. (,qtwebengineprocess))
  966. `("PATH" prefix (,(string-append
  967. (assoc-ref inputs "mpv")
  968. "/bin")))
  969. `("GUIX_PYTHONPATH" = ,site-packages)))
  970. (find-files bin ".")))
  971. #t)))))
  972. (native-inputs
  973. (list xdg-utils))
  974. (inputs
  975. `(("lame" ,lame)
  976. ("mpv" ,mpv)
  977. ("python" ,python-wrapper)
  978. ("python-beautifulsoup4" ,python-beautifulsoup4)
  979. ("python-decorator" ,python-decorator)
  980. ("python-distro" ,python-distro)
  981. ("python-jsonschema" ,python-jsonschema)
  982. ("python-markdown" ,python-markdown)
  983. ("python-pyaudio" ,python-pyaudio)
  984. ;; `python-pyqtwebengine' must precede `python-pyqt' in PYTHONPATH.
  985. ("python-pyqtwebengine" ,python-pyqtwebengine)
  986. ("python-pyqt" ,python-pyqt-without-qtwebkit)
  987. ("python-requests" ,python-requests)
  988. ("python-send2trash" ,python-send2trash)
  989. ("python-sip" ,python-sip)
  990. ;; `qtwebengine' is included in `pyqtwebengine', included here for easy
  991. ;; wrapping.
  992. ("qtwebengine" ,qtwebengine)))
  993. (home-page "https://apps.ankiweb.net/")
  994. (synopsis "Powerful, intelligent flash cards")
  995. (description "Anki is a program which makes remembering things
  996. easy. Because it's a lot more efficient than traditional study
  997. methods, you can either greatly decrease your time spent studying, or
  998. greatly increase the amount you learn.
  999. Anyone who needs to remember things in their daily life can benefit
  1000. from Anki. Since it is content-agnostic and supports images, audio,
  1001. videos and scientific markup (via LaTeX), the possibilities are
  1002. endless. For example:
  1003. @itemize
  1004. @item Learning a language
  1005. @item Studying for medical and law exams
  1006. @item Memorizing people's names and faces
  1007. @item Brushing up on geography
  1008. @item Mastering long poems
  1009. @item Even practicing guitar chords!
  1010. @end itemize")
  1011. (license license:agpl3+)))
  1012. (define-public t4k-common
  1013. (package
  1014. (name "t4k-common")
  1015. (version "0.1.1")
  1016. (source
  1017. (origin
  1018. (method git-fetch)
  1019. (uri (git-reference
  1020. (url "https://github.com/tux4kids/t4kcommon")
  1021. (commit (string-append "upstream/" version))))
  1022. (file-name (git-file-name name version))
  1023. (sha256
  1024. (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
  1025. (patches (search-patches "t4k-common-libpng16.patch"))
  1026. (modules '((guix build utils)))
  1027. (snippet
  1028. `(begin
  1029. (substitute* "src/t4k_common.h"
  1030. (("char wrapped_lines") "extern char wrapped_lines"))
  1031. #t))))
  1032. (build-system cmake-build-system)
  1033. (arguments
  1034. `(#:tests? #f ;FIXME: cannot find how to run tests
  1035. #:phases
  1036. (modify-phases %standard-phases
  1037. (add-after 'set-paths 'set-sdl-paths
  1038. (lambda* (#:key inputs #:allow-other-keys)
  1039. (setenv "CPATH"
  1040. (string-append
  1041. (search-input-directory inputs "/include/SDL")
  1042. ":" (or (getenv "CPATH") "")))))
  1043. (add-after 'unpack 'fix-andika-font-path
  1044. (lambda* (#:key inputs #:allow-other-keys)
  1045. (substitute* "src/t4k_sdl.c"
  1046. (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
  1047. (string-append (assoc-ref inputs "font-andika")
  1048. "/share/fonts/truetype")))
  1049. #t)))))
  1050. (native-inputs
  1051. (list pkg-config))
  1052. (inputs
  1053. `(("font-andika" ,font-sil-andika)
  1054. ("libpng" ,libpng)
  1055. ("librsvg" ,librsvg)
  1056. ("libxml2" ,libxml2)
  1057. ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))))
  1058. (home-page "https://github.com/tux4kids/t4kcommon")
  1059. (synopsis "Library of code shared between TuxMath and TuxType")
  1060. (description "Tux4Kids-Common is a library of code shared between
  1061. TuxMath and TuxType.")
  1062. (license license:gpl3+)))
  1063. (define-public tuxmath
  1064. (package
  1065. (name "tuxmath")
  1066. (version "2.0.3")
  1067. (source
  1068. (origin
  1069. (method git-fetch)
  1070. (uri (git-reference
  1071. (url "https://github.com/tux4kids/tuxmath")
  1072. (commit (string-append "upstream/" version))))
  1073. (file-name (git-file-name name version))
  1074. (sha256
  1075. (base32 "1f1pz83w6d3mbik2h6xavfxmk5apxlngxbkh80x0m55lhniwkdxv"))
  1076. (modules '((guix build utils)))
  1077. ;; Unbundle fonts.
  1078. (snippet
  1079. `(begin
  1080. ;; Remove duplicate definition.
  1081. (substitute* "src/menu_lan.c"
  1082. (("lan_player_type.*MAX_CLIENTS\\];") ""))
  1083. (for-each delete-file (find-files "data/fonts" "\\.ttf$"))
  1084. #t))))
  1085. (build-system gnu-build-system)
  1086. (arguments
  1087. `(#:tests? #f ;no test
  1088. #:phases
  1089. (modify-phases %standard-phases
  1090. (add-after 'set-paths 'set-sdl-paths
  1091. (lambda* (#:key inputs #:allow-other-keys)
  1092. (setenv "CPATH"
  1093. (string-append
  1094. (search-input-directory inputs "/include/SDL")
  1095. ":"
  1096. (or (getenv "CPATH") "")))))
  1097. (add-after 'install 'install-desktop-file
  1098. (lambda* (#:key outputs #:allow-other-keys)
  1099. (let* ((out (assoc-ref outputs "out"))
  1100. (apps (string-append out "/share/applications"))
  1101. (pixmaps (string-append out "/share/pixmaps")))
  1102. (install-file "tuxmath.desktop" apps)
  1103. (for-each (lambda (f) (install-file f pixmaps))
  1104. (find-files "data/images/icons/"
  1105. "tuxmath\\.(png|ico|svg)$"))
  1106. #t))))))
  1107. (native-inputs
  1108. (list pkg-config))
  1109. (inputs
  1110. `(("librsvg" ,librsvg)
  1111. ("libxml2" ,libxml2)
  1112. ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))
  1113. ("t4k-common" ,t4k-common)))
  1114. (home-page "https://github.com/tux4kids/tuxmath")
  1115. (synopsis "Educational math tutorial game")
  1116. (description "@emph{Tux, of Math Command} is an educational math
  1117. tutorial game starring Tux, the Linux penguin, in which you play the
  1118. part of Commander Tux, as he defends his friends from an attack of
  1119. math equations. Comets are crashing towards the friendly penguins in
  1120. their igloos, and you must destroy the comets by solving their
  1121. equations.
  1122. TuxMath also includes Factoroids, a game that gives practice in
  1123. factoring numbers and simplifying fractions, as well as zapping rocks
  1124. floating through space.")
  1125. (license license:gpl3+)))
  1126. (define-public libeb
  1127. (package
  1128. (name "libeb")
  1129. (version "4.4.3")
  1130. (source
  1131. (origin
  1132. (method url-fetch)
  1133. (uri
  1134. (string-append "ftp://ftp.sra.co.jp/pub/misc/eb/eb-" version ".tar.bz2"))
  1135. (sha256
  1136. (base32
  1137. "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb"))))
  1138. (build-system gnu-build-system)
  1139. (native-inputs ; Required for building docs
  1140. (list perl))
  1141. (inputs
  1142. (list zlib))
  1143. (synopsis "C library for accessing Japanese CD-ROM books")
  1144. (description "The EB library is a library for accessing CD-ROM
  1145. books, which are a common way to distribute electronic dictionaries in
  1146. Japan. It supports the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING
  1147. formats.")
  1148. ;; FIXME: I cannot find a real home page
  1149. (home-page "https://sra.co.jp/")
  1150. (license license:bsd-3)))
  1151. (define-public qolibri
  1152. (package
  1153. (name "qolibri")
  1154. (version "2.1.4")
  1155. (source
  1156. (origin
  1157. (method git-fetch)
  1158. (uri (git-reference
  1159. (url"https://github.com/ludios/qolibri")
  1160. (commit version)))
  1161. (file-name (git-file-name name version))
  1162. (sha256
  1163. (base32 "066y7jcq9vg6hnvn7qxckzhd1qkgfzpzhw69nw5psm43qbaca8lg"))))
  1164. (build-system qt-build-system)
  1165. (arguments
  1166. '(#:tests? #f)) ; no test target
  1167. (native-inputs
  1168. (list qttools))
  1169. (inputs
  1170. (list libeb
  1171. qtbase-5
  1172. qtmultimedia
  1173. qtquickcontrols2
  1174. qtdeclarative
  1175. qtwebchannel
  1176. qtwebengine
  1177. zlib))
  1178. (synopsis "EPWING dictionary reader")
  1179. (description "qolibri is a dictionary viewer for the EPWING dictionary
  1180. format. Most monolingual Japanese dictionaries can only be found in the
  1181. EPWING format.")
  1182. (home-page "https://github.com/ludios/qolibri")
  1183. (license license:gpl2)))
  1184. (define-public mdk
  1185. (package
  1186. (name "mdk")
  1187. (version "1.3.0")
  1188. (source
  1189. (origin
  1190. (method url-fetch)
  1191. (uri (string-append "mirror://gnu/mdk/v" version "/mdk-"
  1192. version ".tar.gz"))
  1193. (sha256
  1194. (base32
  1195. "0bhk3c82kyp8167h71vdpbcr852h5blpnwggcswqqwvvykbms7lb"))))
  1196. (build-system gnu-build-system)
  1197. (arguments
  1198. `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
  1199. (native-inputs
  1200. (list flex intltool pkg-config))
  1201. (inputs
  1202. (list glib
  1203. gtk+
  1204. libglade
  1205. ncurses
  1206. pango
  1207. readline))
  1208. (home-page "https://www.gnu.org/software/mdk/manual/")
  1209. (synopsis "Virtual development environment for Knuth's MIX")
  1210. (description
  1211. "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
  1212. computer MIX and its assembly language MIXAL. MIX has a virtual CPU with
  1213. standard features such as registers, memory cells, an overflow toggle,
  1214. comparison flags, input-output devices, and a set of binary instructions.
  1215. The package includes a compiler, a virtual machine, a GUI for the virtual
  1216. machine, and more.")
  1217. (license license:gpl3+)))
  1218. (define-public exercism
  1219. (package
  1220. (name "exercism")
  1221. (version "3.0.13")
  1222. (source
  1223. (origin
  1224. (method git-fetch)
  1225. (uri (git-reference
  1226. (url "https://github.com/exercism/cli")
  1227. (commit (string-append "v" version))))
  1228. (file-name (git-file-name name version))
  1229. (sha256
  1230. (base32
  1231. "17gvz9a0sn4p36hf4l77bxhhfipf4x998iay31layqwbnzmb4xy7"))
  1232. (patches (search-patches "exercism-disable-self-update.patch"))))
  1233. (build-system go-build-system)
  1234. (arguments
  1235. `(#:import-path "github.com/exercism/cli/exercism"
  1236. #:unpack-path "github.com/exercism/cli"
  1237. #:install-source? #f))
  1238. (inputs
  1239. `(("github.com/blang/semver" ,go-github-com-blang-semver)
  1240. ("github.com/spf13/cobra" ,go-github-com-spf13-cobra)
  1241. ("github.com/spf13/pflag" ,go-github-com-spf13-pflag)
  1242. ("github.com/spf13/viper" ,go-github-com-spf13-viper)
  1243. ("golang.org/x/net" ,go-golang-org-x-net)
  1244. ("golang.org/x/text" ,go-golang-org-x-text)))
  1245. (home-page "https://exercism.io")
  1246. (synopsis "Mentored learning for programming languages")
  1247. (description "Commandline client for exercism.io, a free service providing
  1248. mentored learning for programming languages.")
  1249. (license license:expat)))