about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/atomic-operator/default.nix
blob: 6db7f0ecdd0880b8871fc0fbdba027d7e7308073 (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
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "atomic-operator";
  version = "0.8.5";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "swimlane";
    repo = pname;
    rev = version;
    hash = "sha256-DyNqu3vndyLkmfybCfTbgxk3t/ALg7IAkAMg4kBkH7Q=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "charset_normalizer~=2.0.0" "charset_normalizer"
  '';

  propagatedBuildInputs = with python3.pkgs; [
    attrs
    certifi
    chardet
    charset-normalizer
    fire
    idna
    paramiko
    pick
    pypsrp
    pyyaml
    requests
    urllib3
  ];

  nativeCheckInputs = with python3.pkgs; [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "atomic_operator"
  ];

  disabledTests = [
    # Tests require network access
    "test_download_of_atomic_red_team_repo"
    "test_setting_input_arguments"
    "test_config_parser"
  ];

  meta = with lib; {
    description = "Tool to execute Atomic Red Team tests (Atomics)";
    homepage = "https://www.atomic-operator.com/";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}