about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyhaversion
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-01-10 11:01:43 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-01-12 22:49:05 +0100
commit0b371941a1d8044fa09919a30daaeb00c55a8f16 (patch)
treeb97f000dac8b930a2ca9c3a55534c693f0670f36 /pkgs/development/python-modules/pyhaversion
parent717020f3f6f23312f79d9c221039430c86d0c93f (diff)
python3Packages.pyhaversion: 3.4.2 -> 20.12.1
Diffstat (limited to 'pkgs/development/python-modules/pyhaversion')
-rw-r--r--pkgs/development/python-modules/pyhaversion/default.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/pyhaversion/default.nix b/pkgs/development/python-modules/pyhaversion/default.nix
index 27d750a5df768..3af6b3a263e88 100644
--- a/pkgs/development/python-modules/pyhaversion/default.nix
+++ b/pkgs/development/python-modules/pyhaversion/default.nix
@@ -1,40 +1,49 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-, pythonOlder
 , aiohttp
+, aresponses
 , async-timeout
-, semantic-version
-, pytestrunner
+, awesomeversion
+, buildPythonPackage
+, fetchFromGitHub
+, pythonAtLeast
+, pytest-asyncio
+, pytestCheckHook
 }:
+
 buildPythonPackage rec {
   pname = "pyhaversion";
-  version = "3.4.2";
-  disabled = pythonOlder "3.8";
+  version = "20.12.1";
+
+  # Only 3.8.0 and beyond are supported
+  disabled = pythonAtLeast "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "b4e49dfa0f9dae10edd072e630d902e5497daa312baad58b7df7618efe863377";
+  src = fetchFromGitHub {
+    owner = "ludeeus";
+    repo = pname;
+    rev = version;
+    sha256 = "17yl67dgw75dghljcfwzblm11kqnh6sxf47w62mxz86aq9zrvcxd";
   };
 
   propagatedBuildInputs = [
     aiohttp
     async-timeout
-    semantic-version
+    awesomeversion
   ];
 
-  buildInputs = [
-    pytestrunner
+  checkInputs = [
+    aresponses
+    awesomeversion
+    pytest-asyncio
+    pytestCheckHook
   ];
 
-  # no tests
-  doCheck = false;
   pythonImportsCheck = [ "pyhaversion" ];
 
   meta = with lib; {
-    description = "A python module to the newest version number of Home Assistant";
+    description = "Python module to the newest version number of Home Assistant";
     homepage = "https://github.com/ludeeus/pyhaversion";
+    changelog = "https://github.com/ludeeus/pyhaversion/releases/tag/${version}";
     license = with licenses; [ mit ];
-    maintainers = [ maintainers.makefu ];
+    maintainers = with maintainers; [ makefu ];
   };
 }