Module parser

Source
Expand description

This module constructs a Derivation by parsing its ATerm serialization.

EnumsΒ§

Error

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.
string_to_store_path πŸ”’