2005-10-12 16:00:20 +02: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 {
|
2006-10-11 15:19:36 +02:00
|
|
|
name = "cairo-1.2.4";
|
2005-10-12 16:00:20 +02:00
|
|
|
src = fetchurl {
|
2006-10-12 15:50:54 +02:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/cairo-1.2.4.tar.gz;
|
2006-10-11 15:19:36 +02:00
|
|
|
sha1 = "5520b771c8b85acea78fa56fc4c39b4dca6bcc7c";
|
2005-10-12 16:00:20 +02:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 fontconfig freetype
|
|
|
|
(if pngSupport then libpng else null)
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
(if postscriptSupport then zlib else null)
|
2006-08-12 00:26:55 +02:00
|
|
|
(if pngSupport then libpng else null)
|
2005-10-12 16:00:20 +02:00
|
|
|
];
|
|
|
|
configureFlags =
|
|
|
|
(if pdfSupport then ["--enable-pdf"] else []);
|
|
|
|
}
|