nixpkgs/pkgs/development/libraries/zydis/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.1 KiB
Nix
Raw Normal View History

2021-11-26 21:37:03 +00:00
{ lib
, stdenv
, fetchFromGitHub
, callPackage
2021-11-26 21:37:03 +00:00
, cmake
, python3
2021-11-26 21:37:03 +00:00
}:
2021-01-24 04:33:12 +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";
2022-11-23 14:34:52 +00:00
version = "4.0.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}";
hash = "sha256-/no/8FNa5LlwhZMSMao4/cwZk6GlamLjqr+isbh6tEI=";
2021-01-24 04:33:12 +00:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zycore ];
cmakeFlags = [
"-DZYAN_SYSTEM_ZYCORE=ON"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
2021-11-27 12:57:13 +00:00
];
2021-01-24 04:33:12 +00:00
doCheck = true;
nativeCheckInputs = [ python3 ];
checkPhase = ''
pushd ../tests
python3 ./regression.py test ../build/ZydisInfo
python3 ./regression_encoder.py \
../build/Zydis{Fuzz{ReEncoding,Encoder},TestEncoderAbsolute}
popd
'';
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/";
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;
};
}