diff options
| author | Zhu Zihao <all_but_last@163.com> | 2025-07-12 14:01:21 +0800 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-08-25 12:17:01 +0200 |
| commit | b757e69b176e84da3d91c8b1472d3ca180546e3b (patch) | |
| tree | 1560501e1e6fd19b951ae4e05b6910f5a832cca9 /gnu | |
| parent | bd9b7d4467008c9c1e1b7a6f2d49d21310d7e8ca (diff) | |
gnu: Add guile-srfi-165.
* gnu/packages/guile-xyz.scm (guile-srfi-165): New variable.
Co-authored-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Change-Id: I81b79de3f69c676b40a98a42fd898d0f58ab9486
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/guile-xyz.scm | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b56c2a62c62..f3af71f232d 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -31,7 +31,7 @@ ;;; Copyright © 2020, 2021 Masaya Tojo <masaya@tojo.tokyo> ;;; Copyright © 2020 Jesse Gibbons <jgibbons2357@gmail.com> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com> -;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com> +;;; Copyright © 2020, 2025 Liliana Marie Prikler <liliana.prikler@gmail.com> ;;; Copyright © 2020, 2021, 2022 pukkamustard <pukkamustard@posteo.net> ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> @@ -4924,6 +4924,68 @@ return accumulators. It is implemented by wrapping the sample implementation in a thin Guile compatibility layer.") (license license:gpl3+)))) +(define-public guile-srfi-165 + (let ((commit "1b441c0edc258e39cb943096bd47dd45071e2f70") + (revision "0")) + (package + (name "guile-srfi-165") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/scheme-requests-for-implementation/srfi-165") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ac1nmf413sayy0xq4c2l4kmbjkh8ksg3s4fwgk44zcd8phy3kxw")))) + (build-system guile-build-system) + (arguments + (list + #:scheme-file-regexp "(srfi-165|impl)\\.scm$" + #:documentation-file-regexp "srfi-165\\.html$" + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'rename-files + (lambda _ + (mkdir-p "srfi/srfi-165") + (rename-file "srfi/165.scm" "srfi/srfi-165/impl.scm") + (substitute* "srfi/165.sld" + (("\\(include \"165.scm\"\\)") + "(include \"srfi-165/impl.scm\")")) + (rename-file "srfi/165.sld" "srfi/srfi-165.scm"))) + (add-after 'build 'check-installed + (lambda _ + (substitute* "srfi/165/test.sld" + (("srfi 165 test") "srfi #{165}# test")) + (define-values (scm go) (target-guile-scm+go #$output)) + + (invoke "guile" + "-L" scm "-C" go + "-l" "./srfi/165/test.sld" + "-c" + (format #f "~S" + '(begin + (use-modules (srfi #{165}# test)) + (run-tests))))))))) + (native-inputs (list guile-3.0 + guile-srfi-125 + guile-srfi-128 + guile-srfi-146)) + (propagated-inputs + (list guile-srfi-125 guile-srfi-128 guile-srfi-146)) + (home-page "https://srfi.schemers.org/srfi-165/") + (synopsis "Environment/Reader Monad") + (description + "This library provides the sample implementation of SRFI-165. +This SRFI defines an environment monad, which models computations that depend on +values from a shared environment. These computations can read values from the +environment, pass values to subsequent computations, execute sub-computations in +an extended environment, and modify the environment for future computations.") + (license license:expat)))) + (define-public guile-srfi-180 (let ((commit "9188bf9724c6d320ef804579d222e855b007b193") (revision "0")) |
