Minimize opam repository overlays using the 0install solver.
opam-repomin takes an opam repository overlay directory and a full opam-repository, uses the opam-0install solver to determine the minimum set of packages required to make the overlay standalone, and copies the relevant packages to an output directory.
opam install opam-repominopam-repomin --overlay <overlay-repo> --full <full-repo> --compiler <pkg.version> --output <output-dir>--overlay - Path to the opam repository overlay directory--full - Path to the full opam-repository--compiler - Compiler package to use (e.g., ocaml-base-compiler.5.2.0 or ocaml-variants.5.2.0+options)--output - Output directory for the minimized repository--dry-run - Print what would be copied without actually copying# Minimize an overlay using OCaml 5.2.0
opam-repomin \
--overlay ./my-overlay \
--full ~/.opam/repo/default \
--compiler ocaml-base-compiler.5.2.0 \
--output ./minimized-repoISC License. See LICENSE.md.