gnu: znc: Update to 1.8.0.
[jackhill/guix/guix.git] / gnu / packages / education.scm
index b0297e9..d6c2cd0 100644 (file)
@@ -3,8 +3,10 @@
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages education)
   #:use-module (ice-9 regex)
   #:use-module (gnu packages)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages game-development)
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages kde)
   #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
+  #:use-module (gnu packages mp3)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
@@ -126,7 +136,7 @@ of categories with some of the activities available in that category.
 (define-public gcompris-qt
   (package
     (name "gcompris-qt")
-    (version "0.96")
+    (version "0.98")
     (source
      (origin
        (method url-fetch)
@@ -134,11 +144,16 @@ of categories with some of the activities available in that category.
              "https://gcompris.net/download/qt/src/gcompris-qt-"
              version ".tar.xz"))
        (sha256
-        (base32 "06483il59l46ny2w771sg45dgzjwv1ph7vidzzbj0wb8wbk2rg52"))))
+        (base32 "1jmjykn0lpk0v6hs2flmch8v4da5bgxl891nav7szxw9l7aqnf4y"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-test
+           (lambda _
+             (substitute* "tests/core/CMakeLists.txt"
+               (("DownloadManagerTest\\.cpp") "#"))
+             #t))
          (add-before 'check 'start-xorg-server
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The test suite requires a running X server.
@@ -167,6 +182,7 @@ of categories with some of the activities available in that category.
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
        ("gettext" ,gettext-minimal)
+       ("kdoctools" ,kdoctools)
        ("perl" ,perl)
        ("qttools" ,qttools)
        ("xorg-server" ,xorg-server-for-tests)))
@@ -590,14 +606,14 @@ Portuguese, Spanish and Italian.")
 (define-public fet
   (package
     (name "fet")
-    (version "5.42.3")
+    (version "5.44.4")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.lalescu.ro/liviu/fet/download/"
                            "fet-" version ".tar.bz2"))
        (sha256
-        (base32 "0z31i8kwd59c3hlq35qll61qhc3x63w330ss92glhp12iy0aja1y"))))
+        (base32 "1bji4910v6adhngdh5ajz5bxam9z3yqnh8d1h1xajy6npm6qq3nx"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -616,14 +632,14 @@ Portuguese, Spanish and Italian.")
      `(("qtbase" ,qtbase)))
     (home-page "https://www.lalescu.ro/liviu/fet/")
     (synopsis "Timetabling software")
-    (description "FET is a program for automatically scheduling the
-timetable of a school, high-school or university.  It uses a fast and
-efficient timetabling algorithm.
+    (description
+     "FET is a program for automatically scheduling the timetable of a school,
+high-school or university.  It uses a fast and efficient timetabling
+algorithm.
 
-Usually, FET is able to solve a complicated timetable in maximum 5-20
-minutes.  For simpler timetables, it may take a shorter time, under
-5 minutes (in some cases, a matter of seconds).  For extremely
-difficult timetables, it may take a longer time, a matter of hours.")
+Usually, FET is able to solve a complicated timetable in maximum 5-20 minutes.
+For extremely difficult timetables, it may take a longer time, a matter of
+hours.")
     (license license:agpl3+)))
 
 (define-public klavaro
@@ -715,6 +731,107 @@ languages and keyboard layouts, and typing statistics are used to dynamically
 adjust the level of difficulty.")
     (license license:gpl2)))
 
+(define-public anki
+  (package
+    (name "anki")
+    ;; Later versions have dependencies on npm packages not yet in Guix.
+    (version "2.1.16")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-"
+                           version "-source.tgz"))
+       (sha256
+        (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
+       (patches (search-patches "anki-mpv-args.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list (string-append "PREFIX=" %output))
+       #:tests? #f                      ;no check target
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 match))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
+                   ;; List of paths to the site-packages directories of Python
+                   ;; library inputs.
+                   (site-packages
+                    (map (lambda (pyinput)
+                           (string-append
+                            (cdr pyinput)
+                            "/lib/python"
+                            ;; Calculate the python version to avoid breaking
+                            ;; with future 3.X releases.
+                            ,(version-major+minor
+                              (package-version python-wrapper))
+                            "/site-packages"))
+                         (filter (match-lambda
+                                   ((label . _)
+                                    (string-prefix? "python-" label)))
+                                 inputs)))
+                   (qtwebengineprocess
+                    (string-append (assoc-ref inputs "qtwebengine")
+                                   "/lib/qt5/libexec/QtWebEngineProcess")))
+               ;; The program fails to find the QtWebEngineProcess program, so
+               ;; we set QTWEBENGINEPROCESS_PATH to help it.  PYTHONPATH is
+               ;; wrapped to avoid declaring Python libraries as propagated
+               ;; inputs.
+               (for-each (lambda (program)
+                           (wrap-program program
+                             `("QTWEBENGINEPROCESS_PATH" =
+                               (,qtwebengineprocess))
+                             `("PATH" prefix (,(string-append
+                                                (assoc-ref inputs "mpv")
+                                                "/bin")))
+                             `("PYTHONPATH" = ,site-packages)))
+                         (find-files bin ".")))
+             #t)))))
+    (native-inputs
+     `(("xdg-utils" ,xdg-utils)))
+    (inputs
+     `(("lame" ,lame)
+       ("mpv" ,mpv)
+       ("python" ,python-wrapper)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-decorator" ,python-decorator)
+       ("python-distro" ,python-distro)
+       ("python-jsonschema" ,python-jsonschema)
+       ("python-markdown" ,python-markdown)
+       ("python-pyaudio" ,python-pyaudio)
+       ;; `python-pyqtwebengine' must precede `python-pyqt' in PYTHONPATH.
+       ("python-pyqtwebengine" ,python-pyqtwebengine)
+       ("python-pyqt" ,python-pyqt)
+       ("python-requests" ,python-requests)
+       ("python-send2trash" ,python-send2trash)
+       ("python-sip" ,python-sip)
+       ;; `qtwebengine' is included in `pyqtwebengine', included here for easy
+       ;; wrapping.
+       ("qtwebengine" ,qtwebengine)))
+    (home-page "https://apps.ankiweb.net/")
+    (synopsis "Powerful, intelligent flash cards")
+    (description "Anki is a program which makes remembering things
+easy.  Because it's a lot more efficient than traditional study
+methods, you can either greatly decrease your time spent studying, or
+greatly increase the amount you learn.
+
+Anyone who needs to remember things in their daily life can benefit
+from Anki.  Since it is content-agnostic and supports images, audio,
+videos and scientific markup (via LaTeX), the possibilities are
+endless.  For example:
+@itemize
+@item Learning a language
+@item Studying for medical and law exams
+@item Memorizing people's names and faces
+@item Brushing up on geography
+@item Mastering long poems
+@item Even practicing guitar chords!
+@end itemize")
+    (license license:agpl3+)))
+
 (define-public t4k-common
   (package
     (name "t4k-common")
@@ -822,3 +939,40 @@ TuxMath also includes Factoroids, a game that gives practice in
 factoring numbers and simplifying fractions, as well as zapping rocks
 floating through space.")
     (license license:gpl3+)))
+
+(define-public mdk
+  (package
+    (name "mdk")
+    (version "1.2.10")
+    (source
+    (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnu/mdk/v1.2.10/mdk-"
+                          version ".tar.gz"))
+      (sha256
+        (base32
+          "1rwcq2b5vvv7318j92nxc5dayj27dpfhzc4rjiv4ccvsc0x35x5h"))))
+   (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
+    (native-inputs
+     `(("flex" ,flex)
+       ("pkg-config" ,pkg-config)
+       ("intltool" ,intltool)
+       ("ncurses" ,ncurses)))
+   (inputs
+    `(("readline" ,readline)
+      ("glib" ,glib)
+      ("gtk+" ,gtk+)
+      ("pango" ,pango)
+      ("libglade" ,libglade)))
+   (home-page "https://www.gnu.org/software/mdk/")
+    (synopsis "Virtual development environment for Knuth's MIX")
+    (description
+     "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
+computer MIX and its assembly language MIXAL.  MIX has a virtual CPU with
+standard features such as registers, memory cells, an overflow toggle,
+comparison flags, input-output devices, and a set of binary instructions.
+The package includes a compiler, a virtual machine, a GUI for the virtual
+machine, and more.")
+    (license license:gpl3+)))