1{ lib
2, stdenv
3, ailment
4, archinfo
5, buildPythonPackage
6, cachetools
7, capstone
8, cffi
9, claripy
10, cle
11, cppheaderparser
12, dpkt
13, fetchFromGitHub
14, gitpython
15, itanium-demangler
16, mulpyplexer
17, nampa
18, networkx
19, progressbar2
20, protobuf
21, psutil
22, pycparser
23, pythonOlder
24, pyvex
25, rich
26, rpyc
27, sortedcontainers
28, sqlalchemy
29, sympy
30, unicorn
31}:
32
33buildPythonPackage rec {
34 pname = "angr";
35 version = "9.2.54";
36 format = "pyproject";
37
38 disabled = pythonOlder "3.8";
39
40 src = fetchFromGitHub {
41 owner = pname;
42 repo = pname;
43 rev = "refs/tags/v${version}";
44 hash = "sha256-5EDVJN8o6Dkb3/QzJJ072RN1kYoMxDhrFnSVAzHzdNc=";
45 };
46
47 propagatedBuildInputs = [
48 ailment
49 archinfo
50 cachetools
51 capstone
52 cffi
53 claripy
54 cle
55 cppheaderparser
56 dpkt
57 gitpython
58 itanium-demangler
59 mulpyplexer
60 nampa
61 networkx
62 progressbar2
63 protobuf
64 psutil
65 pycparser
66 pyvex
67 rich
68 rpyc
69 sortedcontainers
70 sqlalchemy
71 sympy
72 unicorn
73 ];
74
75 setupPyBuildFlags = lib.optionals stdenv.isLinux [
76 "--plat-name"
77 "linux"
78 ];
79
80 # Tests have additional requirements, e.g., pypcode and angr binaries
81 # cle is executing the tests with the angr binaries
82 doCheck = false;
83
84 pythonImportsCheck = [
85 "angr"
86 "claripy"
87 "cle"
88 "pyvex"
89 "archinfo"
90 ];
91
92 meta = with lib; {
93 description = "Powerful and user-friendly binary analysis platform";
94 homepage = "https://angr.io/";
95 license = with licenses; [ bsd2 ];
96 maintainers = with maintainers; [ fab ];
97 };
98}