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