1{ lib, buildPythonPackage, fetchPypi 2, pytest, setuptools-scm, tempora, pytest-black, pytest-cov }: 3 4buildPythonPackage rec { 5 pname = "portend"; 6 version = "2.7.2"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "3fbc0df9e4970b661e4d7386a91fc7bcf34ebeaf0333ce15d819d515a71ba8b2"; 11 }; 12 13 postPatch = '' 14 substituteInPlace pytest.ini --replace "--flake8" "" 15 ''; 16 17 nativeBuildInputs = [ setuptools-scm ]; 18 19 propagatedBuildInputs = [ tempora ]; 20 21 checkInputs = [ pytest pytest-black pytest-cov ]; 22 23 checkPhase = '' 24 py.test --deselect=test_portend.py::TestChecker::test_check_port_listening 25 ''; 26 27 # Some of the tests use localhost networking. 28 __darwinAllowLocalNetworking = true; 29 30 meta = with lib; { 31 description = "Monitor TCP ports for bound or unbound states"; 32 homepage = "https://github.com/jaraco/portend"; 33 license = licenses.bsd3; 34 }; 35}