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

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

37 lines
875 B
Nix
Raw Normal View History

2022-10-27 10:50:32 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtls, sqlite }:
2022-11-24 15:55:47 +00:00
stdenv.mkDerivation (finalAttrs: {
2022-10-27 10:50:32 +00:00
pname = "nanomq";
2022-12-17 20:06:46 +00:00
version = "0.14.8";
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;
2022-12-17 20:06:46 +00:00
hash = "sha256-rWLsH01XHtN/UlyOiMFI2UECuxodCkCVR/L72HIfNtY=";
2022-10-27 10:50:32 +00:00
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;
};
2022-11-24 15:55:47 +00:00
})