about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/cloud-custodian/default.nix
blob: 01e9d9a8572214128488e37ff168848975f62bed (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
{ lib, buildPythonApplication, fetchPypi
, argcomplete
, boto3
, botocore
, certifi
, python-dateutil
, jsonpatch
, jsonschema
, pyyaml
, tabulate
, urllib3
}:

buildPythonApplication rec {
  pname = "cloud-custodian";
  version = "0.8.45.1";

  src = fetchPypi {
    pname = "c7n";
    inherit version;
    sha256 = "0c199gdmpm83xfghrbzp02xliyxiygsnx2fvb35j9qpf37wzzp3z";
  };

  propagatedBuildInputs = [
    argcomplete
    boto3
    botocore
    certifi
    python-dateutil
    jsonpatch
    jsonschema
    pyyaml
    tabulate
    urllib3
  ];

  # Requires tox, many packages, and network access
  checkPhase = ''
    $out/bin/custodian --help
  '';

  meta = with lib; {
    description = "Rules engine for cloud security, cost optimization, and governance";
    mainProgram = "custodian";
    homepage = "https://cloudcustodian.io";
    license = licenses.asl20;
    maintainers = with maintainers; [ bhipple ];
  };
}