diff mbox series

[bug#56983,2/2] gnu: yt-dlp: Use new package style.

Message ID 20220806052833.183236-3-kiasoc5@disroot.org
State Accepted
Headers show
Series [bug#56983,1/2] gnu: yt-dlp: Update to 2022.07.18. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

kiasoc5 Aug. 6, 2022, 5:28 a.m. UTC
* gnu/packages/video.scm
(yt-dlp)[source](snippet): Rewrite snippet as a gexp.
[arguments]: Use gexps.
[inputs]: Use new style.
[native-inputs]: Likewise.
---
 gnu/packages/video.scm | 85 +++++++++++++++++++++---------------------
 1 file changed, 42 insertions(+), 43 deletions(-)

Comments

Liliana Marie Prikler Aug. 6, 2022, 2:40 p.m. UTC | #1
Am Samstag, dem 06.08.2022 um 01:28 -0400 schrieb kiasoc5:
> * gnu/packages/video.scm
> (yt-dlp)[source](snippet): Rewrite snippet as a gexp.
> [arguments]: Use gexps.
> [inputs]: Use new style.
> [native-inputs]: Likewise.
Pushed with slight changes to the ChangeLog.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 017c0d3857..c681165f2e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2484,53 +2484,52 @@  (define-public yt-dlp
                (base32
                 "1wmzfqhysx1mqdba4ikvm6nbahasihi4xgqwqad20y3vs701slyj"))
               (snippet
-               '(begin
-                  ;; Delete the pre-generated files, except for the man page
-                  ;; which requires 'pandoc' to build.
-                  (for-each delete-file '("yt-dlp"
-                                          ;;pandoc is needed to generate
-                                          ;;"yt-dlp.1"
-                                          "completions/bash/yt-dlp"
-                                          "completions/fish/yt-dlp.fish"
-                                          "completions/zsh/_yt-dlp"))))))
+               #~(begin
+                   ;; Delete the pre-generated files, except for the man page
+                   ;; which requires 'pandoc' to build.
+                   (for-each delete-file
+                             (list "yt-dlp"
+                                   ;;pandoc is needed to generate
+                                   ;;"yt-dlp.1"
+                                   "completions/bash/yt-dlp"
+                                   "completions/fish/yt-dlp.fish"
+                                   "completions/zsh/_yt-dlp"))))))
     (arguments
      (substitute-keyword-arguments (package-arguments youtube-dl)
        ((#:tests? _) #t)
        ((#:phases phases)
-        `(modify-phases ,phases
-           ;; See the comment for the corresponding phase in youtube-dl.
-           (replace 'default-to-the-ffmpeg-input
-             (lambda _
-               (substitute* "yt_dlp/postprocessor/ffmpeg.py"
-                 (("\\.get_param\\('ffmpeg_location'\\)" match)
-                  (format #f "~a or '~a'" match (which "ffmpeg"))))))
-           (replace 'build-generated-files
-             (lambda _
-               ;; Avoid the yt-dlp.1 target, which requires pandoc.
-               (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
-           (replace 'fix-the-data-directories
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((prefix (assoc-ref outputs "out")))
-                 (substitute* "setup.py"
-                   (("'etc/")
-                    (string-append "'" prefix "/etc/"))
-                   (("'share/")
-                    (string-append "'" prefix "/share/"))))))
-           (delete 'install-completion)
-           (replace 'check
-             (lambda* (#:key tests? #:allow-other-keys)
-               (when tests?
-                 (invoke "pytest" "-k" "not download"))))))))
-    (inputs
-     `(("python-brotli" ,python-brotli)
-       ("python-certifi" ,python-certifi)
-       ("python-mutagen" ,python-mutagen)
-       ("python-pycryptodomex" ,python-pycryptodomex)
-       ("python-websockets" ,python-websockets)
-       ,@(package-inputs youtube-dl)))
-    (native-inputs
-     `(("python-pytest" ,python-pytest)
-       ,@(package-native-inputs youtube-dl)))
+        #~(modify-phases #$phases
+            ;; See the comment for the corresponding phase in youtube-dl.
+            (replace 'default-to-the-ffmpeg-input
+              (lambda _
+                (substitute* "yt_dlp/postprocessor/ffmpeg.py"
+                  (("\\.get_param\\('ffmpeg_location'\\)" match)
+                   (format #f "~a or '~a'" match (which "ffmpeg"))))))
+            (replace 'build-generated-files
+              (lambda _
+                ;; Avoid the yt-dlp.1 target, which requires pandoc.
+                (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
+            (replace 'fix-the-data-directories
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((prefix (assoc-ref outputs "out")))
+                  (substitute* "setup.py"
+                    (("'etc/")
+                     (string-append "'" prefix "/etc/"))
+                    (("'share/")
+                     (string-append "'" prefix "/share/"))))))
+            (delete 'install-completion)
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "pytest" "-k" "not download"))))))))
+    (inputs (modify-inputs (package-inputs youtube-dl)
+              (append python-brotli
+                      python-certifi
+                      python-mutagen
+                      python-pycryptodomex
+                      python-websockets)))
+    (native-inputs (modify-inputs (package-native-inputs youtube-dl)
+                     (append python-pytest)))
     (description
      "yt-dlp is a small command-line program to download videos from
 YouTube.com and many more sites.  It is a fork of youtube-dl with a