libwebsockets: fix plugin search path

The update of libwebsockets from 4.4.1 to 4.4.5[^1] introduced a regression where
plugins could no longer be found.[^2]  This could be traced back to a change in
how the installation directory is computed since libwebsockets 4.4.2[^3] and we
patch it here with the correct path.

Fixes https://github.com/NixOS/nixpkgs/issues/532638

[^1]: https://github.com/NixOS/nixpkgs/pull/529620
[^2]: https://github.com/NixOS/nixpkgs/issues/532638
[^3]: https://github.com/warmcat/libwebsockets/commit/bdbebaa3b5f89bd31128fceb72a4133c0a2f738d
This commit is contained in:
Henri Menke
2026-06-19 09:27:22 +02:00
parent a85e1ec86f
commit 3c38ce6492
@@ -59,6 +59,9 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace lib/CMakeLists.txt \
--replace-fail '=\''${exec_prefix}/''${LWS_INSTALL_LIB_DIR}' '=''${CMAKE_INSTALL_FULL_LIBDIR}' \
--replace-fail '=\''${prefix}/''${LWS_INSTALL_INCLUDE_DIR}' '=''${CMAKE_INSTALL_FULL_INCLUDEDIR}'
substituteInPlace cmake/lws_config.h.in \
--replace-fail '"''${CMAKE_INSTALL_PREFIX}/''${LWS_INSTALL_LIB_DIR}"' '"''${CMAKE_INSTALL_FULL_LIBDIR}"'
''
# Remove after https://github.com/warmcat/libwebsockets/pull/3567 has been merged or otherwise addressed
+ lib.optionalString stdenv.hostPlatform.isStatic ''