Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django / 3.nix
blob077ea73bd8b9e38a0dac1094d1edbf47a3240dc9
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchPypi
5 , substituteAll
6 , geos39
7 , gdal
8 , asgiref
9 , pytz
10 , sqlparse
11 , tzdata
12 , pythonOlder
13 , withGdal ? false
16 buildPythonPackage rec {
17   pname = "django";
18   version = "3.2.23";
20   disabled = pythonOlder "3.7";
22   src = fetchPypi {
23     pname = "Django";
24     inherit version;
25     hash = "sha256-gpaPNkDinvSnc68sKESPX3oI0AHGrAWzLQKu7mUJUIs=";
26   };
28   patches = [
29     (substituteAll {
30       src = ./django_3_set_zoneinfo_dir.patch;
31       zoneinfo = tzdata + "/share/zoneinfo";
32     })
33   ] ++ lib.optional withGdal
34     (substituteAll {
35       src = ./django_3_set_geos_gdal_lib.patch;
36       inherit geos39;
37       inherit gdal;
38       extension = stdenv.hostPlatform.extensions.sharedLibrary;
39     });
41   propagatedBuildInputs = [
42     asgiref
43     pytz
44     sqlparse
45   ];
47   # too complicated to setup
48   doCheck = false;
50   pythonImportsCheck = [ "django" ];
52   meta = with lib; {
53     description = "A high-level Python Web framework";
54     homepage = "https://www.djangoproject.com/";
55     license = licenses.bsd3;
56     maintainers = with maintainers; [ georgewhewell ];
57   };