{ stdenv, fetchFromGitHub, cmake, pkgconfig, libevent, openssl}:
stdenv.mkDerivation rec {
name = "libcouchbase-${version}";
version = "2.8.6";
src = fetchFromGitHub {
owner = "couchbase";
repo = "libcouchbase";
rev = version;
sha256 = "1in0fdl5mgzhwmd8kvniqkizi7isf2g2gvbknfbbdmxkki7a8p95";
};
cmakeFlags = "-DLCB_NO_MOCK=ON";
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libevent openssl ];
doCheck = true;
checkPhase = "ctest";
meta = with stdenv.lib; {
description = "C client library for Couchbase";
homepage = https://github.com/couchbase/libcouchbase;
license = licenses.asl20;
platforms = platforms.unix;
}