[Nix-dev] Re: introduction nix_repository_manager

Ludovic Courtès ludo at gnu.org
Thu Mar 6 15:30:40 CET 2008


Hi,

"Yury G. Kudryashov"
<urkud.urkud at gmail.com> writes:

> On Thursday 06 March 2008 12:03:51 Ludovic Courtès wrote:

>> Can't it be transparent?  I.e., `fetchdarcs' (or `fetchgit', etc.) would
>> do the following:
>>
>>   *  If the requested repo is not already available under
>>      ~/.managed-repos, then do a full checkout.
>>
>>   *  If the requested repo is already available under ~/.managed-repos,
>>      just do an "update".
>>
> I see 2 problems with your (Ludovic Courtès) approach:
> 1) You need to rewrite fetchdarcs/fetchsvn/fetchgit each time.

"Rewrite"?  As in "reimplement"?  I don't understand.

> 2) In NixOS fetch* is usually executed by nixbld1. Which ~/.managed-repos do 
> you want to use?

Right, that's a real problem.

Another solution would be to create a derivation for each revision
that's checked out or update, and to "somehow" chain them so we don't do
a full checkout each time.  For instance, assuming Git:

  *  The first time, `git-clone' the remote repository, create a
     derivation containing the repository.

  *  Then, `git-clone' or copy the previously checked out repository, put
     that in a new derivation, and `git-pull' from the remote
     repository, so that only changes are actually downloaded.

The thing is, I don't think there's a way to "chain" derivations this
way, because this would require a way to keep track of what store paths
a given Nix expression previously produce.

Thanks,
Ludovic.




More information about the nix-dev mailing list