diff mbox series

[bug#64418,1/1] gnu: Add sbcl-postgres+local-time.

Message ID 0e1d2edc076e7fa93a5becfc11bade4bbaa15f92.1688298316.git.roman@burningswell.com
State New
Headers show
Series Common Lisp local-time Postgres extension | expand

Commit Message

Roman Scherer July 2, 2023, noon UTC
* gnu/packages/lisp-xyz.scm (sbcl-postgres+local-time): New variable.
---
 gnu/packages/lisp-xyz.scm | 54 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index d578c46b90..bd1efc2b83 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -6875,7 +6875,7 @@  (define-public ecl-cl-isaac
 
 (define-public sbcl-local-time
   (let ((commit "40169fe26d9639f3d9560ec0255789bf00b30036")
-        (revision "3"))
+        (revision "4"))
     (package
      (name "sbcl-local-time")
      (version (git-version "1.0.6" revision commit))
@@ -6889,6 +6889,14 @@  (define-public sbcl-local-time
        (sha256
         (base32 "1dbp33zmkqzzshmf5k76pxqgli285wvy0p0dhcz816fdikpwn2jg"))))
      (build-system asdf-build-system/sbcl)
+     (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           ;; Delete the extension provided by sbcl-cl-postgres+local-time
+           (add-after 'unpack 'delete-local-time
+             (lambda _
+               (delete-file "cl-postgres+local-time.asd")
+               (delete-file "src/integration/cl-postgres.lisp"))))))
      (native-inputs
       (list sbcl-hu.dwim.stefil))
      (home-page "https://common-lisp.net/project/local-time/")
@@ -6905,6 +6913,50 @@  (define-public cl-local-time
 (define-public ecl-local-time
   (sbcl-package->ecl-package sbcl-local-time))
 
+(define-public sbcl-postgres+local-time
+  (let ((commit "40169fe26d9639f3d9560ec0255789bf00b30036")
+        (revision "3"))
+    (package
+      (name "sbcl-postgres+local-time")
+      (version (git-version "1.0.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/dlowe-net/local-time")
+               (commit commit)))
+         (file-name (git-file-name "cl-postgres+local-time" version))
+         (sha256
+          (base32 "1dbp33zmkqzzshmf5k76pxqgli285wvy0p0dhcz816fdikpwn2jg"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs (list sbcl-local-time sbcl-postmodern))
+      (native-inputs
+       (list sbcl-hu.dwim.stefil))
+      (arguments
+       `(#:asd-systems '("cl-postgres+local-time")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'delete-local-time
+             (lambda _
+               (delete-file "local-time.asd")
+               (delete-file "src/package.lisp")
+               (delete-file "src/local-time.lisp")
+               (delete-file-recursively "doc")
+               (delete-file-recursively "test")
+               (delete-file-recursively "zoneinfo"))))))
+      (home-page "https://common-lisp.net/project/local-time/")
+      (synopsis "Integration between cl-postgres and local-time")
+      (description
+       "This package provides the LOCAL-TIME extensions for the cl-postgres
+ASDF system of postmodern.")
+      (license license:expat))))
+
+(define-public cl-postgres+local-time
+  (sbcl-package->cl-source-package sbcl-postgres+local-time))
+
+(define-public ecl-postgres+local-time
+  (sbcl-package->ecl-package sbcl-postgres+local-time))
+
 (define-public sbcl-chronicity
   (package
     (name "sbcl-chronicity")