at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, docopt 4, fetchFromGitHub 5, fetchpatch 6, hypothesis 7, passlib 8, poetry-core 9, pytest-logdog 10, pytest-asyncio 11, pytestCheckHook 12, pythonOlder 13, pyyaml 14, setuptools 15, transitions 16, websockets 17}: 18 19buildPythonPackage rec { 20 pname = "amqtt"; 21 version = "unstable-2022-05-29"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "Yakifo"; 28 repo = pname; 29 rev = "09ac98d39a711dcff0d8f22686916e1c2495144b"; 30 hash = "sha256-8T1XhBSOiArlUQbQ41LsUogDgOurLhf+M8mjIrrAC4s="; 31 }; 32 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace 'transitions = "^0.8.0"' 'transitions = "*"' 36 ''; 37 38 nativeBuildInputs = [ 39 poetry-core 40 ]; 41 42 propagatedBuildInputs = [ 43 docopt 44 passlib 45 pyyaml 46 setuptools 47 transitions 48 websockets 49 ]; 50 51 checkInputs = [ 52 hypothesis 53 pytest-logdog 54 pytest-asyncio 55 pytestCheckHook 56 ]; 57 58 pytestFlagsArray = [ 59 "--asyncio-mode=auto" 60 ]; 61 62 disabledTestPaths = [ 63 # Test are not ported from hbmqtt yet 64 "tests/test_client.py" 65 ]; 66 67 preCheck = '' 68 # Some tests need amqtt 69 export PATH=$out/bin:$PATH 70 ''; 71 72 pythonImportsCheck = [ 73 "amqtt" 74 ]; 75 76 meta = with lib; { 77 description = "Python MQTT client and broker implementation"; 78 homepage = "https://amqtt.readthedocs.io/"; 79 license = with licenses; [ mit ]; 80 maintainers = with maintainers; [ fab ]; 81 }; 82}