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";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sewenew";
|
|
|
|
repo = "redis-plus-plus";
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-QCNN85syxw2EGPdyTV3bL0txcHl7t2YhsKwK9lgnexY=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|