From 5c4843d6387ddb6f178aac961db36f95c478ebc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 16 Jan 2021 16:00:03 +0100 Subject: [PATCH] pythonPackages.uamqp: Fix build on darwin --- .../python-modules/uamqp/default.nix | 26 +++++++++++++++---- pkgs/top-level/python-packages.nix | 5 ++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix index f92499cf54d3..05bc653b0591 100644 --- a/pkgs/development/python-modules/uamqp/default.nix +++ b/pkgs/development/python-modules/uamqp/default.nix @@ -1,12 +1,17 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k +{ stdenv +, lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, isPy3k , certifi -, CFNetwork , cmake , enum34 , openssl -, Security , six -, stdenv +, CFNetwork +, CoreFoundation +, Security }: buildPythonPackage rec { @@ -18,6 +23,15 @@ buildPythonPackage rec { sha256 = "sha256-zDUFe/yMCThn+qJqDekMrUHEf1glGxBw4pioExLLoqg="; }; + patches = [ + (fetchpatch { + url = "https://github.com/Azure/azure-c-shared-utility/commit/52ab2095649b5951e6af77f68954209473296983.patch"; + sha256 = "06pxhdpkv94pv3lhj1vy0wlsqsdznz485bvg3zafj67r55g40lhd"; + stripLen = "2"; + extraPrefix = "src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/"; + }) + ]; + buildInputs = [ openssl certifi @@ -25,7 +39,9 @@ buildPythonPackage rec { ] ++ lib.optionals (!isPy3k) [ enum34 ] ++ lib.optionals stdenv.isDarwin [ - CFNetwork Security + CoreFoundation + CFNetwork + Security ]; dontUseCmakeConfigure = true; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4f801a28882c..36e21c3e8ade 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7797,8 +7797,9 @@ in { tzlocal = callPackage ../development/python-modules/tzlocal { }; - uamqp = - callPackage ../development/python-modules/uamqp { inherit (pkgs.darwin.apple_sdk.frameworks) CFNetwork Security; }; + uamqp = callPackage ../development/python-modules/uamqp { + inherit (pkgs.darwin.apple_sdk.frameworks) CFNetwork CoreFoundation Security; + }; ua-parser = callPackage ../development/python-modules/ua-parser { };