Subject: Add cl-redis and dependents
From: Charles <[email-masked]>
To: "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>
Date: Wed, 20 Oct 2021 04:51:39 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Sharlatan, I'm tagging you here because this includes cl-rutils, and I saw that you were working on that some months ago. My solution to the problem .asd file is to just delete it since it seems it isn't referring to the right system anyway.

From 135161ba350f42db65018bdebfbf4dffcb8b64aa Mon Sep 17 00:00:00 2001
From: Charles <[email-masked]>
Date: Tue, 19 Oct 2021 23:42:01 -0500
Subject: [PATCH 1/4] gnu: Add cl-rutils-untested.

* gnu/packages/lisp-xyz.scm (cl-rutils/untested sbcl-rutils/untested
ecl-rutils/untested): New variables.
---
 gnu/packages/lisp-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 9694f6adda..9b383b6d6d 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -7736,6 +7736,49 @@ (define-public cl-serapeum
 (define-public ecl-serapeum
   (sbcl-package->ecl-package sbcl-serapeum))
 
+(define-public sbcl-rutils/untested
+  (let ((commit "db3c3f4ae897025b5f0cd81042ca147da60ca0c5")
+        (revision "0"))
+    (package
+      (name "sbcl-rutils-untested")
+      (version (git-version "5.2.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/vseloved/rutils")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1d2whscknh1zga2vdqvfqri8wx0gnml3sfqz62igq0ppap6q07y3"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       '(#:tests? #f
+         #:asd-systems (list "rutils")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-build
+             (lambda _
+               (for-each delete-file
+                         (list "rutils-test.asd"
+                               "rutilsx.asd"
+                               "rutilsx-test.asd"))
+               #t)))))
+      (inputs
+       `(("closer-mop" ,sbcl-closer-mop)
+         ("named-readtables" ,sbcl-named-readtables)))
+      (home-page "https://github.com/vseloved/rutils")
+      (synopsis "Radical Utilities for Common Lisp")
+      (description "RUTILS is a syntactic utilities package for Common Lisp.")
+      (license license:expat))))
+
+(define-public cl-rutils/untested
+  (sbcl-package->cl-source-package sbcl-rutils/untested))
+
+(define-public ecl-rutils/untested
+  (sbcl-package->ecl-package sbcl-rutils/untested))
+
 (define-public sbcl-arrows
   (let ((commit "df7cf0067e0132d9697ac8b1a4f1b9c88d4f5382")
         (revision "0"))
-- 
2.33.0

From 2bdbde56429d655bc75dad51ed9d7d4f9baccc91 Mon Sep 17 00:00:00 2001
From: Charles <[email-masked]>
Date: Tue, 19 Oct 2021 23:46:35 -0500
Subject: [PATCH 4/4] gnu: Add cl-redis.

* gnu/packages/lisp-xyz.scm (cl-redis sbcl-redis ecl-redis): New variables.
---
 gnu/packages/lisp-xyz.scm | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 545fe86636..924ed5f862 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -3224,6 +3224,57 @@ (define-public cl-sqlite
 (define-public ecl-cl-sqlite
   (sbcl-package->ecl-package sbcl-cl-sqlite))
 
+(define-public sbcl-redis
+  (let ((commit "7d592417421cf7cd1cffa96043b457af0490df7d")
+        (revision "0"))
+    (package
+      (name "sbcl-redis")
+      (version (git-version "2.3.8" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/vseloved/cl-redis")
+               (commit commit)))
+         (file-name (git-file-name "cl-redis" version))
+         (sha256
+          (base32 "0x5ahxb5cx37biyn3cjycshhm1rr9p5cf1a9l5hd1n1xjxm2f8vi"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       '(#:asd-systems (list "cl-redis")
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'start-redis
+             (lambda _
+               (system "redis-server --port 6379 &")
+               #t))
+           (add-after 'check 'stop-redis
+             (lambda _
+               (system "redis-cli -p 6379 shutdown")
+               #t)))))
+      (native-inputs
+       `(("bordeaux-threads" ,sbcl-bordeaux-threads)
+         ("flexi-streams" ,sbcl-flexi-streams)
+         ("redis" ,redis)
+         ("should-test" ,sbcl-should-test)))
+      (inputs
+       `(("babel" ,sbcl-babel)
+         ("cl-ppcre" ,sbcl-cl-ppcre)
+         ("flexi-streams" ,sbcl-flexi-streams)
+         ("rutils" ,sbcl-rutils)
+         ("usocket" ,sbcl-usocket)))
+      (home-page "https://github.com/vseloved/cl-redis")
+      (synopsis "Fast and robust Common Lisp client for Redis")
+      (description "This is a Common Lisp wrapper for interacting with the
+Redis data structure store.")
+      (license license:expat))))
+
+(define-public cl-redis
+  (sbcl-package->cl-source-package sbcl-redis))
+
+(define-public ecl-redis
+  (sbcl-package->ecl-package sbcl-redis))
+
 (define-public sbcl-parenscript
   ;; Source archives are overwritten on every release, we use the Git repo instead.
   (let ((commit "7a1ac46353cecd144fc91915ba9f122aafcf4766"))
-- 
2.33.0

From 39ac3d1b65e78ed3693e6f094af3a6c5dbe30c55 Mon Sep 17 00:00:00 2001
From: Charles <[email-masked]>
Date: Tue, 19 Oct 2021 23:45:50 -0500
Subject: [PATCH 3/4] gnu: Add cl-rutils.

* gnu/packages/lisp-xyz.scm (cl-rutils sbcl-rutils ecl-rutils): New variables.
---
 gnu/packages/lisp-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index d5a6a7bbe0..545fe86636 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -7812,6 +7812,28 @@ (define-public cl-rutils/untested
 (define-public ecl-rutils/untested
   (sbcl-package->ecl-package sbcl-rutils/untested))
 
+(define-public sbcl-rutils
+  (package
+    (inherit sbcl-rutils/untested)
+    (name "sbcl-rutils")
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-build
+           (lambda _
+             (for-each delete-file
+                       (list "rutilsx.asd"
+                             "rutilsx-test.asd"))
+             #t)))))
+    (native-inputs
+     `(("should-test" ,sbcl-should-test)))))
+
+(define-public cl-rutils
+  (sbcl-package->cl-source-package sbcl-rutils))
+
+(define-public ecl-rutils
+  (sbcl-package->ecl-package sbcl-rutils))
+
 (define-public sbcl-arrows
   (let ((commit "df7cf0067e0132d9697ac8b1a4f1b9c88d4f5382")
         (revision "0"))
-- 
2.33.0

From f810ad48bd8ec46ae50a5aeb5485e6122d7add7c Mon Sep 17 00:00:00 2001
From: Charles <[email-masked]>
Date: Tue, 19 Oct 2021 23:44:53 -0500
Subject: [PATCH 2/4] gnu: Add cl-should-test.

* gnu/packages/lisp-xyz.scm (cl-should-test sbcl-should-test ecl-should-test):
New Variables.
---
 gnu/packages/lisp-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 9b383b6d6d..d5a6a7bbe0 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -2417,6 +2417,39 @@ (define-public cl-lisp-unit
 (define-public ecl-lisp-unit
   (sbcl-package->ecl-package sbcl-lisp-unit))
 
+(define-public sbcl-should-test
+  (let ((commit "48facb9f9c07aeceb71fc0c48ce17fd7d54a09d4")
+        (revision "0"))
+    (package
+      (name "sbcl-should-test")
+      (version (git-version "1.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/vseloved/should-test")
+               (commit commit)))
+         (file-name (git-file-name "should-test" version))
+         (sha256
+          (base32 "1fqqa7lhf28qg60ji9libkylkcy747x576qpjn1y7c945j2fxmnm"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("cl-ppcre" ,sbcl-cl-ppcre)
+         ("local-time" ,sbcl-local-time)
+         ("osicat" ,sbcl-osicat)
+         ("rutils" ,sbcl-rutils/untested)))
+      (home-page "https://github.com/vseloved/should-test")
+      (synopsis "Minimal yet feature-rich Common Lisp test framework")
+      (description "SHOULD-TEST is methodology-agnostic and non-opinionated,
+i.e. it doesn't care what kind of test approach you'd like to take.")
+      (license license:expat))))
+
+(define-public cl-should-test
+  (sbcl-package->cl-source-package sbcl-should-test))
+
+(define-public ecl-should-test
+  (sbcl-package->ecl-package sbcl-should-test))
+
 (define-public sbcl-anaphora
   (package
     (name "sbcl-anaphora")
-- 
2.33.0