Store Path

Title: Store Path

Typestring
RequiredNo

Description: A store path identifying a store object.

This schema describes the JSON representation of store paths as used in various Nix JSON APIs.

Format

Store paths in JSON are represented as strings containing just the hash and name portion, without the store directory prefix.

For example: "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv"

(If the store dir is /nix/store, then this corresponds to the path /nix/store/g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv.)

Structure

The format follows this pattern: ${digest}-${name}

  • hash: Digest rendered in a custom variant of Base32 (20 arbitrary bytes become 32 ASCII characters)
  • name: The package name and optional version/suffix information
Restrictions
Min length34
Must match regular expression^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$ Test

Examples

Simple store path

"g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv"