Subject: [PATCH 1/2] gnu: Add bknr-datastore

From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 29 Apr 2021 18:36:25 +0000

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From 4540f61d5bb90f00a9f4e7dc2ad3180fc30f638f Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 29 Apr 2021 19:32:04 +0100
Subject: [PATCH 1/2] gnu: Add bknr-datastore

* gnu/packages/lisp-xyz.scm (sbcl-bknr-datastore, cl-bknr-datastore):
  New variables
---
 gnu/packages/lisp-xyz.scm | 62 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 1ee712e37f..bd3210d8c1 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -16284,3 +16284,65 @@ color spaces, which supports many color models.")
 
 (define-public cl-dufy
   (sbcl-package->cl-source-package sbcl-dufy))
+
+(define-public sbcl-bknr-datastore
+  (let ((commit "c98d44f47cc88d19ff91ca3eefbd9719a8ace022")
+        (revision "1"))
+    (package
+      (name "sbcl-bknr-datastore")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; Some other similar repository
+               ;; https://github.com/sharplispers/bknr.datastore
+               (url "https://github.com/hanshuebner/bknr-datastore")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1vi3w65fnczqvswkm381n6liqfrzjrg40y698qvj7skj28dm5vrm"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:asd-systems
+         '("bknr.datastore"
+           "bknr.impex"
+           "bknr.indices"
+           "bknr.skip-list"
+           "bknr.utils"
+           "bknr.xml")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'chdir
+             (lambda _
+               (chdir "src")
+               #t)))))
+      (native-inputs
+       `(("unit-test" ,sbcl-unit-test)))
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("bordeaux-threads" ,sbcl-bordeaux-threads)
+         ("closer-mop" ,sbcl-closer-mop)
+         ("cl-interpol" ,sbcl-cl-interpol)
+         ("cl-ppcre" ,sbcl-cl-ppcre)
+         ("cl-store" ,sbcl-cl-store)
+         ("cxml" ,sbcl-cxml)
+         ("flexi-streams" ,sbcl-flexi-streams)
+         ("md5" ,sbcl-md5)
+         ("trivial-utf-8" ,sbcl-trivial-utf-8)
+         ("yason" ,sbcl-yason)))
+      (home-page "https://github.com/hanshuebner/bknr-datastore")
+      (synopsis "MOP-Based in-memory database with transactions for Common Lisp")
+      (description
+       "BKNR.DATASTORE is an in-memory CLOS based data store.  This package
+produces 6 systems: BKNR.DATASTORE BKNR.IMPEX BKNR.INDICES BKNR.SKIP-LIST
+BKNR.UTILS BKNR.XML")
+      (license license:bsd-2))))
+
+;; NOTE: (Sharlatan-20210429T191426+0100):
+;; There is no port for ECL in upstream yet
+;; (define-public ecl-bknr-datastore
+;;   (sbcl-package->ecl-package sbcl-bknr-datastore))
+
+(define-public cl-bknr-datastore
+  (sbcl-package->cl-source-package sbcl-bknr-datastore))
-- 
2.31.1