1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, aiodns
6, aiohttp
7, backports-zoneinfo
8}:
9
10buildPythonPackage rec {
11 pname = "forecast-solar";
12 version = "2.3.0";
13
14 src = fetchFromGitHub {
15 owner = "home-assistant-libs";
16 repo = "forecast_solar";
17 rev = "refs/tags/${version}";
18 sha256 = "sha256-1xRbTOeBHzLmf0FJwsrg/4+Z2Fs7uwbQwS2Tm41mNRk=";
19 };
20
21 PACKAGE_VERSION = version;
22
23 propagatedBuildInputs = [
24 aiodns
25 aiohttp
26 ] ++ lib.optionals (pythonOlder "3.9") [
27 backports-zoneinfo
28 ];
29
30 # no unit tests implemented
31 doCheck = false;
32
33 pythonImportsCheck = [ "forecast_solar" ];
34
35 meta = with lib; {
36 description = "Asynchronous Python client for getting forecast solar information";
37 homepage = "https://github.com/home-assistant-libs/forecast_solar";
38 license = licenses.mit;
39 maintainers = with maintainers; [ dotlambda ];
40 };
41}