Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
965 B
Nix
51 lines
965 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
protobuf,
|
|
protobufc,
|
|
libsodium,
|
|
openssl,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libnats";
|
|
version = "3.10.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nats-io";
|
|
repo = "nats.c";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-hPudV1d+6QkHJzs7Mk47v8LVBfR3UTES/UyhdtMkNJA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
libsodium
|
|
openssl
|
|
protobuf
|
|
protobufc
|
|
];
|
|
|
|
separateDebugInfo = true;
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
# 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 ];
|
|
};
|
|
}
|