[Nix-dev] Binary cache substituter
Eelco Dolstra
eelco.dolstra at logicblox.com
Wed Sep 19 17:53:31 CEST 2012
Hi,
On 19/09/12 11:53, Michael Raskin wrote:
>> * The main downside to the binary cache substituter is that it has no support
>> for binary patches (and it's not obvious how to support them). If you really
>> need them, you can add "force-manifest = true" to nix.conf to force nix-channel
>> to nix-pull the channel's manifest.
>
> Are binary diffs pregenerated - and only for a fixed set of second
> arguments?
>
> If yes, narinfo could contain them.
Binary diffs are typically generated after the NAR / .narinfo has been produced,
so adding them later requires modifying an existing .narinfo file. That would
be annoying because life is a lot simpler if .narinfo files are immutable.
Moreover, since patches can be chained, you need to know the entire graph of
available patches. The manifest provides that graph, so it's efficient to
compute the shortest path from the available paths to the target path. But
without the manifest, you'd have to recursively fetch all .narinfo files that
*might* contribute to the graph, which would be pretty slow.
> If no, you could send list of hashes of existing paths with the same
> name (or name minus version) to server and the server will tell you if
> you get any binary diffs.
Right, but that would require an intelligent server. So mirroring (like on S3)
would be hard.
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
More information about the nix-dev
mailing list