1{ stdenv, buildPythonPackage, fetchurl, substituteAll, 2 pythonOlder, 3 geos, gdal, pytz, 4 withGdal ? false 5}: 6 7buildPythonPackage rec { 8 pname = "Django"; 9 version = "1.11.15"; 10 11 disabled = pythonOlder "2.7"; 12 13 src = fetchurl { 14 url = "http://www.djangoproject.com/m/releases/1.11/${pname}-${version}.tar.gz"; 15 sha256 = "0h2sl02x2mxr3rl3dy750pzm5kvmx77116fys8rrgw164kc3b0mi"; 16 }; 17 18 patches = stdenv.lib.optionals 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 # patch only $out/bin to avoid problems with starter templates (see #3134) 28 postFixup = '' 29 wrapPythonProgramsIn $out/bin "$out $pythonPath" 30 ''; 31 32 propagatedBuildInputs = [ pytz ]; 33 34 # too complicated to setup 35 doCheck = false; 36 37 meta = { 38 description = "A high-level Python Web framework"; 39 homepage = https://www.djangoproject.com/; 40 }; 41}