14 withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
21 # Mosquitto needs external poll enabled in libwebsockets.
23 (libwebsockets.override {
24 withExternalPoll = true;
27 # Avoid bug in firefox preventing websockets being created over http/2 connections
28 # https://github.com/eclipse/mosquitto/issues/1211#issuecomment-958137569
29 cmakeFlags = old.cmakeFlags ++ [ "-DLWS_WITH_HTTP2=OFF" ];
33 stdenv.mkDerivation rec {
37 src = fetchFromGitHub {
41 hash = "sha256-oZo6J6mxMC05jJ8RXIunOMB3kptA6FElchKlg4qmuQ8=";
45 for f in html manpage ; do
46 substituteInPlace man/$f.xsl \
47 --replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl
71 ] ++ lib.optional withSystemd systemd;
74 (lib.cmakeBool "WITH_BUNDLED_DEPS" false)
75 (lib.cmakeBool "WITH_WEBSOCKETS" true)
76 (lib.cmakeBool "WITH_SYSTEMD" withSystemd)
80 sed -i "s|^prefix=.*|prefix=$lib|g" $dev/lib/pkgconfig/*.pc
84 inherit (nixosTests) mosquitto;
88 description = "Open source MQTT v3.1/3.1.1/5.0 broker";
89 homepage = "https://mosquitto.org/";
90 changelog = "https://github.com/eclipse/mosquitto/blob/v${version}/ChangeLog.txt";
91 license = lib.licenses.epl10;
92 maintainers = [ lib.maintainers.peterhoeg ];
93 platforms = lib.platforms.unix;
94 mainProgram = "mosquitto";