2017-09-05 11:16:41 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi
|
2019-10-24 08:47:42 +02:00
|
|
|
, pytest, setuptools_scm, tempora, pytest-black }:
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "portend";
|
2019-10-24 08:47:42 +02:00
|
|
|
version = "2.5";
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-24 08:47:42 +02:00
|
|
|
sha256 = "19dc27bfb3c72471bd30a235a4d5fbefef8a7e31cab367744b5d87a205e7bfd9";
|
2017-09-05 11:16:41 +02:00
|
|
|
};
|
|
|
|
|
2019-11-09 12:02:24 +00:00
|
|
|
patches = [ ./black-19.10b0.patch ];
|
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-10-24 08:47:42 +02:00
|
|
|
checkInputs = [ pytest pytest-black ];
|
2018-04-20 13:00:23 +02:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-07-21 04:22:00 -05: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;
|
|
|
|
|
2017-09-05 11:16:41 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Monitor TCP ports for bound or unbound states";
|
|
|
|
homepage = https://github.com/jaraco/portend;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|