GNU bug report logs - #48697
[PATCH] import: Add CHICKEN egg importer.

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Thu, 27 May 2021 12:49:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 48697 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 48697 <at> debbugs.gnu.org, raingloom <raingloom <at> riseup.net>
Subject: Re: [PATCH v3] import: Add CHICKEN egg importer.
Date: Tue, 01 Jun 2021 23:10:54 +0200
Hi!

Xinglu Chen <public <at> yoctocell.xyz> skribis:

> * guix/import/egg.scm: New file.
> * guix/scripts/import/egg.scm: New file.
> * tests/egg.scm: New file.
> * Makefile.am (MODULES, SCM_TESTS): Register them.
> * po/guix/POTFILES.in: Likewise.
> * guix/scripts/import.scm (importers): Add egg importer.
> * doc/guix.texi (Invoking guix import, Invoking guix refresh): Document it.
> ---
> Changes since v2:
> * Remove message telling the user that the egg doesn’t exist, ‘guix
>   import’ will already throw an error if this happens.
>
> * Fixed the failing test, I just had to change (license (list 'a 'b)) to
>   (license '(a b)), duh.

This LGTM, except this last bit, as shown here:

> +(define-package-matcher match-chicken-foo
> +  ('package
> +    ('name "chicken-foo")
> +    ('version "1.0.0")
> +    ('source (? file-like? source))
> +    ('build-system 'chicken-build-system)
> +    ('arguments ('quasiquote ('#:egg-name "foo")))
> +    ('native-inputs
> +     ('quasiquote
> +      (("chicken-test" ('unquote chicken-test))
> +       ("chicken-srfi-1" ('unquote chicken-srfi-1))
> +       ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
> +    ('inputs
> +     ('quasiquote
> +      (("libgit2" ('unquote libgit2)))))
> +    ('propagated-inputs
> +     ('quasiquote
> +      (("chicken-datatype" ('unquote chicken-datatype)))))
> +    ('home-page "https://wiki.call-cc.org/egg/foo")
> +    ('synopsis "Example egg")
> +    ('description #f)
> +    ('license '(license:gpl3 license:expat))))

The generated ‘license’ team is incorrect.  For multiple licenses, the
generated code should look like:

  (package
    ;; …
    (license (list license:gpl3 license:expat)))

For a single license:

  (package
    ;; …
    (license license:gpl3+))

Compare with:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import egg sourcehut | tail -1

Starting download of /tmp/guix-file.N300R0
From https://code.call-cc.org/egg-tarballs/5/sourcehut/sourcehut-0.3.3.tar.gz...
 ….3.3.tar.gz  20KiB                  678KiB/s 00:00 [##################] 100.0%
  (license (license:bsd?)))
--8<---------------cut here---------------end--------------->8---

That’s the last remaining issue in my view.  Could you send a v3?

BTW, if you want, you can also send a snippet for ‘etc/news.scm’ to
announce ‘guix import egg’ to fellow users!  You can take inspiration
from the ‘guix import go’ news entry; I’ll fix up the commit ID when
committing.

Thanks!

Ludo’.




This bug report was last modified 3 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.