1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, poetry-core 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "nats-python"; 11 version = "0.8.0"; 12 disabled = pythonOlder "3.6"; 13 format = "pyproject"; 14 15 src = fetchFromGitHub { 16 owner = "Gr1N"; 17 repo = "nats-python"; 18 rev = version; 19 sha256 = "1j7skyxldir3mphvnsyhjxmf3cimv4h7n5v58jl2gff4yd0hdw7g"; 20 }; 21 22 nativeBuildInputs = [ 23 poetry-core 24 ]; 25 26 patches = [ 27 # Switch to poetry-core, https://github.com/Gr1N/nats-python/pull/19 28 (fetchpatch { 29 name = "use-poetry-core.patch"; 30 url = "https://github.com/Gr1N/nats-python/commit/71b25b324212dccd7fc06ba3914491adba22e83f.patch"; 31 sha256 = "1fip1qpzk2ka7qgkrdpdr6vnrnb1p8cwapa51xp0h26nm7yis1gl"; 32 }) 33 ]; 34 35 # Tests require a running NATS server 36 doCheck = false; 37 38 pythonImportsCheck = [ "pynats" ]; 39 40 meta = with lib; { 41 description = "Python client for NATS messaging system"; 42 homepage = "https://github.com/Gr1N/nats-python"; 43 license = with licenses; [ mit ]; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}