all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Robin Templeton <robin@terpri.org>
Cc: 51179-done@debbugs.gnu.org
Subject: bug#51179: [PATCH] gnu: Add yt-dlp.
Date: Tue, 26 Oct 2021 14:54:30 +0200	[thread overview]
Message-ID: <a2cb0be852dabc396389d895e86becd8065af119.camel@gmail.com> (raw)
In-Reply-To: <87wnm1u66f.fsf_-_@terpri.org>

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 <Morgan.J.Smith@outlook.com>
> Suggested-by: bdju <bdju@tilde.team>
> ---
> 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 <h.goebel@crazy-compilers.com>
>  ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
>  ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
> +;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
>  ;;;
>  ;;; 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





      reply	other threads:[~2021-10-26 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  9:44 [bug#51179] [PATCH] gnu: Add yt-dlp Robin Templeton
2021-10-13 10:15 ` Liliana Marie Prikler
2021-10-13 12:46   ` [bug#51179] [PATCH v2] Re: bug#51179: " Robin Templeton
2021-10-13 14:53     ` Liliana Marie Prikler
2021-10-25  3:12       ` [bug#51179] " Robin Templeton
2021-10-25  3:36         ` Robin Templeton
2021-10-26 12:54           ` Liliana Marie Prikler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2cb0be852dabc396389d895e86becd8065af119.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=51179-done@debbugs.gnu.org \
    --cc=robin@terpri.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.