commit cdb7be1b0161b224781dce80980f07a07ee19cc9 parent 324b527dbbc035051162430d35905c76a304fdc0 Author: Yuval Langer <yuval.langer@gmail.com> Date: Tue, 12 Dec 2023 01:39:33 +0200 Add guile-srfi-133 package definition. Diffstat:
M | kakafarm/packages/guile-xyz.scm | | | 73 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 73 insertions(+), 0 deletions(-)
diff --git a/kakafarm/packages/guile-xyz.scm b/kakafarm/packages/guile-xyz.scm @@ -79,6 +79,79 @@ press a keybinding / shortcut you've set in the windows manager, and clipboard-speaker would read that aloud.") (license license:agpl3+)))) +(define-public guile-srfi-133 + (package + (name "guile-srfi-133") + (version "0.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/scheme-requests-for-implementation/srfi-133") + (commit "db81a114cd3e23375f024baec15482614ec90453"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0a7srl72291yah0aj6rwddhj041v2spximhknjj7hczlparsrm7f")))) + (build-system guile-build-system) + (arguments + (list + #:phases + #~(modify-phases + %standard-phases + (add-after 'unpack 'move-create-and-delete-files + (lambda _ + (rename-file "vectors" "srfi") + (rename-file "srfi/vectors-test.scm" "srfi/srfi-test.scm") + (rename-file "srfi/vectors-impl.scm" "srfi/srfi-impl.scm") + (with-output-to-file "srfi/srfi-133.scm" + (lambda () + (display "(define-module (srfi srfi-133) + #:replace (;; Constructors + vector-copy + + ;; Mutators + vector-fill! vector-copy! + + ;; Conversion + vector->list list->vector) + #:export (;; Constructors + vector-unfold vector-unfold-right vector-reverse-copy + vector-append vector-concatenate vector-append-subvectors + + ;; Predicates + vector-empty? vector= + + ;; Iteration + vector-fold vector-fold-right vector-map vector-map! + vector-for-each vector-count vector-cumulate + + ;; Searching + vector-index vector-index-right vector-skip vector-skip-right + vector-binary-search vector-any vector-every vector-partition + + ;; Mutators + vector-swap! vector-reverse! + vector-reverse-copy! vector-unfold! vector-unfold-right! + + ;; Conversion + reverse-vector->list reverse-list->vector + vector->string string->vector)) + +(include \"srfi-impl.scm\")"))) + (for-each (lambda (filename) + (delete-file filename)) + '("tests/run.scm" + "srfi/vectors.sld" + "srfi/vectors.scm"))))))) + (native-inputs + (list guile-3.0)) + (home-page "https://github.com/scheme-requests-for-implementation/srfi-133") + (synopsis "Vector Library (R7RS-compatible)") + (description + "A comprehensive library of vector operations.") + (license license:expat))) + (define-public guile-srfi-232 (package (name "guile-srfi-232")