nixpkgs/pkgs/servers/mqtt/nanomq/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Nix
Raw Normal View History

2023-03-17 18:20:31 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config
2023-02-18 16:02:33 +00:00
, cyclonedds, libmysqlclient, mariadb, mbedtls, sqlite, zeromq
}:
2022-10-27 10:50:32 +00:00
2022-11-24 15:55:47 +00:00
stdenv.mkDerivation (finalAttrs: {
2022-10-27 10:50:32 +00:00
pname = "nanomq";
2023-03-17 18:20:31 +00:00
version = "0.16.3";
2022-10-27 10:50:32 +00:00
src = fetchFromGitHub {
owner = "emqx";
repo = "nanomq";
2022-11-24 15:55:47 +00:00
rev = finalAttrs.version;
2023-03-17 18:20:31 +00:00
hash = "sha256-9w4afVxuJbYrkagpAe1diftDnjrRjunyhJdJ0BZq3K0=";
2022-10-27 10:50:32 +00:00
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "DESTINATION /etc" "DESTINATION $out/etc"
'';
2023-02-18 16:02:33 +00:00
nativeBuildInputs = [ cmake ninja pkg-config ];
2022-10-27 10:50:32 +00:00
2023-02-18 16:02:33 +00:00
buildInputs = [ cyclonedds libmysqlclient mariadb mbedtls sqlite zeromq ];
2022-10-27 10:50:32 +00:00
cmakeFlags = [
2023-02-18 16:02:33 +00:00
"-DBUILD_BENCH=ON"
"-DBUILD_DDS_PROXY=ON"
2023-01-14 22:10:15 +00:00
"-DBUILD_NANOMQ_CLI=ON"
2023-02-18 16:02:33 +00:00
"-DBUILD_ZMQ_GATEWAY=ON"
"-DENABLE_RULE_ENGINE=ON"
2022-10-27 10:50:32 +00:00
"-DNNG_ENABLE_SQLITE=ON"
2023-02-18 16:02:33 +00:00
"-DNNG_ENABLE_TLS=ON"
2022-10-27 10:50:32 +00:00
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-return-type";
2023-02-18 16:02:33 +00:00
2022-10-27 10:50:32 +00:00
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;
};
2022-11-24 15:55:47 +00:00
})