pythonPackages.uamqp: Fix build on darwin

This commit is contained in:
Sandro Jäckel 2021-01-16 16:00:03 +01:00
parent 974201c4ed
commit 5c4843d638
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 24 additions and 7 deletions

View File

@ -1,12 +1,17 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k { stdenv
, lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, certifi , certifi
, CFNetwork
, cmake , cmake
, enum34 , enum34
, openssl , openssl
, Security
, six , six
, stdenv , CFNetwork
, CoreFoundation
, Security
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -18,6 +23,15 @@ buildPythonPackage rec {
sha256 = "sha256-zDUFe/yMCThn+qJqDekMrUHEf1glGxBw4pioExLLoqg="; 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 = [ buildInputs = [
openssl openssl
certifi certifi
@ -25,7 +39,9 @@ buildPythonPackage rec {
] ++ lib.optionals (!isPy3k) [ ] ++ lib.optionals (!isPy3k) [
enum34 enum34
] ++ lib.optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
CFNetwork Security CoreFoundation
CFNetwork
Security
]; ];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;

View File

@ -7797,8 +7797,9 @@ in {
tzlocal = callPackage ../development/python-modules/tzlocal { }; tzlocal = callPackage ../development/python-modules/tzlocal { };
uamqp = uamqp = callPackage ../development/python-modules/uamqp {
callPackage ../development/python-modules/uamqp { inherit (pkgs.darwin.apple_sdk.frameworks) CFNetwork Security; }; inherit (pkgs.darwin.apple_sdk.frameworks) CFNetwork CoreFoundation Security;
};
ua-parser = callPackage ../development/python-modules/ua-parser { }; ua-parser = callPackage ../development/python-modules/ua-parser { };