From df533183f7d435d668e72597889eaf51bbd4eed6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 16 Apr 2024 09:39:12 +0200 Subject: [PATCH] python311Packages.django: Fix MIME UTF-8 surrogate escaping Closes: #304339 --- pkgs/development/python-modules/django/4.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/django/4.nix b/pkgs/development/python-modules/django/4.nix index 727403f37c46..bc1fcbdfe9c8 100644 --- a/pkgs/development/python-modules/django/4.nix +++ b/pkgs/development/python-modules/django/4.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchPypi +, fetchpatch2 , pythonAtLeast , pythonOlder , substituteAll @@ -63,6 +64,13 @@ buildPythonPackage rec { # and disable failing tests ./django_4_tests.patch + (fetchpatch2 { + # https://github.com/django/django/pull/17979 + name = "django-mime-utf8-surrogates.patch"; + url = "https://github.com/django/django/commit/0d3ddcaf2c74638a32781f361d467af572ced95f.patch"; + hash = "sha256-AoIFvehBsXIrzIlCsqOZ++RqtDFl/H+zXqA25OMQr7g="; + }) + ] ++ lib.optionals withGdal [ (substituteAll { src = ./django_4_set_geos_gdal_lib.patch;