From patchwork Sat May 20 13:49:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dominik Delgado Steuter X-Patchwork-Id: 50164 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 807CB27BBE2; Sat, 20 May 2023 14:51:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BECFD27BBE9 for ; Sat, 20 May 2023 14:51:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0MzC-0002Ln-VU; Sat, 20 May 2023 09:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0Mz9-0002LF-Cq for guix-patches@gnu.org; Sat, 20 May 2023 09:51:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0Mz9-00089B-5e for guix-patches@gnu.org; Sat, 20 May 2023 09:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0Mz8-0007cu-C5 for guix-patches@gnu.org; Sat, 20 May 2023 09:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63117] [PATCH] gnu: yt-dlp: Fix substitution for ffmpeg path. References: <20230427143200.13000-1-d@delgado.nrw> In-Reply-To: <20230427143200.13000-1-d@delgado.nrw> Resent-From: Dominik Delgado Steuter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 May 2023 13:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63117 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63117@debbugs.gnu.org Cc: Dominik Delgado Steuter , liliana.prikler@gmail.com Received: via spool by 63117-submit@debbugs.gnu.org id=B63117.168459061229123 (code B ref 63117); Sat, 20 May 2023 13:51:02 +0000 Received: (at 63117) by debbugs.gnu.org; 20 May 2023 13:50:12 +0000 Received: from localhost ([127.0.0.1]:58027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0MyK-0007Ze-En for submit@debbugs.gnu.org; Sat, 20 May 2023 09:50:12 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0MyF-0007ZR-Js for 63117@debbugs.gnu.org; Sat, 20 May 2023 09:50:11 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 43EBB40318; Sat, 20 May 2023 15:50:06 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PnmaLUpDHO8Q; Sat, 20 May 2023 15:50:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1684590605; bh=+8EK6Vn8JqFJpBqF/4TbgzQ5xWORZFgnka64V2wtN6g=; h=From:To:Cc:Subject:Date; b=j81DSKzaP20qF2O6pelWj/ga2iJLwz+d8EUPshcaPHqp5XFUzSGYnXATUAvo6u//A 5YMruFvpi3Vgjem6gdNH61MHe1Xa5l6UnHhcbUJJhySe5UB4r8MSVAdaHD+NK0h4VL w5V15A2LsjaIQUies4HpjDnskv9d5RhnbRSsQw4ba3eqJDON7dwLoe/w9zE1iE8LuR i9aaIZTUIoKz9+SlWcN7e78DXg77Th2OOCXjUEnRg5/ojst7csVn4qldHDFQMWhLBX CijQMhzBF/XlRJEJZmfr69z5LiphybtjbySvmwrnIeRdhnGboFtLw4u9B5rGN8OELS tzpNSdpqw721Q== Date: Sat, 20 May 2023 15:49:13 +0200 Message-Id: <20230520134913.14357-1-dds@disroot.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Dominik Delgado Steuter X-ACL-Warn: , Dominik Delgado Steuter via Guix-patches X-Patchwork-Original-From: Dominik Delgado Steuter via Guix-patches via From: Dominik Delgado Steuter Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(-) base-commit: 24b6f94cf9b4ab97ef2eb70d05b2104a06776e62 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 ;;; Copyright © 2022 Andy Tai ;;; Copyright © 2023 Ott Joon +;;; Copyright © 2023 Dominik Delgado Steuter ;;; ;;; 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")