1{ 2 lib, 3 aws-sam-translator, 4 buildPythonPackage, 5 fetchFromGitHub, 6 jschema-to-python, 7 jsonpatch, 8 jsonschema, 9 junit-xml, 10 mock, 11 networkx, 12 pydot, 13 pytestCheckHook, 14 pythonOlder, 15 pyyaml, 16 regex, 17 sarif-om, 18 setuptools, 19 sympy, 20}: 21 22buildPythonPackage rec { 23 pname = "cfn-lint"; 24 version = "0.86.0"; 25 format = "setuptools"; 26 27 disabled = pythonOlder "3.8"; 28 29 src = fetchFromGitHub { 30 owner = "aws-cloudformation"; 31 repo = "cfn-lint"; 32 rev = "refs/tags/v${version}"; 33 hash = "sha256-QkxCQ8YPRZSqAidmPus4JCgzez6uuRWvcaqfZsvugtY="; 34 }; 35 36 propagatedBuildInputs = [ 37 aws-sam-translator 38 jschema-to-python 39 jsonpatch 40 jsonschema 41 junit-xml 42 networkx 43 networkx 44 pyyaml 45 regex 46 sarif-om 47 sympy 48 ]; 49 50 nativeCheckInputs = [ 51 mock 52 pydot 53 pytestCheckHook 54 ]; 55 56 preCheck = '' 57 export PATH=$out/bin:$PATH 58 ''; 59 60 disabledTests = [ 61 # Requires git directory 62 "test_update_docs" 63 # Tests depend on network access (fails in getaddrinfo) 64 "test_update_resource_specs_python_2" 65 "test_update_resource_specs_python_3" 66 "test_sarif_formatter" 67 # Some CLI tests fails 68 "test_bad_config" 69 "test_override_parameters" 70 "test_positional_template_parameters" 71 "test_template_config" 72 ]; 73 74 pythonImportsCheck = [ "cfnlint" ]; 75 76 meta = with lib; { 77 description = "Checks cloudformation for practices and behaviour that could potentially be improved"; 78 mainProgram = "cfn-lint"; 79 homepage = "https://github.com/aws-cloudformation/cfn-lint"; 80 changelog = "https://github.com/aws-cloudformation/cfn-lint/blob/v${version}/CHANGELOG.md"; 81 license = licenses.mit; 82 maintainers = with maintainers; [ ]; 83 }; 84}