1{ stdenv, buildPythonPackage, fetchPypi, substituteAll, 2 isPy3k, 3 geos, gdal, pytz, 4 withGdal ? false 5}: 6 7buildPythonPackage rec { 8 pname = "Django"; 9 name = "${pname}-${version}"; 10 version = "2.0.1"; 11 12 disabled = !isPy3k; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "0by1gswkrzxn594fa26llkzsc410999fq8s0b5d1598jwi5q0syr"; 17 }; 18 19 patches = stdenv.lib.optionals withGdal [ 20 (substituteAll { 21 src = ./1.10-gis-libs.template.patch; 22 geos = geos; 23 gdal = gdal; 24 extension = stdenv.hostPlatform.extensions.sharedLibrary; 25 }) 26 ]; 27 28 # patch only $out/bin to avoid problems with starter templates (see #3134) 29 postFixup = '' 30 wrapPythonProgramsIn $out/bin "$out $pythonPath" 31 ''; 32 33 propagatedBuildInputs = [ pytz ]; 34 35 # too complicated to setup 36 doCheck = false; 37 38 meta = with stdenv.lib; { 39 description = "A high-level Python Web framework"; 40 homepage = https://www.djangoproject.com/; 41 license = licenses.bsd3; 42 maintainers = with maintainers; [ georgewhewell ]; 43 }; 44}