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