Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 933 B view raw
1{ stdenv, buildPythonPackage, fetchPypi 2, pytest, setuptools_scm, tempora, pytest-black, pytestcov }: 3 4buildPythonPackage rec { 5 pname = "portend"; 6 version = "2.6"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "600dd54175e17e9347e5f3d4217aa8bcf4bf4fa5ffbc4df034e5ec1ba7cdaff5"; 11 }; 12 13 patches = [ ./black-19.10b0.patch ]; 14 postPatch = '' 15 substituteInPlace pytest.ini --replace "--flake8" "" 16 ''; 17 18 nativeBuildInputs = [ setuptools_scm ]; 19 20 propagatedBuildInputs = [ tempora ]; 21 22 checkInputs = [ pytest pytest-black pytestcov ]; 23 24 checkPhase = '' 25 py.test --deselect=test_portend.py::TestChecker::test_check_port_listening 26 ''; 27 28 # Some of the tests use localhost networking. 29 __darwinAllowLocalNetworking = true; 30 31 meta = with stdenv.lib; { 32 description = "Monitor TCP ports for bound or unbound states"; 33 homepage = "https://github.com/jaraco/portend"; 34 license = licenses.bsd3; 35 }; 36}