2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pyserial-asyncio-fast,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "elkm1-lib";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.2.7";
|
|
|
|
pyproject = true;
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gwww";
|
|
|
|
repo = "elkm1";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-5YdmZO/8HimQ9Ft/K/I6xu0Av2SjUBp3+poBe7aVUpM=";
|
2021-10-01 09:20:50 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-12-17 10:02:37 +00:00
|
|
|
async-timeout
|
2024-05-15 15:35:15 +00:00
|
|
|
pyserial-asyncio-fast
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-01 09:20:50 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "elkm1_lib" ];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for interacting with ElkM1 alarm/automation panel";
|
|
|
|
homepage = "https://github.com/gwww/elkm1";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/gwww/elkm1/blob/${version}/CHANGELOG.md";
|
2021-10-01 09:20:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|