2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, hiredis
|
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
|
|
|
|
|
|
|
# You must build at one type of library
|
|
|
|
assert enableShared || enableStatic;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "redis-plus-plus";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.3.11";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sewenew";
|
|
|
|
repo = "redis-plus-plus";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-ZALnF2h+9LSeh1OA33fdVyT0PYcGen5j+qsufBv5t5I=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Fix-pkg-config-paths.patch
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
propagatedBuildInputs = [ hiredis ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DREDIS_PLUS_PLUS_BUILD_TEST=OFF"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (!enableShared) [
|
2022-04-27 09:35:20 +00:00
|
|
|
"-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (!enableStatic) [
|
2022-04-27 09:35:20 +00:00
|
|
|
"-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sewenew/redis-plus-plus";
|
|
|
|
description = "Redis client written in C++";
|
|
|
|
license = licenses.asl20;
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.unix;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ wheelsandmetal ];
|
|
|
|
};
|
|
|
|
}
|