Skip to content

Commit

Permalink
python3Packages.uamqp: use openssl on darwin-aarch64
Browse files Browse the repository at this point in the history
azure's libraries aren't happy enough with our macos sdk on aarch64
to let us use applessl

(cherry picked from commit 6f7557f)
  • Loading branch information
risicle authored and github-actions[bot] committed May 30, 2022
1 parent fbba8a2 commit b692769
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/uamqp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ buildPythonPackage rec {
./darwin-azure-c-shared-utility-corefoundation.patch
];

postPatch = lib.optionalString (stdenv.isDarwin && !stdenv.isx86_64) ''
# force darwin aarch64 to use openssl instead of applessl, removing
# some quirks upstream thinks they need to use openssl on macos
sed -i \
-e '/^use_openssl =/cuse_openssl = True' \
-e 's/\bazssl\b/ssl/' \
-e 's/\bazcrypto\b/crypto/' \
setup.py
sed -i \
-e '/#define EVP_PKEY_id/d' \
src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/x509_openssl.c
'';

nativeBuildInputs = [
cmake
];
Expand Down

0 comments on commit b692769

Please sign in to comment.