2010-08-25 16:25:51 +02:00
|
|
|
{stdenv, fetchurl, libxpdf, libxml2}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "pdf2xml";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2013-06-25 14:05:48 +02:00
|
|
|
url = http://tarballs.nixos.org/pdf2xml.tar.gz;
|
2010-08-25 16:25:51 +02:00
|
|
|
sha256 = "04rl7ppxqgnvxvvws669cxp478lnrdmiqj0g3m4p69bawfjc4z3w";
|
|
|
|
};
|
|
|
|
sourceRoot = "pdf2xml/pdf2xml";
|
|
|
|
|
|
|
|
buildInputs = [libxml2 libxpdf];
|
|
|
|
|
|
|
|
patches = [./pdf2xml.patch];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cp Makefile.linux Makefile
|
|
|
|
|
|
|
|
sed -i 's|/usr/include/libxml2|${libxml2}/include/libxml2|' Makefile
|
|
|
|
sed -i 's|-lxml2|-lxml2 -L${libxml2}/lib|' Makefile
|
|
|
|
sed -i 's|XPDF = xpdf_3.01|XPDF = ${libxpdf}/lib|' Makefile
|
|
|
|
|
|
|
|
mkdir exe
|
2014-12-17 19:11:30 +01:00
|
|
|
|
|
|
|
buildFlags+=" CXX=$CXX"
|
2010-08-25 16:25:51 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2010-08-25 16:25:51 +02:00
|
|
|
cp exe/* $out/bin
|
|
|
|
'';
|
|
|
|
}
|