Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExitStatusFlags Struct Reference

#include <build-result.hh>

Public Member Functions

void updateFromStatus (BuildResult::Failure::Status status)
unsigned int failingExitStatus () const

Public Attributes

bool permanentFailure = false
bool timedOut = false
bool hashMismatch = false
bool checkMismatch = false

Detailed Description

Flags tracking different types of build failures for exit status computation.

Member Function Documentation

◆ failingExitStatus()

unsigned int nix::ExitStatusFlags::failingExitStatus ( ) const

The exit status in case of failure.

In the case of a build failure, returned value follows this bitmask:

0b1100100
^^^^
|||`- timeout
||`-- output hash mismatch
|`--- build failure
`---- not deterministic

In other words, the failure code is at least 100 (0b1100100), but might also be greater.

Otherwise (no build failure, but some other sort of failure by assumption), this returned value is 1.

◆ updateFromStatus()

void nix::ExitStatusFlags::updateFromStatus ( BuildResult::Failure::Status status)

Update flags based on a build failure status.

Member Data Documentation

◆ checkMismatch

bool nix::ExitStatusFlags::checkMismatch = false

Set if at least one derivation is not deterministic in check mode.

◆ hashMismatch

bool nix::ExitStatusFlags::hashMismatch = false

Set if at least one derivation fails with a hash mismatch.

◆ permanentFailure

bool nix::ExitStatusFlags::permanentFailure = false

Set if at least one derivation had a BuildError (i.e. permanent failure).

◆ timedOut

bool nix::ExitStatusFlags::timedOut = false

Set if at least one derivation had a timeout.


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