"Mark L." <c...@pydis.com> writes:

> Hi everyone!
>
> I am trying out Guix to build software, I like it so far, but what confuses 
> me are the build systems.
>
> I originally thought a build system would figure out which dependencies are
> needed based on the project lockfile (has versions and hashes) and then 
> installs
> them from there. But it doesnt seem to work that way.

It cannot be done during the build, since the build runs without access
to the network.

>
> It seems that package dependencies specified in the languages lockfiles need 
> to
> be duplicated into the guix package definitions, which I think means any
> dependency of the project needs to be packaged in Guix, & any package updates
> need to be done twice. Is this correct?

Yes, I believe you are correct.  However in practice, it the program you
are packages does not need latest version of some dependency, and there
are no security or other issues, you can possibly skip updating it.

>
> Would it be possible for the build system to somehow infer packages from the
> project dependencies - maybe have them supply a function to return package
> definitions as sourced from the lockfile?

You can take a look at (guix)Invoking guix import, I think that might be
something similar to what you are looking for.  It does not however
handle the upgrades as far as I know, but maybe I have just missed
something.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to