9 buildPythonPackage rec {
11 version = lib.getVersion unicorn;
16 sourceRoot = "${src.name}/bindings/python";
19 ln -s ${unicorn}/lib/libunicorn.* prebuilt/
22 # Needed on non-x86 linux
24 lib.optionals stdenv.hostPlatform.isLinux [
28 # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag.
29 # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense.
30 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
35 build-system = [ setuptools ];
40 mv unicorn unicorn.hidden
41 patchShebangs sample_*.py shellcode.py
47 pythonImportsCheck = [ "unicorn" ];
50 description = "Python bindings for Unicorn CPU emulator engine";
51 homepage = "https://www.unicorn-engine.org/";
52 license = licenses.gpl2Plus;
53 maintainers = with maintainers; [