A declared external command-line dependency.
Tools are declared through CliDeps's tool/2 macro rather than built
directly; this struct is what that produces and what CliDeps.Check acts on.
Summary
Types
Per-operating-system install instructions. The :default key is used when
the running system has no specific entry.
Functions
The install hint for the current operating system, or nil if none applies.
Builds a tool from its declared options.
A coarse key for the running operating system.
Types
Per-operating-system install instructions. The :default key is used when
the running system has no specific entry.
@type pattern() :: String.t() | nil
The version-matching pattern, stored as regex source rather than a
compiled Regex.
Tool declarations are macros, so a tool ends up in a module attribute at
compile time — and a compiled Regex carries a reference, which cannot be
escaped into one. Keeping the source string means declarations stay
compile-time data; CliDeps.Check compiles it when it runs.
Functions
The install hint for the current operating system, or nil if none applies.
Falls back to the :default entry when the running system has no specific
instruction.
Builds a tool from its declared options.
Raises ArgumentError for options that cannot work, rather than deferring
the failure to the first check.
@spec os_key() :: :macos | :linux | :windows
A coarse key for the running operating system.
Distinguishing Debian from Fedora would need to read /etc/os-release, and
a wrong guess prints a command that does not exist — so Linux stays a single
bucket and packages that care can supply :default.