From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 31 07:02:02 2020 Received: (at submit) by debbugs.gnu.org; 31 Jan 2020 12:02:02 +0000 Received: from localhost ([127.0.0.1]:36640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixUzl-00052V-Mf for submit@debbugs.gnu.org; Fri, 31 Jan 2020 07:02:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:51143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixUzk-00052O-0q for submit@debbugs.gnu.org; Fri, 31 Jan 2020 07:01:56 -0500 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.3.2 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1580472108; bh=SWHSIN3FU6W8Zriu+QdJrkOitzA70ChVmQifT0wO81c=; h=From:To:Cc:Subject:Date:From; b=ClZsA3pz3N63jKDxfeCD6jqa/Un03wlsGhQbcTD7Tgoelz+X6c3g9CCRkG5fIXXzu vCmDdbXi5DllrKFQmFZ3y9lLwv8NWBK7jw2qns8m69cbnfmwpFBNHb7D4D6HgyRwP8 jLPfpBzEB2WLbTO2opoXTf3ZAxjtRZza6NMuFT94+Y8ed8MBIRL+YF1zGvMiucLgXX JCPFFuwUNltcO94EYjUgS1VUiQ4wnG5HUTSvO16ezsLJQ4SrP7cr+UesGU0SARbaKW eqCxs7g3fsw4yO+7gvIsaUF3GVuanyuQJNfhuLDtgV3JdDtbZoVBiY3TlDguJTZzU3 SRY0RyihmC9Sg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 488G6J2bbzz9rxD; Fri, 31 Jan 2020 13:01:44 +0100 (CET) From: Robert Smith To: guix-patches@gnu.org Subject: [PATCH] gnu: Add anki. Date: Fri, 31 Jan 2020 13:01:12 +0100 Message-Id: <20200131120112.4532-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit Cc: Robert Smith X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 02 08:01:57 2020 Received: (at 39367) by debbugs.gnu.org; 2 Feb 2020 13:01:57 +0000 Received: from localhost ([127.0.0.1]:39578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyEsv-0000Se-2H for submit@debbugs.gnu.org; Sun, 02 Feb 2020 08:01:57 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:40377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyEss-0000SV-TX for 39367@debbugs.gnu.org; Sun, 02 Feb 2020 08:01:55 -0500 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B580F200004; Sun, 2 Feb 2020 13:01:52 +0000 (UTC) From: Nicolas Goaziou To: Robert Smith Subject: Re: [bug#39367] [PATCH] gnu: Add anki. References: <20200131120112.4532-1-robertsmith@posteo.net> Date: Sun, 02 Feb 2020 14:01:43 +0100 In-Reply-To: <20200131120112.4532-1-robertsmith@posteo.net> (Robert Smith's message of "Fri, 31 Jan 2020 13:01:12 +0100") Message-ID: <87zhe1b0so.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39367 Cc: 39367@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, Robert Smith writes: > * gnu/packages/education.scm (anki): New variable. Thank you! Some comments follow. > + '(#:make-flags (list (string-append "PREFIX=" %output)) OOC, isn't it automatic in gnu-build-system? > + (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))) Please order inputs and propagated-inputs alphabetically. The package builds fine, but when trying to run "anki", I get the following error: ModuleNotFoundError: No module named 'decorator' It looks like you also need to wrap PYTHONPATH around the executable. WDYT? Regards, -- Nicolas Goaziou From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 11:11:31 2020 Received: (at 39367) by debbugs.gnu.org; 3 Feb 2020 16:11:31 +0000 Received: from localhost ([127.0.0.1]:42127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeJv-0000xO-L3 for submit@debbugs.gnu.org; Mon, 03 Feb 2020 11:11:31 -0500 Received: from mout02.posteo.de ([185.67.36.66]:33841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeJt-0000x4-Gm for 39367@debbugs.gnu.org; Mon, 03 Feb 2020 11:11:30 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id DEB85240106 for <39367@debbugs.gnu.org>; Mon, 3 Feb 2020 17:11:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1580746282; bh=FXgZH0t3foHm+mOTB+1D63z8nE7a2zk7ZN7M98s5cnQ=; h=Date:Subject:From:To:Cc:From; b=jWMTOspkTAL11dP0Z5dGmaUKedY3XBzgvBgeQsa+b7gGP0gufBnjlUs+pMe1Qn6oW 2rLIcD7d9y1hKAtLCqf4/BwoC6paRX1D40HeiiLSluE7Td3uoVpT3U14PLYClAlIjZ j0uP2U385xZT6Re2a//iil/F80r0R1JEVxIn5cvwI2IKjRFABF+chiX9iEapVRr9UK DqEx2ren1EKVdmJ/yeW6eUmrmRjBripNDnNSMbZGHV0Blsy4dWdGp9lg4hLRAieWtp owVs66ALEnJGjW0mpru7heQ/aNGv9BsqfpffOOWUFyA5rTp3Oc32ZaoSRM6WlRc5R5 pj1NalNQcMN5g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48BCVy05v1z9rxN; Mon, 3 Feb 2020 17:11:21 +0100 (CET) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 In-Reply-To: <87zhe1b0so.fsf@nicolasgoaziou.fr> Date: Mon, 03 Feb 2020 17:11:20 +0100 Subject: Re: [bug#39367] [PATCH] gnu: Add anki. From: "Robert Smith" To: "Nicolas Goaziou" Message-Id: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39367 Cc: 39367@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Sun Feb 2, 2020 at 2:01 PM Nicolas Goaziou wrote: > > + '(#:make-flags (list (string-append "PREFIX=3D" %output)) >=20 > OOC, isn't it automatic in gnu-build-system? For some reason I thought that this usually happened in the configure stage, which I deleted. You're probably right, I'll double-check and fix if necessary. > Please order inputs and propagated-inputs alphabetically. Will fix! =20 > The package builds fine, but when trying to run "anki", I get the > following error: >=20 > ModuleNotFoundError: No module named 'decorator' >=20 > It looks like you also need to wrap PYTHONPATH around the executable. WDY= T? Since Anki uses python at run time, is the proper action to wrap the executable with the desired pythonpath, or to declare python as a propagated input? Propagating python sounds simpler, but would likely be inconvienent for users who need custom python versions. I'll look into wrapping PYTHONPATH and I will resubmit. Thank you for reviewing my patch! Best, Robert From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 11:18:33 2020 Received: (at 39367) by debbugs.gnu.org; 3 Feb 2020 16:18:33 +0000 Received: from localhost ([127.0.0.1]:42131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeQj-00018I-DI for submit@debbugs.gnu.org; Mon, 03 Feb 2020 11:18:33 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:47431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeQg-000186-Gs for 39367@debbugs.gnu.org; Mon, 03 Feb 2020 11:18:31 -0500 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 391A5240003; Mon, 3 Feb 2020 16:18:28 +0000 (UTC) From: Nicolas Goaziou To: "Robert Smith" Subject: Re: [bug#39367] [PATCH] gnu: Add anki. References: Date: Mon, 03 Feb 2020 17:18:18 +0100 In-Reply-To: (Robert Smith's message of "Mon, 03 Feb 2020 17:11:20 +0100") Message-ID: <87ftfr8x11.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39367 Cc: 39367@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, "Robert Smith" writes: > Since Anki uses python at run time, is the proper action to wrap the > executable with the desired pythonpath, or to declare python as a > propagated input? Propagating python sounds simpler, but would likely be > inconvienent for users who need custom python versions. I'll look into > wrapping PYTHONPATH and I will resubmit. As a rule of thumb, with a few exceptions=E2=80=94notably in emacs-build-system=E2=80=94, propagated-inputs should ideally be used as a = last resort, when nothing else works. Regards, --=20 Nicolas Goaziou From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 04 07:02:00 2020 Received: (at 39367) by debbugs.gnu.org; 4 Feb 2020 12:02:00 +0000 Received: from localhost ([127.0.0.1]:42692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iywtw-0003MH-9K for submit@debbugs.gnu.org; Tue, 04 Feb 2020 07:01:59 -0500 Received: from mout01.posteo.de ([185.67.36.65]:51554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iywts-0003Lw-2K for 39367@debbugs.gnu.org; Tue, 04 Feb 2020 07:01:55 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DF79B160060 for <39367@debbugs.gnu.org>; Tue, 4 Feb 2020 13:01:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1580817704; bh=tdTnavOnqucmQZzGc3TQTutUlQj0+K4KLN3VHus6iyQ=; h=From:To:Cc:Subject:Date:From; b=g1OknwSvU/z28x3CpNQWaE70YcyzIzbPRrfpzezUHlz2NOWOuCG+ElRC/MmAwysa5 XxaQVYM0tRafxlnSJtEvw8puegZR87aAGqYN6degIrrabMqYfhSHs5aDT/xwsu+FvY 9FmrPIJTn9FFTuIntp6oC6dBZmb2kZAHNxBTFh6H8+zYQqUNd3vLykeciFM0rFjHu2 LIVt936oj89EHV8gH2e785Nbt5WznGM3J0DrhE3rB1ctaDwNPoaR/abFmZi+cRM9MW Uj53GIl1piiuZVdD6s3LZWNqfFaO4G0bP7Jb8qLYxw+g/eATIivxYt39DAJ9Pwjt6k SmfCGAY4tqYfA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48BjwR6pbyz6tm9; Tue, 4 Feb 2020 13:01:43 +0100 (CET) From: Robert Smith To: Nicolas Goaziou Subject: [PATCH v2] gnu: Add anki. Date: Tue, 4 Feb 2020 13:01:15 +0100 Message-Id: <20200204120115.7611-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39367 Cc: Robert Smith , 39367@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/education.scm (anki): New variable. --- gnu/packages/education.scm | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) Nicolas, I was able to wrap the PYTHONPATH environment variable into the binary, avoiding any propagated inputs. I still have to set 'PREFIX' manually, as in the GNU build system that is done in the configure stage, which anki doesn't have. I also removed perl as a native input, which was an uncaught mistake from last time (the last patch woud have built without perl as well). Thanks again for reviewing my work! -Robert diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 4f8d7582c7..dcb57c8874 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou +;;; Copyright © 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,100 @@ each key. A collection of lessons are included for a wide range of different 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")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "PREFIX=" %output)) + #:tests? #f ;no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (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 + (lambda (input) + (and + (>= (string-length (car input)) 7) + (string= (car input) "python-" 0 7))) + 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)) + `("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 preceed python-pyqt in the 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+))) -- 2.25.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 05 09:03:20 2020 Received: (at 39367-done) by debbugs.gnu.org; 5 Feb 2020 14:03:20 +0000 Received: from localhost ([127.0.0.1]:45233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izLGy-0002FI-3K for submit@debbugs.gnu.org; Wed, 05 Feb 2020 09:03:20 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izLGw-0002F9-6I for 39367-done@debbugs.gnu.org; Wed, 05 Feb 2020 09:03:18 -0500 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 318BCE000C; Wed, 5 Feb 2020 14:03:16 +0000 (UTC) From: Nicolas Goaziou To: Robert Smith Subject: Re: [PATCH v2] gnu: Add anki. References: <20200204120115.7611-1-robertsmith@posteo.net> Date: Wed, 05 Feb 2020 15:03:05 +0100 In-Reply-To: <20200204120115.7611-1-robertsmith@posteo.net> (Robert Smith's message of "Tue, 4 Feb 2020 13:01:15 +0100") Message-ID: <877e112kti.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39367-done Cc: 39367-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, Robert Smith writes: > * gnu/packages/education.scm (anki): New variable. Applied as 8534c9491d86406ade201bacc3b14fdf63a1f39d. I refactored a bit the part filtering Python packages, added a comment about why `configure' phase was deleted. Thank you! Regards, -- Nicolas Goaziou From unknown Fri Jun 13 10:10:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Mar 2020 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator