nixpkgs/pkgs/development/libraries/nng/default.nix
Nathan Viets fb613a967e nng: 1.6.0-prerelease -> 1.6.0
Co-authored-by: kirillrdy <kirillrdy@gmail.com>
2023-11-30 04:08:21 +01:00

30 lines
835 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
stdenv.mkDerivation rec {
pname = "nng";
version = "1.6.0";
src = fetchFromGitHub {
owner = "nanomsg";
repo = "nng";
rev = "v${version}";
hash = "sha256-Kq8QxPU6SiTk0Ev2IJoktSPjVOlAS4/e1PQvw2+e8UA=";
};
nativeBuildInputs = [ cmake ninja ]
++ lib.optionals mbedtlsSupport [ mbedtls ];
buildInputs = lib.optionals 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 ];
};
}