B0_opam.Fileopam file generation.
type opam := ttype value = [ | `Raw of stringA raw, unescaped value
*)| `B of boolA boolean.
*)| `S of stringA string.
*)| `L of bool * value listA list of values, the boolean indicates whether line-by-line rendering should be forced.
*) ]The type for opam values.
type field = string * valueThe type for opam fields. The field name and its value.
type section = string * string option * tThe type for opam sections. The section name, the optional string and the contents of the section.
and t = item listThe type for generic opam file contents.
val v2 : itemv2 is opam-version: "2.0".
to_string formats file contents to a string. If normalize is true this calls opam to lint and normalize the result.
pkg_of_meta ~with_name m is an opam package file from m. Here's an account of how opam fields are populated by metadata keys.
"authors:", B0_meta.authors."available:", B0_opam.available."build:", B0_opam.build."bug-report:", B0_meta.issues."conflicts:", B0_opam.conflicts."description:", B0_meta.description."depends:", B0_opam.depends."depopts:", B0_opam.depopts."dev-repo:", B0_meta.repo."doc:", B0_meta.online_doc."homepage:", B0_meta.homepage."install:", B0_opam.install."license:", B0_meta.licenses."maintainer:", B0_meta.maintainers."name:", B0_opam.name iff with_name is true."synopsis:", B0_meta.synopsis."tags:", B0_meta.description_tags."x-maintenance-intent:", B0_opam.x_maintenance_intent.Finally the contents of B0_opam.file_addendum is appended after the definition of these fields.
See B0_opam.pkg_meta_of_pack for deriving metadata from build packs.