all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#68015] [PATCH] gnu: guile-xyz: Add guile-srfi-171.
@ 2023-12-24 19:15 lgcoelho--- via Guix-patches via
  2023-12-25  7:42 ` Nikita Domnitskii via Guix-patches via
  2024-02-25  1:23 ` [bug#68015] (no subject) lgcoelho--- via Guix-patches via
  0 siblings, 2 replies; 3+ messages in thread
From: lgcoelho--- via Guix-patches via @ 2023-12-24 19:15 UTC (permalink / raw)
  To: 68015


[-- Attachment #1.1: Type: text/plain, Size: 100 bytes --]

This patch adds the SRFI-171, which supplies transducer functionality, 
in (gnu packages guile-xyz).

[-- Attachment #1.2: Type: text/html, Size: 286 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-guile-xyz-Add-guile-srfi-171.patch --]
[-- Type: text/x-diff; name=0001-gnu-guile-xyz-Add-guile-srfi-171.patch, Size: 4554 bytes --]

From 0e6f08bb1e53fc4d531cb4f1e0f7d1cdc0cd216e Mon Sep 17 00:00:00 2001
From: Luis Guilherme Coelho <lgcoelho@disroot.org>
Date: Sun, 24 Dec 2023 16:13:35 -0300
Subject: [PATCH] gnu: guile-xyz: Add guile-srfi-171.

---
 gnu/packages/guile-xyz.scm | 66 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 7b44dc3167..f22a9d995e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -47,6 +47,7 @@
 ;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2023 Luis Guilherme Coelho <lgcoelho@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3683,6 +3684,71 @@ (define-public guile-srfi-159
 more expressive and flexible than the traditional @code{format} procedure.")
       (license license:bsd-3))))
 
+(define-public guile-srfi-171
+  (let ((commit "40eb284ae54e510013054453890052df603a3a7f")
+        (revision "0"))
+    (package
+      (name "guile-srfi-171")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url (string-append
+                             "https://github.com"
+                             "/scheme-requests-for-implementation/srfi-171"))
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1w2x5mwvzb2xrp6j2drigay885ni5dag8y2iiak4s96v863wyh5l"))
+                (snippet #~(begin
+                             (use-modules (ice-9 rdelim)
+                                          (ice-9 pretty-print)
+                                          (guix build utils))
+                             (with-output-to-file "tmp.scm"
+                               (lambda ()
+                                 (call-with-input-file "srfi/srfi-171.scm"
+                                   (lambda (input-port)
+                                     (let loop
+                                       ((i 0))
+                                       (let ((line (read-line input-port)))
+                                         (unless (equal? line
+                                                  "(include \"171-impl.scm\")")
+                                           (unless (< i 13)
+                                             (write-line line))
+                                           (loop (1+ i)))))))
+                                 (call-with-input-file "srfi/171-impl.scm"
+                                   (lambda (input-port)
+                                     (let loop
+                                       ((i 0))
+                                       (let ((line (read-line input-port)))
+                                         (unless (eof-object? line)
+                                           (unless (< i 13)
+                                             (write-line line))
+                                           (loop (1+ i)))))))))
+                             (delete-file-recursively "srfi")
+                             (mkdir "srfi")
+                             (rename-file "tmp.scm" "srfi/srfi-171.scm")
+                             (for-each delete-file
+                                       '("compose.scm" "srfi-171.html"
+                                         "transducers.md"
+                                         "README.org"
+                                         "index.html"
+                                         "tests-guile.scm"
+                                         "tests-r7rs.scm"
+                                         "tests.scm"))))))
+      (build-system guile-build-system)
+      (inputs (list guile-3.0))
+      (home-page
+       "https://github.com/scheme-requests-for-implementation/srfi-171")
+      (synopsis "SRFI 171 transducers implementation for Guile")
+      (description
+       "This package provides an implementation of SRFI 171 for Guile.
+SRFI 171 defines transducers that generalize common list operations like
+map, filter, take and so on for other types. The traditional Scheme
+approach of having collection-specific procedures is not changed.")
+      (license license:expat))))
+
 (define-public guile-srfi-180
   (let ((commit "9188bf9724c6d320ef804579d222e855b007b193")
         (revision "0"))
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#68015] [PATCH] gnu: guile-xyz: Add guile-srfi-171.
  2023-12-24 19:15 [bug#68015] [PATCH] gnu: guile-xyz: Add guile-srfi-171 lgcoelho--- via Guix-patches via
@ 2023-12-25  7:42 ` Nikita Domnitskii via Guix-patches via
  2024-02-25  1:23 ` [bug#68015] (no subject) lgcoelho--- via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: Nikita Domnitskii via Guix-patches via @ 2023-12-25  7:42 UTC (permalink / raw)
  To: lgcoelho, 68015

Guile already has srfi-171




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#68015] (no subject)
  2023-12-24 19:15 [bug#68015] [PATCH] gnu: guile-xyz: Add guile-srfi-171 lgcoelho--- via Guix-patches via
  2023-12-25  7:42 ` Nikita Domnitskii via Guix-patches via
@ 2024-02-25  1:23 ` lgcoelho--- via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: lgcoelho--- via Guix-patches via @ 2024-02-25  1:23 UTC (permalink / raw)
  To: 68015

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

Ah, sorry, I didn't know it before.

close 68015
quit

[-- Attachment #2: Type: text/html, Size: 324 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-25  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-24 19:15 [bug#68015] [PATCH] gnu: guile-xyz: Add guile-srfi-171 lgcoelho--- via Guix-patches via
2023-12-25  7:42 ` Nikita Domnitskii via Guix-patches via
2024-02-25  1:23 ` [bug#68015] (no subject) lgcoelho--- via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.