nixpkgs/pkgs/development/libraries/libnats-c/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
938 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, cmake, protobuf, protobufc
, libsodium, openssl
}:
stdenv.mkDerivation rec {
pname = "libnats";
2023-03-13 00:24:58 +00:00
version = "3.6.1";
src = fetchFromGitHub {
owner = "nats-io";
repo = "nats.c";
2021-12-15 18:13:28 +00:00
rev = "v${version}";
2023-03-13 00:24:58 +00:00
sha256 = "sha256-zqtPBxjTJ+/XxVpfVpyFIwvlj5xCcnTrUv2RGzP8UQc=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libsodium openssl protobuf protobufc ];
separateDebugInfo = true;
outputs = [ "out" "dev" ];
2022-05-17 12:31:33 +00:00
# https://github.com/nats-io/nats.c/issues/542
postPatch = ''
substituteInPlace src/libnats.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "C API for the NATS messaging system";
homepage = "https://github.com/nats-io/nats.c";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ];
};
}