nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aioresponses,
5 awesomeversion,
6 buildPythonPackage,
7 envoy-utils,
8 fetchFromGitHub,
9 lxml,
10 orjson,
11 poetry-core,
12 pyjwt,
13 pytest-asyncio,
14 pytest-cov-stub,
15 pytest-timeout,
16 pytestCheckHook,
17 python-jsonpath,
18 respx,
19 syrupy,
20 tenacity,
21}:
22
23buildPythonPackage (finalAttrs: {
24 pname = "pyenphase";
25 version = "2.4.3";
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "pyenphase";
30 repo = "pyenphase";
31 tag = "v${finalAttrs.version}";
32 hash = "sha256-JJtkfN3udslcNYMXGGRXjyPqP3hjix9bg7GcGNOoMbM=";
33 };
34
35 pythonRelaxDeps = [ "tenacity" ];
36
37 build-system = [ poetry-core ];
38
39 dependencies = [
40 aiohttp
41 awesomeversion
42 envoy-utils
43 lxml
44 orjson
45 pyjwt
46 tenacity
47 ];
48
49 nativeCheckInputs = [
50 aioresponses
51 pytest-asyncio
52 pytest-cov-stub
53 pytest-timeout
54 pytestCheckHook
55 python-jsonpath
56 respx
57 syrupy
58 ];
59
60 disabledTestPaths = [
61 # Tests need network access
62 "tests/test_retries.py"
63 ];
64
65 pythonImportsCheck = [ "pyenphase" ];
66
67 meta = {
68 description = "Library to control enphase envoy";
69 homepage = "https://github.com/pyenphase/pyenphase";
70 changelog = "https://github.com/pyenphase/pyenphase/blob/${finalAttrs.src.tag}/CHANGELOG.md";
71 license = lib.licenses.mit;
72 maintainers = with lib.maintainers; [ fab ];
73 };
74})