package opam-lib
Install
dune-project
Dependency
Authors
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
AAnil Madhavapeddy <anil@recoil.org>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
Maintainers
Sources
sha256=625767c3465219cc8799aad1449c74279b31686db0821300cfdb92fbff17e9fd
md5=e0688c0cf9a55f93ee93f62d07cf6b74
doc/opam-lib.format/OpamFile/OPAM/index.html
Module OpamFile.OPAM
OPAM files
include IO_FILE
val write : OpamTypes.filename -> t -> unitWrite some contents to a file
val read : OpamTypes.filename -> tRead file contents. Raise an error if the file does not exist.
val safe_read : OpamTypes.filename -> tRead file contents. Return empty if the file does not exist.
val read_from_channel : ?filename:OpamTypes.filename -> in_channel -> tRead from channel.
val read_from_string : ?filename:OpamTypes.filename -> string -> tval write_to_channel : out_channel -> t -> unitWrite to channel.
val empty : tval create : OpamTypes.package -> tCreate an opam file
val template : OpamTypes.package -> tCreate an OPAM package template filled with common options
val validate : t -> (int * [ `Warning | `Error ] * string) listRuns several sanity checks on the opam file; returns a list of warnings. `Error level should be considered unfit for publication, while `Warning are advisory but may be accepted. The int is an identifier for this specific warning/error.
val validate_file :
OpamTypes.filename ->
(int * [ `Warning | `Error ] * string) list * t optionSame as validate, but operates on a file, which allows catching parse errors too. You can specify an expected name and version
val validate_string :
OpamTypes.filename ->
string ->
(int * [ `Warning | `Error ] * string) list * t optionLike validate_file, but takes the file contents as a string
Utility function to print validation results
val is_explicit : OpamTypes.filename -> boolReturns true if the given OPAM file contains 'name' or 'version' fields
val opam_version : t -> OpamTypes.opam_versionGet OPAM version.
val name : t -> OpamTypes.namePackage name
val name_opt : t -> OpamTypes.name optionval version : t -> OpamTypes.versionPackage version
val version_opt : t -> OpamTypes.version optionval ocaml_version : t -> OpamTypes.compiler_constraint optionCompiler constraint
val os : t -> (bool * string) OpamTypes.generic_formulaOS constraint
val available : t -> OpamTypes.filterAvailability formula (OS + compiler constraints)
val maintainer : t -> string listPackage maintainer(s)
val substs : t -> OpamTypes.basename listFile substitutions
val build_env : t -> (string * string * string) listList of environment variables to set-up for the build
val build : t -> OpamTypes.command listList of command to run for building the package
val install : t -> OpamTypes.command listList of command to run for installing the package
val remove : t -> OpamTypes.command listList of command to run for removing the package
val depends : t -> OpamTypes.ext_formulaPackage dependencies
val depopts : t -> OpamTypes.ext_formulaOptional dependencies
val depexts : t -> OpamTypes.tags optionExternal dependencies
val extension : t -> OpamTypes.value OpamStd.String.Map.tAll extended "x-" fields as a map
val extended : t -> string -> (OpamTypes.value -> 'a) -> 'a optionParse a single extended field (reports proper file position)
val with_messages : t -> (string * OpamTypes.filter option) list -> tval with_post_messages : t -> (string * OpamTypes.filter option) list -> tval conflicts : t -> OpamTypes.formulaPackage conflicts
val features : t -> (OpamVariable.t * string * OpamTypes.filter) listContents of the 'features' field
val libraries : t -> (string * OpamTypes.filter option) listList of exported libraries
val syntax : t -> (string * OpamTypes.filter option) listList of exported syntax extensions
val patches : t -> (OpamTypes.basename * OpamTypes.filter option) listPatches
val homepage : t -> string listHomepage(s)
val author : t -> string listAuthor(s)
val license : t -> string listLicense(s)
val doc : t -> string listAPI documentation
val tags : t -> string listClassification tags
val build_test : t -> OpamTypes.command listCommands to build and run the tests
val build_doc : t -> OpamTypes.command listCommands to build the documentation
val messages : t -> (string * OpamTypes.filter option) listMessages to display before taking action
val post_messages : t -> (string * OpamTypes.filter option) listMessages to display at end of install
val bug_reports : t -> string listWhere to post bug reports.
val flags : t -> OpamTypes.package_flag listThe package flags that are present for this package.
val has_flag : OpamTypes.package_flag -> t -> boolCheck the package for the given flag. Allows flags specified through tags for compatibility
val with_opam_version : t -> OpamTypes.opam_version -> tSets the opam version
val dev_repo : t -> OpamTypes.pin_option optionThe package source repository address
val with_name : t -> OpamTypes.name -> tconstruct as name
val with_name_opt : t -> OpamTypes.name option -> tval with_version : t -> OpamTypes.version -> tconstruct as version
val with_version_opt : t -> OpamTypes.version option -> tval with_depends : t -> OpamTypes.ext_formula -> tConstruct as depends
val with_depopts : t -> OpamTypes.ext_formula -> tConstruct as depopts
val with_conflicts : t -> OpamTypes.formula -> tval with_features : t -> (OpamVariable.t * string * OpamTypes.filter) list -> tval with_build : t -> OpamTypes.command list -> tConstruct as build
val with_install : t -> OpamTypes.command list -> tval with_remove : t -> OpamTypes.command list -> tConstruct as remove
val with_libraries : t -> (string * OpamTypes.filter option) list -> tConstruct as libraries
val with_syntax : t -> (string * OpamTypes.filter option) list -> tReplace the syntax field of the given OPAM file.
val with_substs : t -> OpamTypes.basename list -> tConstruct as substs
val with_ocaml_version : t -> OpamTypes.compiler_constraint option -> tConstruct as compiler_version
val with_os : t -> (bool * string) OpamTypes.generic_formula -> tval with_available : t -> OpamTypes.filter -> tval with_patches :
t ->
(OpamTypes.basename * OpamTypes.filter option) list ->
tConstruct as patches
val with_depexts : t -> OpamTypes.tags option -> tConstruct using depexts
val with_flags : t -> OpamTypes.package_flag list -> tval with_dev_repo : t -> OpamTypes.pin_option option -> tval with_extension : t -> OpamTypes.value OpamStd.String.Map.t -> tval add_extension : t -> string -> OpamTypes.value -> tval to_1_0 : OpamTypes.file -> OpamTypes.fileConvert to OPAM 1.0