gnu: Add guile-srfi-223.

* gnu/packages/guile-xyz.scm (guile-srfi-223): New variable.

Change-Id: If3ed341c015913b6519cd07dbce1e0c89b90f14d
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Zhu Zihao 2025-07-08 16:21:59 +08:00 committed by Ludovic Courtès
parent a16d6225ee
commit dc9046061c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -5206,6 +5206,60 @@ nested expressions like @code{(a b (c d (e f g)))} as a sequence of
operations: @code{(chain g (e f _) (c d _) (a b _))}.")
(license license:expat))))
(define-public guile-srfi-223
(let ((commit "a60b766d94365829b154b978c719854caf4533b9") ;finalize commit
(revision "0"))
(package
(name "guile-srfi-223")
(version (git-version "0" revision commit))
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/scheme-requests-for-implementation/srfi-223")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"16786gk8qcwvqsff6zzfscnjx98pdac5w49shd8369a8jfmkzhqn"))))
(native-inputs (list guile-3.0))
(build-system guile-build-system)
(arguments
(list
#:not-compiled-file-regexp "-impl\\.scm$"
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'move-source
(lambda _
(mkdir-p "srfi/srfi-223")
(substitute* "srfi-223.sld"
(("\\(define-library.*$")
"(define-library (srfi srfi-223)\n")
(("\\(include \"srfi-223.scm\"\\)")
"(include \"srfi-223/223-impl.scm\")"))
(rename-file "srfi-223.sld" "srfi/srfi-223.scm")
(rename-file "srfi-223.scm" "srfi/srfi-223/223-impl.scm")
;; Require (chibi test) to run.
(delete-file "test.scm")))
;; FIXME: Use #:documentation-file-regexp.
(replace 'install-documentation
(lambda _
(let* ((doc (string-append #$output "/share/doc/"
(strip-store-file-name #$output))))
(install-file "srfi-223.html" doc)))))))
(home-page "https://srfi.schemers.org/srfi-223/")
(synopsis "Generalized binary search procedures")
(description
"This library provides a reference implementation for SRFI-223. This
SRFI defines a generalized procedures for binary search of vector-like data
structures are provided which can be applied to any sequence type, including
ones defined by the user, together with applications of these procedures for
Schemes built-in vectors.")
(license license:expat))))
(define-public guile-srfi-232
(package
(name "guile-srfi-232")