From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ENDgERKsZmGYwgAAgWs5BA (envelope-from ) for ; Wed, 13 Oct 2021 11:51:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MACBDRKsZmF4PQAAbx9fmQ (envelope-from ) for ; Wed, 13 Oct 2021 09:51:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7EC1413359 for ; Wed, 13 Oct 2021 11:51:13 +0200 (CEST) Received: from localhost ([::1]:51462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maaum-0003zY-JJ for larch@yhetil.org; Wed, 13 Oct 2021 05:51:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maauc-0003vG-5k for guix-patches@gnu.org; Wed, 13 Oct 2021 05:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maaub-0003hN-Ov for guix-patches@gnu.org; Wed, 13 Oct 2021 05:51:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maaub-0007gh-Nh for guix-patches@gnu.org; Wed, 13 Oct 2021 05:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51179] [PATCH] gnu: Add yt-dlp. Resent-From: Robin Templeton Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Oct 2021 09:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51179@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163411862829504 (code B ref -1); Wed, 13 Oct 2021 09:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2021 09:50:28 +0000 Received: from localhost ([127.0.0.1]:58414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maau3-0007fo-Jq for submit@debbugs.gnu.org; Wed, 13 Oct 2021 05:50:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:53538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maato-0007fO-OU for submit@debbugs.gnu.org; Wed, 13 Oct 2021 05:50:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maatm-0002zB-Ul for guix-patches@gnu.org; Wed, 13 Oct 2021 05:50:11 -0400 Received: from ciao.gmane.io ([116.202.254.214]:33568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maatj-0002s7-Es for guix-patches@gnu.org; Wed, 13 Oct 2021 05:50:10 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1maate-0002cU-Aq for guix-patches@gnu.org; Wed, 13 Oct 2021 11:50:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Robin Templeton Date: Wed, 13 Oct 2021 05:44:41 -0400 Message-ID: <87pms9mf7a.fsf@terpri.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:tBYPhRC2cTD+g7CdYmmcc17/JOE= Received-SPF: pass client-ip=116.202.254.214; envelope-from=gcggp-guix-patches@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634118673; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=AKei07hONB8fZYJwDfJZymeowJM5f6AT/mSjqkr8YvY=; b=EIxfbmr4RY9E7UrOf4otOQUxdFEP+8XN3qj2P2hVy5c9w9R7M8DPdklcVK7Hl5HuNH5tAF B7zCMNRKDZrQmQ9TQ/LXGy4CuGSWHDmwnLAaMWTcOXJZ4Aw1LrO/Kf900MP8oZcTG2En1m 7zaeNaF6N5FoTJK/LDmCzjnz7CCtKM7wT9T7fKRLz3NiOonYGTUhphgYdw7ZSeffdMf4sE aPIOdbyvQbBMoPIgfVsIez2d07UxEEx1xht1JSjaSYN/tZ5I6QokpO+8RHU+t+ijGE56E0 RuZQe9AeHDlVkVx4jZG3m+o661TxopV8AmAllMtuCbYWnJqYF6eOKAzQErOZbQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634118673; a=rsa-sha256; cv=none; b=CdUKdkJEXwpsuJUd1MntVk6rf6VjJ5656rV9aSm4ekaa3wE/hp+EoGwKDTdBBwHiUYS/vb 2jCMHDEGqpZLcjkYQUiGUPgDh6u7FM4tmo/EKhrGNiyu/q8gwM3QIz6h89tLHJhDVGM9NU 6QmpdPR4mLf8Qufsu886LfySrVjPAc14SwKH2i9bWP8P1toYgfbU67PJG6wPFtldnEeBiy DfijUbyz3B1BayZ5Zka2PSLSg4gE1gnM7k51f96XAXGq8Km2ncv09SawqijV9DwuVytlop 64FZHdPCOqyBu2EtY0R74Q/6daTFJiMM26NDQuwOM6dci5D+qSEvOSK4ekqc+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7EC1413359 X-Spam-Score: -2.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: vOKYGtfUe4L2 * gnu/packages/video.scm (yt-dlp): New variable. Suggested-by: bdju --- gnu/packages/video.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index fcac369f60..1aceac25eb 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2360,6 +2360,77 @@ YouTube.com and many more sites.") (home-page "https://yt-dl.org") (license license:public-domain))) +(define-public yt-dlp + (package + (name "yt-dlp") + (version "2021.10.10") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/yt-dlp/yt-dlp/" + "releases/download/" + version "/yt-dlp.tar.gz")) + (sha256 + (base32 + "1ywld4qhvsik970gbac1h3kvxb74r7150m5axq9r5nffdw5sz3vd")) + (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")) + #t)))) + (build-system python-build-system) + (arguments + ;; The problem here is that the directory for the man page and completion + ;; files is relative, and for some reason, setup.py uses the + ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO". + ;; So, we need pass the prefix directly. + `(#:tests? #f ; Many tests fail. The test suite can be run with pytest. + #:phases (modify-phases %standard-phases + (add-after 'unpack 'default-to-the-ffmpeg-input + (lambda _ + ;; 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. + (substitute* "yt_dlp/postprocessor/ffmpeg.py" + (("\\.get\\('ffmpeg_location'\\)" match) + (format #f "~a or '~a'" match (which "ffmpeg")))) + #t)) + (add-before 'build 'build-generated-files + (lambda _ + ;; Avoid the make targets that require pandoc. + (invoke "make" + "PYTHON=python" + "yt-dlp" + ;;"youtube-dl.1" ; needs pandoc + "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/"))) + #t)))))) + (native-inputs + `(("zip" ,zip))) + (inputs + `(("ffmpeg" ,ffmpeg))) + (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.") + (home-page "https://github.com/yt-dlp/yt-dlp") + (license license:public-domain))) + (define-public youtube-dl-gui (package (name "youtube-dl-gui") -- 2.33.0