2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, asyncio-dgram
|
|
|
|
, asynctest
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, poetry-core
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
, voluptuous
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioguardian";
|
2021-03-19 17:17:44 +00:00
|
|
|
version = "1.0.7";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-03-19 17:17:44 +00:00
|
|
|
sha256 = "sha256-KMhq86hcqoYloS/6VHsl+3KVEZBbN97ABrZlmEr32Z8=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
asyncio-dgram
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asyncio-dgram
|
|
|
|
asynctest
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/bachya/aioguardian/pull/66
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'asyncio_dgram = "^1.0.1"' 'asyncio_dgram = "^2.0.0"'
|
|
|
|
# https://github.com/bachya/aioguardian/pull/67
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "poetry>=0.12" "poetry-core"
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [ "examples/" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
pythonImportsCheck = [ "aioguardian" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = " Python library to interact with Elexa Guardian devices";
|
|
|
|
longDescription = ''
|
|
|
|
aioguardian is a Pytho3, asyncio-focused library for interacting with the
|
|
|
|
Guardian line of water valves and sensors from Elexa.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/bachya/aioguardian";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|