redis: 8.2.3 -> 8.6.3, adopt (#508449)

This commit is contained in:
Sandro
2026-05-06 23:35:52 +00:00
committed by GitHub
+20 -4
View File
@@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
fetchpatch2,
apple-sdk,
lua,
jemalloc,
pkg-config,
@@ -26,13 +27,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "redis";
version = "8.2.3";
version = "8.6.3";
src = fetchFromGitHub {
owner = "redis";
repo = "redis";
tag = finalAttrs.version;
hash = "sha256-PsTAo92Vz+LNxOsbI9VVnx+rHFm67a3bBMeDcLdhXFA=";
hash = "sha256-Zg2bghU4uExwI1SWplYIGCeGRhgRxdh3Oy9k1DZPado=";
};
patches = lib.optional useSystemJemalloc (fetchpatch2 {
@@ -40,6 +41,20 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-A9qp+PWQRuNy/xmv9KLM7/XAyL7Tzkyn0scpVCGngcc=";
});
postPatch = ''
# Using `yes` seems to be an invalid value and causes the test to fail. See
# https://github.com/redis/redis/blob/bd3b38d41070b478c58bc8b72d2af89cbccd1a40/redis.conf#L674-L688
substituteInPlace tests/integration/replication.tcl \
--replace-fail 'repl-diskless-load yes' ' repl-diskless-load on-empty-db'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# The path `/Library/...` isn't available in the build sandbox. The package `apple-sdk`
# can provide that functionality for us.
substituteInPlace src/modules/Makefile modules/vector-sets/Makefile tests/modules/Makefile \
--replace-fail '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib' \
'${apple-sdk.sdkroot}/usr/lib'
'';
nativeBuildInputs = [
pkg-config
which
@@ -82,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
# disable test "Connect multiple replicas at the same time": even
# upstream find this test too timing-sensitive
substituteInPlace tests/integration/replication.tcl \
--replace-fail 'foreach sdl {disabled swapdb} {' 'foreach sdl {} {'
--replace-fail 'foreach sdl {disabled swapdb flushdb} {' 'foreach sdl {} {'
substituteInPlace tests/support/server.tcl \
--replace-fail 'exec /usr/bin/env' 'exec env'
@@ -105,6 +120,7 @@ stdenv.mkDerivation (finalAttrs: {
--skipunit integration/aof-multi-part \
--skipunit integration/failover \
--skipunit integration/replication-rdbchannel \
--skipunit unit/cluster/atomic-slot-migration \
--skiptest "Check MEMORY USAGE for embedded key strings with jemalloc"
# ^ breaks due to unexpected and varying address space sizes that jemalloc gets built with
@@ -127,7 +143,7 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.agpl3Only;
platforms = lib.platforms.all;
changelog = "https://github.com/redis/redis/releases/tag/${finalAttrs.version}";
maintainers = [ ];
maintainers = with lib.maintainers; [ hythera ];
mainProgram = "redis-cli";
};
})