Skip to content

Commit

Permalink
Merge pull request #175533 from NixOS/backport-175161-to-release-22.05
Browse files Browse the repository at this point in the history
[Backport release-22.05] python3Packages.uamqp: use openssl on darwin-aarch64
  • Loading branch information
risicle authored May 30, 2022
2 parents 9895371 + b692769 commit 7c1e79e
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 7c1e79e

Please sign in to comment.