2022-09-09 14:08:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nng";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "1.6.0-prerelease";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nanomsg";
|
|
|
|
repo = "nng";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "8e1836f57e8bcdb228dd5baadc71dfbf30b544e0";
|
|
|
|
sha256 = "sha256-Q08/Oxv9DLCHp7Hf3NqNa0sHq7qwM6TfGT8gNyiwin8=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja ]
|
|
|
|
++ lib.optionals mbedtlsSupport [ mbedtls ];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = lib.optionals mbedtlsSupport [ mbedtls ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-G Ninja" "-DNNG_ENABLE_TLS=ON" ]
|
|
|
|
++ lib.optionals mbedtlsSupport [ "-DMBEDTLS_ROOT_DIR=${mbedtls}" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://nng.nanomsg.org/";
|
|
|
|
description = "Nanomsg next generation";
|
|
|
|
license = licenses.mit;
|
|
|
|
mainProgram = "nngcat";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ nviets ];
|
|
|
|
};
|
|
|
|
}
|