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";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "239e3116045ea823f6df87d6168107ad75ccc0590e37242af0cc1e98c5d224e4";
|
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;
|
|
|
|
};
|
|
|
|
}
|