2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
2019-12-22 02:16:31 +01:00
|
|
|
, pytest, setuptools_scm, tempora, pytest-black, pytestcov }:
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "portend";
|
2020-11-29 15:04:36 +01:00
|
|
|
version = "2.7.0";
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 15:04:36 +01:00
|
|
|
sha256 = "ac0e57ae557f75dc47467579980af152e8f60bc2139547eff8469777d9110379";
|
2017-09-05 11:16:41 +02:00
|
|
|
};
|
|
|
|
|
2019-02-14 23:53:13 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace "--flake8" ""
|
|
|
|
'';
|
|
|
|
|
2018-04-20 13:00:23 +02:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ tempora ];
|
|
|
|
|
2019-12-22 02:16:31 +01:00
|
|
|
checkInputs = [ pytest pytest-black pytestcov ];
|
2018-04-20 13:00:23 +02:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-07-21 11:22:00 +02:00
|
|
|
py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
|
2018-04-20 13:00:23 +02:00
|
|
|
'';
|
|
|
|
|
2019-09-14 13:35:35 +02:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-09-05 11:16:41 +02:00
|
|
|
description = "Monitor TCP ports for bound or unbound states";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/jaraco/portend";
|
2017-09-05 11:16:41 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|