3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/portend/default.nix

37 lines
910 B
Nix
Raw Normal View History

{ stdenv, buildPythonPackage, fetchPypi
2019-10-24 07:47:42 +01:00
, pytest, setuptools_scm, tempora, pytest-black }:
buildPythonPackage rec {
pname = "portend";
2019-10-24 07:47:42 +01:00
version = "2.5";
src = fetchPypi {
inherit pname version;
2019-10-24 07:47:42 +01:00
sha256 = "19dc27bfb3c72471bd30a235a4d5fbefef8a7e31cab367744b5d87a205e7bfd9";
};
2019-11-09 12:02:24 +00:00
patches = [ ./black-19.10b0.patch ];
postPatch = ''
substituteInPlace pytest.ini --replace "--flake8" ""
'';
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ tempora ];
2019-10-24 07:47:42 +01:00
checkInputs = [ pytest pytest-black ];
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;
};
}