Unverified Commit 687eaa3b authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

cpp-redis: init at 4.3.1 (#275738)

parents e4e994e3 d5b20477
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
{
  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;
  };
}