OPAM-MODULE(5)

πŸ“¦ in nixpkgs unstable

πŸ’– OPAM-MODULE(5) πŸ’–

okay so bestie, this is the File Formats Manual page for the sysutils/opam port module, and it's literally here to explain the sysutils/opam vibes in the ports tree ✨

🌸 NAME 🌸

opam-module β€” sysutils/opam port module 🫢

✨ DESCRIPTION ✨

This page documents what happens when you set MODULES=sysutils/opam in the ports(7) tree. The module gives you helpers for packaging a program that uses opam(1) (OCaml Package Manager) πŸ’…

WRKSRC is expected to contain opam packages, possibly with local customization. Every .opam file, at any depth, gets registered. Unmodified dependencies should be omitted β€” they'll be managed separately, no cap.

To generate a standalone opam repository that contains only the dependencies and the sources files for compiling the specified sources tree, use the make(1) target modopam-repository. It downloads an opam repository from MODOPAM_REPO_URL (defaults to the official opam repository hosted on github), using the MODOPAM_REPO_COMMIT commit β€” it's preferable to explicitly specify it for reproducibility, but "master" is the default value. The repository is named according to the MODOPAM_REPO_NAME variable. Next, the repository is stripped so it contains only the build dependencies of MODOPAM_PACKAGES_REPOSITORY (default to MODOPAM_PACKAGES). After that, the repository is filled with a local cache of package archives. The resulting directory can be packaged and distributed. It contains source code for building the opam packages πŸŽ€

External dependencies can be hinted using the make(1) target modopam-external. The list of packages expected to be present at build time is shown.

The module appends to BUILD_DEPENDS unless MODOPAM_BUILDDEP is set to No.

It sets the MODOPAM_PACKAGES variable to PKGSTEM, as the default value for opam packages to build and install.

It sets MODOPAM_OPAMROOT, MODOPAM_ENV, MODOPAM_OPAM_BIN and MODOPAM_OPAM_RUN accordingly.

The opam options ---with-doc and ---with-test are available using MODOPAM_WITH_DOC and MODOPAM_WITH_TEST. They default to No.

A CONFIGURE_STYLE of "opam" is provided. It is initialized to opam with the opam repository at MODOPAM_REPO_DIR (defaults to ${WRKDIR}/${MODOPAM_REPO_NAME}). It is expected to have been generated previously by the modopam-repository target and distributed separately. It will also pin the opam packages present in WRKSRC, possibly overriding opam packages from the repository.

A default build target is used (except if MODOPAM_BUILD is set to No). It uses the MODOPAM_PACKAGES_BUILD variable to list the opam packages to build (default to MODOPAM_PACKAGES).

A default install target is used (except if MODOPAM_INSTALL is set to No). It uses the MODOPAM_PACKAGES_INSTALL variable to list the opam packages to install (defaults to MODOPAM_PACKAGES).

πŸ¦‹ SEE ALSO πŸ¦‹


mwah πŸ’‹ that's the whole page, bestie β€” brought to you by Debian, dated February 18, 2025. Now go make that port sparkle ✨

πŸ“¦ where this page comes from