diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-28 20:57:51 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-28 20:57:51 +0900 |
| commit | e76bc6a13aa9d2d1f6695c3ddcda1267cafe9ae6 (patch) | |
| tree | 5a736e5bbc854cc2f6aefe53c74a3367e3158f44 /internal | |
| parent | cc403c96d8cb23aceb7aca4a88ce73f422934a39 (diff) | |
internal/rosa: resolve preset by name
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rosa/all.go | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 18ea6cad..3b9ccb74 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -80,3 +80,56 @@ func (t Toolchain) Load(p PArtifact) pkg.Artifact { }) return artifacts[t][p] } + +// ResolveName returns a [PArtifact] by name. +func (t Toolchain) ResolveName(name string) (p PArtifact, ok bool) { + p, ok = map[string]PArtifact{ + "acl": ACL, + "attr": Attr, + "autoconf": Autoconf, + "bash": Bash, + "busybox": Busybox, + "cmake": CMake, + "coreutils": Coreutils, + "diffutils": Diffutils, + "fuse": Fuse, + "gawk": Gawk, + "gettext": Gettext, + "git": Git, + "go": Go, + "gperf": Gperf, + "hakurei": Hakurei, + "hakurei-dist": HakureiDist, + "iniconfig": IniConfig, + "kernel-headers": KernelHeaders, + "libXau": LibXau, + "libexpat": Libexpat, + "libseccomp": Libseccomp, + "libxml2": Libxml2, + "libffi": Libffi, + "libgd": Libgd, + "m4": M4, + "make": Make, + "meson": Meson, + "nss": NSS, + "nss-cacert": NSSCACert, + "ninja": Ninja, + "packaging": Packaging, + "patch": Patch, + "perl": Perl, + "pkg-config": PkgConfig, + "pluggy": Pluggy, + "pytest": PyTest, + "pygments": Pygments, + "python": Python, + "rsync": Rsync, + "setuptools": Setuptools, + "wayland": Wayland, + "wayland-protocols": WaylandProtocols, + "xcb": XCB, + "xcb-proto": XCBProto, + "xproto": Xproto, + "zlib": Zlib, + }[name] + return +} |
