2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest, setuptools-scm, tempora, pytest-black, pytest-cov }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "portend";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "2.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "986ed9a278e64a87b5b5f4c21e61c25bebdce9919a92238d9c14c37a7416482b";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace "--flake8" ""
|
|
|
|
'';
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ tempora ];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ pytest pytest-black pytest-cov ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|