Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, angr
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, progressbar
7, pythonOlder
8, pythonRelaxDepsHook
9, tqdm
10}:
11
12buildPythonPackage rec {
13 pname = "angrop";
14 version = "9.2.7";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "angr";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-wIPk7Cz7FSPviPFBSLrBjLr9M0o3pyoJM7wiAhHrg9Q=";
24 };
25
26 patches = [
27 (fetchpatch {
28 name = "compatibility-with-newer-angr.patch";
29 url = "https://github.com/angr/angrop/commit/23194ee4ecdcb7a7390ec04eb133786ec3f807b1.patch";
30 hash = "sha256-n9/oPUblUHSk81qwU129rnNOjsNViaegp6454CaDo+8=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 pythonRelaxDepsHook
36 ];
37
38 propagatedBuildInputs = [
39 angr
40 progressbar
41 tqdm
42 ];
43
44 pythonRelaxDeps = [
45 "angr"
46 ];
47
48 # Tests have additional requirements, e.g., angr binaries
49 # cle is executing the tests with the angr binaries already and is a requirement of angr
50 doCheck = false;
51
52 pythonImportsCheck = [
53 "angrop"
54 ];
55
56 meta = with lib; {
57 description = "ROP gadget finder and chain builder";
58 homepage = "https://github.com/angr/angrop";
59 license = with licenses; [ bsd2 ];
60 maintainers = with maintainers; [ fab ];
61 };
62}