~ruther/guix-local

dc9046061c9e09fc0e0f3fd594d2429d2d76309f — Zhu Zihao 11 months ago a16d622
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>
1 files changed, 54 insertions(+), 0 deletions(-)

M gnu/packages/guile-xyz.scm
M gnu/packages/guile-xyz.scm => gnu/packages/guile-xyz.scm +54 -0
@@ 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")