aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 14:27:28 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 14:27:28 -0500
commit056cc1c1b903114f59c536dd9821b46f68516f4e (patch)
tree7a93772a077355c152c12042ccd9392abc86eb5e /src/libstore/store-api.hh
parent2e7be46e73293f729358eefc5b464dcb7e2d76bf (diff)
parent2e41ae9f93af0be2c778dda97e0ee9544a8aca1f (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 4579be4c6..d77aea338 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -71,6 +71,9 @@ class NarInfoDiskCache;
class Store;
+typedef std::map<std::string, StorePath> OutputPathMap;
+
+
enum CheckSigsFlag : bool { NoCheckSigs = false, CheckSigs = true };
enum SubstituteFlag : bool { NoSubstitute = false, Substitute = true };
enum AllowInvalidFlag : bool { DisallowInvalid = false, AllowInvalid = true };
@@ -122,6 +125,8 @@ public:
typedef std::map<std::string, std::string> Params;
+
+
protected:
struct PathInfoCacheValue {
@@ -614,6 +619,13 @@ public:
*/
StorePathSet exportReferences(const StorePathSet & storePaths, const StorePathSet & inputPaths);
+ /**
+ * Given a store path, return the realisation actually used in the realisation of this path:
+ * - If the path is a content-addressed derivation, try to resolve it
+ * - Otherwise, find one of its derivers
+ */
+ std::optional<StorePath> getBuildDerivationPath(const StorePath &);
+
/* Hack to allow long-running processes like hydra-queue-runner to
occasionally flush their path info cache. */
void clearPathInfoCache()
@@ -715,6 +727,11 @@ void copyClosure(
void removeTempRoots();
+/* Resolve the derived path completely, failing if any derivation output
+ is unknown. */
+OutputPathMap resolveDerivedPath(Store &, const DerivedPath::Built &, Store * evalStore = nullptr);
+
+
/* Return a Store object to access the Nix store denoted by
‘uri’ (slight misnomer...). Supported values are: