2005-10-12 15:00:20 +01:00
|
|
|
{ postscriptSupport ? true
|
|
|
|
, pdfSupport ? true
|
|
|
|
, pngSupport ? true
|
|
|
|
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype
|
|
|
|
, zlib, libpng
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert postscriptSupport -> zlib != null;
|
|
|
|
assert pngSupport -> libpng != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-05-13 22:45:43 +01:00
|
|
|
name = "cairo-1.4.6";
|
2005-10-12 15:00:20 +01:00
|
|
|
src = fetchurl {
|
2007-05-13 22:45:43 +01:00
|
|
|
url = http://cairographics.org/releases/cairo-1.4.6.tar.gz;
|
|
|
|
sha256 = "15l87pzmlwbxk6m4102g2zln4drq0l32qs60ccs5bpmcnky2lqya";
|
2005-10-12 15:00:20 +01:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 fontconfig freetype
|
|
|
|
(if pngSupport then libpng else null)
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
(if postscriptSupport then zlib else null)
|
2006-08-11 23:26:55 +01:00
|
|
|
(if pngSupport then libpng else null)
|
2005-10-12 15:00:20 +01:00
|
|
|
];
|
|
|
|
configureFlags =
|
|
|
|
(if pdfSupport then ["--enable-pdf"] else []);
|
|
|
|
}
|