summary refs log tree commit diff
path: root/pkgs/development/libraries/libwebsockets
diff options
context:
space:
mode:
authorRick van Schijndel <rol3517@gmail.com>2021-11-23 19:15:33 +0100
committerRick van Schijndel <rol3517@gmail.com>2021-11-23 19:15:33 +0100
commit065992e4f88361938844e37decbe471228566bae (patch)
tree9ee45942e3a0b78277b5b715266f4bb90e58ddd0 /pkgs/development/libraries/libwebsockets
parente8ecc402a5ec3140a8484608fdecc01462af11f3 (diff)
downloadnixpkgs-065992e4f88361938844e37decbe471228566bae.tar
nixpkgs-065992e4f88361938844e37decbe471228566bae.tar.gz
nixpkgs-065992e4f88361938844e37decbe471228566bae.tar.bz2
nixpkgs-065992e4f88361938844e37decbe471228566bae.tar.lz
nixpkgs-065992e4f88361938844e37decbe471228566bae.tar.xz
nixpkgs-065992e4f88361938844e37decbe471228566bae.tar.zst
nixpkgs-065992e4f88361938844e37decbe471228566bae.zip
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.
Diffstat (limited to 'pkgs/development/libraries/libwebsockets')
-rw-r--r--pkgs/development/libraries/libwebsockets/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libwebsockets/default.nix b/pkgs/development/libraries/libwebsockets/default.nix
index 15bf77d2fc6..faf6acd40b9 100644
--- a/pkgs/development/libraries/libwebsockets/default.nix
+++ b/pkgs/development/libraries/libwebsockets/default.nix
@@ -5,6 +5,8 @@
 , openssl
 , zlib
 , libuv
+# External poll is required for e.g. mosquitto, but discouraged by the maintainer.
+, withExternalPoll ? false
 }:
 
 let
@@ -29,7 +31,8 @@ let
       "-DLWS_WITH_SOCKS5=ON"
       # Required since v4.2.0
       "-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";