2021-10-07 14:46:35 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, iso4217
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytest-asyncio
|
2021-10-07 14:46:35 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyefergy";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "22.1.1";
|
2021-10-07 14:46:35 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tkdrob";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-AdoM+PcVoajxhnEfkyN9UuNufChu8XGmZDLNC3mjrps=";
|
2021-10-07 14:46:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
iso4217
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# Tests require network access
|
|
|
|
doCheck =false;
|
2021-10-07 14:46:35 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyefergy"
|
|
|
|
];
|
2021-10-07 14:46:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API library for Efergy energy meters";
|
|
|
|
homepage = "https://github.com/tkdrob/pyefergy";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|