Document the Nix32 base-32 variant used for store path digests and hash output. The new page covers: - The 32-character alphabet (omitting e, o, u, t) - Byte order differences from base-16 encoding Also update references throughout the manual to link to the new page.
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
"$schema": "http://json-schema.org/draft-07/schema"
|
|
"$id": "https://nix.dev/manual/nix/latest/protocols/json/schema/store-path-v1.json"
|
|
title: Store Path
|
|
description: |
|
|
A [store path](@docroot@/store/store-path.md) identifying a store object.
|
|
|
|
This schema describes the JSON representation of store paths as used in various Nix JSON APIs.
|
|
|
|
> **Warning**
|
|
>
|
|
> This JSON format is currently
|
|
> [**experimental**](@docroot@/development/experimental-features.md#xp-feature-nix-command)
|
|
> and subject to change.
|
|
|
|
## 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 [Nix32](@docroot@/protocols/nix32.md), a variant of base-32 (20 hash bytes become 32 ASCII characters)
|
|
- **name**: The package name and optional version/suffix information
|
|
|
|
type: string
|
|
pattern: "^[0123456789abcdfghijklmnpqrsvwxyz]{32}-.+$"
|
|
minLength: 34
|