depot/third_party/nixpkgs/pkgs/development/python-modules/sense-energy/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

49 lines
882 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, aiohttp
, pythonOlder
, requests
, websocket-client
, websockets
}:
buildPythonPackage rec {
pname = "sense-energy";
version = "0.11.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "scottbonline";
repo = "sense";
rev = version;
hash = "sha256-QX8CPf3o0IaAhjWYeUjDoAgktNrh/sSRjFhOweAxxco=";
};
postPatch = ''
sed -i '/download_url/d' setup.py
'';
propagatedBuildInputs = [
aiohttp
requests
websocket-client
websockets
];
# no tests implemented
doCheck = false;
pythonImportsCheck = [
"sense_energy"
];
meta = with lib; {
description = "API for the Sense Energy Monitor";
homepage = "https://github.com/scottbonline/sense";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}