From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54215) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTv-0004QW-Cp for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTu-0000zT-2f for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54346) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7PTt-0000zN-W5 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7PTt-0007Ic-RE for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:01 -0500 Subject: [bug#39814] [PATCH] gnu: anki: Fix mpv audio playback Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:54153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTZ-00048f-J2 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTX-0000qH-A0 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7PTW-0000pF-NT for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:39 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6474F16005E for ; Thu, 27 Feb 2020 21:09:35 +0100 (CET) From: Robert Smith Date: Thu, 27 Feb 2020 21:09:09 +0100 Message-Id: <20200227200909.16365-1-robertsmith@posteo.net> MIME-Version: 1.0 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: 39814@debbugs.gnu.org Cc: Robert Smith * gnu/packages/patches/anki-mpv-args.patch: New file. * gnu/packages/education.scm (anki): Adjust accordingly. --- mpv now requires that the input-ipc-server argument be passed with an equals sign and without any spaces. This is a slightly out-of-date version of anki, so presumably mpv used to be more lenient with command line arguments. mpv was also added to the PATH using wrap-program to to ensure anki can find it at runtime. --- gnu/packages/education.scm | 6 ++++- gnu/packages/patches/anki-mpv-args.patch | 30 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/anki-mpv-args.patch diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 20fc9a3706..d8427f6eab 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -738,7 +738,8 @@ adjust the level of difficulty.") (uri (string-append "https://apps.ankiweb.net/downloads/archive/a= nki-" version "-source.tgz")) (sha256 - (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))= )) + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")) + (patches (search-patches "anki-mpv-args.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=3D" %output)) @@ -779,6 +780,9 @@ adjust the level of difficulty.") (wrap-program program `("QTWEBENGINEPROCESS_PATH" =3D (,qtwebengineprocess)) + `("PATH" prefix (,(string-append + (assoc-ref inputs "mpv") + "/bin"))) `("PYTHONPATH" =3D ,site-packages))) (find-files bin "."))) #t))))) diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patc= hes/anki-mpv-args.patch new file mode 100644 index 0000000000..a66632c0e0 --- /dev/null +++ b/gnu/packages/patches/anki-mpv-args.patch @@ -0,0 +1,30 @@ +From 0e2c723f2b920f96937725a12e3db13c14795117 Mon Sep 17 00:00:00 2001 +From: Robert Smith +Date: Thu, 27 Feb 2020 20:07:08 +0100 +Subject: [PATCH] Fix mpv argument formatting + +--- +mpv now requires that the input-ipc-server argument be passed with an +equals sign and without any spaces. This is a slightly out-of-date +version of anki, so presumably mpv used to be more lenient with +command line arguments. +--- + anki/mpv.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/anki/mpv.py b/anki/mpv.py +index f53d9d0..c6e7dd7 100644 +--- a/anki/mpv.py ++++ b/anki/mpv.py +@@ -104,7 +104,7 @@ class MPVBase: + """ + self.argv =3D [self.executable] + self.argv +=3D self.default_argv +- self.argv +=3D ["--input-ipc-server", self._sock_filename] ++ self.argv +=3D ["--input-ipc-server=3D" + self._sock_filename] + if self.window_id is not None: + self.argv +=3D ["--wid", str(self.window_id)] +=20 +--=20 +2.25.0 + --=20 2.25.1