1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Per-package-manager install hints.
//!
//! [`InstallHint`] is an open map keyed by manager name: `brew`, `dnf`,
//! `apt`, `pacman`, `cargo`, and anything else a user (or a future zenops
//! release) wants to add. Each entry holds the package list zenops would
//! ask that manager to install.
//!
//! The map shape is deliberately schema-loose: adding zypper or apk on
//! the runtime side means a new row in the manager-grammar registry plus
//! `install_hint.zypper.packages = [...]` in user pkg TOML — no
//! deserialize change, no migration. Unknown keys parse cleanly and sit
//! dormant until detection finds a matching `PackageManager`.
use IndexMap;
use SmolStr;
/// How to install this package via each package manager that knows it.
///
/// Keyed by the lowercase manager name (matching
/// [`crate::platform::PackageManager::name`]); the value carries that
/// manager's package list. Manager names zenops doesn't ship a grammar
/// for are accepted silently — they're useful as forward-compatible
/// hints for users on managers zenops will support later.
;
/// One manager's install entry. `packages` is the list of package names
/// to pass to the manager's install command.