From e446f7b091cee5f0924b5284802ee12fb3a77a43 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 24 Mar 2022 13:27:25 -0600 Subject: [PATCH] python3Packages.capstone: fix build on aarch64-darwin closes #165679 --- pkgs/development/python-modules/capstone/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix index c99c392841e..f1a37fb70a0 100644 --- a/pkgs/development/python-modules/capstone/default.nix +++ b/pkgs/development/python-modules/capstone/default.nix @@ -18,6 +18,10 @@ buildPythonPackage rec { substituteInPlace setup.py --replace manylinux1 manylinux2014 ''; + # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag. + # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense. + setupPyBuildFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "--plat-name" "macosx_11_0" ]; + propagatedBuildInputs = [ setuptools ]; checkPhase = ''