2022-09-22 12:36:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
, cmake
|
2022-09-22 12:36:57 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fixDarwinDylibNames
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "capstone";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-04-21 15:54:59 +00:00
|
|
|
owner = "capstone-engine";
|
2022-01-03 16:56:52 +00:00
|
|
|
repo = "capstone";
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-kKmL5sae9ruWGu1gas1mel9qM52qQOD+zLj8cRE3isg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
cmake
|
2022-09-22 12:36:57 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
fixDarwinDylibNames
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Advanced disassembly library";
|
|
|
|
homepage = "http://www.capstone-engine.org";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice ris ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "cstool";
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|