depot/third_party/nixpkgs/pkgs/development/python-modules/forecast-solar/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

45 lines
933 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, aiodns
, aiohttp
, backports-zoneinfo
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "forecast-solar";
version = "3.0.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = "forecast_solar";
rev = "refs/tags/${version}";
hash = "sha256-Go0DF2qyVyGVYEeoEEuxsSR9Ge8Pg4S77zM1HL83ELc=";
};
PACKAGE_VERSION = version;
propagatedBuildInputs = [
aiodns
aiohttp
] ++ lib.optionals (pythonOlder "3.9") [
backports-zoneinfo
];
pythonImportsCheck = [ "forecast_solar" ];
nativeCheckInputs = [
pytestCheckHook
];
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 ];
};
}