5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
30 lines
835 B
Nix
30 lines
835 B
Nix
{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nng";
|
|
version = "1.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nanomsg";
|
|
repo = "nng";
|
|
rev = "v${version}";
|
|
hash = "sha256-E2uosZrmxO3fqwlLuu5e36P70iGj5xUlvhEb+1aSvOA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ninja ]
|
|
++ lib.optionals mbedtlsSupport [ mbedtls ];
|
|
|
|
buildInputs = lib.optionals mbedtlsSupport [ mbedtls ];
|
|
|
|
cmakeFlags = [ "-G Ninja" ]
|
|
++ lib.optionals mbedtlsSupport [ "-DMBEDTLS_ROOT_DIR=${mbedtls}" "-DNNG_ENABLE_TLS=ON" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://nng.nanomsg.org/";
|
|
description = "Nanomsg next generation";
|
|
license = licenses.mit;
|
|
mainProgram = "nngcat";
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ nviets ];
|
|
};
|
|
}
|