dune-universe/opam-overlays is an opam repository containing package
definitions of dune ports of existing packages from the main default repository
that haven't been ported yet or won't be ported upstream in the near future.
It complements
ocaml/opam-repository and does
not attempt to replace it.
It's meant to be used by the opam-monorepo
tool to allow you to vendor your dependencies and build your entire project using
dune only.
All packages' versions in this repository are suffixed with a +dune to
distinguish them from the upstream variants. That means that the
opam-overlays port of package abc version X.Y.Z is available on this repo
as abc version X.Y.Z+dune.
The typical workflow to port an existing package pkg, version X.Y.Z to dune
and publish it on opam-overlays would be the following:
- Create a fork of the upstream package
pkgrepo on dune-universe. - Create a branch
dune-universe-vX.Y.Zpointing to the upstreamX.Y.Zrelease tag. - Work on the actual port. Make sure the opam file has been properly updated
and that dune is now part of the package
dependsfield. The build instructions should also be updated to use dune. To ease the release process, thedev-repoandhomepageshould point to the dune-universe fork. It is also recommended to remove thedocfield for similar reasons. Once it is ready, create a PR to merge your port into thedune-universe-vX.Y.Zbranch of the dune-universe fork. - Once the PR is reviewed and merged, tag the head commit of the
dune-universe-v.X.Y.ZwithvX.Y.Z+dune. You should use annotated tags as this is what dune-release expect. You can do this by runningdune-release tag vX.Y.Z+duneorgit tag -a vX.Y.Z+dune. - Use
dune-releaseto release the port to this repo as described in the section below.
Note that this requires you to be a member of the dune-universe organisation
to follow all the steps described here. If you'd like to submit a new port as an
external contributor, please open an issue on this repository with the name of
the package and the version you wish to port. dune-universe maintainers will
be happy to help you with the admin work so that you can submit the PR described
in 3. Once the PR is merged, dune-universe maintainers will take care of the
release.
If there is an issue with an existing port that we need to fix, we do not remove the previous port. Doing so would invalidate previously created lockfiles or any reference to the original release tarball. We release the fix as a new, higher version of the port so that it is picked by the solver instead.
Please follow the steps described below to create a new, fixed port of
pkg.X.Y.Z+dune:
- Open a PR to merge the fix into the
dune-universe-vX.Y.Zbranch of the dune-universe fork. - Once the PR is reviewed and merged, tag the head commit of
dune-universe-vX.Y.ZwithvX.Y.Z+dune2(or+dune3,+dune4, etc.). - Use
dune-releaseto release the port to this repo as described in the below section.
If this is the first time you are releasing to dune-universe/opam-overlays
you will need to do the following first:
- Clone this repository on your machine
- Fork this repo on Github
Once your dune port is ready and you tagged it with vX.Y.Z+dune, you can run
the following:
dune-release --opam-repo dune-universe/opam-overlays --remote <url to your fork> --local <path-to-your-clone>
We strongly recommend you delete the doc field from the opam file when doing the port as dune-release will otherwise try to publish the documentation. This is both not needed and can lead to errors.
dune-release 2.0.0 will simplify this workflow greatly but in the meantime please bear with us!
Note that the packages on this repository are not the official packages and may deviate significantly since they modify the build system. Use these at your own risk, and do not contact upstream authors with issues specific to the patches contained here.