43 lines
997 B
Nix
43 lines
997 B
Nix
{ stdenv, buildPythonPackage, fetchurl, substituteAll,
|
|
pythonOlder,
|
|
geos, gdal, pytz,
|
|
withGdal ? false
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "Django";
|
|
name = "${pname}-${version}";
|
|
version = "1.11.8";
|
|
|
|
disabled = pythonOlder "2.7";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.djangoproject.com/m/releases/1.11/${name}.tar.gz";
|
|
sha256 = "04gphaarwj1yrhhpi9im6gsg77i2vv0iwyjc0pmxba53nndyglzy";
|
|
};
|
|
|
|
patches = stdenv.lib.optionals withGdal [
|
|
(substituteAll {
|
|
src = ./1.10-gis-libs.template.patch;
|
|
geos = geos;
|
|
gdal = gdal;
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
})
|
|
];
|
|
|
|
# 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/;
|
|
};
|
|
}
|