From 1c5f73f529d83543dc776b4de4180309bfd3b4a3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 21 Mar 2016 17:55:57 +0100 Subject: Add Store::dumpPath() method This allows applying nix-store --verify-path to binary cache stores: NIX_REMOTE=https://cache.nixos.org nix-store --verify-path /nix/store/s5c7... --- src/libstore/store-api.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 72b0b0f032db..9a2c9daca08c 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -215,6 +215,9 @@ public: virtual Path addTextToStore(const string & name, const string & s, const PathSet & references, bool repair = false) = 0; + /* Write a NAR dump of a store path. */ + virtual void dumpPath(const Path & path, Sink & sink) = 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 @@ -354,6 +357,8 @@ public: class LocalFSStore : public Store { +public: + void dumpPath(const Path & path, Sink & sink) override; ref getFSAccessor() override; }; -- cgit 1.4.1