summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-postgresql-netfields/default.nix
blob: 5564e0f6de22d9d59284306550ee1b3c938aad7c (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
50
51
52
53
54
55
56
57
58
{ lib
, buildPythonPackage
, django
, netaddr
, six
, fetchFromGitHub
, pythonOlder
# required for tests
#, djangorestframework
#, psycopg2
}:

buildPythonPackage rec {
  pname = "django-postgresql-netfields";
  version = "1.3.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "jimfunk";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-I+X4yfadtiiZlW7QhfwVbK1qyWn/khH9fWXszCo9uro=";
  };

  propagatedBuildInputs = [
    django
    netaddr
    six
  ];

  # tests need a postgres database
  doCheck = false;

  # keeping the dependencies below as comment for reference
  # checkPhase = ''
    # python manage.py test
  # '';

  # buildInputs = [
    # djangorestframework
    # psycopg2
  # ];

  # Requires psycopg2
  # pythonImportsCheck = [
  #   "netfields"
  # ];

  meta = with lib; {
    description = "Django PostgreSQL netfields implementation";
    homepage = "https://github.com/jimfunk/django-postgresql-netfields";
    changelog = "https://github.com/jimfunk/django-postgresql-netfields/blob/v${version}/CHANGELOG";
    license = licenses.bsd2;
    maintainers = with maintainers; [ ];
  };
}