diff --git a/pkgs/by-name/re/redis/package.nix b/pkgs/by-name/re/redis/package.nix index e60ba5c6caff..435c8b1afff7 100644 --- a/pkgs/by-name/re/redis/package.nix +++ b/pkgs/by-name/re/redis/package.nix @@ -14,7 +14,8 @@ systemd, openssl, python3, - + nix-update-script, + versionCheckHook, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, tlsSupport ? true, # Using system jemalloc fixes cross-compilation and various setups. @@ -25,13 +26,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "redis"; - version = "7.2.7"; + version = "8.0.2"; src = fetchFromGitHub { owner = "redis"; repo = "redis"; - rev = finalAttrs.version; - hash = "sha256-WZ89BUm3zz6n0dZKyODHCyMGExbqaPJJ1qxLvJKUSDI="; + tag = finalAttrs.version; + hash = "sha256-BZJEBp3M7Gw/6/fZjfaMfU777dFmMzAS4bDI06ErkSc="; }; patches = lib.optional useSystemJemalloc (fetchpatch2 { @@ -65,7 +66,6 @@ stdenv.mkDerivation (finalAttrs: { hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]); env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isFreeBSD "-lexecinfo"; # darwin currently lacks a pure `pgrep` which is extensively used here @@ -81,12 +81,13 @@ 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 'foreach mdl {no yes}' 'foreach mdl {}' + --replace-fail 'foreach sdl {disabled swapdb} {' 'foreach sdl {} {' substituteInPlace tests/support/server.tcl \ - --replace 'exec /usr/bin/env' 'exec env' + --replace-fail 'exec /usr/bin/env' 'exec env' - sed -i '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \ + sed -i -e '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \ + -e '/^proc wait_for_ofs_sync/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \ tests/support/util.tcl ./runtest \ @@ -100,15 +101,23 @@ stdenv.mkDerivation (finalAttrs: { runHook postCheck ''; - passthru.tests.redis = nixosTests.redis; - passthru.serverBin = "redis-server"; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = "${placeholder "out"}/bin/redis-server"; + versionCheckProgramArg = "--version"; + + passthru = { + tests.redis = nixosTests.redis; + serverBin = "redis-server"; + updateScript = nix-update-script { }; + }; meta = { homepage = "https://redis.io"; description = "Open source, advanced key-value store"; - license = lib.licenses.bsd3; + license = lib.licenses.agpl3Only; platforms = lib.platforms.all; - changelog = "https://github.com/redis/redis/raw/${finalAttrs.version}/00-RELEASENOTES"; + changelog = "https://github.com/redis/redis/releases/tag/${finalAttrs.version}"; maintainers = with lib.maintainers; [ berdario globin