1 { lib, stdenv, fetchFromGitHub
2 , cmake, protobuf, protobufc
6 stdenv.mkDerivation rec {
10 src = fetchFromGitHub {
14 sha256 = "sha256-Mbmd1bhFnc4feC0bnOa5mD15DxvY4Sgftx3Ep/7Cdp4=";
17 nativeBuildInputs = [ cmake ];
18 buildInputs = [ libsodium openssl protobuf protobufc ];
20 separateDebugInfo = true;
21 outputs = [ "out" "dev" ];
23 # https://github.com/nats-io/nats.c/issues/542
25 substituteInPlace src/libnats.pc.in \
26 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
30 description = "C API for the NATS messaging system";
31 homepage = "https://github.com/nats-io/nats.c";
32 license = licenses.asl20;
33 platforms = platforms.unix;
34 maintainers = with maintainers; [ thoughtpolice ];