capstone: 5.0.1 -> 5.0.3 (#334145)

This commit is contained in:
OTABI Tomoya
2024-11-07 20:40:12 +09:00
committed by GitHub
2 changed files with 9 additions and 15 deletions
@@ -7,16 +7,18 @@
stdenv.mkDerivation rec {
pname = "capstone";
version = "5.0.1";
version = "5.0.3";
src = fetchFromGitHub {
owner = "capstone-engine";
repo = "capstone";
rev = version;
sha256 = "sha256-kKmL5sae9ruWGu1gas1mel9qM52qQOD+zLj8cRE3isg=";
hash = "sha256-LZ10czBn5oaKMHQ8xguC6VZa7wvEgPRu6oWt/22QaDs=";
};
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
] ++ lib.optionals stdenv.isDarwin [ (lib.cmakeBool "CAPSTONE_BUILD_MACOS_THIN" true) ];
nativeBuildInputs = [
cmake
@@ -4,7 +4,6 @@
capstone,
stdenv,
setuptools,
fetchpatch,
}:
buildPythonPackage rec {
@@ -13,15 +12,6 @@ buildPythonPackage rec {
src = capstone.src;
sourceRoot = "${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;
})
];
# libcapstone.a is not built with BUILD_SHARED_LIBS. For some reason setup.py
# checks if it exists but it is not really needed. Most likely a bug in setup.py.
@@ -42,8 +32,10 @@ buildPythonPackage rec {
checkPhase = ''
mv capstone capstone.hidden
patchShebangs test_*
make check
pushd tests
patchShebangs test_*
make -f ../Makefile check
popd
'';
meta = with lib; {