2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-08-05 21:33:18 +00:00
|
|
|
, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
, aiodns
|
|
|
|
, aiohttp
|
2021-08-05 21:33:18 +00:00
|
|
|
, backports-zoneinfo
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "forecast-solar";
|
2021-08-25 08:27:29 +00:00
|
|
|
version = "2.1.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
|
|
|
repo = "forecast_solar";
|
|
|
|
rev = version;
|
2021-08-25 08:27:29 +00:00
|
|
|
sha256 = "sha256-UrLy+j8YDWuS9pciEDKb/+UoCcw54XWiIUAEYC72/W0=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
PACKAGE_VERSION = version;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiodns
|
|
|
|
aiohttp
|
2021-08-05 21:33:18 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
backports-zoneinfo
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# no unit tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "forecast_solar" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous Python client for getting forecast solar information";
|
|
|
|
homepage = "https://github.com/home-assistant-libs/forecast_solar";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|