summary refs log tree commit diff
path: root/pkgs/development/python-modules/cfn-lint
diff options
context:
space:
mode:
authorDrew Risinger <drewrisinger@users.noreply.github.com>2020-09-12 11:26:12 -0400
committerJon <jonringer@users.noreply.github.com>2020-09-20 11:30:00 -0700
commit4e435eee31b118d24fe132c82b1232df26e409c9 (patch)
treecb9737700dc522853c4e0e6862c3e3e821ac38a5 /pkgs/development/python-modules/cfn-lint
parent9a4468b935107263ca8e9bab2219e72647a20bf2 (diff)
downloadnixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar.gz
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar.bz2
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar.lz
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar.xz
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.tar.zst
nixpkgs-4e435eee31b118d24fe132c82b1232df26e409c9.zip
pythonPackages.cfn-lint: 0.35.0 -> 0.35.1
* Update version
* Cleanup packaging: run tests & use GitHub source
* Meta: add changelog
Diffstat (limited to 'pkgs/development/python-modules/cfn-lint')
-rw-r--r--pkgs/development/python-modules/cfn-lint/default.nix42
1 files changed, 25 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/cfn-lint/default.nix b/pkgs/development/python-modules/cfn-lint/default.nix
index f18e307c61c..b79bf761317 100644
--- a/pkgs/development/python-modules/cfn-lint/default.nix
+++ b/pkgs/development/python-modules/cfn-lint/default.nix
@@ -1,28 +1,34 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 , pythonOlder
-, pyyaml
-, six
-, requests
 , aws-sam-translator
 , importlib-metadata
 , importlib-resources
 , jsonpatch
 , jsonschema
-, pathlib2
-, setuptools
 , junit-xml
 , networkx
+, pathlib2
+, pyyaml
+, requests
+, setuptools
+, six
+# Test inputs
+, pytestCheckHook
+, mock
+, pydot
 }:
 
 buildPythonPackage rec {
   pname = "cfn-lint";
-  version = "0.35.0";
+  version = "0.35.1";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "42023d89520e3a29891ec2eb4c326eef9d1f7516fe9abee8b6c97ce064187b45";
+  src = fetchFromGitHub {
+    owner = "aws-cloudformation";
+    repo  = "cfn-python-lint";
+    rev = "v${version}";
+    sha256 = "1ajb0412hw9fg9m4b3xbpfbp8cixmnpjxrkaks6k749xinzsv7qk";
   };
 
   postPatch = ''
@@ -30,20 +36,18 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [
-    pyyaml
-    six
-    requests
     aws-sam-translator
     jsonpatch
     jsonschema
-    pathlib2
-    setuptools
     junit-xml
     networkx
+    pathlib2
+    pyyaml
+    requests
+    setuptools
+    six
   ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata importlib-resources ];
 
-  # No tests included in archive
-  doCheck = false;
   pythonImportsCheck = [
     "cfnlint"
     "cfnlint.conditions"
@@ -60,9 +64,13 @@ buildPythonPackage rec {
     "cfnlint.transform"
   ];
 
+  checkInputs = [ pytestCheckHook mock pydot ];
+  preCheck = "export PATH=$out/bin:$PATH";
+
   meta = with lib; {
     description = "Checks cloudformation for practices and behaviour that could potentially be improved";
     homepage = "https://github.com/aws-cloudformation/cfn-python-lint";
+    changelog = "https://github.com/aws-cloudformation/cfn-python-lint/blob/master/CHANGELOG.md";
     license = licenses.mit;
   };
 }