2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2023-10-09 19:29:22 +00:00
|
|
|
, backoff
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, packaging
|
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-bsblan";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.5.16";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liudger";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-m80lnNd1ANddV0d/w3S7+QWzIPRklDZsWMO2g1hgEoQ=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace "--cov" ""
|
|
|
|
sed -i "/covdefaults/d" pyproject.toml
|
|
|
|
sed -i "/ruff/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-10-09 19:29:22 +00:00
|
|
|
backoff
|
2022-10-30 15:09:59 +00:00
|
|
|
packaging
|
|
|
|
pydantic
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bsblan"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to control and monitor an BSBLan device programmatically";
|
|
|
|
homepage = "https://github.com/liudger/python-bsblan";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/liudger/python-bsblan/releases/tag/v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|