about summary refs log tree commit diff
path: root/pkgs/development/python-modules/iptools/default.nix
blob: c3d14b161c02d4e42c007bcb8caa62985eb59758 (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  version = "0.7.0";
  pname = "iptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bd808";
    repo = "python-iptools";
    rev = "refs/tags/v${version}";
    hash = "sha256-340Wc4QGwUqEEANM5EQzFaXxIWVf2fDr4qfCuxNEVBQ=";
  };

  build-system = [ setuptools ];

  pythonImportsCheck = [ "iptools" ];

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [ "tests/iptools/iptools_test.py" ];

  meta = with lib; {
    description = "Utilities for manipulating IP addresses including a class that can be used to include CIDR network blocks in Django's INTERNAL_IPS setting";
    homepage = "https://github.com/bd808/python-iptools";
    license = licenses.bsd0;
  };
}