Pierre Neidhardt <m...@ambrevar.xyz> skribis: >> “Something” needs to build the file-to-package database (which is what >> you’re working on), and then there needs to be a way for users to fetch >> that database. This is all orthogonal to substitutes, as I see it, >> which is why I think we need to think about integrating it maybe with >> ‘guix publish’ on the server side and (guix channels) on the client >> side. > > If the database is filled on =guix build=, then the substitute server > would automatically have a filesearch database. > > Question: How do I hook onto =guix build=?
You would need a build-completion hook in the daemon, which doesn’t exist (yet!). Note also that at this level we only see derivations, not packages. >> Ah got it; having a database known to correspond to a specific commit is >> even better. >> >> However, note that it could take time for the server to provide the >> complete database for a commit (the time for as many packages as >> possible to be built), so clients may want to refresh it anyway, or even >> perhaps to use an older database. > > Indeed, and that's why I think we need to include a timestamp: if the > client's database timestamp is older than that of the substitute server > database, then we re-fetch it. Yeah, maybe that can work. Thanks, Ludo’.