Module nix_compat::derivation::parser
source Β· Expand description
This module constructs a Derivation by parsing its ATerm serialization.
Enums§
Functions§
- Consume a string containing the algo, and optionally a
r:
prefix, and a digest (bytes), return a CAHash::Nar or CAHash::Flat. - parse π
- 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