2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
2024-06-05 15:53:02 +00:00
|
|
|
aiozoneinfo,
|
2024-04-21 15:54:59 +00:00
|
|
|
arrow,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pyotp,
|
|
|
|
python-dotenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "opower";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.5.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tronikos";
|
|
|
|
repo = "opower";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-Rv5ttUUlBqa4yFEV5WWrZ+fhL/mrvjoYFsMN6xnFUhQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
aiohttp
|
2024-06-05 15:53:02 +00:00
|
|
|
aiozoneinfo
|
2023-07-15 17:15:38 +00:00
|
|
|
arrow
|
2023-08-22 20:05:09 +00:00
|
|
|
pyotp
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
python-dotenv
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "opower" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for getting historical and forecasted usage/cost from utilities that use opower.com";
|
|
|
|
homepage = "https://github.com/tronikos/opower";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/tronikos/opower/releases/tag/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|