[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54796] [PATCH v3 00/22] Add importer for hex.pm and rebar3 build-sy
From: |
Ludovic Courtès |
Subject: |
[bug#54796] [PATCH v3 00/22] Add importer for hex.pm and rebar3 build-system for Erlang |
Date: |
Fri, 29 Apr 2022 15:13:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> hex.pm is a package repository for Erlang and Elixir.
>
> * 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.
Please mention tests/hexpm.scm.
[...]
> +(define-module (guix hexpm-download)
> + #:use-module (srfi srfi-26)
> + #:export (hexpm-package-url
> + hexpm-uri))
How about moving these two procedures to (guix build-system rebar3)?
This is what is done in similar cases, for example with ‘pypi-uri’.
> +++ b/guix/scripts/import/hexpm.scm
> @@ -0,0 +1,109 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2014 David Thompson <davet@gnu.org>
> +;;; Copyright © 2016 David Craven <david@craven.ch>
> +;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net>
> +;;; Copyright © 2020, 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
I think it’s fine to keep just your name here; it’s a short file and one
could argue that the bits found in all these files aren’t inventive. :-)
> + #:use-module (srfi srfi-11)
> + #:use-module (srfi srfi-71)
I think you can drop these two imports.
> +++ b/guix/upstream.scm
> @@ -464,6 +464,7 @@ SOURCE, an <upstream-source>."
> #:key-download key-download)))
> (values version tarball source))))))
>
> +
Oops. :-)
> +++ b/tests/hexpm.scm
> @@ -0,0 +1,257 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2015 David Thompson <davet@gnu.org>
> +;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
> +;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
> +;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
Same comment here.
> +(test-assert "hexpm->guix-package"
> + ;; Replace network resources with sample data.
> + (mock ((guix http-client) http-fetch
> + (lambda (url . rest)
I have a preference for spawning an HTTP server, if that’s possible, as
is done in tests/cpan.scm for instance.
But it’s already been a long ride, so we can keep that for later.
Otherwise LGTM.
Great to see this new importer!
Ludo’.
- [bug#54796] [PATCH v3 08/22] gnu: Add erlang-eunit-formatters., (continued)
- [bug#54796] [PATCH v3 08/22] gnu: Add erlang-eunit-formatters., Hartmut Goebel, 2022/04/08
- [bug#54796] [PATCH v3 11/22] gnu: Add erlang-hex-core., Hartmut Goebel, 2022/04/08
- [bug#54796] [PATCH v3 17/22] gnu: Add erlang-covertool., Hartmut Goebel, 2022/04/08
- [bug#54796] [PATCH v3 20/22] gnu: Add rebar3-git-vsn., Hartmut Goebel, 2022/04/08
- [bug#54796] [PATCH v4 00/22] Add importer for hex.pm and rebar3 build-system for Erlang, Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 02/22] build-system: Add 'rebar3-build-system'., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 01/22] import: Add hex.pm importer., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v3 00/22] Add importer for hex.pm and rebar3 build-system for Erlang,
Ludovic Courtès <=
- [bug#54796] [PATCH v4 03/22] gnu: Add erlang-cf., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 04/22] gnu: Add erlang-certifi., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 05/22] gnu: Add erlang-erlware-commons., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 06/22] gnu: Add erlang-cth-readable., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 08/22] gnu: Add erlang-getopt., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 07/22] gnu: Add erlang-bbmustache., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 11/22] gnu: Add erlang-parse-trans., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 10/22] gnu: Add erlang-providers., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 13/22] gnu: Add erlang-ssl-verify-fun., Hartmut Goebel, 2022/04/10
- [bug#54796] [PATCH v4 15/22] gnu: Add erlang-edown., Hartmut Goebel, 2022/04/10