depot/third_party/nixpkgs/pkgs/servers/mqtt/nanomq/default.nix
Default email 7d542a9f98 Project import generated by Copybara.
GitOrigin-RevId: b72b8b94cf0c012b0252a9100a636cad69696666
2022-12-02 08:20:57 +00:00

36 lines
875 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtls, sqlite }:
stdenv.mkDerivation (finalAttrs: {
pname = "nanomq";
version = "0.13.6";
src = fetchFromGitHub {
owner = "emqx";
repo = "nanomq";
rev = finalAttrs.version;
hash = "sha256-CZxUDuuXuC2MqiJZiJ/JwlORou6OXeuSieLG4LAnhuA=";
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;
};
})