Subject: Re: [bug#33448] [PATCH 2/3] describe: Add json format.

From: [email-masked] (Ludovic Courtès)
Date: Wed, 21 Nov 2018 22:33:32 +0100

Oleg Pykhalov <[email-masked]> skribis:

> * guix/channels.scm (channel->json): New procedure.
> * guix/scripts/describe.scm (%options): Add 'json' option.
> (display-checkout-info, display-profile-info): Use 'channel->json'.
> * doc/guix.texi (Invoking guix describe): Document this.

[...]

> +(define channel->json
> +  (match-lambda
> +    (($ <channel> name url branch commit location)
> +     (scm->json-string
> +      (list
> +       (cons 'name name)
> +       (cons 'url url)
> +       (cons 'commit commit))))))

Since this is not a core feature of channels and add a dependency on
(json), what about moving this procedure to (guix scripts describe)?

(‘channel->sexp’ could got to (guix scripts describe) as well maybe; no
big deal.)

Otherwise LGTM!

Ludo’.