Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::BuildResult Struct Reference
Inheritance diagram for nix::BuildResult:
nix::KeyedBuildResult

Public Types

enum  Status {
  Built = 0 , Substituted , AlreadyValid , PermanentFailure ,
  InputRejected , OutputRejected , TransientFailure , CachedFailure ,
  TimedOut , MiscFailure , DependencyFailed , LogLimitExceeded ,
  NotDeterministic , ResolvesToAlreadyValid , NoSubstituters
}
 

Public Member Functions

std::string toString () const
 
bool operator== (const BuildResult &) const noexcept
 
std::strong_ordering operator<=> (const BuildResult &) const noexcept
 
bool success ()
 
void rethrow ()
 

Public Attributes

enum nix::BuildResult::Status status = MiscFailure
 
std::string errorMsg
 
unsigned int timesBuilt = 0
 
bool isNonDeterministic = false
 
SingleDrvOutputs builtOutputs
 
time_t startTime = 0
 
time_t stopTime = 0
 
std::optional< std::chrono::microseconds > cpuUser
 
std::optional< std::chrono::microseconds > cpuSystem
 

Member Enumeration Documentation

◆ Status

Note
This is directly used in the nix-store –serve protocol. That means we need to worry about compatability across versions. Therefore, don't remove status codes, and only add new status codes at the end of the list.
Enumerator
TransientFailure 

possibly transient

CachedFailure 

no longer used

Member Data Documentation

◆ builtOutputs

SingleDrvOutputs nix::BuildResult::builtOutputs

For derivations, a mapping from the names of the wanted outputs to actual paths.

◆ cpuUser

std::optional<std::chrono::microseconds> nix::BuildResult::cpuUser

User and system CPU time the build took.

◆ errorMsg

std::string nix::BuildResult::errorMsg

Information about the error if the build failed.

Todo
This should be an entire ErrorInfo object, not just a string, for richer information.

◆ isNonDeterministic

bool nix::BuildResult::isNonDeterministic = false

If timesBuilt > 1, whether some builds did not produce the same result. (Note that 'isNonDeterministic = false' does not mean the build is deterministic, just that we don't have evidence of non-determinism.)

◆ startTime

time_t nix::BuildResult::startTime = 0

The start/stop times of the build (or one of the rounds, if it was repeated).

◆ timesBuilt

unsigned int nix::BuildResult::timesBuilt = 0

How many times this build was performed.


The documentation for this struct was generated from the following files: