1{ stdenv
2, lib
3, angr
4, buildPythonPackage
5, cmd2
6, coreutils
7, fetchFromGitHub
8, pygments
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "angrcli";
15 version = "1.2.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "fmagin";
22 repo = "angr-cli";
23 rev = "v${version}";
24 hash = "sha256-a5ajUBQwt3xUNkeSOeGOAFf47wd4UVk+LcuAHGqbq4s=";
25 };
26
27 postPatch = ''
28 substituteInPlace tests/test_derefs.py \
29 --replace "/bin/ls" "${coreutils}/bin/ls"
30 '';
31
32 propagatedBuildInputs = [
33 angr
34 cmd2
35 pygments
36 ];
37
38 nativeCheckInputs = [
39 coreutils
40 pytestCheckHook
41 ];
42
43 disabledTests = lib.optionals (!stdenv.hostPlatform.isx86) [
44 # expects the x86 register "rax" to exist
45 "test_cc"
46 "test_loop"
47 "test_max_depth"
48 ];
49
50 pythonImportsCheck = [
51 "angrcli"
52 ];
53
54 meta = with lib; {
55 description = "Python modules to allow easier interactive use of angr";
56 homepage = "https://github.com/fmagin/angr-cli";
57 license = with licenses; [ mit ];
58 maintainers = with maintainers; [ fab ];
59 };
60}