at master 1.7 kB view raw
1{ 2 lib, 3 aws-sam-translator, 4 buildPythonPackage, 5 defusedxml, 6 fetchFromGitHub, 7 jschema-to-python, 8 jsonpatch, 9 jsonschema, 10 junit-xml, 11 mock, 12 networkx, 13 pydot, 14 pytestCheckHook, 15 pythonOlder, 16 pyyaml, 17 regex, 18 sarif-om, 19 setuptools, 20 sympy, 21}: 22 23buildPythonPackage rec { 24 pname = "cfn-lint"; 25 version = "1.38.3"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.8"; 29 30 src = fetchFromGitHub { 31 owner = "aws-cloudformation"; 32 repo = "cfn-lint"; 33 tag = "v${version}"; 34 hash = "sha256-n3NHmbo3qRhP7oqUOokw8oGnNXo4rhRhuAgL66hvfog="; 35 }; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 aws-sam-translator 41 jschema-to-python 42 jsonpatch 43 jsonschema 44 junit-xml 45 networkx 46 networkx 47 pyyaml 48 regex 49 sarif-om 50 sympy 51 ]; 52 53 optional-dependencies = { 54 graph = [ pydot ]; 55 junit = [ junit-xml ]; 56 sarif = [ 57 jschema-to-python 58 sarif-om 59 ]; 60 full = [ 61 jschema-to-python 62 junit-xml 63 pydot 64 sarif-om 65 ]; 66 }; 67 68 nativeCheckInputs = [ 69 defusedxml 70 mock 71 pytestCheckHook 72 ] 73 ++ lib.flatten (builtins.attrValues optional-dependencies); 74 75 preCheck = '' 76 export PATH=$out/bin:$PATH 77 ''; 78 79 disabledTests = [ 80 # Requires git directory 81 "test_update_docs" 82 ]; 83 84 pythonImportsCheck = [ "cfnlint" ]; 85 86 meta = with lib; { 87 description = "Checks cloudformation for practices and behaviour that could potentially be improved"; 88 mainProgram = "cfn-lint"; 89 homepage = "https://github.com/aws-cloudformation/cfn-lint"; 90 changelog = "https://github.com/aws-cloudformation/cfn-lint/blob/${src.tag}/CHANGELOG.md"; 91 license = licenses.mit; 92 maintainers = [ ]; 93 }; 94}