graphviz: simplify and add a missing X library

This commit is contained in:
Vladimír Čunát 2015-10-15 19:00:25 +02:00
parent 31d9263159
commit 74d4fc7959

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat
, yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo , yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo
, flex , flex
}: }:
@ -22,21 +22,14 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex
] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender pango libXaw ] ] ++ stdenv.lib.optionals (xorg != null)
(with xorg; [ xlibsWrapper libXrender pango libXaw libXpm ])
++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext;
CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin") CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin")
"-I${cairo.dev}/include/cairo"; "-I${cairo.dev}/include/cairo";
configureFlags = configureFlags = stdenv.lib.optional (xorg == null) "--without-x";
[ "--with-pngincludedir=${libpng}/include"
"--with-pnglibdir=${libpng}/lib"
"--with-jpegincludedir=${libjpeg}/include"
"--with-jpeglibdir=${libjpeg}/lib"
"--with-expatincludedir=${expat}/include"
"--with-expatlibdir=${expat}/lib"
]
++ stdenv.lib.optional (xorg == null) "--without-x";
preBuild = '' preBuild = ''
sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile