aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore/store-api.hh
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/store-api.hh')
-rw-r--r--nix/libstore/store-api.hh24
1 files changed, 24 insertions, 0 deletions
diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh
index 9403cbee19..3e982f6dd3 100644
--- a/nix/libstore/store-api.hh
+++ b/nix/libstore/store-api.hh
@@ -106,6 +106,30 @@ typedef list<ValidPathInfo> ValidPathInfos;
enum BuildMode { bmNormal, bmRepair, bmCheck };
+struct BuildResult
+{
+ enum Status {
+ Built = 0,
+ Substituted,
+ AlreadyValid,
+ PermanentFailure,
+ InputRejected,
+ OutputRejected,
+ TransientFailure, // possibly transient
+ CachedFailure,
+ TimedOut,
+ MiscFailure,
+ DependencyFailed,
+ LogLimitExceeded,
+ NotDeterministic,
+ } status = MiscFailure;
+ std::string errorMsg;
+ //time_t startTime = 0, stopTime = 0;
+ bool success() {
+ return status == Built || status == Substituted || status == AlreadyValid;
+ }
+};
+
class StoreAPI
{