Build Result
- 1. Property
Successful Build Result - 2. Property
Failed Build Result - 3. The following properties are required
- 4. Property
timesBuilt - 5. Property
startTime - 6. Property
stopTime - 7. Property
cpuUser - 8. Property
cpuSystem
Title: Build Result
| Type | combining |
| Required | No |
| Additional properties | Any type allowed |
Description: This schema describes the JSON representation of Nix’s BuildResult type, which represents the result of building a derivation or substituting store paths.
Build results can represent either successful builds (with built outputs) or various types of failures.
| Property | Type | Pattern | Title/Description |
|---|---|---|---|
| - timesBuilt | integer | No | Times built |
| - startTime | integer | No | Start time |
| - stopTime | integer | No | Stop time |
| - cpuUser | integer | No | User CPU time |
| - cpuSystem | integer | No | System CPU time |
| One of(Option) |
|---|
| Successful Build Result |
| Failed Build Result |
1. Property Successful Build Result
Title: Successful Build Result
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | #/$defs/success |
Description: Represents a successful build with built outputs.
| Property | Type | Pattern | Title/Description |
|---|---|---|---|
| + success | const | No | Success indicator |
| + status | enum (of string) | No | Success status |
| + builtOutputs | object | No | Built outputs |
1.1. Property success
Title: Success indicator
| Type | const |
| Required | Yes |
Description: Always true for successful build results.
Specific value: true
1.2. Property status
Title: Success status
| Type | enum (of string) |
| Required | Yes |
Description: Status string for successful builds.
Must be one of:
- “Built”
- “Substituted”
- “AlreadyValid”
- “ResolvesToAlreadyValid”
1.3. Property builtOutputs
Title: Built outputs
| Type | object |
| Required | Yes |
| Additional properties | Each additional property must conform to the schema |
Description: A mapping from output names to their build trace entries.
1.3.1. Property Build Trace Value
Title: Build Trace Value
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | build-trace-entry-v3.yaml#/$defs/value |
Description: A build trace entry is a key-value pair. This is the “value” part, describing an output.
| Property | Type | Pattern | Title/Description |
|---|---|---|---|
| + outPath | string | No | Output Store Path |
| + signatures | array | No | Build Signatures |
1.3.1.1. Property outPath
Title: Output Store Path
| Type | string |
| Required | Yes |
| Defined in | store-path-v1.yaml |
Description: The path to the store object that resulted from building this derivation for the given output name.
| Restrictions | |
|---|---|
| Min length | 34 |
| Must match regular expression | ^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$ Test |
1.3.1.2. Property signatures
Title: Build Signatures
| Type | array |
| Required | Yes |
Description: A set of cryptographic signatures attesting to the authenticity of this build trace entry.
| Array restrictions | |
|---|---|
| Min items | N/A |
| Max items | N/A |
| Items unicity | False |
| Additional items | False |
| Tuple validation | See below |
| Each item of this array must be | Description |
|---|---|
| Signature | A cryptographic signature along with the name of the key that produced it. … |
1.3.1.2.1. Signature
Title: Signature
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | signature-v2.yaml |
Description: A cryptographic signature along with the name of the key that produced it.
This schema describes the JSON representation of signatures as used in various Nix JSON APIs.
Warning
This JSON format is currently experimental and subject to change.
Version History
-
Version 1: Colon-separated string in the format
<key-name>:<signature-in-Base64> -
Version 2: Structured object with
keyNameandsigfields
1.3.1.2.1.1. Property keyName
Title: Key Name
| Type | string |
| Required | Yes |
Description: The name of the key used to produce this signature
1.3.1.2.1.2. Property sig
Title: Signature Data
| Type | string |
| Required | Yes |
Description: The raw signature bytes, Base64-encoded
2. Property Failed Build Result
Title: Failed Build Result
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | #/$defs/failure |
Description: Represents a failed build with error information.
| Property | Type | Pattern | Title/Description |
|---|---|---|---|
| + success | const | No | Success indicator |
| + status | enum (of string) | No | Failure status |
| + errorMsg | string | No | Error message |
| - isNonDeterministic | boolean | No | Non-deterministic flag |
2.1. Property success
Title: Success indicator
| Type | const |
| Required | Yes |
Description: Always false for failed build results.
Specific value: false
2.2. Property status
Title: Failure status
| Type | enum (of string) |
| Required | Yes |
Description: Status string for failed builds.
Must be one of:
- “PermanentFailure”
- “InputRejected”
- “OutputRejected”
- “TransientFailure”
- “CachedFailure”
- “TimedOut”
- “MiscFailure”
- “DependencyFailed”
- “LogLimitExceeded”
- “NotDeterministic”
- “NoSubstituters”
- “HashMismatch”
2.3. Property errorMsg
Title: Error message
| Type | string |
| Required | Yes |
Description: Information about the error if the build failed.
2.4. Property isNonDeterministic
Title: Non-deterministic flag
| Type | boolean |
| Required | No |
Description: 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.
3. The following properties are required
- success
- status
4. Property timesBuilt
Title: Times built
| Type | integer |
| Required | No |
Description: How many times this build was performed.
| Restrictions | |
|---|---|
| Minimum | ≥ 0 |
5. Property startTime
Title: Start time
| Type | integer |
| Required | No |
Description: The start time of the build (or one of the rounds, if it was repeated), as a Unix timestamp.
| Restrictions | |
|---|---|
| Minimum | ≥ 0 |
6. Property stopTime
Title: Stop time
| Type | integer |
| Required | No |
Description: The stop time of the build (or one of the rounds, if it was repeated), as a Unix timestamp.
| Restrictions | |
|---|---|
| Minimum | ≥ 0 |
7. Property cpuUser
Title: User CPU time
| Type | integer |
| Required | No |
Description: User CPU time the build took, in microseconds.
| Restrictions | |
|---|---|
| Minimum | ≥ 0 |
8. Property cpuSystem
Title: System CPU time
| Type | integer |
| Required | No |
Description: System CPU time the build took, in microseconds.
| Restrictions | |
|---|---|
| Minimum | ≥ 0 |
Examples
Successful build
{
"builtOutputs": {
"bar": {
"outPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar",
"signatures": []
},
"foo": {
"outPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo",
"signatures": []
}
},
"cpuSystem": 604000000,
"cpuUser": 500000000,
"startTime": 30,
"status": "Built",
"stopTime": 50,
"success": true,
"timesBuilt": 3
}
Failed build (output rejected)
{
"errorMsg": "no idea why",
"isNonDeterministic": false,
"startTime": 30,
"status": "OutputRejected",
"stopTime": 50,
"success": false,
"timesBuilt": 3
}
Failed build (non-deterministic)
{
"errorMsg": "no idea why",
"isNonDeterministic": false,
"startTime": 0,
"status": "NotDeterministic",
"stopTime": 0,
"success": false,
"timesBuilt": 1
}