2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, netaddr
|
|
|
|
, six
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
# required for tests
|
|
|
|
#, djangorestframework
|
|
|
|
#, psycopg2
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-postgresql-netfields";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jimfunk";
|
2020-11-03 02:18:15 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-I+X4yfadtiiZlW7QhfwVbK1qyWn/khH9fWXszCo9uro=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
netaddr
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# tests need a postgres database
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# keeping the dependencies below as comment for reference
|
|
|
|
# checkPhase = ''
|
|
|
|
# python manage.py test
|
|
|
|
# '';
|
|
|
|
|
|
|
|
# buildInputs = [
|
|
|
|
# djangorestframework
|
|
|
|
# psycopg2
|
|
|
|
# ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# Requires psycopg2
|
|
|
|
# pythonImportsCheck = [
|
|
|
|
# "netfields"
|
|
|
|
# ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Django PostgreSQL netfields implementation";
|
|
|
|
homepage = "https://github.com/jimfunk/django-postgresql-netfields";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/jimfunk/django-postgresql-netfields/blob/v${version}/CHANGELOG";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|