nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 77 lines 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, transitions 15, websockets 16}: 17 18buildPythonPackage rec { 19 pname = "amqtt"; 20 version = "unstable-2022-01-11"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "Yakifo"; 27 repo = pname; 28 rev = "8961b8fff57007a5d9907b98bc555f0519974ce9"; 29 hash = "sha256-3uwz4RSoa6KRC8mlVfeIMLPH6F2kOJjQjjXCrnVX0Jo="; 30 }; 31 32 nativeBuildInputs = [ 33 poetry-core 34 ]; 35 36 propagatedBuildInputs = [ 37 docopt 38 passlib 39 pyyaml 40 transitions 41 websockets 42 ]; 43 44 checkInputs = [ 45 hypothesis 46 pytest-logdog 47 pytest-asyncio 48 pytestCheckHook 49 ]; 50 51 postPatch = '' 52 substituteInPlace pyproject.toml \ 53 --replace 'PyYAML = "^5.4.0"' 'PyYAML = "*"' 54 ''; 55 56 disabledTestPaths = [ 57 # Test are not ported from hbmqtt yet 58 "tests/test_cli.py" 59 "tests/test_client.py" 60 ]; 61 62 preCheck = '' 63 # Some tests need amqtt 64 export PATH=$out/bin:$PATH 65 ''; 66 67 pythonImportsCheck = [ 68 "amqtt" 69 ]; 70 71 meta = with lib; { 72 description = "Python MQTT client and broker implementation"; 73 homepage = "https://amqtt.readthedocs.io/"; 74 license = with licenses; [ mit ]; 75 maintainers = with maintainers; [ fab ]; 76 }; 77}