Documentation
¶
Overview ¶
Package paru implements the dotdrift mise package-plugin backend for the `paru` manager (pacman + AUR). The dotdrift paru subcommand exposes two operations — installed (status check) and install — that the Lua plugin shim delegates to. This keeps all paru invocation logic in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatStatus ¶
FormatStatus emits the line-based protocol consumed by the Lua plugin shim: one line per package, tab-separated: name<TAB>installed|missing<TAB>version.
func Install ¶
Install runs `paru -S --needed --noconfirm <names>`. paru self-elevates (calls sudo pacman internally); this function invokes no sudo itself.
func InstallArgs ¶
InstallArgs builds the argv for installing packages via paru.
func WritePlugin ¶
WritePlugin writes the mise package-plugin for the `paru` manager into dir. Creates the directory and hooks/ subdirectory. Overwrites existing files (the content is deterministic — same call, same bytes).
Types ¶
type Runner ¶
Runner executes one command and returns its stdout (trimmed) on success or the combined output on failure.
type State ¶
State is one element of the installed-status response.
func PackageStatus ¶
PackageStatus checks each package via `pacman -Q <name>`. The query is read-only and never elevates. A package present in pacman's local database (covering both repo and AUR packages) is "installed"; anything else is "missing". Errors from individual queries are tolerated (treated as missing) so one bad name never blocks the batch.