mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
Merge pull request #3568 from qknight/pdfgrep
pdfgrep: added a nice util to search in pdf files
This commit is contained in:
commit
6c2763c3bf
32
pkgs/tools/typesetting/pdfgrep/default.nix
Normal file
32
pkgs/tools/typesetting/pdfgrep/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -9413,6 +9413,7 @@ let
|
||||
};
|
||||
|
||||
pdftk = callPackage ../tools/typesetting/pdftk { };
|
||||
pdfgrep = callPackage ../tools/typesetting/pdfgrep { };
|
||||
|
||||
pianobar = callPackage ../applications/audio/pianobar { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user