Expand description
This module constructs a Derivation by parsing its ATerm serialization.
EnumsΒ§
FunctionsΒ§
- from_
algo_ πand_ mode_ and_ digest - Consume a string containing the algo, and optionally a
r:
prefix, and a digest (bytes), return a CAHash::Nar or CAHash::Flat. - parse π
- parse_
derivation - parse_
input_ πderivations - parse_
input_ πsources - parse_
kv π - Parse a list of key/value pairs into a BTreeMap. The parser for the values can be passed in. In terms of ATerm, this is just a 2-tuple, but we have the additional restriction that the first element needs to be unique across all tuples.
- parse_
output π - Parse one output in ATerm. This is 4 string fields inside parans: output name, output path, algo (and mode), digest. Returns the output name and Output struct.
- parse_
outputs π - Parse multiple outputs in ATerm. This is a list of things acccepted by parse_output, and takes care of turning the (String, Output) returned from it to a BTreeMap. We donβt use parse_kv here, as itβs dealing with 2-tuples, and these are 4-tuples.
- parse_
streaming - This parses a derivation in streaming fashion. If the parse is successful, it returns the leftover bytes which were not used for the parsing. If the parse is unsuccessful, either it returns incomplete or an error with the input as leftover.
- string_
to_ πstore_ path