From b824a1daeefd1611c8d84432dc0b2b38f24bbbfd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Feb 2007 23:17:20 +0000 Subject: * Start of `nix-store --export' operation for serialising a store path. This is like `nix-store --dump', only it also dumps the meta-information of the store path (references, deriver). Will add a `--sign' flag later to add a cryptographic signature, which we will use for exchanging store paths between build farm machines in a secure manner. --- src/libstore/store-api.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 361e7aaa1aee..6a1de616ca59 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -7,6 +7,7 @@ #include #include "hash.hh" +#include "serialise.hh" namespace nix { @@ -91,6 +92,13 @@ public: virtual Path addTextToStore(const string & suffix, const string & s, const PathSet & references) = 0; + /* Export a store path, that is, create a NAR dump of the store + path and append its references and its deriver. Optionally, a + cryptographic signature (created by OpenSSL) of the preceding + data is attached. */ + virtual void exportPath(const Path & path, bool sign, + Sink & sink) = 0; + /* Ensure that the output paths of the derivation are valid. If they are already valid, this is a no-op. Otherwise, validity can be reached in two ways. First, if the output paths have -- cgit 1.4.1