1{
2 lib,
3 boto3,
4 botocore,
5 buildPythonPackage,
6 cached-property,
7 click,
8 click-option-group,
9 fetchFromGitHub,
10 jinja2,
11 markdown,
12 policy-sentry,
13 pytestCheckHook,
14 pythonOlder,
15 pyyaml,
16 schema,
17}:
18
19buildPythonPackage rec {
20 pname = "cloudsplaining";
21 version = "0.6.2";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "salesforce";
28 repo = pname;
29 rev = "refs/tags/${version}";
30 hash = "sha256-7aOPerqayuJTHItlpnVVSzOlSGNnqHvtIi5BdovNh3A=";
31 };
32
33 propagatedBuildInputs = [
34 boto3
35 botocore
36 cached-property
37 click
38 click-option-group
39 jinja2
40 markdown
41 policy-sentry
42 pyyaml
43 schema
44 ];
45
46 nativeCheckInputs = [ pytestCheckHook ];
47
48 postPatch = ''
49 # Ignore pinned versions
50 sed -i "s/'\(.*\)\(==\|>=\).*'/'\1'/g" requirements.txt
51 '';
52
53 disabledTests = [
54 "test_policy_expansion"
55 "test_statement_details_for_allow_not_action"
56 ];
57
58 pythonImportsCheck = [ "cloudsplaining" ];
59
60 meta = with lib; {
61 description = "Python module for AWS IAM security assessment";
62 mainProgram = "cloudsplaining";
63 homepage = "https://github.com/salesforce/cloudsplaining";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ fab ];
66 };
67}