* Purity fix in fontforge: don't look for /usr/include/libxml.

svn path=/nixpkgs/trunk/; revision=11288
This commit is contained in:
Eelco Dolstra 2008-03-26 12:57:30 +00:00
parent 2f79d64089
commit 31bc21974d
2 changed files with 23 additions and 18 deletions

View File

@ -1,7 +1,6 @@
{ stdenv, fetchurl, gettext, freetype, zlib { stdenv, fetchurl, gettext, freetype, zlib
, libungif, libpng, libjpeg, libtiff, libxml2 , libungif, libpng, libjpeg, libtiff, libxml2
, libX11 ? null , lib , xproto ? null , libX11 ? null, lib, xproto ? null, libXt ? null
, libXt ? null
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -12,18 +11,23 @@ stdenv.mkDerivation {
sha256 = "1b3x5djn9ifvszwmgwmn1jwl50pbq6fzvbmgx0qjg0m60m3v44nx"; sha256 = "1b3x5djn9ifvszwmgwmn1jwl50pbq6fzvbmgx0qjg0m60m3v44nx";
}; };
preConfigure = " configureFlags = if libX11 != null then "--with-gui=gdraw" else "";
preConfigure = ''
unpackFile ${freetype.src} unpackFile ${freetype.src}
freetypeSrcPath=$(echo `pwd`/freetype-*) freetypeSrcPath=$(echo `pwd`/freetype-*)
configureFlags=\"$configureFlags --with-freetype-src=$freetypeSrcPath\" configureFlags="$configureFlags --with-freetype-src=$freetypeSrcPath"
"
+ (if libX11!=null then ''
configureFlags="$configureFlags --with-gui=gdraw";
'' else "");
buildInputs = [gettext freetype zlib libungif libpng libjpeg libtiff libxml2] substituteInPlace configure \
++ (lib.optional (libX11!=null) libX11) --replace /usr/include /no-such-path \
++ (lib.optional (xproto!=null) xproto) --replace /usr/lib /no-such-path \
++ (lib.optional (libXt!=null) libXt) --replace /usr/local /no-such-path \
'';
buildInputs =
[gettext freetype zlib libungif libpng libjpeg libtiff libxml2]
++ lib.optional (libX11 != null) libX11
++ lib.optional (xproto != null) xproto
++ lib.optional (libXt != null) libXt
; ;
} }

View File

@ -587,15 +587,16 @@ let pkgs = rec {
inherit fetchurl stdenv; inherit fetchurl stdenv;
}; };
fontforgeFun = lib.sumArgs (import ../tools/misc/fontforge) { fontforge = import ../tools/misc/fontforge {
inherit fetchurl stdenv gettext freetype zlib inherit fetchurl stdenv gettext freetype zlib
libungif libpng libjpeg libtiff libxml2 lib; libungif libpng libjpeg libtiff libxml2 lib;
}; };
fontforge = fontforgeFun null; fontforgeX = import ../tools/misc/fontforge {
fontforgeX = fontforgeFun { inherit fetchurl stdenv gettext freetype zlib
libungif libpng libjpeg libtiff libxml2 lib;
inherit (xlibs) libX11 xproto libXt; inherit (xlibs) libX11 xproto libXt;
} null; };
gawk = useFromStdenv "gawk" gawk = useFromStdenv "gawk"
(import ../tools/text/gawk { (import ../tools/text/gawk {