libwebsockets: Fix CMake config for static build (#507822)

This commit is contained in:
Rick van Schijndel
2026-04-09 16:03:30 +00:00
committed by GitHub
@@ -69,6 +69,13 @@ stdenv.mkDerivation (finalAttrs: {
]
);
# Remove after https://github.com/warmcat/libwebsockets/pull/3567 has been merged or otherwise addressed
postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
substituteInPlace "cmake/libwebsockets-config.cmake.in" --replace-fail \
"set(LIBWEBSOCKETS_LIBRARIES websockets websockets_shared)" \
"set(LIBWEBSOCKETS_LIBRARIES websockets)"
'';
postInstall = ''
# Fix path that will be incorrect on move to "dev" output.
substituteInPlace "$out/lib/cmake/libwebsockets/LibwebsocketsTargets-release.cmake" \