base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / pd / pdfgrep / package.nix
bloba1e9ed91f990d3036c9c5a78cd12c4c3d25605c0
1 { lib, stdenv, fetchurl, pkg-config, poppler, libgcrypt, pcre2, asciidoc }:
3 stdenv.mkDerivation rec {
4   pname = "pdfgrep";
5   version = "2.2.0";
7   src = fetchurl {
8     url = "https://pdfgrep.org/download/${pname}-${version}.tar.gz";
9     hash = "sha256-BmHlMeTA7wl5Waocl3N5ZYXbOccshKAv+H0sNjfGIMs=";
10   };
12   postPatch = ''
13     for i in ./src/search.h ./src/pdfgrep.cc ./src/search.cc; do
14       substituteInPlace $i --replace '<cpp/' '<'
15     done
16   '';
18   configureFlags = [
19     "--with-libgcrypt-prefix=${lib.getDev libgcrypt}"
20   ];
22   nativeBuildInputs = [ pkg-config asciidoc ];
23   buildInputs = [ poppler libgcrypt pcre2 ];
25   meta = {
26     description = "Commandline utility to search text in PDF files";
27     homepage = "https://pdfgrep.org/";
28     license = lib.licenses.gpl2Plus;
29     maintainers = with lib.maintainers; [ qknight fpletz ];
30     platforms = with lib.platforms; unix;
31     mainProgram = "pdfgrep";
32   };