8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
49 lines
927 B
Nix
49 lines
927 B
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, substituteAll
|
|
, geos
|
|
, gdal
|
|
, asgiref
|
|
, pytz
|
|
, sqlparse
|
|
, pythonOlder
|
|
, withGdal ? false
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django";
|
|
version = "3.2.12";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "Django";
|
|
inherit version;
|
|
sha256 = "sha256-l3Lmk1cD5Z6ZOWCDLWamFM8CM6HFEjvGIk7MataeQeI=";
|
|
};
|
|
|
|
patches = 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 lib; {
|
|
description = "A high-level Python Web framework";
|
|
homepage = "https://www.djangoproject.com/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ georgewhewell ];
|
|
};
|
|
}
|