Hugo's new (again) package manager that reads a Lua configuration file and coordinates the download, build, and installation from remote URLs. Packages are processed in parallel using POSIX threads.
You might be asking why I wrote another Package Manager. Good question. I don't know either. Update: appart from the rest, this one works.
pm [option]...
| Command | Description |
|---|---|
pm |
Fetch, build, and install all packages from config |
pm --help / pm -h |
Show help message and exit |
pm --version / pm -v |
Show version info and exit |
pm --color |
Enable colored output |
pm init / pm i |
Create a template config at the c/config path (default: ~/.config/pm/init.lua) |
pm threads N / pm t N |
Use at most N threads (default: CPU count) |
pm list / pm l |
List all packages defined in the config |
pm system / pm s |
Print system configuration paths and settings |
pm config FILE / pm c FILE |
Use a different config file (default: ~/.config/pm/init.lua) |
The config file lives at ~/.config/pm/init.lua and defines:
System = {
build = { path = os.getenv("HOME") .. "/.local/share/pm/cache/" },
bin = { path = os.getenv("HOME") .. "/.local/share/pm/bin/" },
}
Packages = {
{
url = "...",
build = "...",
artifact = "...",
},
}It's plain Lua, so you can use require, helper functions, and split packages
across multiple files. See the example directory for
reference.
make # release build
make debug # debug build with sanitizersRequires lua, libcurl, and libcrypto (OpenSSL). The Makefile installs the
man page to ~/.local/share/man/man1/pm.1.