2024-04-09 21:14:20 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
ailment,
|
|
|
|
archinfo,
|
|
|
|
buildPythonPackage,
|
|
|
|
cachetools,
|
|
|
|
capstone,
|
|
|
|
cffi,
|
|
|
|
claripy,
|
|
|
|
cle,
|
|
|
|
cppheaderparser,
|
|
|
|
dpkt,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitpython,
|
|
|
|
itanium-demangler,
|
|
|
|
mulpyplexer,
|
|
|
|
nampa,
|
|
|
|
networkx,
|
|
|
|
progressbar2,
|
|
|
|
protobuf,
|
|
|
|
psutil,
|
|
|
|
pycparser,
|
|
|
|
pyformlang,
|
|
|
|
pythonOlder,
|
|
|
|
pyvex,
|
|
|
|
rich,
|
|
|
|
rpyc,
|
|
|
|
setuptools,
|
|
|
|
sortedcontainers,
|
|
|
|
sqlalchemy,
|
|
|
|
sympy,
|
|
|
|
unicorn,
|
|
|
|
unique-log-filter,
|
2021-04-06 20:15:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "angr";
|
2024-11-20 17:46:04 +00:00
|
|
|
version = "9.2.129";
|
2023-10-12 12:01:30 +00:00
|
|
|
pyproject = true;
|
2022-01-18 21:20:08 +00:00
|
|
|
|
2023-10-12 12:01:30 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-04-06 20:15:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-10-12 12:01:30 +00:00
|
|
|
owner = "angr";
|
|
|
|
repo = "angr";
|
2023-03-28 22:40:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-11-20 17:46:04 +00:00
|
|
|
hash = "sha256-GO8Vk/L1swhQsGfH/Ugi5i9MwWbaco/f1ukqJ2+R6IA=";
|
2021-04-06 20:15:50 +00:00
|
|
|
};
|
|
|
|
|
2024-09-24 20:59:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
# unicorn is also part of build-system
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "unicorn==2.0.1.post1" "unicorn"
|
|
|
|
'';
|
2024-03-28 22:50:54 +00:00
|
|
|
|
2024-09-24 20:59:45 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"capstone"
|
|
|
|
"unicorn"
|
2024-03-28 22:41:08 +00:00
|
|
|
];
|
|
|
|
|
2024-09-24 20:59:45 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2024-03-28 22:41:08 +00:00
|
|
|
dependencies = [
|
2021-04-06 20:15:50 +00:00
|
|
|
ailment
|
|
|
|
archinfo
|
|
|
|
cachetools
|
|
|
|
capstone
|
|
|
|
cffi
|
|
|
|
claripy
|
|
|
|
cle
|
|
|
|
cppheaderparser
|
|
|
|
dpkt
|
2022-12-05 18:15:33 +00:00
|
|
|
gitpython
|
2022-10-16 22:39:28 +00:00
|
|
|
itanium-demangler
|
2021-04-06 20:15:50 +00:00
|
|
|
mulpyplexer
|
2021-07-14 20:53:35 +00:00
|
|
|
nampa
|
2021-04-06 20:15:50 +00:00
|
|
|
networkx
|
|
|
|
progressbar2
|
|
|
|
protobuf
|
|
|
|
psutil
|
|
|
|
pycparser
|
2024-03-28 22:50:54 +00:00
|
|
|
pyformlang
|
2021-04-06 20:15:50 +00:00
|
|
|
pyvex
|
2023-04-19 17:46:56 +00:00
|
|
|
rich
|
2021-04-06 20:15:50 +00:00
|
|
|
rpyc
|
|
|
|
sortedcontainers
|
2022-01-18 21:20:08 +00:00
|
|
|
sqlalchemy
|
|
|
|
sympy
|
2022-11-24 08:36:51 +00:00
|
|
|
unicorn
|
2024-03-28 22:50:54 +00:00
|
|
|
unique-log-filter
|
2021-04-06 20:15:50 +00:00
|
|
|
];
|
|
|
|
|
2024-09-29 05:35:45 +00:00
|
|
|
optional-dependencies = {
|
2024-04-09 21:14:20 +00:00
|
|
|
AngrDB = [ sqlalchemy ];
|
2024-01-17 09:08:13 +00:00
|
|
|
};
|
|
|
|
|
2022-01-18 21:20:08 +00:00
|
|
|
setupPyBuildFlags = lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
"--plat-name"
|
|
|
|
"linux"
|
|
|
|
];
|
|
|
|
|
2021-04-06 20:15:50 +00: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 19:57:02 +00:00
|
|
|
|
2021-07-14 20:53:35 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"angr"
|
|
|
|
"claripy"
|
|
|
|
"cle"
|
|
|
|
"pyvex"
|
|
|
|
"archinfo"
|
|
|
|
];
|
2021-04-06 20:15:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Powerful and user-friendly binary analysis platform";
|
|
|
|
homepage = "https://angr.io/";
|
|
|
|
license = with licenses; [ bsd2 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-09-24 20:40:40 +00:00
|
|
|
# angr is pining unicorn
|
|
|
|
broken = versionAtLeast unicorn.version "2.0.1.post1";
|
2021-04-06 20:15:50 +00:00
|
|
|
};
|
|
|
|
}
|