diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/lisp-xyz.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 2d774463f6b..f7454d1cc4d 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm | |||
| @@ -20323,3 +20323,56 @@ Lisp. A subsystem offers an experimental GUI Gemini client.") | |||
| 20323 | 20323 | ||
| 20324 | (define-public ecl-phos | 20324 | (define-public ecl-phos |
| 20325 | (sbcl-package->ecl-package sbcl-phos)) | 20325 | (sbcl-package->ecl-package sbcl-phos)) |
| 20326 | |||
| 20327 | (define-public sbcl-nhooks | ||
| 20328 | (package | ||
| 20329 | (name "sbcl-nhooks") | ||
| 20330 | (version "1.0.0") | ||
| 20331 | (source | ||
| 20332 | (origin | ||
| 20333 | (method git-fetch) | ||
| 20334 | (uri (git-reference | ||
| 20335 | (url "https://github.com/atlas-engineer/nhooks") | ||
| 20336 | (commit version))) | ||
| 20337 | (file-name (git-file-name "nhooks" version)) | ||
| 20338 | (sha256 | ||
| 20339 | (base32 | ||
| 20340 | "1v3gh9jf4hbpl1hnyzhkrcj3jdh3q0mlp1n6ci2cbn2rsc65baff")))) | ||
| 20341 | (build-system asdf-build-system/sbcl) | ||
| 20342 | (inputs | ||
| 20343 | (list sbcl-serapeum)) | ||
| 20344 | (native-inputs | ||
| 20345 | (list sbcl-fiveam)) | ||
| 20346 | (home-page "https://github.com/atlas-engineer/nhooks") | ||
| 20347 | (synopsis "Hook facility for Common Lisp") | ||
| 20348 | (description "This package holds an enhanced implementation of | ||
| 20349 | hooks (extension points). It works similarly to Emacs hooks with crucial | ||
| 20350 | improvements: | ||
| 20351 | |||
| 20352 | @itemize | ||
| 20353 | |||
| 20354 | @item If the compiler allows it (such as SBCL), type-checking is performed at | ||
| 20355 | compile-time and at run-time when adding handlers to a hook. | ||
| 20356 | |||
| 20357 | @item On failure, multiple restarts are offered, such as disabling the | ||
| 20358 | offending handler or simply continuing to the next function. | ||
| 20359 | |||
| 20360 | @item The hook handler execution order and combination can be customized. | ||
| 20361 | |||
| 20362 | @item Anonymous functions (lambdas) can be added to hooks as handler objects. | ||
| 20363 | When inspecting hooks, readable names are thus exposed instead of lambda | ||
| 20364 | blackboxes. Handlers are compared through their names (through the mandatory | ||
| 20365 | name slot). A hook can not contain multiple handlers with the same name. | ||
| 20366 | |||
| 20367 | @item A special provision is taken for “setters”, handlers that are meant to | ||
| 20368 | set a given place to a given values. Such handler objects can be compared and | ||
| 20369 | identified uniquely. | ||
| 20370 | |||
| 20371 | @end itemize\n") | ||
| 20372 | (license license:expat))) | ||
| 20373 | |||
| 20374 | (define-public cl-nhooks | ||
| 20375 | (sbcl-package->cl-source-package sbcl-nhooks)) | ||
| 20376 | |||
| 20377 | (define-public ecl-nhooks | ||
| 20378 | (sbcl-package->ecl-package sbcl-nhooks)) | ||
