1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 py-radix-sr,
7 versionCheckHook,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "aggregate6";
13 version = "1.0.14";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "job";
18 repo = "aggregate6";
19 rev = version;
20 hash = "sha256-sF5F4AIIQuMTuWE3zoBE1akJX9QSmAaRp1qgoHzSJMo=";
21 };
22
23 # py-radix-sr is a fork, with fixes
24 # NOTE: it should be worth switching to py-radix again in the future as there
25 # is still development sadly currently without a new release.
26 postPatch = ''
27 substituteInPlace setup.py --replace-fail 'py-radix==0.10.0' 'py-radix-sr'
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [ py-radix-sr ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 versionCheckHook
37 ];
38
39 pythonImportsCheck = [ "aggregate6" ];
40 versionCheckProgramArg = "-V";
41
42 meta = {
43 description = "IPv4 and IPv6 prefix aggregation tool";
44 mainProgram = "aggregate6";
45 homepage = "https://github.com/job/aggregate6";
46 license = with lib.licenses; [ bsd2 ];
47 maintainers = with lib.maintainers; [ marcel ];
48 teams = [ lib.teams.wdz ];
49 };
50}