2017-04-07 16:06:00 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchurl, substituteAll,
|
|
|
|
pythonOlder,
|
2017-10-09 17:21:41 +01:00
|
|
|
geos, gdal, pytz,
|
|
|
|
withGdal ? false
|
2017-04-07 16:06:00 +01:00
|
|
|
}:
|
2017-10-09 17:14:15 +01:00
|
|
|
|
2017-04-07 16:06:00 +01:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "Django";
|
|
|
|
name = "${pname}-${version}";
|
2017-11-03 11:09:25 +00:00
|
|
|
version = "1.11.7";
|
2017-05-27 10:25:35 +01:00
|
|
|
|
2017-04-07 16:06:00 +01:00
|
|
|
disabled = pythonOlder "2.7";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.djangoproject.com/m/releases/1.11/${name}.tar.gz";
|
2017-11-03 11:09:25 +00:00
|
|
|
sha256 = "16ab3p6jj1da94wkz2b5fb128ycy4826bbsnbabcd3qdaf9f6649";
|
2017-04-07 16:06:00 +01:00
|
|
|
};
|
|
|
|
|
2017-10-09 17:21:41 +01:00
|
|
|
patches = stdenv.lib.optionals withGdal [
|
2017-04-07 16:06:00 +01:00
|
|
|
(substituteAll {
|
|
|
|
src = ./1.10-gis-libs.template.patch;
|
|
|
|
geos = geos;
|
|
|
|
gdal = gdal;
|
2017-10-09 17:14:15 +01:00
|
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
2017-04-07 16:06:00 +01: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/;
|
|
|
|
};
|
|
|
|
}
|