Skip to main content

make_references_string

Function make_references_string 

Source
fn make_references_string<'a>(
    ty: &str,
    references: impl IntoIterator<Item = StorePathRef<'a>>,
    self_ref: bool,
) -> String
Expand description

This contains the Nix logic to create “text hash strings”, which are used in builtins.toFile, as well as in Derivation Path calculation.

A text hash is calculated by concatenating the following fields, separated by a ::

  • text
  • references, individually joined by :
  • the nix_hash_string representation of the sha256 digest of some contents
  • the value of storeDir
  • the name