2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, arrow
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-08-22 20:05:09 +00:00
|
|
|
, pyotp
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, setuptools
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "opower";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.0.39";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
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}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-5JcediHl2TeMhYa6OJqoW5K0SlAjdIrMwj2IHh3qW7I=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pythonRemoveDeps = [
|
|
|
|
# https://github.com/tronikos/opower/pull/4
|
|
|
|
"asyncio"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
arrow
|
2023-08-22 20:05:09 +00:00
|
|
|
pyotp
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"opower"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|