unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 28251@debbugs.gnu.org
Subject: [bug#28251] [PATCH 0/3] Add generic JSON importer
Date: Thu, 28 Sep 2017 21:58:34 +0200	[thread overview]
Message-ID: <87efqqlhn9.fsf@gnu.org> (raw)
In-Reply-To: <1033407664.20475.1506597823791.JavaMail.sas@[172.25.246.172]> (Ricardo Wurmus's message of "Thu\, 28 Sep 2017 13\:23\:40 +0200")

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> I wonder if we could further simplify the “source” part, like allowing
>> (maybe optionally) for:
>>
>>   "source": "mirror://gnu…"
>>
>> and then letting the importer download the thing and fill in the hash.
>> Likewise for a Git checkout:
>>
>>   "git": { "commit": "cabba9e"; "url": "…" };
>>
>> Thoughts?
>
> I have added support for a simple source string as in the first example.
> I left the support for a direct translation of origin expressions
> unchanged, because I’m not sure yet how to express this.
>
> So, right now we can do either
>
>   "source": "mirror://gnu/hello/hello-2.10.tar.gz",
>
> or
>
>   "source": {
>     "method": "url-fetch",
>     "uri": "mirror://gnu/hello/hello-2.10.tar.gz",
>     "sha256": {
>       "base32": "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"
>     }
>   }
>
> I’m open to simplifying this further.  What do other people think?

That sounds good to me.

One important consideration is to have a format that is future-proof,
which is probably the case here.  We could perhaps add a
“format-version” field in the JSON input to be on the safe side, though
it would defeat the whole simplification.

(In other news, I’ve been considering the implementation of an
“upstream” importer, where “guix import upstream URL” would return a
package template as complete as possible.)

Thanks,
Ludo’.

      reply	other threads:[~2017-09-28 19:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 15:58 [bug#28251] [PATCH 0/3] Add generic JSON importer Ricardo Wurmus
2017-08-27 16:00 ` [bug#28251] [PATCH 1/3] packages: Add package->code Ricardo Wurmus
2017-08-27 16:00   ` [bug#28251] [PATCH 2/3] import: Add generic data to package converter Ricardo Wurmus
2017-09-04 13:04     ` Ludovic Courtès
2017-08-27 16:00   ` [bug#28251] [PATCH 3/3] import: Add JSON importer Ricardo Wurmus
2017-09-04 13:04     ` Ludovic Courtès
2017-09-01 15:55   ` [bug#28251] [PATCH 1/3] packages: Add package->code Ludovic Courtès
2017-09-28 11:19     ` bug#28251: " Ricardo Wurmus
2017-08-28 12:27 ` [bug#28251] [PATCH 0/3] Add generic JSON importer Ricardo Wurmus
2017-09-01 15:35 ` Ludovic Courtès
2017-09-28 11:23   ` Ricardo Wurmus
2017-09-28 19:58     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efqqlhn9.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=28251@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).