Module store_path

Source

Modules§

utils 🔒

Structs§

StorePath
Represents a path in the Nix store (a direct child of STORE_DIR).

Enums§

BuildStorePathError
Errors that can occur when creating a content-addressed store path.
Error
Errors that can occur when parsing a literal store path

Constants§

DIGEST_SIZE
ENCODED_DIGEST_SIZE
STORE_DIR
STORE_DIR_WITH_SLASH

Statics§

NAME_CHARS 🔒
NAME_CHARS contains true for bytes that are valid in store path names.

Functions§

build_ca_path
This builds a store path from a CAHash and a list of references.
build_output_path
This builds an input-addressed store path.
build_text_path
This builds a store path, by calculating the text_hash_string of either a derivation or a literal text file that may contain references. If you don’t want to have to pass the entire contents, you might want to use build_ca_path instead.
compress_hash
compress_hash takes an arbitrarily long sequence of bytes (usually a hash digest), and returns a sequence of bytes of length OUTPUT_SIZE.
hash_placeholder
Nix placeholders (i.e. values returned by builtins.placeholder) are used to populate outputs with paths that must be string-replaced with the actual placeholders later, at runtime.
validate_name 🔒
Checks a given &u8 to match the restrictions for StorePath::name, and returns the name as string if successful.

Type Aliases§

StorePathRef
Like StorePath, but without a heap allocation for the name. Used by StorePath for parsing.