snix_glue

Module snix_build

Source
Expand description

This module contains glue code translating from nix_compat::derivation::Derivation to snix_build::buildservice::BuildRequest.

Constantsยง

  • These are the environment variables that Nix sets in its sandbox for every build.

Functionsยง

  • For a given key k in a derivation environment thatโ€™s supposed to be passed as file, calculate the ${k}Path key and filepath value that itโ€™s being replaced with while preparing the build. The filepath is /build/.attrs-${nixbase32(sha256(key)).
  • Takes a Derivation and turns it into a snix_build::buildservice::BuildRequest. It assumes the Derivation has been validated, and all referenced output paths are present in inputs.
  • get_all_inputs ๐Ÿ”’
    Get a stream of a transitive input closure for a derivation. Itโ€™s used for input propagation into the build and nixbase32 needle propagation for build output refscanning.
  • handle passAsFile, if set. For each env $x in that list, the original env is removed, and a $xPath environment var added instead, referring to a path inside the build with the contents from the original env var.