zajer
zajer

Reputation: 813

OCaml - Is it possible to define external (system) dependencies in dune?

I made an OCaml library that relies on an external/system package (namely libnauty2-dev).

Since I would like my library to be installed via opam I looked for a way to specify the external lib as a dependency. So far I have found that .opam files can specify such dependencies with

depexts: [ "libnauty2" ]

And here is my question: Is there a way to specify my dependency in a dune-project file so that generated .opam file will contain the same dependency ?

Upvotes: 2

Views: 210

Answers (1)

mbac32768
mbac32768

Reputation: 11623

The dune language doesn't directly support this part of opam file generation, but you can create a <packagename>.opam.template file with your depexts rules and dune will paste the contents of that file at the end of the generated .opam file.

Upvotes: 2

Related Questions