unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 68305@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#68305] [PATCH] gnu: Add guile-srfi-197.
Date: Sun,  7 Jan 2024 16:09:44 +0100	[thread overview]
Message-ID: <021a14380a3d701f4dddbac72b83bf34bdea4558.1704640177.git.~@wolfsden.cz> (raw)

* gnu/packages/guile-xyz.scm (guile-srfi-197): New variable.

Change-Id: Ifcdc264e6a03e88e7614d79792fbe6ca9c8e519c
---
 gnu/packages/guile-xyz.scm | 56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 75e3754046..ff3104a407 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3840,6 +3840,62 @@ (define-public guile-srfi-189
 or errors (Left).")
       (license license:expat))))
 
+(define-public guile-srfi-197
+  (let ((commit "d31b8be86460bf837cccf2737a1b9b9c01788573")
+        (revision "0"))
+    (package
+      (name "guile-srfi-197")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/scheme-requests-for-implementation/srfi-197")
+               (commit commit)))
+         (sha256
+          (base32
+           "1c1jjzqgavjwfzs352wssdbjga5ymv4g3lkl0zxhjw7pfrr5xx1m"))
+         (file-name (git-file-name name version))))
+      (build-system guile-build-system)
+      (arguments
+       (list
+        #:source-directory "src"
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'create-module
+              (λ _
+                (use-modules (ice-9 textual-ports))
+                (mkdir-p "src/srfi")
+                (call-with-output-file "src/srfi/srfi-197.scm"
+                  (λ (port)
+                    (write '(define-module (srfi srfi-197)
+                              #:use-module (scheme base)
+                              #:export (chain
+                                        chain-and
+                                        chain-when
+                                        chain-lambda
+                                        nest
+                                        nest-reverse))
+                           port)
+                    (call-with-input-file "srfi-197-syntax-case.scm"
+                      (λ (in-port)
+                        (display (get-string-all in-port) port)))))))
+            (add-after 'install 'check-installed
+              (λ _
+                (define-values (scm go) (target-guile-scm+go #$output))
+                (invoke "guile" "-L" scm "-C" go
+                        "--use-srfi=197" "./test.scm"))))))
+      (native-inputs
+       (list guile-3.0))
+      (home-page "https://srfi.schemers.org/srfi-197/")
+      (synopsis "Pipeline operators for Guile")
+      (description
+       "This library provides a reference implementation for SRFI-197.  This
+SRFI defines a family of chain and nest pipeline operators, which can rewrite
+nested expressions like (a b (c d (e f g))) as a sequence of operations:
+(chain g (e f _) (c d _) (a b _)).")
+      (license license:expat))))
+
 (define-public guile-srfi-232
   (package
     (name "guile-srfi-232")

base-commit: b212e6934643e085f168a5364cb593f61aa616ba
-- 
2.41.0





             reply	other threads:[~2024-01-07 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-07 15:09 Tomas Volf [this message]
2024-01-12 16:10 ` [bug#68305] [PATCH] gnu: Add guile-srfi-197 Mathieu Othacehe
2024-01-12 16:47   ` Tomas Volf
2024-01-13  9:22     ` Mathieu Othacehe
2024-01-12 16:46 ` [bug#68305] [PATCH v2] " Tomas Volf
2024-01-13  9:40   ` bug#68305: " Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='021a14380a3d701f4dddbac72b83bf34bdea4558.1704640177.git.~@wolfsden.cz' \
    --to=~@wolfsden.cz \
    --cc=68305@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).