1{ lib 2, anyio 3, buildPythonPackage 4, fetchFromGitHub 5, paho-mqtt 6, pytestCheckHook 7, pythonOlder 8, setuptools 9, setuptools-scm 10, typing-extensions 11, wheel 12}: 13 14buildPythonPackage rec { 15 pname = "asyncio-mqtt"; 16 version = "0.16.1"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "sbtinstruments"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-f3JqocjOEwNjo6Uv17ij6oEdrjb6Z2wTzdhdVhx46iM="; 26 }; 27 28 SETUPTOOLS_SCM_PRETEND_VERSION = version; 29 30 nativeBuildInputs = [ 31 setuptools 32 setuptools-scm 33 wheel 34 ]; 35 36 propagatedBuildInputs = [ 37 paho-mqtt 38 ] ++ lib.optionals (pythonOlder "3.10") [ 39 typing-extensions 40 ]; 41 42 nativeCheckInputs = [ 43 anyio 44 pytestCheckHook 45 ]; 46 47 pythonImportsCheck = [ 48 "asyncio_mqtt" 49 ]; 50 51 disabledTests = [ 52 # Tests require network access 53 "test_client_filtered_messages" 54 "test_client_logger" 55 "test_client_max_concurrent_outgoing_calls" 56 "test_client_no_pending_calls_warnings_with_max_concurrent_outgoing_calls" 57 "test_client_pending_calls_threshold" 58 "test_client_tls_context" 59 "test_client_tls_params" 60 "test_client_unfiltered_messages" 61 "test_client_unsubscribe" 62 "test_client_username_password " 63 "test_client_websockets" 64 "test_client_will" 65 "test_multiple_messages_generators" 66 ]; 67 68 meta = with lib; { 69 description = "Idomatic asyncio wrapper around paho-mqtt"; 70 homepage = "https://github.com/sbtinstruments/asyncio-mqtt"; 71 license = licenses.bsd3; 72 changelog = "https://github.com/sbtinstruments/asyncio-mqtt/blob/v${version}/CHANGELOG.md"; 73 maintainers = with maintainers; [ hexa ]; 74 }; 75}