summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorZhu Zihao <all_but_last@163.com>2025-07-08 16:21:59 +0800
committerLudovic Courtès <ludo@gnu.org>2025-10-13 14:48:27 +0200
commitdc9046061c9e09fc0e0f3fd594d2429d2d76309f (patch)
tree921616a073fa466600fa7622c8ebc6c8d369fb20 /gnu
parenta16d6225ee519cb7031d1610784daefe99b570e8 (diff)
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>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/guile-xyz.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e699b3d97b6..92b70b23183 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -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
+Scheme’s built-in vectors.")
+ (license license:expat))))
+
(define-public guile-srfi-232
(package
(name "guile-srfi-232")