aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index ba8990755..ec32e995d 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -20,12 +20,12 @@
namespace nix {
-MakeError(SubstError, Error)
-MakeError(BuildError, Error) /* denotes a permanent build failure */
-MakeError(InvalidPath, Error)
-MakeError(Unsupported, Error)
-MakeError(SubstituteGone, Error)
-MakeError(SubstituterDisabled, Error)
+MakeError(SubstError, Error);
+MakeError(BuildError, Error); // denotes a permanent build failure
+MakeError(InvalidPath, Error);
+MakeError(Unsupported, Error);
+MakeError(SubstituteGone, Error);
+MakeError(SubstituterDisabled, Error);
struct BasicDerivation;
@@ -258,7 +258,7 @@ protected:
struct State
{
- LRUCache<std::string, std::shared_ptr<ValidPathInfo>> pathInfoCache;
+ LRUCache<std::string, std::shared_ptr<const ValidPathInfo>> pathInfoCache;
};
Sync<State> state;
@@ -303,7 +303,8 @@ public:
const Hash & hash, const string & name) const;
Path makeFixedOutputPath(bool recursive,
- const Hash & hash, const string & name) const;
+ const Hash & hash, const string & name,
+ const PathSet & references = {}) const;
Path makeTextPath(const string & name, const Hash & hash,
const PathSet & references) const;
@@ -360,12 +361,12 @@ public:
/* Asynchronous version of queryPathInfo(). */
void queryPathInfo(const Path & path,
- Callback<ref<ValidPathInfo>> callback) noexcept;
+ Callback<ref<const ValidPathInfo>> callback) noexcept;
protected:
virtual void queryPathInfoUncached(const Path & path,
- Callback<std::shared_ptr<ValidPathInfo>> callback) noexcept = 0;
+ Callback<std::shared_ptr<const ValidPathInfo>> callback) noexcept = 0;
public:
@@ -421,6 +422,13 @@ public:
bool recursive = true, HashType hashAlgo = htSHA256,
PathFilter & filter = defaultPathFilter, RepairFlag repair = NoRepair) = 0;
+ // FIXME: remove?
+ virtual Path addToStoreFromDump(const string & dump, const string & name,
+ bool recursive = true, HashType hashAlgo = htSHA256, RepairFlag repair = NoRepair)
+ {
+ throw Error("addToStoreFromDump() is not supported by this store");
+ }
+
/* Like addToStore, but the contents written to the output path is
a regular file containing the given string. */
virtual Path addTextToStore(const string & name, const string & s,