2023-10-09 19:29:22 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, netaddr
|
|
|
|
, six
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, djangorestframework
|
2020-04-24 23:36:52 +00:00
|
|
|
# required for tests
|
2023-10-09 19:29:22 +00:00
|
|
|
, postgresql
|
|
|
|
, postgresqlTestHook
|
|
|
|
, psycopg2
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-django
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-postgresql-netfields";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.3.1";
|
2022-12-17 10:02:37 +00:00
|
|
|
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}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-76vGvxxfNZQBCCsTkkSgQZ8PpFspWxJQDj/xq9iOSTU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
netaddr
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
doCheck = !stdenv.isDarwin; # could not create shared memory segment: Operation not permitted
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
djangorestframework
|
|
|
|
postgresql
|
|
|
|
postgresqlTestHook
|
|
|
|
psycopg2
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "testsettings";
|
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
|
|
|
};
|
|
|
|
}
|