package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0.kit/B0_opam/File/index.html
Module B0_opam.File
opam file generation.
Generic representation
type value = [ | `Raw of string(*A raw, unescaped value
*)| `B of bool(*A boolean.
*)| `S of string(*A string.
*)| `L of bool * value list(*A 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.
Package files
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.Meta.available."build:",B0_opam.Meta.build."bug-report:",B0_meta.issues."conflicts:",B0_opam.Meta.conflicts."description:",B0_meta.description."depends:",B0_opam.Meta.depends."depopts:",B0_opam.Meta.depopts."dev-repo:",B0_meta.repo."doc:",B0_meta.online_doc."homepage:",B0_meta.homepage."install:",B0_opam.Meta.install."license:",B0_meta.licenses."maintainer:",B0_meta.maintainers."name:",B0_opam.Meta.nameiffwith_nameistrue."synopsis:",B0_meta.synopsis."tags:",B0_meta.description_tags.
Finally the contents of B0_opam.Meta.file_addendum is appended after the definition of these fields.
See Meta.pkg_of_pack for deriving metadata from build packs.