forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpp-redis: init at 4.3.1 (NixOS#275738)
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
} |