nixpkgs/pkgs/development/python-modules/cfn-lint/default.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

2019-05-01 01:59:49 -07:00
{ lib
, buildPythonPackage
, fetchPypi
2019-12-21 01:52:28 -08:00
, pythonOlder
2019-05-01 01:59:49 -07:00
, pyyaml
, six
, requests
, aws-sam-translator
2019-12-21 01:52:28 -08:00
, importlib-metadata
, importlib-resources
2019-05-01 01:59:49 -07:00
, jsonpatch
, jsonschema
, pathlib2
2019-11-08 09:16:10 -08:00
, setuptools
2020-06-11 01:49:49 -07:00
, junit-xml
, networkx
2019-05-01 01:59:49 -07:00
}:
buildPythonPackage rec {
pname = "cfn-lint";
2020-08-16 10:30:54 -07:00
version = "0.35.0";
2019-05-01 01:59:49 -07:00
src = fetchPypi {
inherit pname version;
2020-08-16 10:30:54 -07:00
sha256 = "42023d89520e3a29891ec2eb4c326eef9d1f7516fe9abee8b6c97ce064187b45";
2019-05-01 01:59:49 -07:00
};
postPatch = ''
substituteInPlace setup.py --replace 'importlib_resources~=1.4;python_version<"3.7" and python_version!="3.4"' 'importlib_resources;python_version<"3.7"'
'';
2019-05-01 01:59:49 -07:00
propagatedBuildInputs = [
pyyaml
six
requests
aws-sam-translator
jsonpatch
jsonschema
pathlib2
2019-11-08 09:16:10 -08:00
setuptools
2020-06-11 01:49:49 -07:00
junit-xml
networkx
2019-12-21 01:52:28 -08:00
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata importlib-resources ];
2019-05-01 01:59:49 -07:00
# No tests included in archive
doCheck = false;
pythonImportsCheck = [
"cfnlint"
"cfnlint.conditions"
"cfnlint.core"
"cfnlint.decode.node"
"cfnlint.decode.cfn_yaml"
"cfnlint.decode.cfn_json"
"cfnlint.decorators.refactored"
"cfnlint.graph"
"cfnlint.helpers"
"cfnlint.rules"
"cfnlint.runner"
"cfnlint.template"
"cfnlint.transform"
];
2019-05-01 01:59:49 -07:00
meta = with lib; {
description = "Checks cloudformation for practices and behaviour that could potentially be improved";
homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
2019-05-01 01:59:49 -07:00
license = licenses.mit;
};
}