From 45b7befa6e5722d74f11573968d4d2f325da27f7 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 8 Apr 2026 10:37:40 +0200 Subject: [PATCH] libwebsockets: Fix CMake config for static build --- pkgs/by-name/li/libwebsockets/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/li/libwebsockets/package.nix b/pkgs/by-name/li/libwebsockets/package.nix index 973541089c396..1435543f0ad77 100644 --- a/pkgs/by-name/li/libwebsockets/package.nix +++ b/pkgs/by-name/li/libwebsockets/package.nix @@ -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" \