depot/third_party/nixpkgs/pkgs/servers/mqtt/nanomq/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

36 lines
854 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtls, sqlite }:
stdenv.mkDerivation rec {
pname = "nanomq";
version = "0.13.0";
src = fetchFromGitHub {
owner = "emqx";
repo = "nanomq";
rev = version;
hash = "sha256-fxV/X34yohh/bxOsnoVngBKiwqABQDthLgZxvomC0+g=";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "DESTINATION /etc" "DESTINATION $out/etc"
'';
nativeBuildInputs = [ cmake ninja ];
buildInputs = [ mbedtls sqlite ];
cmakeFlags = [
"-DNNG_ENABLE_TLS=ON"
"-DNNG_ENABLE_SQLITE=ON"
];
meta = with lib; {
description = "An ultra-lightweight and blazing-fast MQTT broker for IoT edge";
homepage = "https://nanomq.io/";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}