1{ lib 2, beautifulsoup4 3, buildPythonPackage 4, envoy-utils 5, fetchFromGitHub 6, fetchpatch 7, httpx 8, pyjwt 9, pytest-asyncio 10, pytestCheckHook 11, pytest-raises 12, pythonOlder 13, respx 14}: 15 16buildPythonPackage rec { 17 pname = "envoy-reader"; 18 version = "0.21.3"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "jesserizzo"; 25 repo = "envoy_reader"; 26 rev = version; 27 sha256 = "sha256-aIpZ4ln4L57HwK8H0FqsyNnXosnAp3ingrJI6/MPS90="; 28 }; 29 30 propagatedBuildInputs = [ 31 beautifulsoup4 32 envoy-utils 33 httpx 34 pyjwt 35 ]; 36 37 checkInputs = [ 38 pytest-raises 39 pytest-asyncio 40 pytestCheckHook 41 respx 42 ]; 43 44 postPatch = '' 45 substituteInPlace setup.py \ 46 --replace "pytest-runner>=5.2" "" \ 47 --replace "pyjwt==2.1.0" "pyjwt>=2.1.0" 48 ''; 49 50 pythonImportsCheck = [ 51 "envoy_reader" 52 ]; 53 54 meta = with lib; { 55 description = "Python module to read from Enphase Envoy units"; 56 homepage = "https://github.com/jesserizzo/envoy_reader"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}