generate_opam_files

(generate_opam_files ...)

Added in version 1.10.

Use metadata specified in the dune-project file to generate .opam files.

To enable this integration, add the following field to the dune-project file:

(generate_opam_files)

With this field, Dune can generate *.opam files from dune-project metadata. Build the @opam alias to refresh them explicitly:

$ dune build @opam

The @install and @runtest aliases also depend on @opam.

With (lang dune 3.23) or newer, updates to checked-in *.opam files are reported as promotions and must be applied with dune promote.

With older Dune language versions, generated *.opam files are promoted to the source tree automatically when these aliases are built.

To add opam fields not directly supported by dune-project, you can use <package-name>.opam.template files (see Packages).

See also

package for fields supported by dune-project

Packages for more information on opam.template files