Fabian Affolter 2023-06-27 23:51:43 +02:00
parent 5ca74285a2
commit dae9199ace

View file

@ -1,38 +1,37 @@
{ lib { lib
, aws-sam-translator
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder
, aws-sam-translator
, jschema-to-python , jschema-to-python
, jsonpatch , jsonpatch
, jsonschema , jsonschema
, junit-xml , junit-xml
, networkx
, pyyaml
, sarif-om
, setuptools
, six
, mock , mock
, networkx
, pydot , pydot
, pytestCheckHook , pytestCheckHook
, pythonOlder
, pyyaml
, regex
, sarif-om
, setuptools
, sympy
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "cfn-lint"; pname = "cfn-lint";
version = "0.73.2"; version = "0.77.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aws-cloudformation"; owner = "aws-cloudformation";
repo = "cfn-python-lint"; repo = "cfn-python-lint";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-CNB5LrXllGxy99NjCrbjkUXUpJ72U3pUnWqrqkOiCG8="; hash = "sha256-lIL+lwrQqD4mamf0xDwxpL4jTgQWSLzRM1nUgkSZgQA=";
}; };
postPatch = ''
substituteInPlace setup.py \
--replace "jsonschema~=3.0" "jsonschema>=3.0"
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
aws-sam-translator aws-sam-translator
jschema-to-python jschema-to-python
@ -40,9 +39,11 @@ buildPythonPackage rec {
jsonschema jsonschema
junit-xml junit-xml
networkx networkx
networkx
pyyaml pyyaml
regex
sarif-om sarif-om
six sympy
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
@ -62,34 +63,28 @@ buildPythonPackage rec {
# https://github.com/aws-cloudformation/cfn-python-lint/issues/1705 # https://github.com/aws-cloudformation/cfn-python-lint/issues/1705
# See also: https://github.com/NixOS/nixpkgs/issues/108076 # See also: https://github.com/NixOS/nixpkgs/issues/108076
"TestQuickStartTemplates" "TestQuickStartTemplates"
# requires git directory # Requires git directory
"test_update_docs" "test_update_docs"
# Tests depend on network access (fails in getaddrinfo) # Tests depend on network access (fails in getaddrinfo)
"test_update_resource_specs_python_2" "test_update_resource_specs_python_2"
"test_update_resource_specs_python_3" "test_update_resource_specs_python_3"
"test_sarif_formatter" "test_sarif_formatter"
# Some CLI tests fails
"test_bad_config"
"test_override_parameters"
"test_positional_template_parameters"
"test_template_config"
]; ];
pythonImportsCheck = [ pythonImportsCheck = [
"cfnlint" "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"
]; ];
meta = with lib; { meta = with lib; {
description = "Checks cloudformation for practices and behaviour that could potentially be improved"; description = "Checks cloudformation for practices and behaviour that could potentially be improved";
homepage = "https://github.com/aws-cloudformation/cfn-python-lint"; homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
changelog = "https://github.com/aws-cloudformation/cfn-python-lint/blob/master/CHANGELOG.md"; changelog = "https://github.com/aws-cloudformation/cfn-lint/blob/v${version}/CHANGELOG.md";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ];
}; };
} }