{ stdenv, fetchFromGitHub, cmake, pkgconfig, libevent, openssl}:
stdenv.mkDerivation rec {
name = "libcouchbase-${version}";
version = "2.8.7";
src = fetchFromGitHub {
owner = "couchbase";
repo = "libcouchbase";
rev = version;
sha256 = "1hx66dlbb3sc3xaj6nsav4rp7qghl9zyv796kxj1sammw9wp98b1";
};
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;
}