8 buildPythonPackage rec {
10 version = lib.getVersion capstone;
13 sourceRoot = "source/bindings/python";
16 ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
17 ln -s ${capstone}/lib/libcapstone.a prebuilt/
18 substituteInPlace setup.py --replace manylinux1 manylinux2014
21 # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag.
22 # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense.
23 setupPyBuildFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "--plat-name" "macosx_11_0" ];
25 propagatedBuildInputs = [ setuptools ];
28 mv capstone capstone.hidden
34 homepage = "http://www.capstone-engine.org/";
35 license = licenses.bsdOriginal;
36 description = "Python bindings for Capstone disassembly engine";
37 maintainers = with maintainers; [ bennofs ris ];