Subject: Re: [bug#61117] Update svtplay-dl to 4.18

From: Jessica Tallon <[email-masked]>
Date: Sun, 05 Mar 2023 11:05:28 +0100

Hello,

Sorry for the long delay on addressing this feedback.

Tobias Geerinckx-Rice <[email-masked]> writes:

> [[PGP Signed Part:Undecided]]
> Jessica,
>
> Please avoid propagation whenever possible; it breaks all kinds of
> nice things.
>
> Propagating A from B means that Guix will effectively ‘install’ A
> alongside B when the user installs only B.  Or how classical package
> managers bluntly handle ‘dependencies’.  Not good!
>

Thanks for the tip, I've included a patch which does it this way.

>
>> it's needed while the program is running to merge two files, not
>> while building.
>
> So 4.17 did not need or use ffmpeg this way?
>
> Otherwise, put each unrelated changes into a separate commit: one to
> improve the ffmpeg situation, and one to update svtplay-dl. You can
> send multiple related commits as one patch series to one bug number,
> though.

4.17 did indeed need ffmpeg, I've included two patches one which
resolves the ffmpeg issue and the other which updates it to 4.18.

Thanks,
Jessica.

>From 1b81f1786ba0cb038bf76ab74cbc90847d06206b Mon Sep 17 00:00:00 2001
Message-Id: <[email-masked]>
From: Jessica Tallon <[email-masked]>
Date: Sun, 5 Mar 2023 11:02:49 +0100
Subject: [PATCH 0/2] Upgrade svtplay-dl to 4.18 & fix wrapping with ffmpeg

The first patch fixes svtplay-dl which needs ffmpeg to create a unified file
with both sound and video combined. Before it didn't have access to ffmpeg so
it would display an error and leave the two files uncombined.

The second upgrades svtplay-dl to the latest version, 4.18.

Jessica Tallon (2):
  gnu: fix svtplay-dl wrapping to use ffmpeg
  gnu: svtplay-dl update to 4.18

 gnu/packages/video.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

-- 
2.39.1

>From e9d073dbf37323d11bddae32a1c54d65864959be Mon Sep 17 00:00:00 2001
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
From: Jessica Tallon <[email-masked]>
Date: Sun, 5 Mar 2023 10:43:58 +0100
Subject: [PATCH 1/2] gnu: fix svtplay-dl wrapping to use ffmpeg

* gnu/packages/video.scm (svtplay-dl): Wrap program to give access to ffmpeg.
---
 gnu/packages/video.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 13299fdf06..721f7c4d4e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2022 Chadwain Holness <[email-masked]>
 ;;; Copyright © 2022 Andy Tai <[email-masked]>
 ;;; Copyright © 2023 Ott Joon <[email-masked]>
+;;; Copyright © 2023 Jessica Tallon <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5690,8 +5691,19 @@ (define-public svtplay-dl
                (base32
                 "0yjxmvldskw4pji3lg69pbx05izvxahz9my7z5p31mkiz6v33dmx"))))
     (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'wrap-executable
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out"))
+                    (ffmpeg (assoc-ref inputs "ffmpeg")))
+                (wrap-program (string-append out "/bin/svtplay-dl")
+                  `("PATH" ":" prefix
+                    ,(list (string-append ffmpeg "/bin"))))))))))
     (inputs (list ffmpeg python-pyaml python-requests python-pysocks
-                  python-cryptography))
+                  python-cryptography bash-minimal))
     (home-page "https://svtplay-dl.se/")
     (synopsis "Download or stream SVT Play's (and others) TV programmes")
     (description
-- 
2.39.1

>From 1b81f1786ba0cb038bf76ab74cbc90847d06206b Mon Sep 17 00:00:00 2001
Message-Id: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
From: Jessica Tallon <[email-masked]>
Date: Sun, 5 Mar 2023 10:56:54 +0100
Subject: [PATCH 2/2] gnu: svtplay-dl update to 4.18

* gnu/packages/video.scm (svtplay-dl) update to 4.18
---
 gnu/packages/video.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 721f7c4d4e..fbebaaff28 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -5680,7 +5680,7 @@ (define-public video-contact-sheet
 (define-public svtplay-dl
   (package
     (name "svtplay-dl")
-    (version "4.17")
+    (version "4.18")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -5689,7 +5689,7 @@ (define-public svtplay-dl
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0yjxmvldskw4pji3lg69pbx05izvxahz9my7z5p31mkiz6v33dmx"))))
+                "1xb2n3bwjddr86mjynbfd8m2g98gzqbj5mmsfc735q9xp14l30pf"))))
     (build-system python-build-system)
     (arguments
      (list
-- 
2.39.1