Subject: [PATCH] gnu: cl-caveman: Update to 2.4.0.35cd8bc.

From: jgart <[email-masked]>
Date: Thu, 3 Mar 2022 00:13:57 -0500

* gnu/packages/lisp-xyz.scm (cl-caveman): Update to 2.4.0.35cd8bc.
[inputs]: Add sbcl-sxql.
[native-inputs]: Add sbcl-prove, sbcl-lack, and sbcl-trivial-types.
[arguments]: Delete remove-v1 phase, add test-asd-file keyword, add missing
files to asd-files and asd-systems keywords, and add more commentary on reason
for failing test.
---
 gnu/packages/lisp-xyz.scm | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index dc0ee27676..490b3a5f9e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -12401,8 +12401,8 @@ (define-public ecl-cl-project
   (sbcl-package->ecl-package sbcl-cl-project))
 
 (define-public sbcl-caveman
-  (let ((commit "faa5f7e3b364fd7e7096af9a7bb06728b8d80441") ; No release since 2012
-        (revision "1"))
+  (let ((commit "35cd8bc6c322f9d88498405fc26168a1fb42ae1c") ; No release since 2012
+        (revision "2"))
     (package
       (name "sbcl-caveman")
       (version (git-version "2.4.0" revision commit))
@@ -12415,29 +12415,33 @@ (define-public sbcl-caveman
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "0kh0gx05pczk8f7r9qdi4zn1p3d0a2prps27k7jpgvc1dxkl8qhq"))))
+          (base32 "1wvjm9m1fnapg0r9imhhcwgnhhqkkccnj3c0iw9yg1f72d7zhm2w"))))
       (build-system asdf-build-system/sbcl)
       (inputs
        `(("ningle" ,cl-ningle)
          ("lack" ,sbcl-lack)
          ("cl-project" ,sbcl-cl-project)
          ("dbi" ,sbcl-dbi)
+         ("sxql" ,sbcl-sxql)
          ("cl-syntax" ,sbcl-cl-syntax)
          ("myway" ,sbcl-myway)
          ("quri" ,sbcl-quri)))
       (native-inputs
        `(("usocket" ,sbcl-usocket)
-         ("dexador" ,sbcl-dexador)))
+         ("dexador" ,sbcl-dexador)
+         ("lack" ,sbcl-lack)
+         ("trivial-types" ,sbcl-trivial-types)
+         ("prove" ,sbcl-prove)))
       (arguments
-       `(#:asd-files '("caveman2.asd")
-         #:asd-systems '("caveman2")
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'remove-v1
-             (lambda _
-               (delete-file-recursively "v1")
-               (for-each delete-file
-                         '("README.v1.markdown" "caveman.asd" "caveman-test.asd")))))
+       `(#:asd-files '("caveman2.asd" 
+                       "caveman2-db.asd" 
+                       "caveman2-test.asd"
+                       "caveman-middleware-dbimanager.asd")
+         #:test-asd-file "caveman2-test.asd"
+         #:asd-systems '("caveman2"
+                         "caveman2-db"
+                         "caveman2-test"
+                         "caveman-middleware-dbimanager")
          ;; TODO: Tests fail with:
          ;; writing /gnu/store/...-sbcl-caveman-2.4.0-1.faa5f7e/share/common-lisp/sbcl-source/caveman2/v2/t/tmp/myapp573/tests/myapp573.lisp
          ;; While evaluating the form starting at line 38, column 0
@@ -12445,6 +12449,11 @@ (define-public sbcl-caveman
          ;; Unhandled ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread #<SB-THREAD:THREAD "main thread" RUNNING
          ;;                                                              {10009F8083}>:
          ;;   Component "myapp573" not found
+         ;;
+         ;; The above myapp573 component name is randomly generated by
+         ;; gensym on each test run. `(asdf:load-system *app-name*)` tries
+         ;; to load this component and fails.
+         ;; TODO: Ask fukamachi how to go around this.
          #:tests? #f))
       (synopsis "Lightweight web application framework in Common Lisp")
       (description "Caveman is intended to be a collection of common parts for
-- 
2.35.1