From patchwork Wed Jun 19 02:13:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 65487 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 85FE527BBEA; Wed, 19 Jun 2024 03:14:25 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 4D1DB27BBE2 for ; Wed, 19 Jun 2024 03:14:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJkpl-0008A3-8O; Tue, 18 Jun 2024 22:14:01 -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 1sJkpj-00089i-Kv for guix-patches@gnu.org; Tue, 18 Jun 2024 22:13:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJkpj-0000Op-Ci for guix-patches@gnu.org; Tue, 18 Jun 2024 22:13:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJkpm-0001zs-5Z for guix-patches@gnu.org; Tue, 18 Jun 2024 22:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71640] [PATCH 1/6] gnu: yt-dlp: Don't inherit from youtube-dl. References: In-Reply-To: Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Jun 2024 02:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71640 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 71640@debbugs.gnu.org Received: via spool by 71640-submit@debbugs.gnu.org id=B71640.17187632157571 (code B ref 71640); Wed, 19 Jun 2024 02:14:02 +0000 Received: (at 71640) by debbugs.gnu.org; 19 Jun 2024 02:13:35 +0000 Received: from localhost ([127.0.0.1]:58210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJkpK-0001xv-CJ for submit@debbugs.gnu.org; Tue, 18 Jun 2024 22:13:35 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:34633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJkpH-0001xJ-KL for 71640@debbugs.gnu.org; Tue, 18 Jun 2024 22:13:32 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 4AD3E13805D2; Tue, 18 Jun 2024 22:13:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 18 Jun 2024 22:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=mesmtp; t=1718763203; x=1718849603; bh=l4/O60lfvqrK5lRcjN UCMqtQvPKJ3xskpi1uUWbF0nU=; b=l65m0yfHPF7L5+/qloZp7zdiym8y/Mwzie /4C7yg993ehF9+++rEHJbF4GN7t3lmJNyxt9IJxLLNk0QM/hCe2J22xWjVwf/DqB 5+M3C7E192qJb3WF4e+xHkvTt7MAygigVkhkO942FDYhGEHPS/fsIcch7fuO4E4+ pGnbfI9ls= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1718763203; x=1718849603; bh=l4/O60lfvqrK5lRcjNUCMqtQvPKJ 3xskpi1uUWbF0nU=; b=JnUk4MRxmJJexfRQ1KGYOmD6J4gXf3bn3Kna+bkqBSZO cJjP4DXcWjPFLSpodkVI1Y73Rk9K2FncREJOOgPH6XMu3NLfDuJSXHLD6tWp+Qs5 PS8bz/0W3q5XIo6rijd4toYsbogzDF9PiOKizRAiJydj3cLVd9zUobF5brizSFUj My0mKxZJtYvGx3epkc/e6/to5D2bXRWj5yzEnQUF0LE0oEpLT7XsfP/IsgjUYwA3 KJT5Xem2Ic5B1HpjYZKN1wVCkgjMULmId2Jn/w/4RYzDx0YzvYMkU0Th+P0sl5J6 9VzfZ2VJP25FPrRyYMP8YZKMrVf77ymtBs7d/2QpMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvledgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepueelfeffvdevveeileehgfevgeehuedttd ehvddttdffffeghfdtjedtteelkeeknecuffhomhgrihhnpehgnhhurdhorhhgpdhphihp ihdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <71640@debbugs.gnu.org>; Tue, 18 Jun 2024 22:13:22 -0400 (EDT) From: Leo Famulari Date: Tue, 18 Jun 2024 22:13:10 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 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: , 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 yt-dlp has diverged from youtube-dl sufficiently that package inheritance hinders package maintenance. * gnu/packages/video.scm (yt-dlp): Don't inherit from YOUTUBE-DL. [build-system, synopsis, license]: New fields. [arguments]: Adjust accordingly. [inputs]: Add FFMPEG. Change-Id: I14c4cfb6a75ba0421c62eac778072ab3e76c72a1 Reviewed-by: Maxim Cournoyer --- gnu/packages/video.scm | 95 ++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 46 deletions(-) base-commit: b993f4735d41e690dbafb8ee2e17fce996a8cf20 diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index e7e61303a9..76e4a8a02f 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3135,7 +3135,7 @@ (define-public youtube-dl (license license:public-domain))) (define-public yt-dlp - (package/inherit youtube-dl + (package (name "yt-dlp") (version "2023.10.13") (source @@ -3147,51 +3147,52 @@ (define-public yt-dlp (file-name (git-file-name name version)) (sha256 (base32 "1cy8cpqwq6yfsbrnln3qqp9lsjckn20m6w7b890ha7jahyir5m1n")))) + (build-system python-build-system) (arguments - (substitute-keyword-arguments (package-arguments youtube-dl) - ((#:tests? _) (not (%current-target-system))) - ((#:phases phases) - #~(modify-phases #$phases - ;; See the comment for the corresponding phase in youtube-dl. - (replace 'default-to-the-ffmpeg-input - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "yt_dlp/postprocessor/ffmpeg.py" - (("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") - (invoke "make" - "PYTHON=python" - "yt-dlp" - "yt-dlp.1" - "completions") - (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))) + `(#:tests? ,(not (%current-target-system)) + #:phases + (modify-phases %standard-phases + ;; See . + ;; ffmpeg is big but required to request free formats from, e.g., + ;; YouTube so pull it in unconditionally. Continue respecting the + ;; --ffmpeg-location argument. + (add-after 'unpack 'default-to-the-ffmpeg-input + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "yt_dlp/postprocessor/ffmpeg.py" + (("location = self.get_param(.*)$") + (string-append + "location = '" + (dirname (search-input-file inputs "bin/ffmpeg")) + "'\n"))))) + (add-before 'build 'build-generated-files + (lambda* (#:key inputs #:allow-other-keys) + (if (assoc-ref inputs "pandoc") + (invoke "make" + "PYTHON=python" + "yt-dlp" + "yt-dlp.1" + "completions") + (invoke "make" + "PYTHON=python" + "yt-dlp" + "completions")))) + (add-before 'install '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/")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-k" "not download"))))))) + (inputs (list ffmpeg python-brotli + python-certifi + python-mutagen + python-pycryptodomex + python-websockets)) (native-inputs (append ;; To generate the manpage. @@ -3199,13 +3200,15 @@ (define-public yt-dlp (list pandoc) '()) (list python-pytest zip))) + (synopsis "Download videos from YouTube.com and other sites") (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 focus on adding new features while keeping up-to-date with the original project.") (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/"))) - (home-page "https://github.com/yt-dlp/yt-dlp"))) + (home-page "https://github.com/yt-dlp/yt-dlp") + (license license:public-domain))) (define-public you-get (package