2021-04-06 22:15:50 +02:00
|
|
|
{ lib
|
2021-12-30 00:47:38 +01:00
|
|
|
, stdenv
|
2021-04-06 22:15:50 +02:00
|
|
|
, ailment
|
|
|
|
, archinfo
|
|
|
|
, buildPythonPackage
|
|
|
|
, cachetools
|
|
|
|
, capstone
|
|
|
|
, cffi
|
|
|
|
, claripy
|
|
|
|
, cle
|
|
|
|
, cppheaderparser
|
|
|
|
, dpkt
|
|
|
|
, fetchFromGitHub
|
|
|
|
, GitPython
|
|
|
|
, itanium_demangler
|
|
|
|
, mulpyplexer
|
2021-07-14 22:53:35 +02:00
|
|
|
, nampa
|
2021-04-06 22:15:50 +02:00
|
|
|
, networkx
|
|
|
|
, progressbar2
|
|
|
|
, protobuf
|
|
|
|
, psutil
|
|
|
|
, pycparser
|
|
|
|
, pythonOlder
|
|
|
|
, pyvex
|
2022-01-18 22:20:08 +01:00
|
|
|
, sympy
|
2021-04-06 22:15:50 +02:00
|
|
|
, sqlalchemy
|
|
|
|
, rpyc
|
|
|
|
, sortedcontainers
|
|
|
|
, unicorn
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# Only the pinned release in setup.py works properly
|
|
|
|
unicorn' = unicorn.overridePythonAttrs (old: rec {
|
2021-11-14 18:24:20 +01:00
|
|
|
pname = "unicorn";
|
|
|
|
version = "1.0.2-rc4";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "unicorn-engine";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy";
|
2021-04-06 22:15:50 +02:00
|
|
|
};
|
2021-11-14 18:24:20 +01:00
|
|
|
doCheck = false;
|
2021-04-06 22:15:50 +02:00
|
|
|
});
|
|
|
|
in
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "angr";
|
2022-05-04 13:37:58 +02:00
|
|
|
version = "9.2.2";
|
2022-04-22 19:16:55 +02:00
|
|
|
format = "pyproject";
|
2022-01-18 22:20:08 +01:00
|
|
|
|
2021-04-06 22:15:50 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-04 13:37:58 +02:00
|
|
|
hash = "sha256-aniLMNKfEqlVkniS2mSCaeXIOc0EC4zOR59kiGTNUWk=";
|
2021-04-06 22:15:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ailment
|
|
|
|
archinfo
|
|
|
|
cachetools
|
|
|
|
capstone
|
|
|
|
cffi
|
|
|
|
claripy
|
|
|
|
cle
|
|
|
|
cppheaderparser
|
|
|
|
dpkt
|
|
|
|
GitPython
|
|
|
|
itanium_demangler
|
|
|
|
mulpyplexer
|
2021-07-14 22:53:35 +02:00
|
|
|
nampa
|
2021-04-06 22:15:50 +02:00
|
|
|
networkx
|
|
|
|
progressbar2
|
|
|
|
protobuf
|
|
|
|
psutil
|
|
|
|
pycparser
|
|
|
|
pyvex
|
|
|
|
rpyc
|
|
|
|
sortedcontainers
|
2022-01-18 22:20:08 +01:00
|
|
|
sqlalchemy
|
|
|
|
sympy
|
2021-04-06 22:15:50 +02:00
|
|
|
unicorn'
|
|
|
|
];
|
|
|
|
|
2022-01-18 22:20:08 +01:00
|
|
|
setupPyBuildFlags = lib.optionals stdenv.isLinux [
|
|
|
|
"--plat-name"
|
|
|
|
"linux"
|
|
|
|
];
|
|
|
|
|
2021-04-06 22:15:50 +02:00
|
|
|
# Tests have additional requirements, e.g., pypcode and angr binaries
|
|
|
|
# cle is executing the tests with the angr binaries
|
|
|
|
doCheck = false;
|
2021-04-24 21:57:02 +02:00
|
|
|
|
2021-07-14 22:53:35 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"angr"
|
|
|
|
"claripy"
|
|
|
|
"cle"
|
|
|
|
"pyvex"
|
|
|
|
"archinfo"
|
|
|
|
];
|
2021-04-06 22:15:50 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Powerful and user-friendly binary analysis platform";
|
|
|
|
homepage = "https://angr.io/";
|
|
|
|
license = with licenses; [ bsd2 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|