Liking cljdoc? Tell your friends :D

hive-system.deps.registry

Standard local-host adapters for IDistroDetector and IPackageInstaller, plus a default-ensurer factory that wires the whole thing up using the existing hive-system.shell.core/make-shell adapter.

Adapters here read /etc/os-release and shell out to apt-get / dnf / pacman / brew via the injected IShell. They never auto-install during construction; only install! runs effects, and only when explicitly invoked by IDependencyEnsurer/ensure! under an :auto or accepted :ask policy.

Tests use fake IShell + fake distro/installer impls — see test/hive_system/deps/core_test.clj.

Standard local-host adapters for IDistroDetector and IPackageInstaller,
plus a `default-ensurer` factory that wires the whole thing up using
the existing `hive-system.shell.core/make-shell` adapter.

Adapters here read `/etc/os-release` and shell out to apt-get / dnf /
pacman / brew via the injected IShell. They never auto-install during
construction; only `install!` runs effects, and only when explicitly
invoked by `IDependencyEnsurer/ensure!` under an `:auto` or accepted
`:ask` policy.

Tests use *fake* IShell + fake distro/installer impls — see
`test/hive_system/deps/core_test.clj`.
raw docstring

default-ensurerclj

(default-ensurer)
(default-ensurer {:keys [prompt-fn shell] :as _opts})

Build a DependencyEnsurer using the standard local-host adapters:

  • shell : hive-system.shell.core/make-shell
  • distro-detector : OsReleaseDistroDetector
  • package-installer : ShellPackageInstaller (family auto-picked)

The installer family is fixed at construction time by detecting the distro once. If detection fails (unsupported OS, no /etc/os-release) we fall back to a stub installer that returns :deps/no-installer-available for every install attempt — ensure! then surfaces this in the :failed bucket without crashing.

Opts: :prompt-fn — (fn [spec]) → Result<bool> for :ask policy :shell — override the IShell impl (defaults to make-shell)

Build a DependencyEnsurer using the standard local-host adapters:
  - shell             : hive-system.shell.core/make-shell
  - distro-detector   : OsReleaseDistroDetector
  - package-installer : ShellPackageInstaller (family auto-picked)

The installer family is fixed at construction time by detecting the
distro once. If detection fails (unsupported OS, no /etc/os-release)
we fall back to a stub installer that returns
`:deps/no-installer-available` for every install attempt — `ensure!`
then surfaces this in the `:failed` bucket without crashing.

Opts:
  :prompt-fn — (fn [spec]) → Result<bool> for `:ask` policy
  :shell     — override the IShell impl (defaults to make-shell)
sourceraw docstring

make-os-release-detectorclj

(make-os-release-detector shell)

Construct a /etc/os-release-based IDistroDetector. shell is an IShell impl.

Construct a /etc/os-release-based IDistroDetector.
`shell` is an IShell impl.
sourceraw docstring

make-shell-installerclj

(make-shell-installer family shell)

Construct an IPackageInstaller for family (:apt / :dnf / :pacman / :zypper / :brew / :nix) backed by shell.

Construct an IPackageInstaller for `family` (`:apt` / `:dnf` /
`:pacman` / `:zypper` / `:brew` / `:nix`) backed by `shell`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close