Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, pyyaml 6, six 7, requests 8, aws-sam-translator 9, importlib-metadata 10, importlib-resources 11, jsonpatch 12, jsonschema 13, pathlib2 14, setuptools 15, junit-xml 16, networkx 17}: 18 19buildPythonPackage rec { 20 pname = "cfn-lint"; 21 version = "0.35.0"; 22 23 src = fetchPypi { 24 inherit pname version; 25 sha256 = "42023d89520e3a29891ec2eb4c326eef9d1f7516fe9abee8b6c97ce064187b45"; 26 }; 27 28 postPatch = '' 29 substituteInPlace setup.py --replace 'importlib_resources~=1.4;python_version<"3.7" and python_version!="3.4"' 'importlib_resources;python_version<"3.7"' 30 ''; 31 32 propagatedBuildInputs = [ 33 pyyaml 34 six 35 requests 36 aws-sam-translator 37 jsonpatch 38 jsonschema 39 pathlib2 40 setuptools 41 junit-xml 42 networkx 43 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata importlib-resources ]; 44 45 # No tests included in archive 46 doCheck = false; 47 pythonImportsCheck = [ 48 "cfnlint" 49 "cfnlint.conditions" 50 "cfnlint.core" 51 "cfnlint.decode.node" 52 "cfnlint.decode.cfn_yaml" 53 "cfnlint.decode.cfn_json" 54 "cfnlint.decorators.refactored" 55 "cfnlint.graph" 56 "cfnlint.helpers" 57 "cfnlint.rules" 58 "cfnlint.runner" 59 "cfnlint.template" 60 "cfnlint.transform" 61 ]; 62 63 meta = with lib; { 64 description = "Checks cloudformation for practices and behaviour that could potentially be improved"; 65 homepage = "https://github.com/aws-cloudformation/cfn-python-lint"; 66 license = licenses.mit; 67 }; 68}