From 2cf217562a91633258162564c18e1bfd4fe0ed48 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 15 Jun 2026 13:04:37 +0200 Subject: [PATCH] libwebsockets: Fix darwin dylib install names --- pkgs/by-name/li/libwebsockets/package.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libwebsockets/package.nix b/pkgs/by-name/li/libwebsockets/package.nix index f0e50b0f6132..18767b409aa1 100644 --- a/pkgs/by-name/li/libwebsockets/package.nix +++ b/pkgs/by-name/li/libwebsockets/package.nix @@ -65,7 +65,15 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace "cmake/libwebsockets-config.cmake.in" --replace-fail \ "set(LIBWEBSOCKETS_LIBRARIES websockets websockets_shared)" \ "set(LIBWEBSOCKETS_LIBRARIES websockets)" - ''; + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # Fix doubled store path in macOS install_name + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'SET(CMAKE_INSTALL_NAME_DIR "''${CMAKE_INSTALL_PREFIX}/''${LWS_INSTALL_LIB_DIR}")' \ + 'SET(CMAKE_INSTALL_NAME_DIR "''${LWS_INSTALL_LIB_DIR}")' + '' + + lib.optionalString stdenv.hostPlatform.isStatic ""; postInstall = '' # Fix path that will be incorrect on move to "dev" output.