package opam-client

  1. Overview
  2. Docs

Functions handling the "opam pin" subcommand

Pins a package to the given version, and writes to disk. Returns the updated state. The main difference with source_pin is that a definition overlay is not created. Therefore, the package must exist already.

Sets the package as pinned to the given target. A package definition is looked for in the package source and current metadata (in this order).

If edit, or if no package definition is found, this opens an editor (with a template if no definition is available).

If no target url is given, the url from the installed package or repositories, if any, is used and the package is otherwise pinned without target.

If force, don't abort even if the source can't be fetched from target

Let the user edit a pinned package's opam file. If given, the version is put into the template in advance. Writes and returns the updated switch state.

val list : 'a OpamStateTypes.switch_state -> short:bool -> unit

List the pinned packages to the user.

OCaml

Innovation. Community. Security.