2005-10-12 14:00:20 +00:00
|
|
|
{ postscriptSupport ? true
|
|
|
|
, pdfSupport ? true
|
|
|
|
, pngSupport ? true
|
|
|
|
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype
|
2008-04-23 10:48:10 +00:00
|
|
|
, zlib, libpng, pixman
|
2005-10-12 14:00:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert postscriptSupport -> zlib != null;
|
|
|
|
assert pngSupport -> libpng != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-04-23 10:48:10 +00:00
|
|
|
name = "cairo-1.6.4";
|
2008-03-07 15:43:43 +00:00
|
|
|
|
2005-10-12 14:00:20 +00:00
|
|
|
src = fetchurl {
|
2008-04-23 10:48:10 +00:00
|
|
|
url = http://cairographics.org/releases/cairo-1.6.4.tar.gz;
|
|
|
|
sha1 = "9d990fe39a125ceb07221623c237cd7015855d5c";
|
2005-10-12 14:00:20 +00:00
|
|
|
};
|
2008-03-07 15:43:43 +00:00
|
|
|
|
2005-10-12 14:00:20 +00:00
|
|
|
buildInputs = [
|
2008-04-23 10:48:10 +00:00
|
|
|
pkgconfig x11 fontconfig freetype pixman
|
2005-10-12 14:00:20 +00:00
|
|
|
];
|
2008-03-07 15:43:43 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs =
|
|
|
|
stdenv.lib.optional postscriptSupport zlib ++
|
|
|
|
stdenv.lib.optional pngSupport libpng;
|
|
|
|
|
2005-10-12 14:00:20 +00:00
|
|
|
configureFlags =
|
|
|
|
(if pdfSupport then ["--enable-pdf"] else []);
|
2008-03-07 15:43:43 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 2D graphics library with support for multiple output devices";
|
|
|
|
homepage = http://cairographics.org/;
|
|
|
|
};
|
2005-10-12 14:00:20 +00:00
|
|
|
}
|