Home Explore Blog Models CI



nix

doc/manual/source/command-ref/status-build-failure.md
62b9a72467b57122c77794a03fbe9726d0e33f56188b24ff00000003000003b6
# Special exit codes for build failure

1xx status codes are used when requested builds failed.
The following codes are in use:

- `100` Generic build failure

  The builder process returned with a non-zero exit code.

- `101` Build timeout

  The build was aborted because it did not complete within the specified `timeout`.

- `102` Hash mismatch

  The build output was rejected because it does not match the
  [`outputHash` attribute of the derivation](@docroot@/language/advanced-attributes.md).

- `104` Not deterministic

  The build succeeded in check mode but the resulting output is not binary reproducible.

With the `--keep-going` flag it's possible for multiple failures to occur.
In this case the 1xx status codes are or combined using
[bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation#OR).

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

Chunks
f3d4ea10 (1st chunk of `doc/manual/source/command-ref/status-build-failure.md`)
Title: Special Exit Codes for Build Failure
Summary
This document outlines special 1xx status codes used to indicate different types of build failures. These include `100` for generic build failure (non-zero exit code), `101` for build timeout, `102` for hash mismatch of the build output, and `104` if the build is not binary reproducible. When the `--keep-going` flag is used, multiple failure codes can be combined using a bitwise OR operation.