2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
substituteAll,
|
|
|
|
geos_3_9,
|
|
|
|
gdal,
|
|
|
|
asgiref,
|
|
|
|
pytz,
|
|
|
|
sqlparse,
|
|
|
|
tzdata,
|
|
|
|
pythonOlder,
|
|
|
|
withGdal ? false,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "django";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.2.25";
|
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 {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "Django";
|
|
|
|
inherit version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-fKOKeGVK7nI3hZTWPlFjbAS44oV09VBd/2MIlbVHJ3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches =
|
|
|
|
[
|
|
|
|
(substituteAll {
|
|
|
|
src = ./django_3_set_zoneinfo_dir.patch;
|
|
|
|
zoneinfo = tzdata + "/share/zoneinfo";
|
|
|
|
})
|
|
|
|
]
|
|
|
|
++ lib.optional withGdal (substituteAll {
|
2020-10-27 00:29:36 +00:00
|
|
|
src = ./django_3_set_geos_gdal_lib.patch;
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit geos_3_9;
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit gdal;
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [ "django" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "High-level Python Web framework";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.djangoproject.com/";
|
|
|
|
license = licenses.bsd3;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ georgewhewell ];
|
2024-06-05 15:53:02 +00:00
|
|
|
knownVulnerabilities = [
|
|
|
|
"Support for Django 3.2 ended on 2024-04-01, see https://www.djangoproject.com/download/#supported-versions."
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|