2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
|
|
|
, asyncio-mqtt
|
|
|
|
, awesomeversion
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, fetchFromGitHub
|
|
|
|
, marshmallow
|
|
|
|
, poetry-core
|
|
|
|
, pyserial-asyncio
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiomysensors";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "0.3.9";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MartinHjelmare";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-hLUITEPUoUKGqN3AnacahnKwoKdfGN3mp34df74gsbE=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
asyncio-mqtt
|
|
|
|
awesomeversion
|
|
|
|
click
|
|
|
|
marshmallow
|
|
|
|
pyserial-asyncio
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=src --cov-report=term-missing:skip-covered" "" \
|
|
|
|
--replace 'marshmallow = "^3.17"' 'marshmallow = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiomysensors"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to connect to MySensors gateways";
|
|
|
|
homepage = "https://github.com/MartinHjelmare/aiomysensors";
|
2023-03-30 22:05:00 +00:00
|
|
|
changelog = "https://github.com/MartinHjelmare/aiomysensors/releases/tag/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|