package opam-0install
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=26cacd296641278384dc7357560e3b13aca1269d406c9fd0c5f0b1132d8ccdf8
sha512=9d0a51adfecd143b575cb1a0615c527e19ba4748dbe338c442c1974ca4707e39a56de96e5c937df53cb185f442914646226b3ec0a4df50303e1d1a3eed695fa2
doc/opam-0install/Opam_0install/Dir_context/index.html
Module Opam_0install.Dir_contextSource
A context that reads opam files directly from an opam-repository checkout. It does not use a switch, and therefore does not pick up any pins the user has set. It also does not get any opam variables from the environment - instead, the caller must provide them explicitly.
include S.CONTEXT
A reason why a package can't be used as input to the solver. e.g. it is for a different platform, or conflicts with a user-provided constraint.
val candidates :
t ->
OpamPackage.Name.t ->
(OpamPackage.Version.t * (OpamFile.OPAM.t, rejection) result) listcandidates t name is the list of available versions of name, in order of decreasing preference. If the user or environment provides additional constraints that mean a version should be rejected, include that here too. Rejects are only used for generating diagnostics reports. Candidates whose "availablity" field isn't satisfied must be rejected here.
user_restrictions t pkg is the user's constraint on pkg, if any. This is just used for diagnostics; you still have to filter them out yourself in candidates.
filter_deps t pkg f is used to pre-process depends and conflicts. pkg is the package which has the dependency f. For example, you can use this to filter out dependencies that are only needed on Windows if the platform is Linux.
val std_env :
?ocaml_native:bool ->
?sys_ocaml_version:string ->
arch:string ->
os:string ->
os_distribution:string ->
os_family:string ->
os_version:string ->
unit ->
string ->
OpamVariable.variable_contents optionstd_env ~arch ~os ~os_distribution ~os_family ~os_version is an environment function that returns the given values for the standard opam variables, and None for anything else.
val create :
?prefer_oldest:bool ->
?test:OpamPackage.Name.Set.t ->
?pins:(OpamTypes.version * OpamFile.OPAM.t) OpamTypes.name_map ->
constraints:OpamFormula.version_constraint OpamTypes.name_map ->
env:(string -> OpamVariable.variable_contents option) ->
string ->
tcreate ~constraints ~env packages_dir is a solver that gets candidates from packages_dir, filtering them using constraints. packages_dir contains one sub-directory for each package name, each with subdirectories for each version, in the same format used by opam-repository.