From 4c65928e00698a0d0be9a61a20e0ac4606f3385e Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Fri, 4 Feb 2022 12:48:06 +0100 Subject: [PATCH] python3Packages.img2pdf: fix tests with Pillow 9 --- pkgs/development/python-modules/img2pdf/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/img2pdf/default.nix b/pkgs/development/python-modules/img2pdf/default.nix index 9a6a59f6b8d4..58e3db524a82 100644 --- a/pkgs/development/python-modules/img2pdf/default.nix +++ b/pkgs/development/python-modules/img2pdf/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , isPy27 , fetchPypi +, fetchpatch , pikepdf , pillow , stdenv @@ -26,6 +27,15 @@ buildPythonPackage rec { sha256 = "sha256-jlHFBD76lddRSBtRYHGgBvh8KkBZlhqaxD7COJFd4J8="; }; + patches = [ + # Disable tests broken by Pillow 9.0.0 + # https://gitlab.mister-muffin.de/josch/img2pdf/issues/130#issuecomment-586 + (fetchpatch { + url = "https://salsa.debian.org/debian/img2pdf/-/raw/f77fefc81e7c4b235c47ae6777d222d391c59536/debian/patches/pillow9"; + sha256 = "sha256-8giZCuv5PzSbrBQqslNqiLOhgxbg3LsdBVwt+DWnvh4="; + }) + ]; + propagatedBuildInputs = [ pikepdf pillow