2021-01-03 06:39:01 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
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
|
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
|
2018-10-25 10:48:43 -04:00
|
|
|
}:
|
2017-07-15 13:41:02 +07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zeroconf";
|
2021-11-03 20:00:20 +01:00
|
|
|
version = "0.36.11";
|
2021-07-01 18:29:35 +02:00
|
|
|
format = "setuptools";
|
2021-03-26 21:39:55 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-07-15 13:41:02 +07:00
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
# no tests in pypi sdist
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jstasiak";
|
|
|
|
repo = "python-zeroconf";
|
|
|
|
rev = version;
|
2021-11-03 20:00:20 +01:00
|
|
|
sha256 = "sha256-MGaikOO4vdBRCR+jYHr38FGOdg2rjypK5z0UY5lThY4=";
|
2017-07-15 13:41:02 +07:00
|
|
|
};
|
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ifaddr
|
|
|
|
];
|
2021-03-26 21:39:55 +01:00
|
|
|
|
2021-07-01 18:29:35 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-03-26 21:39:55 +01:00
|
|
|
|
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"
|
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; {
|
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 ];
|
|
|
|
};
|
|
|
|
}
|