2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
anyio,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
paho-mqtt,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
typing-extensions,
|
|
|
|
wheel,
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "asyncio-mqtt";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.16.1";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "pyproject";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sbtinstruments";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-f3JqocjOEwNjo6Uv17ij6oEdrjb6Z2wTzdhdVhx46iM=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
2023-08-10 07:59:29 +00:00
|
|
|
wheel
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ paho-mqtt ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
anyio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "asyncio_mqtt" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_client_filtered_messages"
|
2023-02-02 18:25:31 +00:00
|
|
|
"test_client_logger"
|
|
|
|
"test_client_max_concurrent_outgoing_calls"
|
|
|
|
"test_client_no_pending_calls_warnings_with_max_concurrent_outgoing_calls"
|
|
|
|
"test_client_pending_calls_threshold"
|
2022-11-21 17:40:18 +00:00
|
|
|
"test_client_tls_context"
|
|
|
|
"test_client_tls_params"
|
2023-02-02 18:25:31 +00:00
|
|
|
"test_client_unfiltered_messages"
|
|
|
|
"test_client_unsubscribe"
|
2022-11-21 17:40:18 +00:00
|
|
|
"test_client_username_password "
|
|
|
|
"test_client_websockets"
|
2023-02-02 18:25:31 +00:00
|
|
|
"test_client_will"
|
2023-01-20 10:41:00 +00:00
|
|
|
"test_multiple_messages_generators"
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# newer version are packaged as aiomqtt
|
|
|
|
passthru.skipBulkUpdate = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Idomatic asyncio wrapper around paho-mqtt";
|
|
|
|
homepage = "https://github.com/sbtinstruments/asyncio-mqtt";
|
|
|
|
license = licenses.bsd3;
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/sbtinstruments/asyncio-mqtt/blob/v${version}/CHANGELOG.md";
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|