nixpkgs/pkgs/development/python-modules/django/3.nix

49 lines
925 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
, substituteAll
, geos
, gdal
, asgiref
, pytz
, sqlparse
, pythonOlder
, withGdal ? false
}:
buildPythonPackage rec {
pname = "Django";
version = "3.1.1";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r";
};
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 ];
};
}