Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyenphase / default.nix
blobce1e74e3ffcccc00a38c267d3b8b7945beabf788
1 { lib
2 , awesomeversion
3 , buildPythonPackage
4 , envoy-utils
5 , fetchFromGitHub
6 , httpx
7 , lxml
8 , orjson
9 , poetry-core
10 , pyjwt
11 , pytest-asyncio
12 , pytestCheckHook
13 , pythonOlder
14 , respx
15 , syrupy
16 , tenacity
19 buildPythonPackage rec {
20   pname = "pyenphase";
21   version = "1.14.3";
22   format = "pyproject";
24   disabled = pythonOlder "3.11";
26   src = fetchFromGitHub {
27     owner = "pyenphase";
28     repo = "pyenphase";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-cjkmRGieSKynL8cZORp11/ViK8oCBAZXrgbFKumWKaM=";
31   };
33   postPatch = ''
34     substituteInPlace pyproject.toml \
35       --replace " --cov=pyenphase --cov-report=term-missing:skip-covered" ""
36   '';
38   nativeBuildInputs = [
39     poetry-core
40   ];
42   propagatedBuildInputs = [
43     awesomeversion
44     envoy-utils
45     httpx
46     lxml
47     orjson
48     pyjwt
49     tenacity
50   ];
52   nativeCheckInputs = [
53     pytest-asyncio
54     pytestCheckHook
55     respx
56     syrupy
57   ];
59   disabledTests = [
60     # https://github.com/pyenphase/pyenphase/issues/97
61     "test_with_7_x_firmware"
62   ];
64   pythonImportsCheck = [
65     "pyenphase"
66   ];
68   meta = with lib; {
69     description = "Library to control enphase envoy";
70     homepage = "https://github.com/pyenphase/pyenphase";
71     changelog = "https://github.com/pyenphase/pyenphase/blob/${version}/CHANGELOG.md";
72     license = licenses.mit;
73     maintainers = with maintainers; [ fab ];
74   };