Subject: [bug#42180] bug#51061: [PATCH v2 01/23] guix: Add extracting-download.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 08 Oct 2021 00:01:59 +0200

Hartmut Goebel <[email-masked]> skribis:

> * guix/scripts/import.scm (importers): Add "hexpm".
> * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm,
>   guix/hexpm-download.scm: New files.
> * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of
>   fetch methods.
> * guix/upstream.scm (package-update/hexpm-fetch): New function.
>   (%method-updates) Add it.
> * Makefile.am: Add them.

At the very least it misses tests and documentation, like for every
importer, and an entry in po/guix/POTFILES.in.  The (guix
hexpm-download), like extracting-download.scm, needs more attention
because it’s a core API.

Again, I’m in favor of reverting until it’s been reviewed in more
detail.

> +++ b/guix/hexpm-download.scm
> @@ -0,0 +1,74 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <[email-masked]>
> +;;; Copyright © 2017 Mathieu Lirzin <[email-masked]>
> +;;; Copyright © 2017 Christopher Baines <[email-masked]>
> +;;; Copyright © 2020 Jakub Kądziołka <[email-masked]>
> +;;; Copyright © 2020 Hartmut Goebel <[email-masked]>

The list of copyright holders looks bogus.

> +;;; An <origin> method that fetches a package from the hex.pm repository,
> +;;; unwrapping the actual content from the download tarball.

It would be nice to explain in a few words what “the hex.pm repository”
is (I have no idea.)

> +(define* (hexpm-fetch url hash-algo hash

Why another method?

> +++ b/guix/import/hexpm.scm
> @@ -0,0 +1,294 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2015 Cyril Roelandt <[email-masked]>
> +;;; Copyright © 2016 David Craven <[email-masked]>
> +;;; Copyright © 2017, 2019, 2020 Ludovic Courtès <[email-masked]>
> +;;; Copyright © 2019 Martin Becze <[email-masked]>
> +;;; Copyright © 2020, 2021 Hartmut Goebel <[email-masked]>

Please strip it.

Thanks,
Ludo’.