3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #3568 from qknight/pdfgrep

pdfgrep: added a nice util to search in pdf files
This commit is contained in:
Joachim Schiele 2014-08-13 20:03:53 +02:00
commit 6c2763c3bf
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{ fetchurl, stdenv, pkgconfig, poppler, poppler_data, makeWrapper }:
stdenv.mkDerivation rec {
name = "pdfgrep-${version}";
version = "1.3.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/pdfgrep/${version}/${name}.tar.gz";
sha256 = "6e8bcaf8b219e1ad733c97257a97286a94124694958c27506b2ea7fc8e532437";
};
buildInputs = [ pkgconfig poppler poppler_data makeWrapper ];
patchPhase = ''
sed -i -e "s%cpp/poppler-document.h%poppler/cpp/poppler-document.h%" pdfgrep.cc
sed -i -e "s%cpp/poppler-page.h%poppler/cpp/poppler-page.h%" pdfgrep.cc
'';
# workarround since it can't be hardcoded in pdfgrep
preFixup = ''
wrapProgram "$out/bin/pdfgrep" \
--set POPPLER_DATADIR "${poppler_data}/share/poppler"
'';
meta = {
description = "a tool to search text in PDF files";
homepage = http://pdfgrep.sourceforge.net/;
license = "free";
maintainers = with stdenv.lib.maintainers; [qknight];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -9413,6 +9413,7 @@ let
};
pdftk = callPackage ../tools/typesetting/pdftk { };
pdfgrep = callPackage ../tools/typesetting/pdfgrep { };
pianobar = callPackage ../applications/audio/pianobar { };