Skip to main content

Module utils

Module utils 

Source

Functions§

build_ca_path
This builds a store path for a content-addressed path (used for fetches and FODs).
build_output_path
Builds an input-addressed store path.
build_store_path_from_fingerprint_parts 🔒
This builds a store path from fingerprint parts.
build_text_path
This builds a store path, for a CAHash::Text type store path. If you don’t want to have to pass the entire contents, you might want to use build_text_path_from_content_digest instead.
build_text_path_from_content_digest
This builds a store path, for a CAHash::Text type store path. content_digest needs to be the sha256 digest of the contents. If you have the contents as a byte slice, you can also use build_text_path.
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.
fod_digest 🔒
format_references 🔒
This contains the Nix logic to create “reference strings”, used for the output path calculation of ca paths and text paths.
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.