about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/amoco/default.nix
blob: c78cc8a605763cc2e11e008eeaab995796bfd065 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "amoco";
  version = "2.9.8";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "bdcht";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-3+1ssFyU7SKFJgDYBQY0kVjmTHOD71D2AjnH+4bfLXo=";
  };

  nativeBuildInputs = with python3.pkgs; [
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
    blessed
    click
    crysp
    grandalf
    pyparsing
    tqdm
    traitlets
  ];

  passthru.optional-dependencies = {
    app = with python3.pkgs; [
      # ccrawl
      ipython
      prompt-toolkit
      pygments
      # pyside6
      z3-solver
    ];
  };

  nativeCheckInputs = with python3.pkgs; [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner'," ""
  '';

  pythonRelaxDeps = [
    "grandalf"
    "crysp"
  ];

  pythonImportsCheck = [
    "amoco"
  ];

  disabledTests = [
    # AttributeError: 'str' object has no attribute '__dict__'
    "test_func"
  ];

  meta = with lib; {
    description = "Tool for analysing binaries";
    mainProgram = "amoco";
    homepage = "https://github.com/bdcht/amoco";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ fab ];
  };
}