nixpkgs/pkgs/development/python-modules/regenmaschine/default.nix

65 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-aiohttp
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "regenmaschine";
version = "2023.06.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-W5W/2gBraraZs8ai8tyg3aRWvHt6WOQCVICuiAigae0=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
typing-extensions
];
nativeCheckInputs = [
aresponses
pytest-aiohttp
pytest-asyncio
pytest-mock
pytestCheckHook
];
disabledTestPaths = [
# Examples are prefix with test_
"examples/"
];
pythonImportsCheck = [
"regenmaschine"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Python library for interacting with RainMachine smart sprinkler controllers";
homepage = "https://github.com/bachya/regenmaschine";
changelog = "https://github.com/bachya/regenmaschine/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}