mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
pdfgrep: added a nice util to search in pdf files
This commit is contained in:
parent
6025caa92b
commit
79617c03eb
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;
|
||||||
|
};
|
||||||
|
}
|
@ -9241,6 +9241,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
pdftk = callPackage ../tools/typesetting/pdftk { };
|
pdftk = callPackage ../tools/typesetting/pdftk { };
|
||||||
|
pdfgrep = callPackage ../tools/typesetting/pdfgrep { };
|
||||||
|
|
||||||
pianobar = callPackage ../applications/audio/pianobar { };
|
pianobar = callPackage ../applications/audio/pianobar { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user