2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
aiohttp,
|
|
|
|
asn1,
|
|
|
|
python-dateutil,
|
|
|
|
setuptools,
|
|
|
|
tenacity,
|
2021-07-03 03:11:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smart-meter-texas";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.5.5";
|
|
|
|
pyproject = true;
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grahamwetzler";
|
|
|
|
repo = "smart-meter-texas";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-dHWcYrBtmKdEIU45rMy4KvoPX88hnRpd4KBlbJaNvgI=";
|
2021-07-03 03:11:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "pytest-runner" ""
|
2021-07-03 03:11:41 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2021-07-03 03:11:41 +00:00
|
|
|
aiohttp
|
2021-09-18 10:52:07 +00:00
|
|
|
asn1
|
2021-07-03 03:11:41 +00:00
|
|
|
python-dateutil
|
|
|
|
tenacity
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Connect to and retrieve data from the unofficial Smart Meter Texas API";
|
|
|
|
homepage = "https://github.com/grahamwetzler/smart-meter-texas";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|