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

49 lines
928 B
Nix
Raw Normal View History

{ lib, stdenv
2020-08-29 13:57:03 +01:00
, buildPythonPackage
, fetchPypi
, substituteAll
, geos
, gdal
, asgiref
, pytz
, sqlparse
, pythonOlder
, withGdal ? false
}:
buildPythonPackage rec {
pname = "Django";
version = "3.1.7";
2020-08-29 13:57:03 +01:00
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "32ce792ee9b6a0cbbec340123e229ac9f765dff8c2a4ae9247a14b2ba3a365a7";
2020-08-29 13:57:03 +01:00
};
patches = lib.optional withGdal
2020-08-29 13:57:03 +01:00
(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; {
2020-08-29 13:57:03 +01:00
description = "A high-level Python Web framework";
homepage = "https://www.djangoproject.com/";
license = licenses.bsd3;
maintainers = with maintainers; [ georgewhewell lsix ];
};
}