2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, requests
|
|
|
|
, websocket-client
|
|
|
|
, websockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sense-energy";
|
2022-01-19 23:45:15 +00:00
|
|
|
version = "0.9.4";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scottbonline";
|
|
|
|
repo = "sense";
|
|
|
|
rev = version;
|
2022-01-19 23:45:15 +00:00
|
|
|
hash = "sha256-X+sGfcEodxWkBmDamJkrZVsjyKkuqzsZ5BJFwOgL63M=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
requests
|
|
|
|
websocket-client
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sense_energy"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "API for the Sense Energy Monitor";
|
|
|
|
homepage = "https://github.com/scottbonline/sense";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|