1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

Merge remote-tracking branch 'origin/master' into flakes

This commit is contained in:
Eelco Dolstra 2019-11-04 22:29:31 +01:00
commit b81d9d26f5
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
39 changed files with 995 additions and 923 deletions

View file

@ -259,7 +259,7 @@ protected:
struct State
{
LRUCache<std::string, std::shared_ptr<ValidPathInfo>> pathInfoCache;
LRUCache<std::string, std::shared_ptr<const ValidPathInfo>> pathInfoCache;
};
Sync<State> state;
@ -362,12 +362,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:
@ -423,6 +423,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,