Hi, Mathieu Othacehe <othac...@gnu.org> skribis:
>> Looking at LocalStore::ensurePath, I don’t think a GC root is made. >> You have to call ‘add-temp-root’ if you want that to happen, no? > > Yes, I think we do indeed. So perhaps we should adjust the docstring to reflect that? >> However ‘ensure-path’ can substitute the store item, which I suppose >> means you can substitute .drv files without building them, am I right? > > Yes I'm using it this way: > > (define (add-to-store outputs url) > (with-store store > (for-each (lambda (output) > (add-to-locks-held store output) > (add-substitute-url store url) > (ensure-path store output)) > (map derivation-output-path outputs)))) > > to fetch substitutes without building derivations. The painful part is > that I have to use my own custom RPC: AddToLocksHeld, so that I can add > the substitute to the store even if the output lock is held. Yeah, ‘guix offload’ should not connect to the daemon. It does so currently for one thing (registering GC roots IIRC), which should be done in Scheme instead. > At first, I planned to use "restore-file-set" from (guix nar) but it > only handles nar files produced by "guix archive --export". Specifically it handles “nar bundles” (new name :-)). But probably you can extract the relevant bits to import single nars, right? Thanks, Ludo’.