depot/third_party/nixpkgs/pkgs/development/libraries/redis-plus-plus/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

38 lines
1,020 B
Nix

{ 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";
version = "1.3.5";
src = fetchFromGitHub {
owner = "sewenew";
repo = "redis-plus-plus";
rev = version;
sha256 = "sha256-5tjadh3Ku7lrJn4tbi8TjTH6N0+QB2ER9xuO51cK/LU=";
};
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ hiredis ];
cmakeFlags = [
"-DREDIS_PLUS_PLUS_BUILD_TEST=OFF"
] ++ lib.optional (!enableShared) [
"-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF"
] ++ lib.optional (!enableStatic) [
"-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;
platforms = platforms.unix;
maintainers = with maintainers; [ wheelsandmetal ];
};
}