1{ 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.16";
10
11 disabled = !isPy3k;
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2";
16 };
17
18 patches = stdenv.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 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 lsix ];
37 };
38}