Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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, rpyc
26, sortedcontainers
27, sqlalchemy
28, sympy
29, unicorn
30}:
31
32buildPythonPackage rec {
33 pname = "angr";
34 version = "9.2.30";
35 format = "pyproject";
36
37 disabled = pythonOlder "3.8";
38
39 src = fetchFromGitHub {
40 owner = pname;
41 repo = pname;
42 rev = "v${version}";
43 hash = "sha256-UCXxKCvxzGr/c4WuAAFLfEp2QOlKD3n8tqSGI4fjEDo=";
44 };
45
46 propagatedBuildInputs = [
47 ailment
48 archinfo
49 cachetools
50 capstone
51 cffi
52 claripy
53 cle
54 cppheaderparser
55 dpkt
56 gitpython
57 itanium-demangler
58 mulpyplexer
59 nampa
60 networkx
61 progressbar2
62 protobuf
63 psutil
64 pycparser
65 pyvex
66 rpyc
67 sortedcontainers
68 sqlalchemy
69 sympy
70 unicorn
71 ];
72
73 setupPyBuildFlags = lib.optionals stdenv.isLinux [
74 "--plat-name"
75 "linux"
76 ];
77
78 # Tests have additional requirements, e.g., pypcode and angr binaries
79 # cle is executing the tests with the angr binaries
80 doCheck = false;
81
82 pythonImportsCheck = [
83 "angr"
84 "claripy"
85 "cle"
86 "pyvex"
87 "archinfo"
88 ];
89
90 meta = with lib; {
91 description = "Powerful and user-friendly binary analysis platform";
92 homepage = "https://angr.io/";
93 license = with licenses; [ bsd2 ];
94 maintainers = with maintainers; [ fab ];
95 };
96}