GNU bug report logs - #77899
[PATCH] gnu: Add valkey.

Previous Next

Package: guix-patches;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Fri, 18 Apr 2025 14:03:06 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

Full log


Message #8 received at 77899 <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: 77899 <at> debbugs.gnu.org
Cc: Zhu Zihao <all_but_last <at> 163.com>
Subject: [PATCH] gnu: Add valkey.
Date: Fri, 18 Apr 2025 22:12:17 +0800
* gnu/packages/database.scm(valkey): New variable.

Change-Id: Ia1899ee41ecdd372d659c02940cc7ca9fbc011d8
---
 gnu/packages/databases.scm | 74 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 32973d3896..16593af4f7 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,7 +54,7 @@
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
-;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2022, 2025 Zhu Zihao <all_but_last <at> 163.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
 ;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;; Copyright © 2022 Thomas Albers Raviola <thomas <at> thomaslabs.org>
@@ -2881,6 +2881,78 @@ (define-public redis
     (properties `((lint-hidden-cve . ("CVE-2022-3647" "CVE-2022-33105"))))
     (license license:bsd-3)))
 
+(define-public valkey
+  (package
+    (name "valkey")
+    (version "8.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/valkey-io/valkey")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bd4jhh2hp75996mz62p6l31c0zkr3i9cw3v6va6j94srn9y8v1m"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Delete bundled jemalloc, as the package will use the libc one
+        #~(begin (delete-file-recursively "deps/jemalloc")))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:modules '((ice-9 ftw)
+                  (guix build utils)
+                  (guix build gnu-build-system))
+      #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+                           "MALLOC=libc"
+                           (string-append "PREFIX=" #$output))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-after 'unpack 'patch-paths
+            (lambda _
+              (substitute* "runtest"
+                (("^TCLSH=.*")
+                 (string-append "TCLSH=" (which "tclsh"))))
+              (substitute* "tests/support/server.tcl"
+                (("/usr/bin/env")
+                 (which "env")))))
+          (add-after 'unpack 'adjust-tests
+            (lambda _
+              ;; Disable failing tests.
+              ;; Valkey search test directories for tests.
+              (with-directory-excursion "tests"
+                ;; The AOF tests cause the test suite to hang waiting for a
+                ;; "background AOF rewrite to finish", perhaps because dead
+                ;; processes persist as zombies in the build environment.
+                (delete-file "unit/aofrw.tcl")
+                (delete-file "integration/aof-multi-part.tcl")
+
+                ;; The OOM score tests try to raise the current OOM score, but
+                ;; our build environment already sets it for all children to
+                ;; the highest possible one (1000).  We can't lower it because
+                ;; we don't have CAP_SYS_RESOURCE.
+                (delete-file "unit/oom-score-adj.tcl")
+
+                (delete-file "integration/failover.tcl")
+
+                (with-directory-excursion "integration"
+                  (for-each
+                   delete-file
+                   (scandir "." (lambda (filename)
+                                  (string-prefix? "replication" filename))))
+                  (delete-file "dual-channel-replication.tcl")
+                  (delete-file "cross-version-replication.tcl"))))))))
+    (native-inputs (list pkg-config procps tcl which))
+    (home-page "https://valkey.io/")
+    (synopsis "Free high-performance key/value datastore")
+    (description
+     "Valkey is an free high-performance key/value datastore that supports a
+variety of workloads such as caching, message queues, and can act as a primary
+database.")
+    (license license:bsd-3)))
+
 (define-public hiredis
   (package
     (name "hiredis")

base-commit: 54cc9c96ec0877b2afa24871c3acd8af27b0d500
-- 
2.49.0





This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.