2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-10-27 00:29:36 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, substituteAll
|
|
|
|
, geos
|
|
|
|
, gdal
|
|
|
|
, asgiref
|
|
|
|
, pytz
|
|
|
|
, sqlparse
|
|
|
|
, pythonOlder
|
|
|
|
, withGdal ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Django";
|
2021-10-08 15:17:17 +00:00
|
|
|
version = "3.2.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-08 15:17:17 +00:00
|
|
|
sha256 = "f6d2c4069c9b9bfac03bedff927ea1f9e0d29e34525cec8a68fd28eb2a8df7af";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
patches = lib.optional withGdal
|
2020-04-24 23:36:52 +00:00
|
|
|
(substituteAll {
|
2020-10-27 00:29:36 +00:00
|
|
|
src = ./django_3_set_geos_gdal_lib.patch;
|
2020-04-24 23:36:52 +00:00
|
|
|
geos = geos;
|
|
|
|
gdal = gdal;
|
|
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
2020-10-27 00:29:36 +00:00
|
|
|
});
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
asgiref
|
|
|
|
pytz
|
|
|
|
sqlparse
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# too complicated to setup
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A high-level Python Web framework";
|
|
|
|
homepage = "https://www.djangoproject.com/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ georgewhewell lsix ];
|
|
|
|
};
|
|
|
|
}
|