2012-12-03 06:36:57 +00:00
|
|
|
{ fetchurl, stdenv, python, buildPythonPackage, libjpeg, zlib, freetype }:
|
2011-12-29 16:53:14 +00:00
|
|
|
|
|
|
|
let version = "1.1.7"; in
|
|
|
|
|
2012-12-03 06:36:57 +00:00
|
|
|
buildPythonPackage {
|
|
|
|
name = "imaging-${version}";
|
2011-12-29 16:53:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://effbot.org/downloads/Imaging-${version}.tar.gz";
|
|
|
|
sha256 = "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python libjpeg zlib freetype ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
sed -i "setup.py" \
|
|
|
|
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = libinclude("${freetype}")|g ;
|
|
|
|
s|^JPEG_ROOT =.*$|JPEG_ROOT = libinclude("${libjpeg}")|g ;
|
|
|
|
s|^ZLIB_ROOT =.*$|ZLIB_ROOT = libinclude("${zlib}")|g ;'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = "python setup.py build_ext -i";
|
|
|
|
checkPhase = "python selftest.py";
|
2012-12-03 06:36:57 +00:00
|
|
|
#installPhase = "python setup.py install --prefix=$out";
|
2011-12-29 16:53:14 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.pythonware.com/products/pil/;
|
|
|
|
description = "The Python Imaging Library (PIL)";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The Python Imaging Library (PIL) adds image processing
|
|
|
|
capabilities to your Python interpreter. This library
|
|
|
|
supports many file formats, and provides powerful image
|
|
|
|
processing and graphics capabilities.
|
2008-08-12 16:42:21 +01:00
|
|
|
'';
|
|
|
|
|
2011-12-29 16:53:14 +00:00
|
|
|
license = "http://www.pythonware.com/products/pil/license.htm";
|
|
|
|
};
|
|
|
|
}
|