2021-07-03 03:11:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
2021-09-18 10:52:07 +00:00
|
|
|
, asn1
|
2021-07-03 03:11:41 +00:00
|
|
|
, python-dateutil
|
|
|
|
, tenacity
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smart-meter-texas";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.5.1";
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grahamwetzler";
|
|
|
|
repo = "smart-meter-texas";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-rjMRV5MekwRkipes2nWos/1zi3sD+Ls8LyD3+t5FOZc=";
|
2021-07-03 03:11:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|