2023-05-24 13:37:59 +00:00
|
|
|
|
{ fetchFromGitHub
|
|
|
|
|
, lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, cmake
|
|
|
|
|
, zlib
|
|
|
|
|
, libuv
|
|
|
|
|
, openssl
|
|
|
|
|
, pkg-config
|
|
|
|
|
, examples ? false
|
2022-06-16 17:23:12 +00:00
|
|
|
|
}: stdenv.mkDerivation rec {
|
|
|
|
|
pname = "cassandra-cpp-driver";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
version = "2.17.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "datastax";
|
|
|
|
|
repo = "cpp-driver";
|
|
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
sha256 = "sha256-GuvmKHJknudyn7ahrn/8+kKUA4NW5UjCfkYoX3aTE+Q=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
buildInputs = [ zlib libuv openssl.dev ];
|
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
cmakeFlags = (lib.attrsets.mapAttrsToList
|
2022-06-16 17:23:12 +00:00
|
|
|
|
(name: value: "-DCASS_BUILD_${name}:BOOL=${if value then "ON" else "OFF"}") {
|
|
|
|
|
EXAMPLES = examples;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
}) ++ [ "-DLIBUV_INCLUDE_DIR=${lib.getDev libuv}/include" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "DataStax CPP cassandra driver";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
A modern, feature-rich and highly tunable C/C++ client
|
|
|
|
|
library for Apache Cassandra 2.1+ using exclusively Cassandra’s
|
|
|
|
|
binary protocol and Cassandra Query Language v3.
|
|
|
|
|
'';
|
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
|
platforms = platforms.x86_64;
|
|
|
|
|
homepage = "https://docs.datastax.com/en/developer/cpp-driver/";
|
|
|
|
|
maintainers = [ maintainers.npatsakula ];
|
|
|
|
|
};
|
|
|
|
|
}
|