diff options
Diffstat (limited to 'pkgs/development/python-modules/capstone/4.nix')
-rw-r--r-- | pkgs/development/python-modules/capstone/4.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/capstone/4.nix b/pkgs/development/python-modules/capstone/4.nix index 2ecf1ce9347a1..66b57a01bcb21 100644 --- a/pkgs/development/python-modules/capstone/4.nix +++ b/pkgs/development/python-modules/capstone/4.nix @@ -4,14 +4,23 @@ capstone_4, stdenv, setuptools, - pythonAtLeast, + fetchpatch, }: buildPythonPackage { pname = "capstone"; inherit (capstone_4) version src; - sourceRoot = "source/bindings/python"; + sourceRoot = "${capstone_4.src.name}/bindings/python"; + patches = [ + # Drop distutils in python binding (PR 2271) + (fetchpatch { + name = "drop-distutils-in-python-binding.patch"; + url = "https://github.com/capstone-engine/capstone/commit/d63211e3acb64fceb8b1c4a0d804b4b027f4ef71.patch"; + hash = "sha256-zUGeFmm3xH5dzfPJE8nnHwqwFBrsZ7w8LBJAy20/3RI="; + stripLen = 2; + }) + ]; postPatch = '' ln -s ${capstone_4}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/ @@ -42,6 +51,5 @@ buildPythonPackage { bennofs ris ]; - broken = pythonAtLeast "3.12"; # uses distutils }; } |