diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-21 17:55:57 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-21 17:55:57 +0100 |
commit | 1c5f73f529d83543dc776b4de4180309bfd3b4a3 (patch) | |
tree | 3f19160e2f65893c560d04a8a99b024427b86b78 /src/libstore/store-api.hh | |
parent | 87295b9844090d76173a9f68341a4b17a7e1e7b9 (diff) |
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...
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r-- | src/libstore/store-api.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 72b0b0f03..9a2c9daca 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<FSAccessor> getFSAccessor() override; }; |