{ lib, stdenv , buildPythonPackage , fetchPypi , substituteAll , geos , gdal , asgiref , pytz , sqlparse , pythonOlder , withGdal ? false }: buildPythonPackage rec { pname = "Django"; version = "3.2.7"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; sha256 = "95b318319d6997bac3595517101ad9cc83fe5672ac498ba48d1a410f47afecd2"; }; patches = lib.optional withGdal (substituteAll { src = ./django_3_set_geos_gdal_lib.patch; geos = geos; gdal = gdal; extension = stdenv.hostPlatform.extensions.sharedLibrary; }); propagatedBuildInputs = [ asgiref pytz sqlparse ]; # too complicated to setup doCheck = false; meta = with lib; { description = "A high-level Python Web framework"; homepage = "https://www.djangoproject.com/"; license = licenses.bsd3; maintainers = with maintainers; [ georgewhewell lsix ]; }; }