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