package opam-state

  1. Overview
  2. Docs

Module OpamSysPollSource

This module polls various aspects of the host, to define the arch, os, etc. variables

Sourceval arch : OpamStateTypes.gt_variables -> string option

Functions to get host specification. It checks if variables value is defined in the environment map before polling.

Sourceval os : OpamStateTypes.gt_variables -> string option
Sourceval os_distribution : OpamStateTypes.gt_variables -> string option
Sourceval os_version : OpamStateTypes.gt_variables -> string option
Sourceval os_family : OpamStateTypes.gt_variables -> string option
Sourceval normalise_arch : string -> string

The function used internally to get our canonical names for architectures (returns its input lowercased if not a recognised arch). This is typically called on the output of uname -m

Sourceval normalise_os : string -> string

The function used internally to get our canonical names for OSes (returns its input lowercased if not a recognised OS). This is typically called on the output of uname -s

Sourceval cores : unit -> int
Sourceval to_string : OpamStateTypes.gt_variables -> string

Returns a string containing arch, os, os-distribution & os-version values, unknown if they are not available. env is used to determine host specification.

OCaml

Innovation. Community. Security.