19 buildPythonPackage rec {
24 src = fetchFromGitHub {
26 repo = "azure-uamqp-python";
28 hash = "sha256-HTIOHheCrvyI7DwA/UcUXk/fbesd29lvUvJ9TAeG3CE=";
33 name = "fix-clang16-compatibility.patch";
34 url = "https://github.com/Azure/azure-uamqp-python/commit/bd6d9ef5a8bca3873e1e66218fd09ca787b8064e.patch";
35 hash = "sha256-xtnIVjB71EPJp/QjLQWctcSDds5s6n4ut+gnvp3VMlM=";
39 postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isx86_64) ''
40 # force darwin aarch64 to use openssl instead of applessl, removing
41 # some quirks upstream thinks they need to use openssl on macos
43 -e '/^use_openssl =/cuse_openssl = True' \
44 -e 's/\bazssl\b/ssl/' \
45 -e 's/\bazcrypto\b/crypto/' \
48 -e '/#define EVP_PKEY_id/d' \
49 src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/x509_openssl.c
51 -e 's/OpenSSL 3\nif(LINUX)/OpenSSL 3\nif(1)/' \
52 src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt
66 ++ lib.optionals stdenv.hostPlatform.isDarwin [
72 dependencies = [ certifi ];
74 dontUseCmakeConfigure = true;
77 # remove src module, so tests use the installed module instead
86 pythonImportsCheck = [ "uamqp" ];
89 description = "AMQP 1.0 client library for Python";
90 homepage = "https://github.com/Azure/azure-uamqp-python";
91 license = licenses.mit;
92 maintainers = with maintainers; [ maxwilson ];