Subject: [bug#78468] [PATCH 1/2] gnu: Add libwebsockets-for-mosquitto.

From: Evgeny Pisemsky <[email-masked]>
Date: Sat, 17 May 2025 12:22:15 +0300

* gnu/packages/web.scm (libwebsockets-for-mosquitto): New variable.

Change-Id: Ia8221e1a756e392ed0e8fa9a92e847da436e6215
---
 gnu/packages/web.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e2deee47da..b43b90ac33 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -65,7 +65,7 @@
 ;;; Copyright © 2023 VÖRÖSKŐI András <[email-masked]>
 ;;; Copyright © 2023 Christopher Howard <[email-masked]>
 ;;; Copyright © 2023 Felix Lechner <[email-masked]>
-;;; Copyright © 2023 Evgeny Pisemsky <[email-masked]>
+;;; Copyright © 2023, 2025 Evgeny Pisemsky <[email-masked]>
 ;;; Copyright © 2024 Tomas Volf <[email-masked]>
 ;;; Copyright © 2024 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <[email-masked]>
@@ -1791,6 +1791,17 @@ (define-public libwebsockets
     (home-page "https://libwebsockets.org")
     (license license:expat)))
 
+(define-public libwebsockets-for-mosquitto
+  (hidden-package
+   (package
+     (inherit libwebsockets)
+     (arguments
+      (list
+       ;; Mosquitto requires some tweaks for libwebsockets, see:
+       ;; https://github.com/NixOS/nixpkgs/blob/1750f3c1c89488e2ffdd47cab9d05454dddfb734/pkgs/by-name/mo/mosquitto/package.nix#L20
+       #:configure-flags '(list "-DLWS_WITH_EXTERNAL_POLL=ON"
+                                "-DLWS_WITH_HTTP2=OFF"))))))
+
 (define-public wabt
   (package
     (name "wabt")

base-commit: 5555d8f2da105fefc42d6a4737d34edcfde1c030
-- 
2.49.0