1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, httpx
5, poetry-core
6, pytest-asyncio
7, pytestCheckHook
8, pythonOlder
9, respx
10}:
11
12buildPythonPackage rec {
13 pname = "pyecoforest";
14 version = "0.4.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "pjanuario";
21 repo = "pyecoforest";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-C8sFq0vsVsq6irWbRd0eq18tfKu0qRRBZHt23CiDTGU=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace "--cov=pyecoforest --cov-report=term-missing:skip-covered" ""
29 '';
30
31 nativeBuildInputs = [
32 poetry-core
33 ];
34
35 propagatedBuildInputs = [
36 httpx
37 ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 respx
43 ];
44
45 pythonImportsCheck = [
46 "pyecoforest"
47 ];
48
49 meta = with lib; {
50 description = "Module for interacting with Ecoforest devices";
51 homepage = "https://github.com/pjanuario/pyecoforest";
52 changelog = "https://github.com/pjanuario/pyecoforest/blob/${version}/CHANGELOG.md";
53 license = licenses.mit;
54 maintainers = with maintainers; [ fab ];
55 };
56}