2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2022-08-12 12:06:08 +00:00
|
|
|
, async-timeout
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-07-24 12:14:16 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, ifaddr
|
2023-01-11 07:51:40 +00:00
|
|
|
, poetry-core
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-asyncio
|
2023-04-12 12:48:02 +00:00
|
|
|
, pytest-timeout
|
2020-04-24 23:36:52 +00:00
|
|
|
, pythonOlder
|
2020-10-16 20:44:37 +00:00
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zeroconf";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.132.2";
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jstasiak";
|
|
|
|
repo = "python-zeroconf";
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Jmz9zs//EVdBbEElq6OEfGZiOiMvjV5CJxZOM/lHvok=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "Cython>=3.0.8" "Cython"
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
cython
|
2023-01-11 07:51:40 +00:00
|
|
|
poetry-core
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-07-24 12:14:16 +00:00
|
|
|
ifaddr
|
2023-04-12 12:48:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
async-timeout
|
2021-07-24 12:14:16 +00:00
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-asyncio
|
2023-04-12 12:48:02 +00:00
|
|
|
pytest-timeout
|
2021-07-24 12:14:16 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
preCheck = ''
|
|
|
|
sed -i '/addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
disabledTests = [
|
2023-04-12 12:48:02 +00:00
|
|
|
# OSError: [Errno 19] No such device
|
2021-05-20 23:08:51 +00:00
|
|
|
"test_close_multiple_times"
|
2023-04-12 12:48:02 +00:00
|
|
|
"test_integration_with_listener_ipv6"
|
2020-10-16 20:44:37 +00:00
|
|
|
"test_launch_and_close"
|
2021-07-24 12:14:16 +00:00
|
|
|
"test_launch_and_close_context_manager"
|
2020-10-16 20:44:37 +00:00
|
|
|
"test_launch_and_close_v4_v6"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"zeroconf"
|
|
|
|
"zeroconf.asyncio"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
meta = with lib; {
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "Python implementation of multicast DNS service discovery";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/python-zeroconf/python-zeroconf";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/python-zeroconf/python-zeroconf/releases/tag/${version}";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|