nixpkgs/pkgs/development/python-modules/portend/default.nix

36 lines
844 B
Nix
Raw Normal View History

{ stdenv, buildPythonPackage, fetchPypi
, pytest, setuptools_scm, tempora }:
buildPythonPackage rec {
pname = "portend";
2018-06-12 17:47:04 +01:00
version = "2.3";
src = fetchPypi {
inherit pname version;
2018-06-12 17:47:04 +01:00
sha256 = "b7ce7d35ea262415297cbfea86226513e77b9ee5f631d3baa11992d663963719";
};
postPatch = ''
substituteInPlace pytest.ini --replace "--flake8" ""
'';
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ tempora ];
checkInputs = [ pytest ];
checkPhase = ''
2019-07-21 10:22:00 +01:00
py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
'';
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
meta = with stdenv.lib; {
description = "Monitor TCP ports for bound or unbound states";
homepage = https://github.com/jaraco/portend;
license = licenses.bsd3;
};
}