Expand description
This module contains glue code translating from nix_compat::derivation::Derivation to snix_build::buildservice::BuildRequest.
ConstantsΒ§
- NIX_
ENVIRONMENT_ πVARS - These are the environment variables that Nix sets in its sandbox for every build.
FunctionsΒ§
- calculate_
pass_ πas_ file_ env - 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))
. - derivation_
to_ πbuild_ request - 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_
pass_ πas_ file - 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.
- replace_
placeholders π - Replace all references to
placeholder outputName
inside the derivation - replace_
placeholders_ πb - Replace all references to
placeholder outputName
inside the derivation