Skip to content

Commit

Permalink
cpp-redis: init at 4.3.1 (NixOS#275738)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 20, 2024
2 parents e4e994e + d5b2047 commit 687eaa3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/by-name/cp/cpp-redis/01-fix-sleep_for.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/sources/core/client.cpp b/sources/core/client.cpp
index 7ea20e2..c5d2c40 100644
--- a/sources/core/client.cpp
+++ b/sources/core/client.cpp
@@ -23,6 +23,7 @@
#include <cpp_redis/core/client.hpp>
#include <cpp_redis/misc/error.hpp>
#include <cpp_redis/misc/macro.hpp>
+#include <thread>

namespace cpp_redis {

38 changes: 38 additions & 0 deletions pkgs/by-name/cp/cpp-redis/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
}:

stdenv.mkDerivation rec {
pname = "cpp-redis";
version = "4.3.1";

src = fetchFromGitHub {
owner = "cpp-redis";
repo = "cpp_redis";
rev = version;
hash = "sha256-dLAnxgldylWWKO3WIyx+F7ylOpRH+0nD7NZjWSOxuwQ=";
fetchSubmodules = true;
};

nativeBuildInputs = [
cmake
pkg-config
];
CFLAGS = "-D_GLIBCXX_USE_NANOSLEEP";
patches = [
./01-fix-sleep_for.patch
];

meta = with lib; {
description = "C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform";
homepage = "https://github.com/cpp-redis/cpp_redis";
changelog = "https://github.com/cpp-redis/cpp_redis/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ poelzi ];
platforms = platforms.all;
};
}

0 comments on commit 687eaa3

Please sign in to comment.