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")