1{ stdenv 2, lib 3, buildPythonPackage 4, django 5, netaddr 6, six 7, fetchFromGitHub 8, pythonOlder 9, djangorestframework 10# required for tests 11, postgresql 12, postgresqlTestHook 13, psycopg2 14, pytestCheckHook 15, pytest-django 16}: 17 18buildPythonPackage rec { 19 pname = "django-postgresql-netfields"; 20 version = "1.3.1"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "jimfunk"; 27 repo = pname; 28 rev = "v${version}"; 29 hash = "sha256-76vGvxxfNZQBCCsTkkSgQZ8PpFspWxJQDj/xq9iOSTU="; 30 }; 31 32 propagatedBuildInputs = [ 33 django 34 netaddr 35 six 36 ]; 37 38 doCheck = !stdenv.isDarwin; # could not create shared memory segment: Operation not permitted 39 40 nativeCheckInputs = [ 41 djangorestframework 42 postgresql 43 postgresqlTestHook 44 psycopg2 45 pytestCheckHook 46 pytest-django 47 ]; 48 49 postgresqlTestUserOptions = "LOGIN SUPERUSER"; 50 env.DJANGO_SETTINGS_MODULE = "testsettings"; 51 52 meta = with lib; { 53 description = "Django PostgreSQL netfields implementation"; 54 homepage = "https://github.com/jimfunk/django-postgresql-netfields"; 55 changelog = "https://github.com/jimfunk/django-postgresql-netfields/blob/v${version}/CHANGELOG"; 56 license = licenses.bsd2; 57 maintainers = with maintainers; [ ]; 58 }; 59}