9 buildPythonPackage rec {
11 version = lib.getVersion capstone;
14 sourceRoot = "${src.name}/bindings/python";
16 # libcapstone.a is not built with BUILD_SHARED_LIBS. For some reason setup.py
17 # checks if it exists but it is not really needed. Most likely a bug in setup.py.
19 ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
20 touch prebuilt/libcapstone${stdenv.targetPlatform.extensions.staticLibrary}
21 substituteInPlace setup.py --replace manylinux1 manylinux2014
24 # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag.
25 # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense.
26 setupPyBuildFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
31 propagatedBuildInputs = [ setuptools ];
34 mv capstone capstone.hidden
37 make -f ../Makefile check
42 homepage = "http://www.capstone-engine.org/";
43 license = licenses.bsdOriginal;
44 description = "Python bindings for Capstone disassembly engine";
45 maintainers = with maintainers; [