summary refs log tree commit diff
diff options
context:
space:
mode:
authorRowan Skewes <rowan.skewes@gmail.com>2023-07-21 11:54:07 +1000
committerPeter Hoeg <peter@hoeg.com>2023-07-25 02:24:52 +0000
commit7687b8464f0770cc8a1d97e9082335bf84bb318b (patch)
treebaf1ce5037bb7b466b5b4c18bf8c8e3f26defe22
parent0dd9a9cfed17041e6bdb1946da67962155f82cbe (diff)
downloadnixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar.gz
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar.bz2
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar.lz
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar.xz
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.tar.zst
nixpkgs-7687b8464f0770cc8a1d97e9082335bf84bb318b.zip
mosquitto: fix bug with firefox wss http/2
Firefox has a bug preventing websockets being created with
a server that uses http/2. Building libwebsockets without
http/2 support fixes this issue for mosquitto.
See https://github.com/eclipse/mosquitto/issues/1211#issuecomment-958137569
-rw-r--r--pkgs/servers/mqtt/mosquitto/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix
index f241f48ac52..152332538ff 100644
--- a/pkgs/servers/mqtt/mosquitto/default.nix
+++ b/pkgs/servers/mqtt/mosquitto/default.nix
@@ -17,9 +17,14 @@
 
 let
   # Mosquitto needs external poll enabled in libwebsockets.
-  libwebsockets' = libwebsockets.override {
+  libwebsockets' = (libwebsockets.override {
     withExternalPoll = true;
-  };
+  }).overrideAttrs (old: {
+    # Avoid bug in firefox preventing websockets being created over http/2 connections
+    # https://github.com/eclipse/mosquitto/issues/1211#issuecomment-958137569
+    cmakeFlags = old.cmakeFlags ++ [ "-DLWS_WITH_HTTP2=OFF" ];
+  });
+
 in
 stdenv.mkDerivation rec {
   pname = "mosquitto";