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