Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179{ lib, angr-data, archinfo, buildPythonPackage, cachetools, capstone, cargo, cffi, cle, cxxheaderparser, fastmcp, fetchFromGitHub, gitpython, grpcio-tools, keystone-engine, lmdb, mcp, msgspec, mulpyplexer, networkx, opentelemetry-api, platformdirs, protobuf, psutil, pycparser, pydantic-ai-slim, pydemumble, pypcode, pyvex, python, pythonOlder, rich, runCommandCC, rustc, rustPlatform, setuptools, setuptools-rust, sortedcontainers, sqlalchemy, sympy, typing-extensions, unicorn, z3-solver,}:
buildPythonPackage (finalAttrs: { pname = "angr"; # Keep angr-management, angr, archinfo, cle, and pyvex in sync. # nixpkgs-update: no auto update version = "10.0.4"; pyproject = true;
disabled = pythonOlder "3.12";
src = fetchFromGitHub { owner = "angr"; repo = "angr"; tag = "v${finalAttrs.version}"; hash = "sha256-7XPOH5kGpSychDk17jBz7jK7nv9zRsy+dPWaCYCNx50="; };
cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) src pname version; hash = "sha256-kVDd3sXTyGZPPXg5rFZZqfC3UNqq6AxxHoZdhzMBKyo="; };
pythonRelaxDeps = [ "cxxheaderparser" "lmdb" "z3-solver" ];
postPatch = '' # Nix supplies the build dependency; keep the runtime requirement. sed -i '/^\[build-system\]/,/^\[/{ /"z3-solver/d; }' pyproject.toml
# cxxheaderparser 1.x represents member-function pointers using Pointer. substituteInPlace angr/sim_type.py \ --replace-fail 'cxxheaderparser.types.MemberPointer' \ 'getattr(cxxheaderparser.types, "MemberPointer", cxxheaderparser.types.Pointer)' '';
build-system = [ grpcio-tools protobuf pyvex setuptools setuptools-rust z3-solver ];
nativeBuildInputs = [ rustPlatform.cargoSetupHook cargo rustc ];
env.Z3_SYS_Z3_VERSION = z3-solver.version;
dependencies = [ angr-data archinfo cachetools capstone cffi cle cxxheaderparser gitpython lmdb msgspec mulpyplexer networkx platformdirs protobuf psutil pycparser pydemumble pypcode pyvex rich sortedcontainers sympy typing-extensions z3-solver ];
optional-dependencies = { angrdb = [ sqlalchemy ]; keystone = [ keystone-engine ]; llm = [ fastmcp mcp pydantic-ai-slim ]; telemetry = [ opentelemetry-api ]; unicorn = [ unicorn ]; };
# The full upstream suite requires large external fixtures and optional dependencies. doCheck = false;
pythonImportsCheck = [ "angr" "archinfo" "cle" "pypcode" "pyvex" ];
passthru.tests.smoke = runCommandCC "angr-smoke-test" { __structuredAttrs = true; nativeBuildInputs = [ (python.withPackages (_: [ finalAttrs.finalPackage sqlalchemy unicorn ])) ]; } '' cc -O1 ${./tests/fixture.c} -o fixture python ${./tests/smoke.py} "$PWD/fixture" ${finalAttrs.version} touch "$out" '';
meta = { description = "Powerful and user-friendly binary analysis platform"; homepage = "https://angr.io/"; license = lib.licenses.bsd2; maintainers = with lib.maintainers; [ connornelson fab ]; };})