[Nix-dev] Re: GNUpdate, an automatic update tool for GNU packages
Ludovic Courtès
ludo at gnu.org
Tue Apr 13 15:18:22 CEST 2010
Hello!
Eelco Dolstra <e.dolstra at tudelft.nl>
writes:
> Ludovic Courtès wrote:
[...]
>> 3. Traverse that SXML tree to identify GNU packages based on the
>> contents of ‘meta.description’ and ‘meta.homepage’.
>>
>> 4. For each GNU package, find out the latest release by looking for it
>> on ftp.gnu.org or similar.
>
> Would it be possible to generalise this to support arbitrary packages using
> (maybe) some meta attributes specifying how to look for the latest package?
> E.g., the URL of the page containing the latest releases, and so on - somewhat
> similar to Michael Raskin's src-info-for-default.nix.
In theory, yes. ‘src-info-for-default.nix’ does seem to provide all the
necessary info so that’s probably a good starting point. Apparently
it’s quite flexible but also slightly more verbose than necessary, at
least for GNU projects.
BTW, where’s Michael script to process these?
>> Items #1 and #2 are serious bottlenecks in terms of performance and
>> memory consumption. Ideally, Eelco would provide us with a simple C API
>> to the evaluator that people could easily wrap in their favorite
>> language. :-)
>
> There is a C++ API. Would it possible to interface with that from Guile?
In theory, yes (again ;-)), but C++ name mangling makes it slightly more
difficult, and more importantly it wasn’t all that clear to me whether
something simple and usable could be obtained without having to wrap all
of libexpr.
Ideally we’d have functions to:
- Check whether a Nix object is evaluated or not.
- Force the evaluation of a Nix object.
- Deal with evaluation errors.
- Inspect the type and value of that object.
- Get source location information for objects.
How would you do that?
Thanks,
Ludo’.
More information about the nix-dev
mailing list