From ea48d0369edd463d1ed7d5ad16000e38d6711dea Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 14 May 2022 14:31:15 +0100 Subject: [PATCH] python3Packages.uamqp: re-introduce darwin-fixing patch for x86_64 previously removed in bf0f23274136ddb2b6b0fa91952e1453b990a88d including in-repo as upstream rejected it and we shouldn't rely on github keeping the reference around --- ...zure-c-shared-utility-corefoundation.patch | 37 +++++++++++++++++++ .../python-modules/uamqp/default.nix | 4 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/uamqp/darwin-azure-c-shared-utility-corefoundation.patch diff --git a/pkgs/development/python-modules/uamqp/darwin-azure-c-shared-utility-corefoundation.patch b/pkgs/development/python-modules/uamqp/darwin-azure-c-shared-utility-corefoundation.patch new file mode 100644 index 00000000000..ad2186543f3 --- /dev/null +++ b/pkgs/development/python-modules/uamqp/darwin-azure-c-shared-utility-corefoundation.patch @@ -0,0 +1,37 @@ +From 52ab2095649b5951e6af77f68954209473296983 Mon Sep 17 00:00:00 2001 +From: Sandro +Date: Sat, 16 Jan 2021 15:54:05 +0100 +Subject: [PATCH] Fix finding apple libraries + +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + + +(rejected by upstream in https://github.com/Azure/azure-c-shared-utility/pull/499, +seems problem it's solving is nixpkgs-specific) + +diff --git a/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt b/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt +index 7bbfa6f3f..3567b18bc 100644 +--- a/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt ++++ b/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt +@@ -120,8 +120,9 @@ endif() + + if(${use_applessl}) + # MACOSX only has native tls and open ssl, so use the native apple tls +- find_library(cf_foundation Foundation) ++ find_library(cf_foundation CoreFoundation) + find_library(cf_network CFNetwork) ++ find_library(cf_security Security) + endif() + + if(${no_logging}) +@@ -581,7 +582,7 @@ endif() + + + if(${use_applessl}) +- set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${cf_foundation} ${cf_network}) ++ set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${cf_foundation} ${cf_network} ${cf_security}) + endif() + + if(WIN32) diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix index a838f44eb95..61979da58d4 100644 --- a/pkgs/development/python-modules/uamqp/default.nix +++ b/pkgs/development/python-modules/uamqp/default.nix @@ -23,6 +23,10 @@ buildPythonPackage rec { sha256 = "sha256-guhfOMvddC4E+oOmvpeG8GsXEfqLcSHVdtj3w8fF2Vs="; }; + patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ./darwin-azure-c-shared-utility-corefoundation.patch + ]; + nativeBuildInputs = [ cmake ];