guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28251] [PATCH 0/3] Add generic JSON importer


From: Ludovic Courtès
Subject: [bug#28251] [PATCH 0/3] Add generic JSON importer
Date: Thu, 28 Sep 2017 21:58:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Ricardo Wurmus <address@hidden> skribis:

> Ludovic Courtès <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]