mosquitto: use libwebsockets 4.x
This requires us to enable LWS_WITH_EXTERNAL_POLL. Since only mosquitto needs that and upstream discourages enabling it, we'll just do it in an override in mosquitto.
This commit is contained in:
parent
e8ecc402a5
commit
065992e4f8
@ -5,6 +5,8 @@
|
|||||||
, openssl
|
, openssl
|
||||||
, zlib
|
, zlib
|
||||||
, libuv
|
, libuv
|
||||||
|
# External poll is required for e.g. mosquitto, but discouraged by the maintainer.
|
||||||
|
, withExternalPoll ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -29,7 +31,8 @@ let
|
|||||||
"-DLWS_WITH_SOCKS5=ON"
|
"-DLWS_WITH_SOCKS5=ON"
|
||||||
# Required since v4.2.0
|
# Required since v4.2.0
|
||||||
"-DLWS_BUILD_HASH=no_hash"
|
"-DLWS_BUILD_HASH=no_hash"
|
||||||
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON";
|
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON"
|
||||||
|
++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=unused-but-set-variable";
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=unused-but-set-variable";
|
||||||
|
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
, cjson
|
, cjson
|
||||||
, libuuid
|
, libuuid
|
||||||
, libuv
|
, libuv
|
||||||
, libwebsockets_3_1
|
, libwebsockets
|
||||||
, openssl
|
, openssl
|
||||||
, withSystemd ? stdenv.isLinux
|
, withSystemd ? stdenv.isLinux
|
||||||
, systemd
|
, systemd
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Mosquitto needs external poll enabled in libwebsockets.
|
||||||
|
libwebsockets' = libwebsockets.override {
|
||||||
|
withExternalPoll = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mosquitto";
|
pname = "mosquitto";
|
||||||
version = "2.0.12";
|
version = "2.0.12";
|
||||||
@ -54,7 +60,7 @@ stdenv.mkDerivation rec {
|
|||||||
cjson
|
cjson
|
||||||
libuuid
|
libuuid
|
||||||
libuv
|
libuv
|
||||||
libwebsockets_3_1
|
libwebsockets'
|
||||||
openssl
|
openssl
|
||||||
] ++ lib.optional withSystemd systemd;
|
] ++ lib.optional withSystemd systemd;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user