2023-09-25 21:00:33 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2019-08-06 16:54:14 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, netaddr
|
|
|
|
, six
|
|
|
|
, fetchFromGitHub
|
2022-12-02 08:57:31 +01:00
|
|
|
, pythonOlder
|
2023-09-25 21:00:33 +02:00
|
|
|
, djangorestframework
|
2019-08-06 16:54:14 +02:00
|
|
|
# required for tests
|
2023-09-25 21:00:33 +02:00
|
|
|
, postgresql
|
|
|
|
, postgresqlTestHook
|
|
|
|
, psycopg2
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-django
|
2019-08-06 16:54:14 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-postgresql-netfields";
|
2022-12-02 08:55:14 +01:00
|
|
|
version = "1.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2019-08-06 16:54:14 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jimfunk";
|
2020-11-01 23:39:49 +01:00
|
|
|
repo = pname;
|
2019-08-06 16:54:14 +02:00
|
|
|
rev = "v${version}";
|
2022-12-01 09:47:55 -08:00
|
|
|
hash = "sha256-I+X4yfadtiiZlW7QhfwVbK1qyWn/khH9fWXszCo9uro=";
|
2019-08-06 16:54:14 +02:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:55:14 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
netaddr
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-09-25 21:00:33 +02:00
|
|
|
doCheck = !stdenv.isDarwin; # could not create shared memory segment: Operation not permitted
|
2019-08-06 16:54:14 +02:00
|
|
|
|
2023-09-25 21:00:33 +02:00
|
|
|
nativeCheckInputs = [
|
|
|
|
djangorestframework
|
|
|
|
postgresql
|
|
|
|
postgresqlTestHook
|
|
|
|
psycopg2
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
|
|
|
];
|
2019-08-06 16:54:14 +02:00
|
|
|
|
2023-09-25 21:00:33 +02:00
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "testsettings";
|
2019-08-06 16:54:14 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-08-06 16:54:14 +02:00
|
|
|
description = "Django PostgreSQL netfields implementation";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/jimfunk/django-postgresql-netfields";
|
2022-12-02 08:55:14 +01:00
|
|
|
changelog = "https://github.com/jimfunk/django-postgresql-netfields/blob/v${version}/CHANGELOG";
|
2019-08-06 16:54:14 +02:00
|
|
|
license = licenses.bsd2;
|
2022-12-02 08:55:14 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2019-08-06 16:54:14 +02:00
|
|
|
};
|
|
|
|
}
|