gnu: Add datafly.
[jackhill/guix/guix.git] / gnu / packages / lisp-xyz.scm
index fee28df..8f8862e 100644 (file)
@@ -3611,6 +3611,12 @@ RFC 1321 by R. Rivest, published April 1992.")
 (define-public cl-md5
   (sbcl-package->cl-source-package sbcl-md5))
 
+(define-public ecl-md5
+  (package
+    (inherit (sbcl-package->ecl-package sbcl-md5))
+    (inputs
+     `(("flexi-streams" ,ecl-flexi-streams)))))
+
 (define-public sbcl-cl+ssl
   (let ((commit "701e645081e6533a3f0f0b3ac86389d6f506c4b5")
         (revision "1"))
@@ -10910,6 +10916,19 @@ a PostgreSQL server over a socket.")))
 (define-public cl-postgres
   (sbcl-package->cl-source-package sbcl-cl-postgres))
 
+(define-public ecl-cl-postgres
+  (package
+    (inherit (sbcl-package->ecl-package sbcl-cl-postgres))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-ecl
+           (lambda _
+             (substitute* "cl-postgres.asd"
+               (("\\) \"usocket\"") " :ecl) \"usocket\""))
+             #t)))
+       #:tests? #f))))
+
 (define-public sbcl-simple-date-postgres-glue
   (package
     (inherit sbcl-simple-date)
@@ -13424,3 +13443,370 @@ package that includes a number of renames and shadows. ")
 
 (define-public ecl-hu.dwim.common-lisp
   (sbcl-package->ecl-package sbcl-hu.dwim.common-lisp))
+
+(define-public sbcl-hu.dwim.common
+  (package
+    (name "sbcl-hu.dwim.common")
+    (version "2015-07-09")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://beta.quicklisp.org/archive/hu.dwim.common/"
+             version "/hu.dwim.common-"
+             (string-replace-substring version "-" "")
+             "-darcs.tgz"))
+       (sha256
+        (base32 "12l1rr6w9m99w0b5gc6hv58ainjfhbc588kz6vwshn4gqsxyzbhp"))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     `(("hu.dwim.asdf" ,sbcl-hu.dwim.asdf)))
+    (inputs
+     `(("alexandria" ,sbcl-alexandria)
+       ("anaphora" ,sbcl-anaphora)
+       ("closer-mop" ,sbcl-closer-mop)
+       ("hu.dwim.common-lisp" ,sbcl-hu.dwim.common-lisp)
+       ("iterate" ,sbcl-iterate)
+       ("metabang-bind" ,sbcl-metabang-bind)))
+    (home-page "http://dwim.hu/")
+    (synopsis "Common Lisp library shared by other hu.dwim systems")
+    (description "")
+    (license license:public-domain)))
+
+(define-public cl-hu.dwim.common
+  (sbcl-package->cl-source-package sbcl-hu.dwim.common))
+
+(define-public ecl-hu.dwim.common
+  (sbcl-package->ecl-package sbcl-hu.dwim.common))
+
+(define-public sbcl-hu.dwim.defclass-star
+  (package
+    (name "sbcl-hu.dwim.defclass-star")
+    (version "2015-07-09")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://beta.quicklisp.org/archive/hu.dwim.defclass-star/"
+             version "/hu.dwim.defclass-star-"
+             (string-replace-substring version "-" "")
+             "-darcs.tgz"))
+       (sha256
+        (base32 "032982lyp0hm0ssxlyh572whi2hr4j1nqkyqlllaj373v0dbs3vs"))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     `(;; These 2 inputs are only needed tests which are disabled, see below.
+       ;; ("hu.dwim.common" ,sbcl-hu.dwim.common)
+       ;; Need cl- package for the :hu.dwim.stefil+hu.dwim.def+swank system.
+       ;; ("hu.dwim.stefil" ,cl-hu.dwim.stefil)
+       ("hu.dwim.asdf" ,sbcl-hu.dwim.asdf)))
+    (arguments
+     `(#:test-asd-file "hu.dwim.defclass-star.test.asd"
+       ;; Tests require a circular dependency: hu.dwim.stefil -> hu.dwim.def
+       ;; -> hu.dwim.util -> hu.dwim.defclass-star.
+       #:tests? #f))
+    (home-page "http://dwim.hu/?_x=dfxn&_f=mRIMfonK")
+    (synopsis "Simplify definitions with defclass* and friends in Common Lisp")
+    (description "@code{defclass-star} provides defclass* and defcondition* to
+simplify class and condition declarations.  Features include:
+
+@itemize
+@item Automatically export all or select slots at compile time.
+@item Define the @code{:initarg} and @code{:accesor} automatically.
+@item Specify a name transformer for both the @code{:initarg} and
+@code{:accessor}, etc.
+@item Specify the @code{:initform} as second slot value.
+@end itemize
+
+See
+@url{https://common-lisp.net/project/defclass-star/configuration.lisp.html}
+for an example.")
+    (license license:public-domain)))
+
+(define-public cl-hu.dwim.defclass-star
+  (sbcl-package->cl-source-package sbcl-hu.dwim.defclass-star))
+
+(define-public ecl-hu.dwim.defclass-star
+  (sbcl-package->ecl-package sbcl-hu.dwim.defclass-star))
+
+(define-public sbcl-livesupport
+  (let ((commit "71e6e412df9f3759ad8378fabb203913d82e228a")
+       (revision "1"))
+    (package
+      (name "sbcl-livesupport")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/cbaggers/livesupport")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1rvnl0mncylbx63608pz5llss7y92j7z3ydambk9mcnjg2mjaapg"))))
+      (build-system asdf-build-system/sbcl)
+      (home-page "https://github.com/cbaggers/livesupport")
+      (synopsis "Some helpers that make livecoding a little easier")
+      (description "This package provides a macro commonly used in livecoding to
+enable continuing when errors are raised.  Simply wrap around a chunk of code
+and it provides a restart called @code{continue} which ignores the error and
+carrys on from the end of the body.")
+      (license license:bsd-2))))
+
+(define-public cl-livesupport
+  (sbcl-package->cl-source-package sbcl-livesupport))
+
+(define-public ecl-livesupport
+  (sbcl-package->ecl-package sbcl-livesupport))
+
+(define-public sbcl-envy
+  (let ((commit "956321b2852d58ba71c6fe621f5c2924178e9f88")
+       (revision "1"))
+    (package
+      (name "sbcl-envy")
+      (version (git-version "0.1" revision commit))
+      (home-page "https://github.com/fukamachi/envy")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "17iwrfxcdinjbb2h6l09qf40s7xkbhrpmnljlwpjy8l8rll8h3vg"))))
+      (build-system asdf-build-system/sbcl)
+      ;; (native-inputs ; Only for tests.
+      ;;  `(("prove" ,sbcl-prove)
+      ;;    ("osicat" ,sbcl-osicat)))
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-tests
+             (lambda _
+               (substitute* "envy-test.asd"
+                 (("cl-test-more") "prove"))
+               #t)))
+         ;; Tests fail with
+         ;;   Component ENVY-ASD::ENVY-TEST not found, required by #<SYSTEM "envy">
+         ;; like xsubseq.  Why?
+         #:tests? #f))
+      (synopsis "Common Lisp configuration switcher inspired by Perl's Config::ENV.")
+      (description "Envy is a configuration manager for various applications.
+Envy uses an environment variable to determine a configuration to use.  This
+can separate configuration system from an implementation.")
+      (license license:bsd-2))))
+
+(define-public cl-envy
+  (sbcl-package->cl-source-package sbcl-envy))
+
+(define-public ecl-envy
+  (sbcl-package->ecl-package sbcl-envy))
+
+(define sbcl-mito-core
+  (let ((commit "d3b9e375ef364a65692da2185085a08c969ac88a")
+       (revision "1"))
+    (package
+      (name "sbcl-mito-core")
+      (version (git-version "0.1" revision commit))
+      (home-page "https://github.com/fukamachi/mito")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "08mncgzjnbbsf1a6am3l73iw4lyfvz5ldjg5g84awfaxml4p73mb"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("dbi" ,sbcl-dbi)
+         ("sxql" ,sbcl-sxql)
+         ("cl-ppcre" ,sbcl-cl-ppcre)
+         ("closer-mop" ,sbcl-closer-mop)
+         ("dissect" ,sbcl-dissect)
+         ("optima" ,sbcl-optima)
+         ("cl-reexport" ,sbcl-cl-reexport)
+         ("local-time" ,sbcl-local-time)
+         ("uuid" ,sbcl-uuid)
+         ("alexandria" ,sbcl-alexandria)))
+      (synopsis "ORM for Common Lisp with migrations and relationships support")
+      (description "Mito is yet another object relational mapper, and it aims
+to be a successor of Integral.
+
+@itemize
+@item Support MySQL, PostgreSQL and SQLite3.
+@item Add id (serial/uuid primary key), created_at and updated_at by default
+like Ruby's ActiveRecord.
+@item Migrations.
+@item Database schema versioning.
+@end itemize\n")
+      (license license:llgpl))))
+
+(define sbcl-mito-migration
+  (package
+    (inherit sbcl-mito-core)
+    (name "sbcl-mito-migration")
+    (inputs
+     `(("mito-core" ,sbcl-mito-core)
+       ("dbi" ,sbcl-dbi)
+       ("sxql" ,sbcl-sxql)
+       ("closer-mop" ,sbcl-closer-mop)
+       ("cl-reexport" ,sbcl-cl-reexport)
+       ("uuid" ,sbcl-uuid)
+       ("alexandria" ,sbcl-alexandria)
+       ("esrap" ,sbcl-esrap)))))
+
+(define sbcl-lack-middleware-mito
+  (package
+    (inherit sbcl-mito-core)
+    (name "sbcl-lack-middleware-mito")
+    (inputs
+     `(("mito-core" ,sbcl-mito-core)
+       ("dbi" ,sbcl-dbi)))
+    (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-build
+             (lambda _
+               (substitute* "lack-middleware-mito.asd"
+                 (("cl-dbi") "dbi"))
+               #t)))))))
+
+(define-public sbcl-mito
+  (package
+    (inherit sbcl-mito-core)
+    (name "sbcl-mito")
+    (inputs
+     `(("mito-core" ,sbcl-mito-core)
+       ("mito-migration" ,sbcl-mito-migration)
+       ("lack-middleware-mito" ,sbcl-lack-middleware-mito)
+       ("cl-reexport" ,sbcl-cl-reexport)))
+    (native-inputs
+     `(("prove" ,sbcl-prove)
+       ("prove-asdf" ,sbcl-prove-asdf)
+       ("dbd-mysql" ,sbcl-dbd-mysql)
+       ("dbd-postgres" ,sbcl-dbd-postgres)
+       ("dbd-sqlite3" ,sbcl-dbd-sqlite3)))
+    (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'remove-non-functional-tests
+             (lambda _
+               (substitute* "mito-test.asd"
+                 ;; (("\\(:test-file \"migration/mysql\"\\)") "")
+                 (("\\(:test-file \"db/mysql\"\\)") "")
+                 (("\\(:test-file \"db/postgres\"\\)") "")
+                 (("\\(:test-file \"dao\"\\)") "")
+                 ;; TODO: migration/sqlite3 should work, re-enable once
+                 ;; upstream has fixed it:
+                 ;; https://github.com/fukamachi/mito/issues/70
+                 (("\\(:test-file \"migration/sqlite3\"\\)") "")
+                 (("\\(:test-file \"migration/mysql\"\\)") "")
+                 (("\\(:test-file \"migration/postgres\"\\)") "")
+                 (("\\(:test-file \"postgres-types\"\\)") "")
+                 (("\\(:test-file \"mixin\"\\)") ""))
+               #t)))
+         ;; TODO: While all enabled tests pass, the phase fails with:
+         ;; Component MITO-ASD::MITO-TEST not found, required by #<SYSTEM "mito">
+         #:tests? #f))))
+
+(define-public cl-mito
+  (sbcl-package->cl-source-package sbcl-mito))
+
+(define-public sbcl-kebab
+  (let ((commit "e7f77644c4e46131e7b8039d191d35fe6211f31b")
+        (revision "1"))
+    (package
+      (name "sbcl-kebab")
+      (version (git-version "0.1" revision commit))
+      (home-page "https://github.com/pocket7878/kebab")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0j5haabnvj0vz0rx9mwyfsb3qzpga9nickbjw8xs6vypkdzlqv1b"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("cl-ppcre" ,sbcl-cl-ppcre)
+         ("alexandria" ,sbcl-alexandria)
+         ("cl-interpol" ,sbcl-cl-interpol)
+         ("split-sequence" ,sbcl-split-sequence)))
+      (native-inputs
+       `(("prove-asdf" ,sbcl-prove-asdf)
+         ("prove" ,sbcl-prove)))
+      (arguments
+       ;; Tests passes but the phase fails with
+       ;; Component KEBAB-ASD::KEBAB-TEST not found, required by #<SYSTEM "kebab">.
+       `(#:tests? #f))
+      (synopsis "Common Lisp case converter")
+      (description "This Common Lisp library converts strings, symbols and
+keywords between any of the following typographical cases: PascalCase,
+camelCase, snake_case, kebab-case (lisp-case).")
+      (license license:llgpl))))
+
+(define-public cl-kebab
+  (sbcl-package->cl-source-package sbcl-kebab))
+
+(define-public ecl-kebab
+  (sbcl-package->ecl-package sbcl-kebab))
+
+(define-public sbcl-datafly
+  (let ((commit "adece27fcbc4b5ea39ad1a105048b6b7166e3b0d")
+        (revision "1"))
+    (package
+      (name "sbcl-datafly")
+      (version (git-version "0.1" revision commit))
+      (home-page "https://github.com/fukamachi/datafly")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "16b78kzmglp2a4nxlxxl7rpf5zaibsgagn0p3c56fsxvx0c4hszv"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("iterate" ,sbcl-iterate)
+         ("optima" ,sbcl-optima)
+         ("trivial-types" ,sbcl-trivial-types)
+         ("closer-mop" ,sbcl-closer-mop)
+         ("cl-syntax-annot" ,sbcl-cl-syntax-annot)
+         ("sxql" ,sbcl-sxql)
+         ("dbi" ,sbcl-dbi)
+         ("babel" ,sbcl-babel)
+         ("local-time" ,sbcl-local-time)
+         ("function-cache" ,sbcl-function-cache)
+         ("jonathan" ,sbcl-jonathan)
+         ("kebab" ,sbcl-kebab)
+         ("log4cl" ,sbcl-log4cl)))
+      (native-inputs
+       `(("prove-asdf" ,sbcl-prove-asdf)
+         ("prove" ,sbcl-prove)
+         ("dbd-sqlite3" ,sbcl-dbd-sqlite3)))
+      (arguments
+       ;; TODO: Tests fail with
+       ;; While evaluating the form starting at line 22, column 0
+       ;;   of #P"/tmp/guix-build-sbcl-datafly-0.1-1.adece27.drv-0/source/t/datafly.lisp":
+       ;; Unhandled SQLITE:SQLITE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
+       ;; {10009F8083}>:
+       ;;   Error when binding parameter 1 to value NIL.
+       ;; Code RANGE: column index out of range.
+       `(#:tests? #f))
+      (synopsis "Lightweight database library for Common Lisp")
+      (description "Datafly is a lightweight database library for Common Lisp.")
+      (license license:bsd-3))))
+
+(define-public cl-datafly
+  (sbcl-package->cl-source-package sbcl-datafly))
+
+(define-public ecl-datafly
+  (sbcl-package->ecl-package sbcl-datafly))