2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-08-29 12:57:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, substituteAll
|
|
|
|
, geos
|
|
|
|
, gdal
|
|
|
|
, asgiref
|
|
|
|
, pytz
|
|
|
|
, sqlparse
|
|
|
|
, pythonOlder
|
|
|
|
, withGdal ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Django";
|
2021-11-01 12:01:44 +00:00
|
|
|
version = "3.2.9";
|
2020-08-29 12:57:03 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-01 12:01:44 +00:00
|
|
|
sha256 = "51284300f1522ffcdb07ccbdf676a307c6678659e1284f0618e5a774127a6a08";
|
2020-08-29 12:57:03 +00:00
|
|
|
};
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
patches = lib.optional withGdal
|
2020-08-29 12:57:03 +00:00
|
|
|
(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;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-29 12:57:03 +00:00
|
|
|
description = "A high-level Python Web framework";
|
|
|
|
homepage = "https://www.djangoproject.com/";
|
|
|
|
license = licenses.bsd3;
|
2021-11-14 16:27:56 +00:00
|
|
|
maintainers = with maintainers; [ georgewhewell ];
|
2020-08-29 12:57:03 +00:00
|
|
|
};
|
|
|
|
}
|