6ae7ad3cc5
GitOrigin-RevId: a322b32e9d74fb476944ff6cfb55833dc69cfaaa
48 lines
937 B
Nix
48 lines
937 B
Nix
{ stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, substituteAll
|
|
, geos
|
|
, gdal
|
|
, asgiref
|
|
, pytz
|
|
, sqlparse
|
|
, pythonOlder
|
|
, withGdal ? false
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "Django";
|
|
version = "3.1.3";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "14b87775ffedab2ef6299b73343d1b4b41e5d4e2aa58c6581f114dbec01e3f8f";
|
|
};
|
|
|
|
patches = stdenv.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 stdenv.lib; {
|
|
description = "A high-level Python Web framework";
|
|
homepage = "https://www.djangoproject.com/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ georgewhewell lsix ];
|
|
};
|
|
}
|