Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 35 lines 886 B view raw
1{ lib, buildPythonPackage, fetchPypi 2, pytest, setuptools_scm, tempora, pytest-black, pytestcov }: 3 4buildPythonPackage rec { 5 pname = "portend"; 6 version = "2.7.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "986ed9a278e64a87b5b5f4c21e61c25bebdce9919a92238d9c14c37a7416482b"; 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 pytestcov ]; 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}