ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / cfn-lint / default.nix
blob238f5e83630efe3f8f5f34550a4a2ce808933ea4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , aws-sam-translator
6 , jschema-to-python
7 , jsonpatch
8 , jsonschema
9 , junit-xml
10 , networkx
11 , pyyaml
12 , sarif-om
13 , setuptools
14 , six
15 , mock
16 , pydot
17 , pytestCheckHook
20 buildPythonPackage rec {
21   pname = "cfn-lint";
22   version = "0.61.2";
24   src = fetchFromGitHub {
25     owner = "aws-cloudformation";
26     repo = "cfn-python-lint";
27     rev = "refs/tags/v${version}";
28     sha256 = "sha256-282h1fBWhAfwqCuP+dU3ajn0gQtmOcPNTMKZ0a2+vHU=";
29   };
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "jsonschema~=3.0" "jsonschema>=3.0"
34   '';
36   propagatedBuildInputs = [
37     aws-sam-translator
38     jschema-to-python
39     jsonpatch
40     jsonschema
41     junit-xml
42     networkx
43     pyyaml
44     sarif-om
45     six
46   ];
48   checkInputs = [
49     mock
50     pydot
51     pytestCheckHook
52   ];
54   preCheck = ''
55     export PATH=$out/bin:$PATH
56   '';
58   disabledTests = [
59     # These tests depend on the current date, for example because of issues like this.
60     # This makes it possible for them to succeed on hydra and then begin to fail without
61     # any code changes.
62     # https://github.com/aws-cloudformation/cfn-python-lint/issues/1705
63     # See also: https://github.com/NixOS/nixpkgs/issues/108076
64     "TestQuickStartTemplates"
65     # requires git directory
66     "test_update_docs"
67     # Tests depend on network access (fails in getaddrinfo)
68     "test_update_resource_specs_python_2"
69     "test_update_resource_specs_python_3"
70     "test_sarif_formatter"
71   ];
73   pythonImportsCheck = [
74     "cfnlint"
75     "cfnlint.conditions"
76     "cfnlint.core"
77     "cfnlint.decode.node"
78     "cfnlint.decode.cfn_yaml"
79     "cfnlint.decode.cfn_json"
80     "cfnlint.decorators.refactored"
81     "cfnlint.graph"
82     "cfnlint.helpers"
83     "cfnlint.rules"
84     "cfnlint.runner"
85     "cfnlint.template"
86     "cfnlint.transform"
87   ];
89   meta = with lib; {
90     description = "Checks cloudformation for practices and behaviour that could potentially be improved";
91     homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
92     changelog = "https://github.com/aws-cloudformation/cfn-python-lint/blob/master/CHANGELOG.md";
93     license = licenses.mit;
94   };