60f07311b9
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, substituteAll
|
|
, geos_3_9
|
|
, gdal
|
|
, asgiref
|
|
, pytz
|
|
, sqlparse
|
|
, tzdata
|
|
, pythonOlder
|
|
, withGdal ? false
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django";
|
|
version = "3.2.24";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "Django";
|
|
inherit version;
|
|
hash = "sha256-qu6fsPtOvUMRUgiHrS4zMT02iEZgf4KpoO1GHNTDWxg=";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./django_3_set_zoneinfo_dir.patch;
|
|
zoneinfo = tzdata + "/share/zoneinfo";
|
|
})
|
|
] ++ lib.optional withGdal
|
|
(substituteAll {
|
|
src = ./django_3_set_geos_gdal_lib.patch;
|
|
inherit geos_3_9;
|
|
inherit gdal;
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
});
|
|
|
|
propagatedBuildInputs = [
|
|
asgiref
|
|
pytz
|
|
sqlparse
|
|
];
|
|
|
|
# too complicated to setup
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "django" ];
|
|
|
|
meta = with lib; {
|
|
description = "A high-level Python Web framework";
|
|
homepage = "https://www.djangoproject.com/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ georgewhewell ];
|
|
};
|
|
}
|