@@ -8156,6 +8156,12 @@ let
81568156 -e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = libinclude("${pkgs.freetype}")|g ;
81578157 s|^JPEG_ROOT =.*$|JPEG_ROOT = libinclude("${pkgs.libjpeg}")|g ;
81588158 s|^ZLIB_ROOT =.*$|ZLIB_ROOT = libinclude("${pkgs.zlib}")|g ;'
8159+ ''
8160+ # Remove impurities
8161+ + stdenv.lib.optionalString stdenv.isDarwin ''
8162+ substituteInPlace setup.py \
8163+ --replace '"/Library/Frameworks",' "" \
8164+ --replace '"/System/Library/Frameworks"' ""
81598165 '';
81608166
81618167 checkPhase = "${python}/bin/${python.executable} selftest.py";
@@ -8197,10 +8203,16 @@ let
81978203 s|^LCMS_ROOT =.*$|LCMS_ROOT = _lib_include("${pkgs.libwebp}")|g ;
81988204 s|^TIFF_ROOT =.*$|TIFF_ROOT = _lib_include("${pkgs.libtiff}")|g ;
81998205 s|^TCL_ROOT=.*$|TCL_ROOT = _lib_include("${pkgs.tcl}")|g ;'
8206+ ''
8207+ # Remove impurities
8208+ + stdenv.lib.optionalString stdenv.isDarwin ''
8209+ substituteInPlace setup.py \
8210+ --replace '"/Library/Frameworks",' "" \
8211+ --replace '"/System/Library/Frameworks"' ""
82008212 '';
82018213
82028214 meta = {
8203− homepage = http://python-imaging.github.com/Pillow;
8215+ homepage = "https://python-pillow.github.io/";
82048216
82058217 description = "Fork of The Python Imaging Library (PIL)";
82068218