@@ -1,40 +1,49 @@
11{ lib
2−, buildPythonPackage
3−, fetchPypi
4−, pythonOlder
52, aiohttp
3+, aresponses
64, async-timeout
7−, semantic-version
8−, pytestrunner
5+, awesomeversion
6+, buildPythonPackage
7+, fetchFromGitHub
8+, pythonAtLeast
9+, pytest-asyncio
10+, pytestCheckHook
911}:
12+
1013buildPythonPackage rec {
1114 pname = "pyhaversion";
12− version = "3.4.2";
13− disabled = pythonOlder "3.8";
15+ version = "20.12.1";
16+
17+ # Only 3.8.0 and beyond are supported
18+ disabled = pythonAtLeast "3.8";
1419
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "b4e49dfa0f9dae10edd072e630d902e5497daa312baad58b7df7618efe863377";
20+ src = fetchFromGitHub {
21+ owner = "ludeeus";
22+ repo = pname;
23+ rev = version;
24+ sha256 = "17yl67dgw75dghljcfwzblm11kqnh6sxf47w62mxz86aq9zrvcxd";
1825 };
1926
2027 propagatedBuildInputs = [
2128 aiohttp
2229 async-timeout
23− semantic-version
30+ awesomeversion
2431 ];
2532
26− buildInputs = [
27− pytestrunner
33+ checkInputs = [
34+ aresponses
35+ awesomeversion
36+ pytest-asyncio
37+ pytestCheckHook
2838 ];
2939
30− # no tests
31− doCheck = false;
3240 pythonImportsCheck = [ "pyhaversion" ];
3341
3442 meta = with lib; {
35− description = "A python module to the newest version number of Home Assistant";
43+ description = "Python module to the newest version number of Home Assistant";
3644 homepage = "https://github.com/ludeeus/pyhaversion";
45+ changelog = "https://github.com/ludeeus/pyhaversion/releases/tag/${version}";
3746 license = with licenses; [ mit ];
38− maintainers = [ maintainers.makefu ];
47+ maintainers = with maintainers; [ makefu ];
3948 };
4049}