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