Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 38 lines 853 B view raw
1{ stdenv, buildPythonPackage, fetchPypi, substituteAll, 2 isPy3k, 3 geos, gdal, pytz, 4 withGdal ? false 5}: 6 7buildPythonPackage rec { 8 pname = "Django"; 9 version = "2.1.11"; 10 11 disabled = !isPy3k; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "1m9bs78sh91slsjxkhxgkg715gbsgph9ky7d74czs0z2mhg86h8s"; 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 propagatedBuildInputs = [ pytz ]; 28 29 # too complicated to setup 30 doCheck = false; 31 32 meta = with stdenv.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}