Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Build Trace Entry

Title: Build Trace Entry

Typeobject
RequiredNo
Additional propertiesNot 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
  • Version 3:

    • Use drvPath not drvHash to refer to derivation in a more conventional way.
    • Separate into key and value
    • Use 2nd version of signatures format (objects, not strings)
PropertyTypePatternTitle/Description
+ keyobjectNoBuild Trace Key
+ valueobjectNoBuild Trace Value

1. Property key

Title: Build Trace Key

Typeobject
RequiredYes
Additional propertiesNot 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.

PropertyTypePatternTitle/Description
+ drvPathstringNoDerivation Path
+ outputNamestringNoOutput Name

1.1. Property drvPath

Title: Derivation Path

Typestring
RequiredYes
Defined instore-path-v1.yaml

Description: The store path of the derivation that was built.

Restrictions
Min length34
Must match regular expression^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$ Test

1.2. Property outputName

Title: Output Name

Typestring
RequiredYes

Description: Name of the specific output (e.g., “out”, “dev”, “doc”)

2. Property value

Title: Build Trace Value

Typeobject
RequiredYes
Additional propertiesAny type allowed
Defined in#/$defs/value

Description: A build trace entry is a key-value pair. This is the “value” part, describing an output.

PropertyTypePatternTitle/Description
+ outPathstringNoOutput Store Path
+ signaturesarrayNoBuild Signatures

2.1. Property outPath

Title: Output Store Path

Typestring
RequiredYes
Defined instore-path-v1.yaml

Description: The path to the store object that resulted from building this derivation for the given output name.

Restrictions
Min length34
Must match regular expression^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$ Test

2.2. Property signatures

Title: Build Signatures

Typearray
RequiredYes

Description: A set of cryptographic signatures attesting to the authenticity of this build trace entry.

Array restrictions
Min itemsN/A
Max itemsN/A
Items unicityFalse
Additional itemsFalse
Tuple validationSee below
Each item of this array must beDescription
SignatureA cryptographic signature along with the name of the key that produced it. …

2.2.1. Signature

Title: Signature

Typeobject
RequiredNo
Additional propertiesAny type allowed
Defined insignature-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 keyName and sig fields

PropertyTypePatternTitle/Description
+ keyNamestringNoKey Name
+ sigstringNoSignature Data
2.2.1.1. Property keyName

Title: Key Name

Typestring
RequiredYes

Description: The name of the key used to produce this signature

2.2.1.2. Property sig

Title: Signature Data

Typestring
RequiredYes

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=="
      }
    ]
  }
}