gnu: Add cl-postgres.
[jackhill/guix/guix.git] / gnu / packages / lisp-xyz.scm
index b4f1fdb..2f84ad2 100644 (file)
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
+;;; Copyright © 2020 Dimakis Dimakakos <me@bendersteed.tech>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,6 +51,7 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages c)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages imagemagick)
@@ -57,6 +59,7 @@
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages lisp)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
@@ -218,7 +221,7 @@ support.")
 ANSI CL by David N. Gray.  The proposal did not make it into ANSI CL, but most
 popular CL implementations implement it.  This package provides an extremely
 thin compatibility layer for gray streams.")
-      (home-page "http://www.cliki.net/trivial-gray-streams")
+      (home-page "https://www.cliki.net/trivial-gray-streams")
       (license license:x11))))
 
 (define-public cl-trivial-gray-streams
@@ -602,7 +605,7 @@ files.")
     (build-system asdf-build-system/sbcl)
     (native-inputs
      `(("fiasco" ,sbcl-fiasco)))
-    (home-page "http://www.cliki.net/portable-clx")
+    (home-page "https://www.cliki.net/portable-clx")
     (synopsis "X11 client library for Common Lisp")
     (description "CLX is an X11 client library for Common Lisp.  The code was
 originally taken from a CMUCL distribution, was modified somewhat in order to
@@ -1130,7 +1133,7 @@ utilities that make it even easier to manipulate text in Common Lisp.  It has
         (base32 "0ccv7dqyrk55xga78i5vzlic7mdwp28in3g1a8fqhlk6626scsq9"))))
     (build-system asdf-build-system/sbcl)
     (arguments '(#:tests? #f))
-    (home-page "http://cliki.net/trivial-features")
+    (home-page "https://cliki.net/trivial-features")
     (synopsis "Ensures consistency of @code{*FEATURES*} in Common Lisp")
     (description "Trivial-features ensures that @code{*FEATURES*} is
 consistent across multiple Common Lisp implementations.")
@@ -4609,7 +4612,7 @@ performance and simplicity in mind.")
        `(("stefil" ,sbcl-hu.dwim.stefil)))
       (inputs
        `(("sbcl-cl-fad" ,sbcl-cl-fad)))
-      (home-page "http://shinmera.github.io/trivial-mimes/")
+      (home-page "https://shinmera.github.io/trivial-mimes/")
       (synopsis "Tiny Common Lisp library to detect mime types in files")
       (description
        "This is a teensy library that provides some functions to determine the
@@ -4753,7 +4756,7 @@ performance and simplicity in mind.")
          ("sbcl-lack-component" ,sbcl-lack-component)
          ("sbcl-alexandria" ,sbcl-alexandria)
          ("sbcl-babel" ,sbcl-babel)))
-      (home-page "http://8arrow.org/ningle/")
+      (home-page "https://8arrow.org/ningle/")
       (synopsis "Super micro framework for Common Lisp")
       (description
        "Ningle is a lightweight web application framework for Common Lisp.")
@@ -9646,7 +9649,7 @@ Common Lisp.  It uses the libuv library as backend.")
       (description
        "This is a standalone promise implementation for Common Lisp.  It is
 the successor to the now-deprecated cl-async-future project.")
-      (home-page "http://orthecreedence.github.io/blackbird/")
+      (home-page "https://orthecreedence.github.io/blackbird/")
       (license license:expat))))
 
 (define-public cl-blackbird
@@ -9681,7 +9684,7 @@ the successor to the now-deprecated cl-async-future project.")
       (description
        "This is futures implementation for Common Lisp.  It plugs in nicely
 to cl-async.")
-      (home-page "http://orthecreedence.github.io/cl-async/future")
+      (home-page "https://orthecreedence.github.io/cl-async/future")
       (license license:expat))))
 
 (define-public cl-async-future
@@ -10598,3 +10601,215 @@ and usefulness, not speed.  Track the progress at
 
 (define-public cl-numcl
   (sbcl-package->cl-source-package sbcl-numcl))
+
+(define-public sbcl-pzmq
+  (let ((commit "7c7390eedc469d033c72dc497984d1536ee75826")
+        (revision "1"))
+    (package
+      (name "sbcl-pzmq")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/orivej/pzmq.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0gmwzf7h90wa7v4wnk49g0hv2mdalljpwhyigxcb967wzv8lqci9"))))
+      (build-system asdf-build-system/sbcl)
+      (native-inputs
+       `(("bordeaux-threads" ,sbcl-bordeaux-threads)
+         ("fiveam" ,sbcl-fiveam)
+         ("let-plus" ,sbcl-let-plus)))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("cffi-grovel" ,sbcl-cffi-grovel)
+         ("zeromq" ,zeromq)))
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (add-after 'unpack 'fix-paths
+                      (lambda* (#:key inputs #:allow-other-keys)
+                        (substitute* "c-api.lisp"
+                          (("\"libzmq")
+                           (string-append "\""
+                                          (assoc-ref inputs "zeromq")
+                                          "/lib/libzmq")))
+                        #t)))))
+      (synopsis "Common Lisp bindings for the ZeroMQ library")
+      (description "This Common Lisp library provides bindings for the ZeroMQ
+lightweight messaging kernel.")
+      (home-page "https://github.com/orivej/pzmq")
+      (license license:unlicense))))
+
+(define-public cl-pzmq
+  (sbcl-package->cl-source-package sbcl-pzmq))
+
+(define-public ecl-pzmq
+  (sbcl-package->ecl-package sbcl-pzmq))
+
+(define-public sbcl-clss
+  (let ((revision "1")
+        (commit "2a8e8615ab55870d4ca01928f3ed3bbeb4e75c8d"))
+    (package
+      (name "sbcl-clss")
+      (version (git-version "0.3.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/Shinmera/clss.git")
+           (commit commit)))
+         (sha256
+          (base32 "0la4dbcda78x29szanylccrsljqrn9d1mhh569sqkyp44ni5fv91"))
+         (file-name (git-file-name name version))))
+      (inputs
+       `(("array-utils" ,sbcl-array-utils)
+         ("plump" ,sbcl-plump)))
+      (build-system asdf-build-system/sbcl)
+      (synopsis "DOM tree searching engine based on CSS selectors")
+      (description "CLSS is a DOM traversal engine based on CSS
+selectors.  It makes use of the Plump-DOM and is used by lQuery.")
+      (home-page "https://github.com/Shinmera/clss")
+      (license license:zlib))))
+
+(define-public cl-clss
+  (sbcl-package->cl-source-package sbcl-clss))
+
+(define-public ecl-clss
+  (sbcl-package->ecl-package sbcl-clss))
+
+(define-public sbcl-lquery
+  (let ((revision "1")
+        (commit "8048111c6b83956daa632e7a3ffbd8c9c203bd8d"))
+    (package
+      (name "sbcl-lquery")
+      (version (git-version "3.2.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/Shinmera/lquery.git")
+           (commit commit)))
+         (sha256
+          (base32 "0520mcpxc2d6fdm8z61arpgd2z38kan7cf06qs373n5r64rakz6w"))
+         (file-name (git-file-name name version))))
+      (native-inputs
+       `(("fiveam" ,sbcl-fiveam)))
+      (inputs
+       `(("array-utils" ,sbcl-array-utils)
+         ("form-fiddle" ,sbcl-form-fiddle)
+         ("plump" ,sbcl-plump)
+         ("clss" ,sbcl-clss)))
+      (build-system asdf-build-system/sbcl)
+      (synopsis "Library to allow jQuery-like HTML/DOM manipulation")
+      (description "@code{lQuery} is a DOM manipulation library written in
+Common Lisp, inspired by and based on the jQuery syntax and
+functions.  It uses Plump and CLSS as DOM and selector engines.  The
+main idea behind lQuery is to provide a simple interface for crawling
+and modifying HTML sites, as well as to allow for an alternative
+approach to templating.")
+      (home-page "https://github.com/Shinmera/lquery")
+      (license license:zlib))))
+
+(define-public cl-lquery
+  (sbcl-package->cl-source-package sbcl-lquery))
+
+(define-public ecl-lquery
+  (sbcl-package->ecl-package sbcl-lquery))
+
+(define-public sbcl-cl-mysql
+  (let ((commit "ab56c279c1815aec6ca0bfe85164ff7e85cfb6f9")
+        (revision "1"))
+    (package
+      (name "sbcl-cl-mysql")
+      (version (git-version "0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/hackinghat/cl-mysql.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0dg5ynx2ww94d0qfwrdrm7plkn43h64hs4iiq9mj2s1s4ixnp3lr"))))
+      (build-system asdf-build-system/sbcl)
+      (native-inputs
+       `(("stefil" ,sbcl-stefil)))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("mariadb-lib" ,mariadb "lib")))
+      (arguments
+       `(#:tests? #f ; TODO: Tests require a running server
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "system.lisp"
+                 (("libmysqlclient_r" all)
+                  (string-append (assoc-ref inputs "mariadb-lib")
+                                 "/lib/"
+                                 all)))
+               #t)))))
+      (synopsis "Common Lisp wrapper for MySQL")
+      (description
+       "@code{cl-mysql} is a Common Lisp implementation of a MySQL wrapper.")
+      (home-page "http://www.hackinghat.com/index.php/cl-mysql")
+      (license license:expat))))
+
+(define-public cl-mysql
+  (sbcl-package->cl-source-package sbcl-cl-mysql))
+
+(define-public sbcl-simple-date
+  (let ((commit "74469b25bbda990ec9b77e0d0eccdba0cd7e721a")
+        (revision "1"))
+    (package
+      (name "sbcl-simple-date")
+      (version (git-version "1.19" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/marijnh/Postmodern.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0im7ymnyxjhn2w74jfg76k5gpr0gl33n31akx33hl28722ljd0hd"))))
+      (build-system asdf-build-system/sbcl)
+      (native-inputs
+       `(("fiveam" ,sbcl-fiveam)))
+      (synopsis "Basic date and time objects for Common Lisp")
+      (description
+       "@code{simple-date} is a very basic implementation of date and time
+objects, used to support storing and retrieving time-related SQL types.")
+      (home-page "https://marijnhaverbeke.nl/postmodern/")
+      (license license:zlib))))
+
+(define-public cl-simple-date
+  (sbcl-package->cl-source-package sbcl-simple-date))
+
+(define-public ecl-simple-date
+  (sbcl-package->ecl-package sbcl-simple-date))
+
+(define-public sbcl-cl-postgres
+  (package
+    (inherit sbcl-simple-date)
+    (name "sbcl-cl-postgres")
+    (native-inputs
+     `(("fiveam" ,sbcl-fiveam)
+       ("simple-date" ,sbcl-simple-date)))
+    (inputs
+     `(("md5" ,sbcl-md5)
+       ("split-sequence" ,sbcl-split-sequence)
+       ("usocket" ,sbcl-usocket)))
+    (arguments
+     `(#:tests? #f)) ; TODO: Break simple-date/postgres-glue circular dependency
+    (synopsis "Common Lisp interface for PostgreSQL")
+    (description
+     "@code{cl-postgres} is a low-level library used for interfacing with
+a PostgreSQL server over a socket.")))
+
+(define-public cl-postgres
+  (sbcl-package->cl-source-package sbcl-cl-postgres))