package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.kit/B0_opam/index.html
Module B0_opam
Source
opam
support.
See the b0 b0 opam manual for more details.
opam
The type for opam.
get ~search cmd ()
looks for the opam command cmd
(defaults to Cmd.tool "opam"
) in search
(defaults to Os.Cmd.get ?search
).
opam
files
Metadata
These metadata keys can be specified to define opam file fields. Some of the metadata is covered by standard keys. The full map is documented in File.pkg_of_meta
.
The type for package specifications. A package name and a filtered package formula, use ""
if you don't have any constraint.
tag
indicates the entity is related to opam
. Adding this tag to a pack makes it represent an opam package for b0's opam tooling.
available
is an opam available:
field value. This is a raw string in opam sntax that defines the whole field.
build
is an opam build:
field value. This is a raw string in opam syntax that defines the whole field. Used to override automatic opam file generation, see pkg_meta_of_pack
.
build_env
is an opam build-env:
field value. This a raw string in opam syntax that defines the whole field.
depends
is an opam depends:
field value. Used to override automatic opam file dependency generation, see pkg_meta_of_pack
.
depopts
is an opam depopts:
field value.
conflicts
is an opam conflicts:
field value.
file_addendum
is an opam
file fragment appended at the end of a generated opam
file. See B0_opam.File.pkg_of_meta
.
install
is an opam install:
field value. This is a raw string in opam syntax that defines the whole field. Used to override automatic opam file generation, see pkg_meta_of_pack
.
name
is an opam
name:
field value. Use to override automatic opam
package name generation, see pkg_meta_of_pack
.
pin_depends
is an opam pin-depends:
field value.
x_maintenance_intent
is an x-maintenance-intent:
field value.
Package derivation
pkg_name_of_pack p
derives an opam package name for p
. This is either in order:
- The
name
field ofp
's meta, if defined. - The
B0_pack.basename
ofp
if not equal to"default"
. - The basename of
p
's scope directory.
pkg_meta_of_pack p
is opam
package metadata for pack p
ready to be used with File.pkg_of_meta
to derive an opam package file.
This is p
's metadata with the following fields added if they are unspecified:
name
, the value ofB0_opam.pkg_name_of_pack
p
.B0_meta.synopsis
andB0_meta.description
. The fields are tentatively derived usingB0_pack.derive_synopsis_and_description
.build
, a locked b0 build of the pack is defined.x_maintenance_intent
, the value["(latest)"]
.depends
, we collect the OCaml libraries required by units in the pack, derive a package names out of them. FIXME. This is the poc but it's not workable for now we don't have enough metadata in library names.
.opam
unit
unit
is the unit of the .opam
action.
See b0 -- .opam --help
and the b0 opam
manual for more information.