2020-08-29 13:57:03 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, substituteAll
|
|
|
|
, geos
|
|
|
|
, gdal
|
|
|
|
, asgiref
|
|
|
|
, pytz
|
|
|
|
, sqlparse
|
|
|
|
, pythonOlder
|
|
|
|
, withGdal ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Django";
|
2020-12-03 08:07:12 +00:00
|
|
|
version = "3.1.4";
|
2020-08-29 13:57:03 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-03 08:07:12 +00:00
|
|
|
sha256 = "edb10b5c45e7e9c0fb1dc00b76ec7449aca258a39ffd613dbd078c51d19c9f03";
|
2020-08-29 13:57:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = stdenv.lib.optional withGdal
|
|
|
|
(substituteAll {
|
|
|
|
src = ./django_3_set_geos_gdal_lib.patch;
|
|
|
|
geos = geos;
|
|
|
|
gdal = gdal;
|
|
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
|
|
});
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asgiref
|
|
|
|
pytz
|
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
|
|
|
# too complicated to setup
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A high-level Python Web framework";
|
|
|
|
homepage = "https://www.djangoproject.com/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ georgewhewell lsix ];
|
|
|
|
};
|
|
|
|
}
|