1{ lib, stdenv, buildPythonPackage, fetchPypi, substituteAll, 2 isPy3k, 3 geos, gdal, pytz, sqlparse, 4 withGdal ? false 5}: 6 7buildPythonPackage rec { 8 pname = "Django"; 9 version = "2.2.24"; 10 11 disabled = !isPy3k; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "1dvx3x85lggm91x7mpvaf9nmpxyz7r97pbpnmr2k1qfy0c7gyf9k"; 16 }; 17 18 patches = lib.optional withGdal 19 (substituteAll { 20 src = ./1.10-gis-libs.template.patch; 21 geos = geos; 22 gdal = gdal; 23 extension = stdenv.hostPlatform.extensions.sharedLibrary; 24 }) 25 ; 26 27 propagatedBuildInputs = [ pytz sqlparse ]; 28 29 # too complicated to setup 30 doCheck = false; 31 32 meta = with lib; { 33 description = "A high-level Python Web framework"; 34 homepage = "https://www.djangoproject.com/"; 35 license = licenses.bsd3; 36 maintainers = with maintainers; [ georgewhewell ]; 37 }; 38}