2021-11-26 21:37:03 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2022-11-20 20:27:58 +00:00
|
|
|
callPackage,
|
2021-11-26 21:37:03 +00:00
|
|
|
cmake,
|
2022-11-20 20:27:58 +00:00
|
|
|
python3,
|
2021-11-26 21:37:03 +00:00
|
|
|
}:
|
2021-01-24 04:33:12 +00:00
|
|
|
|
2022-11-20 20:27:58 +00:00
|
|
|
let
|
|
|
|
zycore = callPackage ./zycore.nix {
|
|
|
|
inherit stdenv fetchFromGitHub cmake;
|
|
|
|
};
|
|
|
|
in
|
2021-01-24 04:33:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zydis";
|
2024-02-10 17:41:09 +00:00
|
|
|
version = "4.1.0";
|
2021-01-24 04:33:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zyantific";
|
|
|
|
repo = "zydis";
|
2021-11-07 17:34:34 +00:00
|
|
|
rev = "v${version}";
|
2024-02-10 17:41:09 +00:00
|
|
|
hash = "sha256-akusu0T7q5RX4KGtjRqqOFpW5i9Bd1L4RVZt8Rg3PJY=";
|
2021-01-24 04:33:12 +00:00
|
|
|
};
|
|
|
|
|
2022-11-20 20:27:58 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2024-10-12 14:22:41 +00:00
|
|
|
propagatedBuildInputs = [ zycore ];
|
2022-11-20 20:27:58 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
2021-11-27 12:57:13 +00:00
|
|
|
];
|
2021-01-24 04:33:12 +00:00
|
|
|
|
2022-11-20 20:27:58 +00:00
|
|
|
doCheck = true;
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ python3 ];
|
2022-11-20 20:27:58 +00:00
|
|
|
passthru = { inherit zycore; };
|
|
|
|
|
2021-01-24 04:33:12 +00:00
|
|
|
meta = with lib; {
|
2021-11-26 21:37:03 +00:00
|
|
|
homepage = "https://zydis.re/";
|
2024-10-04 19:35:12 +00:00
|
|
|
changelog = "https://github.com/zyantific/zydis/releases/tag/v${version}";
|
2021-01-24 04:33:12 +00:00
|
|
|
description = "Fast and lightweight x86/x86-64 disassembler library";
|
|
|
|
license = licenses.mit;
|
2022-11-20 20:28:18 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
jbcrail
|
|
|
|
AndersonTorres
|
|
|
|
athre0z
|
|
|
|
];
|
2021-01-24 04:33:12 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|