Subject: [bug#58432] [PATCH] gnu: Add hiredis

From: Thomas Albers <[email-masked]>
Date: Tue, 11 Oct 2022 15:08:34 +0200

* gnu/packages/databases.scm (hiredis): New variable.
---
 gnu/packages/databases.scm | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index cf07832df7..8523c084e4 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -58,6 +58,7 @@
 ;;; Copyright © 2022 Zhu Zihao <[email-masked]>
 ;;; Copyright © 2021 Brice Waegeneire <[email-masked]>
 ;;; Copyright © 2022 muradm <[email-masked]>
+;;; Copyright © 2022 Thomas Albers Raviola <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2494,6 +2495,31 @@ (define-public redis
     (home-page "https://redis.io/")
     (license license:bsd-3)))

+(define-public hiredis
+  (package
+    (name "hiredis")
+    (version "1.0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/redis/hiredis")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a55zk3qrw9yl27i87h3brg2hskmmzbfda77dhq9a4if7y70xnfb"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     ;; needed for testing
+     (list redis))
+    (synopsis "Minimalistic C client library for the Redis database")
+    (description "This package provides a library for sending commands and
+receiving replies to and from a Redis server.  It comes with a synchronous
+API, asynchronous API and reply parsing API.  Only the binary-safe Redis
+protocol is supported.")
+    (home-page "https://github.com/redis/hiredis")
+    (license license:bsd-3)))
+
 (define-public ruby-redis
   (package
     (name "ruby-redis")
--
2.37.3