patch: hooks from zeta
This commit is contained in:
@@ -39,6 +39,21 @@ return {
|
||||
|
||||
**Build systems**: `autotools`, `cmake`, `meson`, `make`, `cargo`, `custom`
|
||||
|
||||
## Post-transaction hooks
|
||||
|
||||
Packages may ship post-transaction hooks — pure-data Lua files under
|
||||
`usr/share/zeta/hooks/*.hook` in the stage tree. A hook declares an `order`,
|
||||
a `trigger` (e.g. `{ op = "install", type = "package", target = { "mypkg" } }`),
|
||||
and an `action` (e.g. `{ when = "post", exec = "..." }`).
|
||||
|
||||
At build time `zeta-makepkg` scans the stage for `*.hook` files, validates each
|
||||
one (they must load as a table carrying `trigger` and `action`), and merges
|
||||
their paths into the generated `files` whitelist so hooks are committed
|
||||
alongside the declared files. A malformed hook fails the build.
|
||||
|
||||
See [`toolchain/examples/hooks-demo/`](toolchain/examples/hooks-demo/hooks-demo.recipe)
|
||||
for a working example.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user