2021-06-27 13:55:56 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-07-22 10:12:24 +01:00
|
|
|
, pythonOlder
|
2021-06-27 13:55:56 +01:00
|
|
|
, aiodns
|
|
|
|
, aiohttp
|
2021-07-22 10:12:24 +01:00
|
|
|
, backports-zoneinfo
|
2021-06-27 13:55:56 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "forecast-solar";
|
2021-07-22 10:12:24 +01:00
|
|
|
version = "2.0.0";
|
2021-06-27 13:55:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
|
|
|
repo = "forecast_solar";
|
|
|
|
rev = version;
|
2021-07-22 10:12:24 +01:00
|
|
|
sha256 = "12d9bb3q7gp0yy152x0rcbi727wrg3w9458asp2nhnqlb8nm6j4d";
|
2021-06-27 13:55:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiodns
|
|
|
|
aiohttp
|
2021-07-22 10:12:24 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
backports-zoneinfo
|
2021-06-27 13:55:56 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|