summary refs log tree commit diff
path: root/gnu/packages/cluster.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/cluster.scm')
-rw-r--r--gnu/packages/cluster.scm45
1 files changed, 43 insertions, 2 deletions
diff --git a/gnu/packages/cluster.scm b/gnu/packages/cluster.scm
index 01996591c7..e643cc58f9 100644
--- a/gnu/packages/cluster.scm
+++ b/gnu/packages/cluster.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Dion Mendel <guix@dm9.info>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls))
 
@@ -186,7 +188,7 @@ independently or together to provide resilient infrastructures.")
 (define-public libraft
   (package
     (name "libraft")
-    (version "0.9.11")
+    (version "0.10.1")
     (home-page "https://github.com/canonical/raft")
     (source (origin
               (method git-fetch)
@@ -195,7 +197,7 @@ independently or together to provide resilient infrastructures.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "00rsq4z9nykmf7r5rlpv1y6bvckcmg3zv57vh1h681y5pij6cch1"))))
+                "18idj53vnl5fx1ja1zlp8kiwmdxgwjxsi88rdql0pbh0484b92a3"))))
     (arguments '(#:configure-flags '("--enable-uv")
                  #:phases
                  (modify-phases %standard-phases
@@ -220,3 +222,42 @@ that, a pluggable interface defines the I/O implementation for networking
 (send/receive RPC messages) and disk persistence (store log entries and
 snapshots).")
     (license license:asl2.0)))
+
+(define-public libdqlite
+  (package
+    (name "libdqlite")
+    (version "1.7.0")
+    (home-page "https://github.com/canonical/dqlite")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "15cg8yl3n7lcg0qyg0byciz8v6y200ghmzzkwpdzggy3m6c168wl"))))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "Makefile.am"
+               ;; Test client/query sometimes fails.
+               ;; The actual tested asserts succeed, but there appears to be a
+               ;; race condition when tearing down the test server.
+               ((".*test_client.c.*") "")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libraft" ,libraft)
+       ("libuv" ,libuv)))
+    (propagated-inputs
+     `(("sqlite" ,sqlite)))  ; dqlite.h includes sqlite3.h
+    (build-system gnu-build-system)
+    (synopsis "Distributed SQLite")
+    (description "dqlite is a C library that implements an embeddable and replicated
+SQL database engine with high-availability and automatic failover.")
+    (license license:lgpl3)))