1 { lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
3 stdenv.mkDerivation rec {
5 version = "1.6.0-prerelease";
7 src = fetchFromGitHub {
10 rev = "a54820ff0e1b74554c7f649e8386ee8c4ecd98f5";
11 sha256 = "sha256-4Vj8nf3c45Y8LJ79YUOrNAAGMmfygdPtAJrs+JuFiUM=";
14 nativeBuildInputs = [ cmake ninja ]
15 ++ lib.optionals mbedtlsSupport [ mbedtls ];
17 buildInputs = lib.optionals mbedtlsSupport [ mbedtls ];
19 cmakeFlags = [ "-G Ninja" "-DNNG_ENABLE_TLS=ON" ]
20 ++ lib.optionals mbedtlsSupport [ "-DMBEDTLS_ROOT_DIR=${mbedtls}" ];
23 homepage = "https://nng.nanomsg.org/";
24 description = "Nanomsg next generation";
25 license = licenses.mit;
26 mainProgram = "nngcat";
27 platforms = platforms.unix;
28 maintainers = with maintainers; [ nviets ];