From 2711c7477db765cabb0cad506bfb1b6f3b1e0fc2 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Tue, 28 Jan 2020 12:27:28 +0100 Subject: [PATCH] pythonPackages.django: django_1_11 -> django_lts --- pkgs/development/python-modules/diskcache/default.nix | 3 +++ pkgs/development/python-modules/django-compat/default.nix | 3 +++ pkgs/development/python-modules/mezzanine/default.nix | 3 +++ pkgs/servers/mail/mailman/web.nix | 4 ++++ pkgs/top-level/all-packages.nix | 6 +++++- pkgs/top-level/python-packages.nix | 2 +- 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index a420fc037bbe..793b0edd6974 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -6,6 +6,7 @@ , pytest_xdist , pytest-django , mock +, django }: buildPythonPackage rec { @@ -27,6 +28,8 @@ buildPythonPackage rec { mock ]; + disabled = lib.versionAtLeast django.version "2.0"; + checkPhase = '' pytest ''; diff --git a/pkgs/development/python-modules/django-compat/default.nix b/pkgs/development/python-modules/django-compat/default.nix index 32d85cfadd71..de180ca03e55 100644 --- a/pkgs/development/python-modules/django-compat/default.nix +++ b/pkgs/development/python-modules/django-compat/default.nix @@ -1,6 +1,9 @@ { stdenv, buildPythonPackage, fetchFromGitHub, python, django, six }: +if stdenv.lib.versionAtLeast django.version "2.0" +then throw "django-compat requires django < 2.0" +else buildPythonPackage rec { pname = "django-compat"; version = "1.0.15"; diff --git a/pkgs/development/python-modules/mezzanine/default.nix b/pkgs/development/python-modules/mezzanine/default.nix index a831618134bc..567a1c66e029 100644 --- a/pkgs/development/python-modules/mezzanine/default.nix +++ b/pkgs/development/python-modules/mezzanine/default.nix @@ -18,6 +18,9 @@ , chardet }: +if stdenv.lib.versionOlder django.version "1.11" || stdenv.lib.versionAtLeast django.version "2.0" +then throw "mezzanine requires django-1.11. Consider overriding python package set to use django_1_11" +else buildPythonPackage rec { version = "4.3.1"; pname = "Mezzanine"; diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix index 4586c3d0fdf7..b73120c646d2 100644 --- a/pkgs/servers/mail/mailman/web.nix +++ b/pkgs/servers/mail/mailman/web.nix @@ -1,7 +1,11 @@ { buildPythonPackage, lib, fetchgit, isPy3k , git, makeWrapper, sassc, hyperkitty, postorius, whoosh +, django }: +if lib.versionOlder "2.2" django.version +then throw "mailman-web requires django < 2.2" +else buildPythonPackage rec { pname = "mailman-web-unstable"; version = "2019-09-29"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3826475eb5f7..7adcc3c99c09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15309,7 +15309,11 @@ in mailman-rss = callPackage ../development/python-modules/mailman-rss { }; - mailman-web = with python3.pkgs; toPythonApplication mailman-web; + mailman-web = with (python3.override { + packageOverrides = self: super: { + django = self.django_1_11; + }; + }).pkgs; toPythonApplication mailman-web; mattermost = callPackage ../servers/mattermost { }; matterircd = callPackage ../servers/mattermost/matterircd.nix { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8b660ce98c0c..ec469c1e1e60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3214,7 +3214,7 @@ in { crayons = callPackage ../development/python-modules/crayons{ }; - django = self.django_1_11; + django = self.django_lts; django_lts = self.django_2_2;