From 9de9d365273527d9e96a2ecc3c2233776642a893 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 12 Aug 2024 12:59:10 +0000 Subject: [PATCH] capstone: 5.0.1 -> 5.0.3 --- pkgs/development/libraries/capstone/default.nix | 8 +++++--- .../python-modules/capstone/default.nix | 16 ++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/capstone/default.nix b/pkgs/development/libraries/capstone/default.nix index 1aed26cec87d..9342000c864b 100644 --- a/pkgs/development/libraries/capstone/default.nix +++ b/pkgs/development/libraries/capstone/default.nix @@ -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 diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix index e735871268e5..e869c9567d63 100644 --- a/pkgs/development/python-modules/capstone/default.nix +++ b/pkgs/development/python-modules/capstone/default.nix @@ -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; {