2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2024-07-01 15:47:52 +00:00
|
|
|
pythonOlder,
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "discovery30303";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.3.2";
|
|
|
|
pyproject = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
2024-07-01 15:47:52 +00:00
|
|
|
repo = "discovery30303";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-P31P5GjIrMotdIXqqZ6LCbk5MIl2Kq4MzlWDw+aOcrE=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail " --cov=discovery30303" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "discovery30303" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to discover devices that respond on port 30303";
|
|
|
|
homepage = "https://github.com/bdraco/discovery30303";
|
2024-07-01 15:47:52 +00:00
|
|
|
changelog = "https://github.com/bdraco/discovery30303/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|