summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aggregate6/default.nix
blob: bf625f816d92aea37690a42d659f41aa9ef105f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  py-radix-sr,
  versionCheckHook,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "aggregate6";
  version = "1.0.14";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "job";
    repo = "aggregate6";
    rev = version;
    hash = "sha256-sF5F4AIIQuMTuWE3zoBE1akJX9QSmAaRp1qgoHzSJMo=";
  };

  # py-radix-sr is a fork, with fixes
  # NOTE: it should be worth switching to py-radix again in the future as there
  #       is still development sadly currently without a new release.
  postPatch = ''
    substituteInPlace setup.py --replace-fail 'py-radix==0.10.0' 'py-radix-sr'
  '';

  build-system = [ setuptools ];

  dependencies = [ py-radix-sr ];

  nativeCheckInputs = [
    pytestCheckHook
    versionCheckHook
  ];

  pythonImportsCheck = [ "aggregate6" ];
  versionCheckProgramArg = "-V";

  meta = {
    description = "IPv4 and IPv6 prefix aggregation tool";
    mainProgram = "aggregate6";
    homepage = "https://github.com/job/aggregate6";
    license = with lib.licenses; [ bsd2 ];
    maintainers = with lib.maintainers; [ marcel ];
  };
}