@@ -1,28 +1,34 @@
2, buildPythonPackage
2, buildPythonPackage
3−, fetchPypi
3+, fetchFromGitHub
4, pythonOlder
4, pythonOlder
8, aws-sam-translator
5, aws-sam-translator
9, importlib-metadata
6, importlib-metadata
10, importlib-resources
7, importlib-resources
11, jsonpatch
8, jsonpatch
12, jsonschema
9, jsonschema
15, junit-xml
10, junit-xml
19buildPythonPackage rec {
23buildPythonPackage rec {
20 pname = "cfn-lint";
24 pname = "cfn-lint";
21− version = "0.35.0";
25+ version = "0.35.1";
23− src = fetchPypi {
27+ src = fetchFromGitHub {
28+ owner = "aws-cloudformation";
29+ repo = "cfn-python-lint";
24− inherit pname version;
30+ rev = "v${version}";
25− sha256 = "42023d89520e3a29891ec2eb4c326eef9d1f7516fe9abee8b6c97ce064187b45";
31+ sha256 = "1ajb0412hw9fg9m4b3xbpfbp8cixmnpjxrkaks6k749xinzsv7qk";
28 postPatch = ''
34 postPatch = ''
@@ -30,20 +36,18 @@ buildPythonPackage rec {
32 propagatedBuildInputs = [
38 propagatedBuildInputs = [
36 aws-sam-translator
39 aws-sam-translator
38 jsonschema
41 jsonschema
43 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata importlib-resources ];
49 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata importlib-resources ];
45− # No tests included in archive
47 pythonImportsCheck = [
51 pythonImportsCheck = [
49 "cfnlint.conditions"
53 "cfnlint.conditions"
@@ -60,9 +64,13 @@ buildPythonPackage rec {
60 "cfnlint.transform"
64 "cfnlint.transform"
67+ checkInputs = [ pytestCheckHook mock pydot ];
68+ preCheck = "export PATH=$out/bin:$PATH";
63 meta = with lib; {
70 meta = with lib; {
64 description = "Checks cloudformation for practices and behaviour that could potentially be improved";
71 description = "Checks cloudformation for practices and behaviour that could potentially be improved";
65 homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
72 homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
73+ changelog = "https://github.com/aws-cloudformation/cfn-python-lint/blob/master/CHANGELOG.md";
66 license = licenses.mit;
74 license = licenses.mit;