Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 40 lines 992 B view raw
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.23"; 10 11 src = fetchurl { 12 url = "https://www.djangoproject.com/m/releases/1.11/${pname}-${version}.tar.gz"; 13 sha256 = "1qb9npkpvyafd1f4yjqyzhj78wp1ifg3awj41bd04v83idznv9jj"; 14 }; 15 16 patches = stdenv.lib.optionals withGdal [ 17 (substituteAll { 18 src = ./1.10-gis-libs.template.patch; 19 geos = geos; 20 gdal = gdal; 21 extension = stdenv.hostPlatform.extensions.sharedLibrary; 22 }) 23 ]; 24 25 # patch only $out/bin to avoid problems with starter templates (see #3134) 26 postFixup = '' 27 wrapPythonProgramsIn $out/bin "$out $pythonPath" 28 ''; 29 30 propagatedBuildInputs = [ pytz ]; 31 32 # too complicated to setup 33 doCheck = false; 34 35 meta = with stdenv.lib; { 36 description = "A high-level Python Web framework"; 37 homepage = https://www.djangoproject.com/; 38 license = licenses.bsd3; 39 }; 40}