Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ fetchFromGitHub 2, lib 3, stdenv 4, cmake 5, zlib 6, libuv 7, openssl 8, pkg-config 9, examples ? false 10}: stdenv.mkDerivation rec { 11 pname = "cassandra-cpp-driver"; 12 version = "2.17.0"; 13 14 src = fetchFromGitHub { 15 owner = "datastax"; 16 repo = "cpp-driver"; 17 rev = "refs/tags/${version}"; 18 sha256 = "sha256-sLKLaBFnGq3NIQV7Tz5aAfsL+LeLw8XDbcJt//H468k="; 19 }; 20 21 nativeBuildInputs = [ cmake pkg-config ]; 22 buildInputs = [ zlib libuv openssl.dev ]; 23 24 cmakeFlags = (lib.attrsets.mapAttrsToList 25 (name: value: "-DCASS_BUILD_${name}:BOOL=${if value then "ON" else "OFF"}") { 26 EXAMPLES = examples; 27 }) ++ [ "-DLIBUV_INCLUDE_DIR=${lib.getDev libuv}/include" ]; 28 29 meta = with lib; { 30 description = "DataStax CPP cassandra driver"; 31 longDescription = '' 32 A modern, feature-rich and highly tunable C/C++ client 33 library for Apache Cassandra 2.1+ using exclusively Cassandras 34 binary protocol and Cassandra Query Language v3. 35 ''; 36 license = with licenses; [ asl20 ]; 37 platforms = platforms.x86_64; 38 homepage = "https://docs.datastax.com/en/developer/cpp-driver/"; 39 maintainers = [ maintainers.npatsakula ]; 40 }; 41}