571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
37 lines
938 B
Nix
37 lines
938 B
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, cmake, protobuf, protobufc
|
|
, libsodium, openssl
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libnats";
|
|
version = "3.8.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nats-io";
|
|
repo = "nats.c";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Tn88RRigL6C36AcFhUlLbLyqcqbBR8z6PKAQH4w/mYY=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|