From unknown Mon Aug 18 08:51:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51179 <51179@debbugs.gnu.org> To: bug#51179 <51179@debbugs.gnu.org> Subject: Status: [PATCH] gnu: Add yt-dlp. Reply-To: bug#51179 <51179@debbugs.gnu.org> Date: Mon, 18 Aug 2025 15:51:49 +0000 retitle 51179 [PATCH] gnu: Add yt-dlp. reassign 51179 guix-patches submitter 51179 Robin Templeton severity 51179 normal tag 51179 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 13 05:50:28 2021 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/ To: guix-patches@gnu.org From: Robin Templeton Subject: [PATCH] gnu: Add yt-dlp. 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-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) * 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 13 06:15:56 2021 Received: (at 51179) by debbugs.gnu.org; 13 Oct 2021 10:15:56 +0000 Received: from localhost ([127.0.0.1]:58471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mabId-0008IU-7r for submit@debbugs.gnu.org; Wed, 13 Oct 2021 06:15:56 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mabIZ-0008IF-Cy for 51179@debbugs.gnu.org; Wed, 13 Oct 2021 06:15:49 -0400 Received: by mail-wr1-f65.google.com with SMTP id t2so6508352wrb.8 for <51179@debbugs.gnu.org>; Wed, 13 Oct 2021 03:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=LixeefSJ+rykGL10YWOYXdR2Du1lcdBZc4cYARW3pis=; b=kslA2lYIf9t2jXOS2yp3LXjj1PhWOs7SdBwwo1KVgfIui4RMocl7fjr44wX6Q1KW66 SvSeMVsLelF4J/YAgmh/TEiRzq+eC6qx4gkTWOK6e/+zwa2js9cz063cIOymwd8+AN7M +5EGeb9r94AkrPwyJxwoqZN+0sV1nibyeUtqE7B8TtoFZgfb1Bf7o8PRitaVTnLey+83 pT5X7XU39S6z77tKJwFKiaKQe6NZ+QB3yOQN05nKYk8ph1N/+OfssFrvBhvZXtW4Q78P wjBCh2CyOnYB9B3yriCmfj+SGU0n7AlkZno0AUVukIjuIVDeDCO11Tfs1jnmszgPcAal 9Rqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=LixeefSJ+rykGL10YWOYXdR2Du1lcdBZc4cYARW3pis=; b=OCInbHupE9Q5+sp345nD6b9zEQAkFlzGXB9qa0BvTGgJVXEB02ZOeGoDskIkJHYQ89 JMiYzmcx3z06HhdelHUuLaJ2pua6yb/v2L+S/n0ZU788I5lRxNzafiutX7Xw9zz1OA/A 9bVnEKps4hMHO4pimg210HlwHDoVjsrGNrHkiXx8ekW7PljKH4wnz4iGfZ1Qa5PENXK0 9R+VseYDLqGSn0bt7UI+9XmjRopcR0xpjrjHRBmJITfQLqdM3jkuljTX3vkuZPOwXCWb EIlM2ti2hKLxQwnoZH/nUl4z8eSBDNLQNmoqr8ty2d/m45NL7wL+MmDMzgeBvWM/jg9C UKqg== X-Gm-Message-State: AOAM530Y4FIuPAUJM3qMPwdmnkNPsO0PCPizUInpMI/G80sc8vHGeLRH /D7yFf2dNj8l1tsibUk+qLSydDveEx8= X-Google-Smtp-Source: ABdhPJzhjvBJmv0bXy7nHv8DCHRMzNvfA3s3LcSuxW/ERmX3BN6hlygZyCS3FflEO1hEmZivMjFEzg== X-Received: by 2002:a5d:6245:: with SMTP id m5mr38955003wrv.148.1634120141471; Wed, 13 Oct 2021 03:15:41 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d2sm14052386wrc.32.2021.10.13.03.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:15:41 -0700 (PDT) Message-ID: Subject: Re: [PATCH] gnu: Add yt-dlp. From: Liliana Marie Prikler To: Robin Templeton , 51179@debbugs.gnu.org Date: Wed, 13 Oct 2021 12:15:39 +0200 In-Reply-To: <87pms9mf7a.fsf@terpri.org> References: <87pms9mf7a.fsf@terpri.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Robin, Am Mittwoch, den 13.10.2021, 05:44 -0400 schrieb Robin Templeton: > * 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") I think yt-dlp can (and ought to) inherit from youtube-dl, which might simplify some of the below. > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/yt-dlp/yt-dlp/ > " > + "releases/download/" > + version "/yt-dlp.tar.gz")) > + (sha256 > + (base32 > + "1ywld4qhvsik970gbac1h3kvxb74r7150m5axq9r5nffdw5sz3v > d")) > + (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)))) Is this the same as for youtube-dl? If not, we might want to give pandoc as native-input. That will increase build times, but it ought not to increase closure size. > + (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)))))) Horizontal space is at a premium and you can save some. > + (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))) Otherwise LGTM, but haven't tested. Regards, Liliana From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 13 08:46:39 2021 Received: (at 51179) by debbugs.gnu.org; 13 Oct 2021 12:46:39 +0000 Received: from localhost ([127.0.0.1]:58937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1madeT-0008M1-Ne for submit@debbugs.gnu.org; Wed, 13 Oct 2021 08:46:39 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:42712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1madeR-0008Lj-VW for 51179@debbugs.gnu.org; Wed, 13 Oct 2021 08:46:32 -0400 Received: from [2603:6081:2241:752:71c3:6c06:a290:62ae] (helo=cervus) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1madeM-0006HG-Ih; Wed, 13 Oct 2021 08:46:26 -0400 From: Robin Templeton To: Liliana Marie Prikler Subject: [PATCH v2] Re: bug#51179: [PATCH] gnu: Add yt-dlp. References: <87pms9mf7a.fsf@terpri.org> Date: Wed, 13 Oct 2021 08:46:16 -0400 In-Reply-To: (Liliana Marie Prikler's message of "Wed, 13 Oct 2021 12:15:39 +0200") Message-ID: <87ee8pm6sn.fsf_-_@terpri.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179 Cc: 51179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Liliana Marie Prikler writes: > Am Mittwoch, den 13.10.2021, 05:44 -0400 schrieb Robin Templeton: >> * gnu/packages/video.scm (yt-dlp): New variable. [...] >> +(define-public yt-dlp >> + (package >> + (name "yt-dlp") >> + (version "2021.10.10") > I think yt-dlp can (and ought to) inherit from youtube-dl, which might > simplify some of the below. Agreed, changed in the revised patch below (yt-dlp can't, e.g., directly use youtube-dl's extra phases at the moment, but it should be more maintainable in the future). [...] >> + (snippet >> + '(begin >> + ;; Delete the pre-generated files, except for the >> man page >> + ;; which requires 'pandoc' to build. [...] > Is this the same as for youtube-dl? If not, we might want to give > pandoc as native-input. That will increase build times, but it ought > not to increase closure size. This is analogous to youtube-dl's pandoc avoidance; IMHO youtube-dl ought to use pandoc as a native input, but I wanted to keep the packaging as close to youtube-dl's as possible. [...] >> + (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)))))) > Horizontal space is at a premium and you can save some. I'm not sure where exactly this should use fewer columns, but I squeezed the make invocation onto a single line. v2 also adds three inputs needed for the program to run correctly (updated based on efraim's yt-dlp package, ; in that package, the extra libraries are propagated inputs, but adding them as regular inputs appears to be sufficient). [...] > Otherwise LGTM, but haven't tested. Thanks for the quick review! Patch v2 below. (I tested it on a few YouTube videos and it worked as expected, at least for simple "yt-dlp $URL"-type usage.) --8<---------------cut here---------------start------------->8--- * gnu/packages/video.scm (yt-dlp): New variable. Suggested-by: bdju --- gnu/packages/video.scm | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index fcac369f60..94f5e85e77 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -142,6 +142,7 @@ #:use-module (gnu packages man) #:use-module (gnu packages markup) #:use-module (gnu packages maths) + #:use-module (gnu packages music) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) @@ -2360,6 +2361,66 @@ YouTube.com and many more sites.") (home-page "https://yt-dl.org") (license license:public-domain))) +(define-public yt-dlp + (package/inherit youtube-dl + (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)))) + (arguments + (substitute-keyword-arguments (package-arguments youtube-dl) + ((#: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\\('ffmpeg_location'\\)" match) + (format #f "~a or '~a'" match (which "ffmpeg")))) + #t)) + (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/")))) + #t)) + (delete 'install-completion))))) + (inputs + `(("python-mutagen" ,python-mutagen) + ("python-pycryptodomex" ,python-pycryptodomex) + ("python-websockets" ,python-websockets) + ,@(package-inputs youtube-dl))) + (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"))) + (define-public youtube-dl-gui (package (name "youtube-dl-gui") -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 13 10:53:56 2021 Received: (at 51179) by debbugs.gnu.org; 13 Oct 2021 14:53:56 +0000 Received: from localhost ([127.0.0.1]:33004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mafde-0003hm-SN for submit@debbugs.gnu.org; Wed, 13 Oct 2021 10:53:56 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mafda-0003hV-UA for 51179@debbugs.gnu.org; Wed, 13 Oct 2021 10:53:49 -0400 Received: by mail-wr1-f68.google.com with SMTP id r7so9316162wrc.10 for <51179@debbugs.gnu.org>; Wed, 13 Oct 2021 07:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=+hktt7fX1gnC2PfZxph/0KFD/H+tuhdKiWirRlugcE8=; b=T2gqAOJpKFv4aumsywZ7tdNkqvB2TU2llgoQR6icqi/WtTVbzbKsFiW5Xj5onkwtet o314+tMhDt+6+AJTiECfSRrrPzBqGT212t7biD6aKoYUUD69tXVzeA43C1ixndfQead3 QnrfHmKaVWIwL3XaLALDkik3UBVmbHCfufFNI78cr+bztxSvGC2dfLO7mgVymApUtOqH 8tVSKnDPHNc+58CctmQvjtv8DXPMp+I2SdtL0FlVz+qt0Sxm2o1HGweFXVZDPfNNvXeR khRKWyfHGjvN4DTkrvqNEqkTRDE+QJGKhgZVv2vyYwiwV86SfxM7ujh7SqzKjBwcEBxx q0fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=+hktt7fX1gnC2PfZxph/0KFD/H+tuhdKiWirRlugcE8=; b=USemS7pY5a9I9xKEBri8vychlTk6SD/racaQZ1vPUyejLNq4a7QABcjwX4Qo9XzzOu r9M61rZ+tqbHpX7zFymVjUu8cCMKIxFn2Oi1+BmvQ7VGKAjr96YlZYWu52PjIib+qZ9j 7RxSXDiT6rtn0gi//jeSWDuM7lxOU3MyKeEXt3ogrhHup2sbnc+lk4hLnfaKYSf4lN0s u0m/hsJ+N5xvCC1Nzw4EiL7fACBzp6PcwJ2QRkal2Cj4WbxcZqTFex5BjNj1Gd8RrlDS 80tzjQmj5t4qh1UiuZi3oUT2bAV1K5N9Zw3Pw/JVA1xorHQBtXLEwwGhnnGw0mKNzwjK bf9g== X-Gm-Message-State: AOAM531GJZiljh2tLP92SenYUekzXZ0ifIxfUhmWPFU3w69k29yNhTAF VU+0MsmEcrgfW4BQyYKXA0I= X-Google-Smtp-Source: ABdhPJx6HewIRwkNuAVIJD3SA0Xh3Nh0gwBRFmN6tb6oqaf0rQFt3PHvspZCmdTdbQJPTvS2sLWfyA== X-Received: by 2002:adf:9b8a:: with SMTP id d10mr38655931wrc.151.1634136820680; Wed, 13 Oct 2021 07:53:40 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id h1sm5479487wmb.7.2021.10.13.07.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 07:53:40 -0700 (PDT) Message-ID: <99268fb747b2278cc0e279c5efc83f5bbbfaccf1.camel@gmail.com> Subject: Re: [PATCH v2] Re: bug#51179: [PATCH] gnu: Add yt-dlp. From: Liliana Marie Prikler To: Robin Templeton Date: Wed, 13 Oct 2021 16:53:38 +0200 In-Reply-To: <87ee8pm6sn.fsf_-_@terpri.org> References: <87pms9mf7a.fsf@terpri.org> <87ee8pm6sn.fsf_-_@terpri.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179 Cc: 51179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Robin, when pasting other stuff into a patch, one usually ought to do so after the "---" line before the summary and the first diff. Am Mittwoch, den 13.10.2021, 08:46 -0400 schrieb Robin Templeton: > Liliana Marie Prikler writes: > > [...] > > > + (snippet > > > + '(begin > > > + ;; Delete the pre-generated files, except for > > > the man page > > > + ;; which requires 'pandoc' to build. > [...] > > Is this the same as for youtube-dl? If not, we might want to give > > pandoc as native-input. That will increase build times, but it > > ought not to increase closure size. > > This is analogous to youtube-dl's pandoc avoidance; IMHO youtube-dl > ought to use pandoc as a native input, but I wanted to keep the > packaging as close to youtube-dl's as possible. Hence why I asked whether youtube-dl does the same. Making that change would probably be out of scope for now. > [...] > > > + (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)))))) > > Horizontal space is at a premium and you can save some. > > I'm not sure where exactly this should use fewer columns, but I > squeezed the make invocation onto a single line. You fixed it by accident, given that you're now required to use substitute-keyword-arguments*, putting #:phases on an extra line as it ought to be. > v2 also adds three inputs needed for the program to run correctly > (updated based on efraim's yt-dlp package, ;; in > that package, the extra libraries are propagated inputs, but adding > them as regular inputs appears to be sufficient). Can we somehow verify that this is indeed the case? Normally we would wrap PYTHONPATH in such a case. > [...] > > Otherwise LGTM, but haven't tested. > > Thanks for the quick review! Patch v2 below. (I tested it on a few > YouTube videos and it worked as expected, at least for simple "yt-dlp > $URL"-type usage.) > > --8<---------------cut here---------------start------------->8--- > > * gnu/packages/video.scm (yt-dlp): New variable. > > Suggested-by: bdju > --- > gnu/packages/video.scm | 61 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > > diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm > index fcac369f60..94f5e85e77 100644 > --- a/gnu/packages/video.scm > +++ b/gnu/packages/video.scm > @@ -142,6 +142,7 @@ > #:use-module (gnu packages man) > #:use-module (gnu packages markup) > #:use-module (gnu packages maths) > + #:use-module (gnu packages music) > #:use-module (gnu packages mp3) > #:use-module (gnu packages ncurses) > #:use-module (gnu packages networking) > @@ -2360,6 +2361,66 @@ YouTube.com and many more sites.") > (home-page "https://yt-dl.org") > (license license:public-domain))) > > +(define-public yt-dlp > + (package/inherit youtube-dl > + (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 > + "1ywld4qhvsik970gbac1h3kvxb74r7150m5axq9r5nffdw5sz3v > d")) > + (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)))) > + (arguments > + (substitute-keyword-arguments (package-arguments youtube-dl) > + ((#: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\\('ffmpeg_location'\\)" match) > + (format #f "~a or '~a'" match (which "ffmpeg")))) > + #t)) > + (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/")))) > + #t)) > + (delete 'install-completion))))) Why do we not install completions? > + (inputs > + `(("python-mutagen" ,python-mutagen) > + ("python-pycryptodomex" ,python-pycryptodomex) > + ("python-websockets" ,python-websockets) > + ,@(package-inputs youtube-dl))) > + (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"))) > + > (define-public youtube-dl-gui > (package > (name "youtube-dl-gui") Regards, Liliana From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 23 16:51:38 2021 Received: (at control) by debbugs.gnu.org; 23 Oct 2021 20:51:38 +0000 Received: from localhost ([127.0.0.1]:37451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meNzO-0007tG-Lt for submit@debbugs.gnu.org; Sat, 23 Oct 2021 16:51:38 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meNzN-0007t2-3N for control@debbugs.gnu.org; Sat, 23 Oct 2021 16:51:37 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3DD915C077D; Sat, 23 Oct 2021 16:51:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 23 Oct 2021 16:51:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:message-id:mime-version:content-type; s=mesmtp; bh=BtMJsX2FCWbdAc0DqTOsnUlmqnGX8/T+T6z6yGtI1T0=; b=iWA837HR2Txp dR45Db5UrrxgyCfFRTZWVXnmLhc1+xuV18wz4nyYlbJZS62L8yNlZYGgSYi4ltIa agYuVk/N3gd2REBJltjw+BU7rraU0fHkfBw0gFfN/SC/euDaZIUkD2GEL2HUYUDr bEJaU0YFhFpChBULYv35KmycnczEFAc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=BtMJsX2FCWbdAc0DqTOsnUlmqnGX8/T+T6z6yGtI1 T0=; b=dvi+12WvLxvZzwsIZRKQ6Sk9wafe1z7NVV2ZQeH1L0f38X0Sg/0GE4XL5 oDLBF6+b2lzoEd+VD7UyyE7OIjd2X+kN9xtKm0ZzwtZTm9HeFU+RFfxoNvZreksY hrTa5zx1FhNdlLi/Qit0QRPM4Q3+Enkpw+3+CXoGTGrxc2AtH2mXJKwzcC12y0zK sne6dJQITceUdc1vRjdAnQ/pDge2UugqkTQyOimlbEacpEljwCTXozEKNXqDyC7H ZncIavzyYILQuaK2lBRJKo8jFl2zDfVCqZqIiaJVwx7Xowi36wo0nypaHWH5fEAB 6jzCv+oJr9AqmZk180yN9miif/4mg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdeftddgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecugfhmphhthicushhusghjvggtthculddutddmne cujfgurhepfffhvffkgggtugesthdtredttddtvdenucfhrhhomhepnfgvohcuhfgrmhhu lhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrthhtvghrnh ephfejiefgfeevvdefteehgeeltdekvedutdegtdduieetheetgedvfeffudfffeffnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfh grmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 23 Oct 2021 16:51:30 -0400 (EDT) Date: Sat, 23 Oct 2021 16:51:28 -0400 From: Leo Famulari To: control@debbugs.gnu.org Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: merge 51363 51179 Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [66.111.4.28 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [66.111.4.28 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) merge 51363 51179 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 23:12:26 2021 Received: (at 51179) by debbugs.gnu.org; 25 Oct 2021 03:12:26 +0000 Received: from localhost ([127.0.0.1]:41367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqPS-0005p1-27 for submit@debbugs.gnu.org; Sun, 24 Oct 2021 23:12:26 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:49400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqPQ-0005op-Ks for 51179@debbugs.gnu.org; Sun, 24 Oct 2021 23:12:25 -0400 Received: from [2603:6081:2241:752:71c3:6c06:a290:62ae] (helo=cervus) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meqPL-0006j1-7K; Sun, 24 Oct 2021 23:12:19 -0400 From: Robin Templeton To: Liliana Marie Prikler Subject: Re: bug#51179: [PATCH] gnu: Add yt-dlp. References: <87pms9mf7a.fsf@terpri.org> <87ee8pm6sn.fsf_-_@terpri.org> <99268fb747b2278cc0e279c5efc83f5bbbfaccf1.camel@gmail.com> Date: Sun, 24 Oct 2021 23:12:06 -0400 Message-ID: <8735opvlvd.fsf@terpri.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179 Cc: 51179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Liliana Marie Prikler writes: > Hi Robin, > > when pasting other stuff into a patch, one usually ought to do so after > the "---" line before the summary and the first diff. Ah, thanks for the reminder, it's been a minute since I used email for patch submissions :) So IIUC, it's preferable to write: > * gnu/packages/video.scm (yt-dlp): New variable. [...] > --- > > [RANDOM COMMENTS HERE] > > gnu/packages/video.scm | 61 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 61 insertions(+) rather than using "cut here" lines and the like. > Am Mittwoch, den 13.10.2021, 08:46 -0400 schrieb Robin Templeton: >> Liliana Marie Prikler writes: >> >> [...] >> > > + (snippet >> > > + '(begin >> > > + ;; Delete the pre-generated files, except for >> > > the man page >> > > + ;; which requires 'pandoc' to build. >> [...] >> > Is this the same as for youtube-dl? If not, we might want to give >> > pandoc as native-input. That will increase build times, but it >> > ought not to increase closure size. >> >> This is analogous to youtube-dl's pandoc avoidance; IMHO youtube-dl >> ought to use pandoc as a native input, but I wanted to keep the >> packaging as close to youtube-dl's as possible. > Hence why I asked whether youtube-dl does the same. Making that change > would probably be out of scope for now. +1 >> [...] >> > > + (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)))))) >> > Horizontal space is at a premium and you can save some. >> >> I'm not sure where exactly this should use fewer columns, but I >> squeezed the make invocation onto a single line. > You fixed it by accident, given that you're now required to use > substitute-keyword-arguments*, putting #:phases on an extra line as it > ought to be. Oh, I see what you meant now, thanks for clarifying. >> v2 also adds three inputs needed for the program to run correctly >> (updated based on efraim's yt-dlp package, ;; in >> that package, the extra libraries are propagated inputs, but adding >> them as regular inputs appears to be sufficient). > Can we somehow verify that this is indeed the case? Normally we would > wrap PYTHONPATH in such a case. python-build-system wraps the yt-dlc script correctly, although (as jgart explained to me on IRC) the Python library inputs would need to become propagated inputs if users or future packages want to use yt-dlc as a library. Morgan's patch packages yt-dlc the way I'd package *youtube-dl* (using a git origin, generating the manpage with pandoc, etc.) but yt-dlc doesn't inherit from youtube-dl in their patch. The non-downloading-related part of yt-dlc's test suite (~10% of tests) *does* run without failures, unlike youtube-dl, so I enabled tests and added the pytest invocation from Morgan's version; otherwise, no changes in v3 (besides using the latest yt-dlc release), which I'll post as a follow-up. I don't have a strong opinion about my patch vs. Morgan's for an initial version; at some point I think youtube-dl should be packaged similarly to Morgan's approach, which would allow the yt-dlc definition to be simplified too, but my patch is written to inherit from youtube-dl as it's packaged now. IMO the order of the changes doesn't matter much. Thanks, Robin -- Inteligenta persono lernas la lingvon Esperanton rapide kaj facile. Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla, belsona, Esperanto estas la praktika solvo de la problemo de universala interkompreno. Lernu la interlingvon Esperanton! From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 23:36:41 2021 Received: (at 51179) by debbugs.gnu.org; 25 Oct 2021 03:36:41 +0000 Received: from localhost ([127.0.0.1]:41373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqmn-0006PY-7G for submit@debbugs.gnu.org; Sun, 24 Oct 2021 23:36:41 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:49444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqml-0006PK-8Z for 51179@debbugs.gnu.org; Sun, 24 Oct 2021 23:36:31 -0400 Received: from [2603:6081:2241:752:71c3:6c06:a290:62ae] (helo=cervus) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meqmf-0007bI-KN; Sun, 24 Oct 2021 23:36:25 -0400 From: Robin Templeton To: Liliana Marie Prikler Subject: Re: bug#51179: [PATCH] gnu: Add yt-dlp. References: <87pms9mf7a.fsf@terpri.org> <87ee8pm6sn.fsf_-_@terpri.org> <99268fb747b2278cc0e279c5efc83f5bbbfaccf1.camel@gmail.com> <8735opvlvd.fsf@terpri.org> Date: Sun, 24 Oct 2021 23:36:24 -0400 In-Reply-To: <8735opvlvd.fsf@terpri.org> (Robin Templeton's message of "Sun, 24 Oct 2021 23:12:06 -0400") Message-ID: <87wnm1u66f.fsf_-_@terpri.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179 Cc: 51179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/video.scm (yt-dlp): New variable. Co-authored-by: Morgan Smith Suggested-by: bdju --- Add check phase from Morgan's package and use latest yt-dlp release gnu/packages/video.scm | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d2a2a08ee3..a2ae26987a 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -53,6 +53,7 @@ ;;; Copyright =C2=A9 2020 Hartmut Goebel ;;; Copyright =C2=A9 2021 Raghav Gururajan ;;; Copyright =C2=A9 2021 Petr Hodina +;;; Copyright =C2=A9 2021 Robin Templeton ;;; ;;; This file is part of GNU Guix. ;;; @@ -142,6 +143,7 @@ (define-module (gnu packages video) #:use-module (gnu packages man) #:use-module (gnu packages markup) #:use-module (gnu packages maths) + #:use-module (gnu packages music) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) @@ -2360,6 +2362,74 @@ (define-public youtube-dl (home-page "https://yt-dl.org") (license license:public-domain))) =20 +(define-public yt-dlp + (package/inherit youtube-dl + (name "yt-dlp") + (version "2021.10.22") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/yt-dlp/yt-dlp/" + "releases/download/" + version "/yt-dlp.tar.gz")) + (sha256 + (base32 + "0xh4cwmvx49pxn8x07wj2dy8ynj6xg8977l5493vv0l8zc27wp87")) + (snippet + '(begin + ;; Delete the pre-generated files, except for the man pa= ge + ;; 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)))) + (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\\('ffmpeg_location'\\)" match) + (format #f "~a or '~a'" match (which "ffmpeg")))) + #t)) + (replace 'build-generated-files + (lambda _ + ;; Avoid the yt-dlp.1 target, which requires pandoc. + (invoke "make" "PYTHON=3Dpython" "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/")))) + #t)) + (delete 'install-completion) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-k" "not download")))))))) + (inputs + `(("python-mutagen" ,python-mutagen) + ("python-pycryptodomex" ,python-pycryptodomex) + ("python-websockets" ,python-websockets) + ,@(package-propagated-inputs youtube-dl))) + (native-inputs + `(("python-pytest" ,python-pytest) + ,@(package-native-inputs youtube-dl))) + (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"))) + (define-public youtube-dl-gui (package (name "youtube-dl-gui") --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 26 08:54:47 2021 Received: (at 51179-done) by debbugs.gnu.org; 26 Oct 2021 12:54:48 +0000 Received: from localhost ([127.0.0.1]:45388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfLyR-0006fF-RR for submit@debbugs.gnu.org; Tue, 26 Oct 2021 08:54:47 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfLyQ-0006ey-4u for 51179-done@debbugs.gnu.org; Tue, 26 Oct 2021 08:54:39 -0400 Received: by mail-wr1-f66.google.com with SMTP id d10so14978681wrb.1 for <51179-done@debbugs.gnu.org>; Tue, 26 Oct 2021 05:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=Fs6oFnUUKbIKok0VFKXL+JRr6Ye3lroPCs/UE4piN3Y=; b=lYD0Y6ghyqrAYtbMN2TfMcJfReZTVgcQHR1a6Y5PRdXgbG1Ln7Lg4mw0oJiQyv9juu RVFO6g5suK/+wwcVpvb9WEfHm8TUZE1waMJJjQhA1aVcQvaIZqedmkzEC7VgP/l8tH2s 7asueoB4MJ/e3oI1rRFC/IGfZiAJTUwe1UoGISS1lqFP1SgfIjT4yQwXTFVie80xFb1u g/yaoZv7ivorgWYPwi9vsnHuQxulQqB4Ex32XwnR+BW6FxkhuSNJUjeFSi4V7NJSgXqR MauP24TitaZzzPCrJxopawfCPH1IEazc8j64le/4b6FFOI9HB95vwLX7WfCgpP9EkMpY 0Y7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Fs6oFnUUKbIKok0VFKXL+JRr6Ye3lroPCs/UE4piN3Y=; b=qtEMqJoRtveM8vl9UqP0TYhdcjAssw+XQJLEkR8HFYQ1x3myHOjJNOkIMUPZxK4IV+ BMs6mXF3dJA0lGZbN32fjpeC6hjOp0q7CIXEYxbKfqNf5Paf18yq1TIW2xAfwbA1sv3E bndOMUVbsk/OnNRHQdylbh3I4aRV8i3U6E6haY+Y+M+P5qF9ZS6xTJFw0pyYWNg2Ejtz NaAVuFXDXz9RBNUpMrAnEI6q8Oikjp0K+2H8SJRmU65RlIPhu8bVGGB2OHT5UNNcrYY7 W2PS5W8NYdI2sYJBk6oXskG8bl9yFFkN356Q6JvltbjotEX7To9T6Xia6VyBxUYs2LRL TY9Q== X-Gm-Message-State: AOAM532Xgbh/sKdlbv5t+Siow6hcYvUgOJ6ONuHSXuJtTOCwS2wQRlxs PMCzB9ikjAFybXzjkHEq+l7k4gqzfSxscA== X-Google-Smtp-Source: ABdhPJxfYFnMtP4kBzsSG2oCHTHH9uEJBcG+C5Uex6/3gNed2pwLnfq9NTkeuwo2dUJdmF6DNvRxgA== X-Received: by 2002:adf:a413:: with SMTP id d19mr32474743wra.246.1635252872055; Tue, 26 Oct 2021 05:54:32 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id p17sm527150wmd.1.2021.10.26.05.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 05:54:31 -0700 (PDT) Message-ID: Subject: Re: bug#51179: [PATCH] gnu: Add yt-dlp. From: Liliana Marie Prikler To: Robin Templeton Date: Tue, 26 Oct 2021 14:54:30 +0200 In-Reply-To: <87wnm1u66f.fsf_-_@terpri.org> References: <87pms9mf7a.fsf@terpri.org> <87ee8pm6sn.fsf_-_@terpri.org> <99268fb747b2278cc0e279c5efc83f5bbbfaccf1.camel@gmail.com> <8735opvlvd.fsf@terpri.org> <87wnm1u66f.fsf_-_@terpri.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51179-done Cc: 51179-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, I've pushed this patch with the following adjustments, Am Sonntag, den 24.10.2021, 23:36 -0400 schrieb Robin Templeton: > * gnu/packages/video.scm (yt-dlp): New variable. > > Co-authored-by: Morgan Smith > Suggested-by: bdju > --- > Add check phase from Morgan's package and use latest yt-dlp release > > gnu/packages/video.scm | 70 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 70 insertions(+) > > diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm > index d2a2a08ee3..a2ae26987a 100644 > --- a/gnu/packages/video.scm > +++ b/gnu/packages/video.scm > @@ -53,6 +53,7 @@ > ;;; Copyright © 2020 Hartmut Goebel > ;;; Copyright © 2021 Raghav Gururajan > ;;; Copyright © 2021 Petr Hodina > +;;; Copyright © 2021 Robin Templeton > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -142,6 +143,7 @@ (define-module (gnu packages video) > #:use-module (gnu packages man) > #:use-module (gnu packages markup) > #:use-module (gnu packages maths) > + #:use-module (gnu packages music) > #:use-module (gnu packages mp3) > #:use-module (gnu packages ncurses) > #:use-module (gnu packages networking) > @@ -2360,6 +2362,74 @@ (define-public youtube-dl > (home-page "https://yt-dl.org") > (license license:public-domain))) > > +(define-public yt-dlp > + (package/inherit youtube-dl > + (name "yt-dlp") > + (version "2021.10.22") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/yt-dlp/yt-dlp/ > " > + "releases/download/" > + version "/yt-dlp.tar.gz")) > + (sha256 > + (base32 > + "0xh4cwmvx49pxn8x07wj2dy8ynj6xg8977l5493vv0l8zc27wp8 > 7")) > + (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)))) > + (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\\('ffmpeg_location'\\)" match) > + (format #f "~a or '~a'" match (which "ffmpeg")))) "get" becomes "get_param" in yt-dlp. > + #t)) > + (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/")))) > + #t)) > + (delete 'install-completion) > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (invoke "pytest" "-k" "not download")))))))) > + (inputs > + `(("python-mutagen" ,python-mutagen) > + ("python-pycryptodomex" ,python-pycryptodomex) > + ("python-websockets" ,python-websockets) > + ,@(package-propagated-inputs youtube-dl))) Used (package-inputs) as it should be. > + (native-inputs > + `(("python-pytest" ,python-pytest) > + ,@(package-native-inputs youtube-dl))) > + (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"))) Thanks From unknown Mon Aug 18 08:51:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Nov 2021 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator