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