unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Dominik Delgado Steuter via Guix-patches via <guix-patches@gnu.org>
To: 63117@debbugs.gnu.org
Cc: Dominik Delgado Steuter <dds@disroot.org>, liliana.prikler@gmail.com
Subject: [bug#63117] [PATCH] gnu: yt-dlp: Fix substitution for ffmpeg path.
Date: Sat, 20 May 2023 15:49:13 +0200	[thread overview]
Message-ID: <20230520134913.14357-1-dds@disroot.org> (raw)
In-Reply-To: <20230427143200.13000-1-d@delgado.nrw>

The old expression did not work; ffmpeg was not found
when using the --add-metadata flag.

* gnu/packages/video.scm (yt-dlp)
[arguments]: Adjust substitution in custom 'default-to-the-ffmpeg-input phase.
---
 gnu/packages/video.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index e6c437f..6d2824f 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
 ;;; Copyright © 2022 Andy Tai <atai@atai.org>
 ;;; Copyright © 2023 Ott Joon <oj@vern.cc>
+;;; Copyright © 2023 Dominik Delgado Steuter <dds@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2569,10 +2570,13 @@ (define-public yt-dlp
         #~(modify-phases #$phases
             ;; See the comment for the corresponding phase in youtube-dl.
             (replace 'default-to-the-ffmpeg-input
-              (lambda _
+              (lambda* (#:key inputs #:allow-other-keys)
                 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
-                  (("\\.get_param\\('ffmpeg_location'\\)" match)
-                   (format #f "~a or '~a'" match (which "ffmpeg"))))))
+                  (("location = self.get_param(.*)$")
+                   (string-append
+                     "location = '"
+                     (dirname (search-input-file inputs "bin/ffmpeg"))
+                     "'\n")))))
             (replace 'build-generated-files
               (lambda* (#:key inputs #:allow-other-keys)
                 (if (assoc-ref inputs "pandoc")

base-commit: 24b6f94cf9b4ab97ef2eb70d05b2104a06776e62
-- 
2.40.1





  parent reply	other threads:[~2023-05-20 13:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 14:32 [bug#63117] [PATCH] gnu: yt-dlp: Change input Dominik Delgado Steuter via Guix-patches via
2023-04-29  4:36 ` Jack Hill
2023-05-01 22:39   ` Dominik Delgado Steuter via Guix-patches via
2023-05-05 19:50 ` [bug#63117] [PATCH] gnu: yt-dlp: Fix substitution for ffmpeg path Dominik Delgado Steuter via Guix-patches via
2023-05-06  4:23   ` Liliana Marie Prikler
2023-05-20 13:49 ` Dominik Delgado Steuter via Guix-patches via [this message]
2023-05-25 10:42   ` bug#63117: [PATCH] gnu: yt-dlp: Change input Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230520134913.14357-1-dds@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=63117@debbugs.gnu.org \
    --cc=dds@disroot.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).