2022-08-06 22:15:49 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, async-timeout
|
2018-10-25 10:48:43 -04:00
|
|
|
, buildPythonPackage
|
2021-07-01 18:29:35 +02:00
|
|
|
, fetchFromGitHub
|
2018-10-25 10:48:43 -04:00
|
|
|
, ifaddr
|
2022-12-30 20:13:58 +01:00
|
|
|
, poetry-core
|
2021-07-01 18:29:35 +02:00
|
|
|
, pytest-asyncio
|
2018-10-25 10:48:43 -04:00
|
|
|
, pythonOlder
|
2020-10-04 05:05:06 +02:00
|
|
|
, pytestCheckHook
|
2022-12-30 20:13:58 +01:00
|
|
|
, setuptools
|
2018-10-25 10:48:43 -04:00
|
|
|
}:
|
2017-07-15 13:41:02 +07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zeroconf";
|
2022-12-30 20:13:58 +01:00
|
|
|
version = "0.47.1";
|
|
|
|
format = "pyproject";
|
2021-11-14 13:09:12 +01:00
|
|
|
|
2021-12-27 23:36:47 +01:00
|
|
|
disabled = pythonOlder "3.7";
|
2017-07-15 13:41:02 +07:00
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jstasiak";
|
|
|
|
repo = "python-zeroconf";
|
2022-09-08 01:51:09 +02:00
|
|
|
rev = "refs/tags/${version}";
|
2022-12-30 20:13:58 +01:00
|
|
|
hash = "sha256-vY4n0QIEzumtUayRbGGqycR3z7kpbOH4XKxSMcnTVrA=";
|
2017-07-15 13:41:02 +07:00
|
|
|
};
|
|
|
|
|
2022-12-30 20:13:58 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
propagatedBuildInputs = [
|
2022-08-06 22:15:49 +02:00
|
|
|
async-timeout
|
2021-07-01 18:29:35 +02:00
|
|
|
ifaddr
|
|
|
|
];
|
2021-03-26 21:39:55 +01:00
|
|
|
|
2022-11-07 07:34:00 +01:00
|
|
|
# OSError: [Errno 48] Address already in use
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-03-26 21:39:55 +01:00
|
|
|
|
2022-12-30 20:13:58 +01:00
|
|
|
preCheck = ''
|
|
|
|
sed -i '/addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2020-10-04 05:05:06 +02:00
|
|
|
disabledTests = [
|
2021-07-01 18:29:35 +02:00
|
|
|
# tests that require network interaction
|
2021-05-07 12:09:46 +02:00
|
|
|
"test_close_multiple_times"
|
2020-10-04 05:05:06 +02:00
|
|
|
"test_launch_and_close"
|
2021-07-01 18:29:35 +02:00
|
|
|
"test_launch_and_close_context_manager"
|
2020-10-04 05:05:06 +02:00
|
|
|
"test_launch_and_close_v4_v6"
|
|
|
|
"test_launch_and_close_v6_only"
|
|
|
|
"test_integration_with_listener_ipv6"
|
2022-08-06 22:15:49 +02:00
|
|
|
# Starting with 0.39.0: AssertionError: assert [('add', '_ht..._tcp.local.')]
|
2022-05-03 08:35:58 +02:00
|
|
|
"test_service_browser_expire_callbacks"
|
2021-01-03 06:39:01 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_lots_of_names"
|
2020-10-04 05:05:06 +02:00
|
|
|
];
|
2021-03-26 21:39:55 +01:00
|
|
|
|
2021-01-03 06:39:01 +01:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2018-10-25 10:48:43 -04:00
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"zeroconf"
|
|
|
|
"zeroconf.asyncio"
|
|
|
|
];
|
2017-07-15 13:41:02 +07:00
|
|
|
|
2020-10-04 05:05:06 +02:00
|
|
|
meta = with lib; {
|
2022-12-30 20:13:58 +01:00
|
|
|
changelog = "https://github.com/python-zeroconf/python-zeroconf/releases/tag/${version}";
|
2021-01-12 10:38:29 +01:00
|
|
|
description = "Python implementation of multicast DNS service discovery";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/jstasiak/python-zeroconf";
|
2021-03-26 21:39:55 +01:00
|
|
|
license = licenses.lgpl21Only;
|
2017-07-15 13:41:02 +07:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|