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