diff options
Diffstat (limited to 'pkgs/development/python-modules/pyecoforest/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyecoforest/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyecoforest/default.nix b/pkgs/development/python-modules/pyecoforest/default.nix new file mode 100644 index 00000000000..2021b4e414b --- /dev/null +++ b/pkgs/development/python-modules/pyecoforest/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, respx +}: + +buildPythonPackage rec { + pname = "pyecoforest"; + version = "0.4.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pjanuario"; + repo = "pyecoforest"; + rev = "refs/tags/v${version}"; + hash = "sha256-C8sFq0vsVsq6irWbRd0eq18tfKu0qRRBZHt23CiDTGU="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov=pyecoforest --cov-report=term-missing:skip-covered" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + httpx + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + respx + ]; + + pythonImportsCheck = [ + "pyecoforest" + ]; + + meta = with lib; { + description = "Module for interacting with Ecoforest devices"; + homepage = "https://github.com/pjanuario/pyecoforest"; + changelog = "https://github.com/pjanuario/pyecoforest/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |