Build Trace Entry
Title: Build Trace Entry
| Type | object |
| Required | No |
| Additional properties | Not allowed |
Description: A record of a successful build outcome for a specific derivation output.
This schema describes the JSON representation of an entry in a build trace.
Warning
This JSON format is currently experimental and subject to change.
Version History
-
Version 1: Original format
-
Version 2:
- Remove
dependentRealisations
- Remove
-
Version 3:
- Use
drvPathnotdrvHashto refer to derivation in a more conventional way. - Separate into
keyandvalue - Use 2nd version of signatures format (objects, not strings)
- Use
1. Property key
Title: Build Trace Key
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/$defs/key |
Description: A build trace entry is a key-value pair. This is the “key” part, referring to a derivation and output.
| Property | Type | Pattern | Title/Description |
|---|---|---|---|
| + drvPath | string | No | Derivation Path |
| + outputName | string | No | Output Name |
1.1. Property drvPath
Title: Derivation Path
| Type | string |
| Required | Yes |
| Defined in | store-path-v1.yaml |
Description: The store path of the derivation that was built.
| Restrictions | |
|---|---|
| Min length | 34 |
| Must match regular expression | ^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$ Test |
1.2. Property outputName
Title: Output Name
| Type | string |
| Required | Yes |
Description: Name of the specific output (e.g., “out”, “dev”, “doc”)
2. Property value
Title: Build Trace Value
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Defined in | #/$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 |
2.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 |
2.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. … |
2.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.
Version History
-
Version 1: Colon-separated string in the format
<key-name>:<signature-in-Base64> -
Version 2: Structured object with
keyNameandsigfields
2.2.1.1. Property keyName
Title: Key Name
| Type | string |
| Required | Yes |
Description: The name of the key used to produce this signature
2.2.1.2. Property sig
Title: Signature Data
| Type | string |
| Required | Yes |
Description: The raw signature bytes, Base64-encoded
Examples
Simple build trace entry
{
"key": {
"drvPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar.drv",
"outputName": "foo"
},
"value": {
"outPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo",
"signatures": []
}
}
Build trace entry with signature
{
"key": {
"drvPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar.drv",
"outputName": "foo"
},
"value": {
"outPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv",
"signatures": [
{
"keyName": "asdf",
"sig": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
}
]
}
}