depot/third_party/nixpkgs/pkgs/development/libraries/nng/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

30 lines
835 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
stdenv.mkDerivation rec {
pname = "nng";
version = "1.7.1";
src = fetchFromGitHub {
owner = "nanomsg";
repo = "nng";
rev = "v${version}";
hash = "sha256-6JFmoCELDkvDvTNy2ET4igFCc/J9wraN6Cl1lq9So1Q=";
};
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 ];
};
}