From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixV0q-0007Ow-6E for guix-patches@gnu.org; Fri, 31 Jan 2020 07:03:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixV0o-0006wY-Hj for guix-patches@gnu.org; Fri, 31 Jan 2020 07:03:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58901) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixV0o-0006w4-EH for guix-patches@gnu.org; Fri, 31 Jan 2020 07:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ixV0o-00054D-B1 for guix-patches@gnu.org; Fri, 31 Jan 2020 07:03:02 -0500 Subject: [bug#39367] [PATCH] gnu: Add anki. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:53552) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixUzi-0007CH-3x for guix-patches@gnu.org; Fri, 31 Jan 2020 07:01:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixUzg-0004VT-Dl for guix-patches@gnu.org; Fri, 31 Jan 2020 07:01:53 -0500 Received: from mout02.posteo.de ([185.67.36.66]:39817) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ixUzf-0004TF-S9 for guix-patches@gnu.org; Fri, 31 Jan 2020 07:01:52 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 9E1FB240103 for ; Fri, 31 Jan 2020 13:01:48 +0100 (CET) From: Robert Smith Date: Fri, 31 Jan 2020 13:01:12 +0100 Message-Id: <20200131120112.4532-1-robertsmith@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39367@debbugs.gnu.org Cc: Robert Smith * gnu/packages/education.scm (anki): New variable. --- Add package anki to guix, using a slightly outdated version to avoid NPM dependencies gnu/packages/education.scm | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 4f8d7582c7..3f1fa2ca52 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2017, 2018, 2019 Efraim Flashner ;;; Copyright =C2=A9 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018, 2019, 2020 Nicolas Goaziou +;;; Copyright =C2=A9 2020 Robert Smith ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (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) @@ -39,14 +41,18 @@ #: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 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 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:) @@ -714,3 +720,77 @@ each key. A collection of lessons are included for = a wide range of different languages and keyboard layouts, and typing statistics are used to dynami= cally 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/a= nki-" + version "-source.tgz")) + (sha256 + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))= )) + (build-system gnu-build-system) + (arguments + '(#:make-flags (list (string-append "PREFIX=3D" %output)) + #:tests? #f ;no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'install 'wrap + ;; The program fails to find the QtWebEngineProcess program, + ;; so we set QTWEBENGINEPROCESS_PATH to help it. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin")= ) + (qtwebengineprocess (string-append + (assoc-ref inputs "qtwebengine") + "/lib/qt5/libexec/QtWebEnginePro= cess"))) + (for-each (lambda (program) + (wrap-program program + `("QTWEBENGINEPROCESS_PATH" =3D + (,qtwebengineprocess)))) + (find-files bin ".*"))) + #t))))) + (native-inputs + `(("perl" ,perl) + ("xdg-utils" ,xdg-utils))) + (inputs + `(("python" ,python-wrapper) + ("qtwebengine" ,qtwebengine) + ("mpv" ,mpv) + ("lame" ,lame))) + (propagated-inputs + `(("python-pyqtwebengine" ,python-pyqtwebengine) + ("python-pyqt" ,python-pyqt) + ("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-decorator" ,python-decorator) + ("python-distro" ,python-distro) + ("python-markdown" ,python-markdown) + ("python-jsonschema" ,python-jsonschema) + ("python-pyaudio" ,python-pyaudio) + ("python-requests" ,python-requests) + ("python-send2trash" ,python-send2trash) + ("python-sip" ,python-sip))) + (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+))) --=20 2.25.0