b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
30 lines
836 B
Nix
30 lines
836 B
Nix
{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nng";
|
|
version = "1.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nanomsg";
|
|
repo = "nng";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-qbjMLpPk5FxH710Mf8AIraY0mERbaxVVhTT94W0EV+k=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ninja ]
|
|
++ lib.optionals mbedtlsSupport [ mbedtls ];
|
|
|
|
buildInputs = lib.optional mbedtlsSupport [ mbedtls ];
|
|
|
|
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 ];
|
|
};
|
|
}
|