python3Packages.pillow: Add libxcb support
This commit is contained in:
parent
63e1b20c16
commit
ab0a29d525
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
|
||||
, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
|
||||
, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
|
||||
, libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
|
||||
}@args:
|
||||
|
||||
import ./generic.nix (rec {
|
||||
|
@ -29,6 +29,7 @@ buildPythonPackage rec {
|
||||
checkInputs = [ pytestCheckHook pyroma numpy ];
|
||||
|
||||
buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
|
||||
++ lib.optionals (lib.versionAtLeast version "7.1.0") [ libxcb ]
|
||||
++ lib.optionals (isPyPy) [ tk libX11 ];
|
||||
|
||||
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
|
||||
@ -56,6 +57,9 @@ buildPythonPackage rec {
|
||||
s|self\.disable_platform_guessing = None|self.disable_platform_guessing = True|g ;'
|
||||
export LDFLAGS="$LDFLAGS -L${libwebp}/lib"
|
||||
export CFLAGS="$CFLAGS -I${libwebp}/include"
|
||||
'' + lib.optionalString (lib.versionAtLeast version "7.1.0") ''
|
||||
export LDFLAGS="$LDFLAGS -L${libxcb}/lib"
|
||||
export CFLAGS="$CFLAGS -I${libxcb.dev}/include"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Remove impurities
|
||||
substituteInPlace setup.py \
|
||||
|
@ -4846,7 +4846,7 @@ in {
|
||||
else
|
||||
callPackage ../development/python-modules/pillow {
|
||||
inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk;
|
||||
inherit (pkgs.xorg) libX11;
|
||||
inherit (pkgs.xorg) libX11 libxcb;
|
||||
};
|
||||
|
||||
pillow-simd = callPackage ../development/python-modules/pillow-simd {
|
||||
|
Loading…
Reference in New Issue
Block a user