2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aws-sam-translator,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jschema-to-python,
|
|
|
|
jsonpatch,
|
|
|
|
jsonschema,
|
|
|
|
junit-xml,
|
|
|
|
mock,
|
|
|
|
networkx,
|
|
|
|
pydot,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
regex,
|
|
|
|
sarif-om,
|
|
|
|
setuptools,
|
|
|
|
sympy,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cfn-lint";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.87.7";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws-cloudformation";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "cfn-lint";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-em6Vi9zIn8ikmcHVbljA1vr+R3t8ZpJ57p3Ix3bqMYU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aws-sam-translator
|
2021-12-26 17:43:05 +00:00
|
|
|
jschema-to-python
|
2020-04-24 23:36:52 +00:00
|
|
|
jsonpatch
|
|
|
|
jsonschema
|
2020-06-15 15:56:04 +00:00
|
|
|
junit-xml
|
|
|
|
networkx
|
2023-10-09 19:29:22 +00:00
|
|
|
networkx
|
2020-09-25 04:45:31 +00:00
|
|
|
pyyaml
|
2023-10-09 19:29:22 +00:00
|
|
|
regex
|
2021-12-26 17:43:05 +00:00
|
|
|
sarif-om
|
2023-10-09 19:29:22 +00:00
|
|
|
sympy
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-05 17:05:55 +00:00
|
|
|
mock
|
|
|
|
pydot
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-10-09 19:29:22 +00:00
|
|
|
# Requires git directory
|
2021-01-05 17:05:55 +00:00
|
|
|
"test_update_docs"
|
2021-04-26 19:14:03 +00:00
|
|
|
# Tests depend on network access (fails in getaddrinfo)
|
|
|
|
"test_update_resource_specs_python_2"
|
|
|
|
"test_update_resource_specs_python_3"
|
2021-12-26 17:43:05 +00:00
|
|
|
"test_sarif_formatter"
|
2023-10-09 19:29:22 +00:00
|
|
|
# Some CLI tests fails
|
|
|
|
"test_bad_config"
|
|
|
|
"test_override_parameters"
|
|
|
|
"test_positional_template_parameters"
|
|
|
|
"test_template_config"
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cfnlint" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Checks cloudformation for practices and behaviour that could potentially be improved";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cfn-lint";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://github.com/aws-cloudformation/cfn-lint";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/aws-cloudformation/cfn-lint/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|