Subject: [bug#63801] [PATCH] gnu: Add yle-dl

From: Nicolas Goaziou <[email-masked]>
Date: Sat, 01 Jul 2023 13:22:48 +0200

Hello,

Saku Laesvuori via Guix-patches via <[email-masked]> writes:

> * gnu/packages/video.scm (yle-dl): New variable.

Applied with the changes below. Thank you.

> * gnu/packages/video.scm: Import (gnu packages python-build).

This information is not necessary in the commit message.

> +(define-public yle-dl
> + (package

Indentation is off. You may want to run "guix style" command prior to
sending a patch (I don't, but I'm opinionated about indentation)

> +  (name "yle-dl")
> +  (version "20221231")
> +  (source (origin
> +           ;; PyPI release doesn't include tests
> +           (method git-fetch)
> +           (uri
> +            (git-reference
> +             (url "https://github.com/aajanki/yle-dl.git")

We usually remove ".git" suffix from URL.

> +             (commit "c2a4d2f3926056496f520e289334d345889b51c4")))

We don't use raw hash commits there. The project tags its releases, so
it should be:

  (commit version)

> +        (add-after 'wrap 'wrap-path
> +          (lambda _
> +            (wrap-program (string-append #$output "/bin/yle-dl")
> +                          `("PATH" = (,(string-append #$ffmpeg "/bin")
> +                                      ,(string-append #$wget "/bin"))))))

"#$ffmpeg" and "#$wget" would prevent package transformations. You
should prefer, e.g.,

  (string-append #$(this-package-input "ffmpeg") "/bin")

Regards,
-- 
Nicolas Goaziou