2017-04-07 17:06:00 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchurl, substituteAll,
|
|
|
|
pythonOlder,
|
2017-10-09 18:21:41 +02:00
|
|
|
geos, gdal, pytz,
|
|
|
|
withGdal ? false
|
2017-04-07 17:06:00 +02:00
|
|
|
}:
|
2017-10-09 18:14:15 +02:00
|
|
|
|
2017-04-07 17:06:00 +02:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "Django";
|
2018-05-23 15:24:32 +02:00
|
|
|
version = "1.11.13";
|
2017-05-27 11:25:35 +02:00
|
|
|
|
2017-04-07 17:06:00 +02:00
|
|
|
disabled = pythonOlder "2.7";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-04-17 10:42:07 +02:00
|
|
|
url = "http://www.djangoproject.com/m/releases/1.11/${pname}-${version}.tar.gz";
|
2018-05-23 15:24:32 +02:00
|
|
|
sha256 = "19d4c1rlbhmbvbxvskvqjb2aw4dnf2cqi1hhdh11ykdy1a7gxba6";
|
2017-04-07 17:06:00 +02:00
|
|
|
};
|
|
|
|
|
2017-10-09 18:21:41 +02:00
|
|
|
patches = stdenv.lib.optionals withGdal [
|
2017-04-07 17:06:00 +02:00
|
|
|
(substituteAll {
|
|
|
|
src = ./1.10-gis-libs.template.patch;
|
|
|
|
geos = geos;
|
|
|
|
gdal = gdal;
|
2017-10-09 18:14:15 +02:00
|
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
2017-04-07 17:06:00 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
# patch only $out/bin to avoid problems with starter templates (see #3134)
|
|
|
|
postFixup = ''
|
|
|
|
wrapPythonProgramsIn $out/bin "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pytz ];
|
|
|
|
|
|
|
|
# too complicated to setup
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A high-level Python Web framework";
|
|
|
|
homepage = https://www.djangoproject.com/;
|
|
|
|
};
|
|
|
|
}
|