1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 pytestCheckHook,
7 setuptools-scm,
8 tempora,
9}:
10
11buildPythonPackage rec {
12 pname = "portend";
13 version = "3.2.1";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-qp1Aqx+eFL231AH0IhDfNdAXybl5kbrrGFaM7fuMZIk=";
21 };
22
23 postPatch = ''
24 sed -i "/coherent\.licensed/d" pyproject.toml;
25 '';
26
27 build-system = [ setuptools-scm ];
28
29 dependencies = [ tempora ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "portend" ];
34
35 # Some of the tests use localhost networking.
36 __darwinAllowLocalNetworking = true;
37
38 meta = with lib; {
39 description = "Monitor TCP ports for bound or unbound states";
40 homepage = "https://github.com/jaraco/portend";
41 license = licenses.bsd3;
42 };
43}