|
| 1 | +"$schema": "http://json-schema.org/draft-04/schema" |
| 2 | +"$id": "https://nix.dev/manual/nix/latest/protocols/json/schema/build-trace-entry-v1.json" |
| 3 | +title: Build Trace Entry |
| 4 | +description: | |
| 5 | + A record of a successful build outcome for a specific derivation output. |
| 6 | +
|
| 7 | + This schema describes the JSON representation of a [build trace entry](@docroot@/store/build-trace.md) entry. |
| 8 | +
|
| 9 | + > **Warning** |
| 10 | + > |
| 11 | + > This JSON format is currently |
| 12 | + > [**experimental**](@docroot@/development/experimental-features.md#xp-feature-ca-derivations) |
| 13 | + > and subject to change. |
| 14 | +
|
| 15 | +type: object |
| 16 | +required: |
| 17 | + - id |
| 18 | + - outPath |
| 19 | + - dependentRealisations |
| 20 | + - signatures |
| 21 | +properties: |
| 22 | + id: |
| 23 | + type: string |
| 24 | + title: Derivation Output ID |
| 25 | + pattern: "^sha256:[0-9a-f]{64}![a-zA-Z_][a-zA-Z0-9_-]*$" |
| 26 | + description: | |
| 27 | + Unique identifier for the derivation output that was built. |
| 28 | +
|
| 29 | + Format: `{hash-quotient-drv}!{output-name}` |
| 30 | +
|
| 31 | + - **hash-quotient-drv**: SHA-256 [hash of the quotient derivation](@docroot@/store/derivation/outputs/input-address.md#hash-quotient-drv). |
| 32 | + Begins with `sha256:`. |
| 33 | +
|
| 34 | + - **output-name**: Name of the specific output (e.g., "out", "dev", "doc") |
| 35 | +
|
| 36 | + Example: `"sha256:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad!foo"` |
| 37 | +
|
| 38 | + outPath: |
| 39 | + "$ref": "store-path-v1.yaml" |
| 40 | + title: Output Store Path |
| 41 | + description: | |
| 42 | + The path to the store object that resulted from building this derivation for the given output name. |
| 43 | +
|
| 44 | + dependentRealisations: |
| 45 | + type: object |
| 46 | + title: Dependent Build Outputs |
| 47 | + description: | |
| 48 | + This is for [*derived*](@docroot@/store/build-trace.md#derived) build trace entries to ensure coherence. |
| 49 | +
|
| 50 | + As described in the linked section on derived build trace traces, derived build trace entries must be kept in addition and not instead of the underlying base build entries. |
| 51 | + This is the set of base build trace entries that this derived build trace is derived from. |
| 52 | +
|
| 53 | + Keys are derivation output IDs (same format as the main `id` field). |
| 54 | + Values are the store paths that those dependencies resolved to. |
| 55 | +
|
| 56 | + patternProperties: |
| 57 | + "^sha256:[0-9a-f]{64}![a-zA-Z_][a-zA-Z0-9_-]*$": |
| 58 | + $ref: "store-path-v1.yaml" |
| 59 | + title: Dependent Store Path |
| 60 | + description: Store path that this dependency resolved to during the build |
| 61 | + additionalProperties: false |
| 62 | + |
| 63 | + signatures: |
| 64 | + type: array |
| 65 | + title: Build Signatures |
| 66 | + description: | |
| 67 | + A set of cryptographic signatures attesting to the authenticity of this build trace entry. |
| 68 | + items: |
| 69 | + type: string |
| 70 | + title: Signature |
| 71 | + description: A single cryptographic signature |
| 72 | + |
| 73 | +additionalProperties: false |
0 commit comments