2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest, setuptools_scm, tempora, pytest-black, pytestcov }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "portend";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "2.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "ac0e57ae557f75dc47467579980af152e8f60bc2139547eff8469777d9110379";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace "--flake8" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ tempora ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytest-black pytestcov ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Monitor TCP ports for bound or unbound states";
|
|
|
|
homepage = "https://github.com/jaraco/portend";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|