2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
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
|
2023-04-29 16:46:19 +00:00
|
|
|
, pytestCheckHook
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "forecast-solar";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.0";
|
|
|
|
pyproject = true;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
|
|
|
repo = "forecast_solar";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-iol0XtfPZI95o/uEyBcXgeQjcfl2kI+4mugtywa6BXI=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
env.PACKAGE_VERSION = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-06-28 23:13:55 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "forecast_solar" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/home-assistant-libs/forecast_solar/releases/tag/v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|