This commit gets pkgsCross.*.pdfgrep a bit farther. It still fails with the error below; if anybody recognizes it I'd appreciate a hint. ``` pdfgrep-aarch64-unknown-linux-gnu> aarch64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/nix/store/9kzvsy9ybsy2zvivz62ia881q9djf734-poppler-glib-aarch64-unknown-linux-gnu-23.02.0-dev/include/poppler/cpp -I/nix/store/6ib0mcvv0ascsydhpja2a1kcnwvxqnfp-pcre-aarch64-unknown-linux-gnu-8.45-dev/include -I/nix/store/yyyy71mx8j85hh1xknfy2nqgw4ihfchr-libgcrypt-aarch64-unknown-linux-gnu-1.10.1-dev/include -I/nix/store/mqx4d57dva5y5kg91a9pnlipdc6bfcxc-libgpg-error-aarch64-unknown-linux-gnu-1.46-dev/include -g -O2 -c -o pdfgrep.o pdfgrep.cc pdfgrep-aarch64-unknown-linux-gnu> In file included from /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:36, pdfgrep-aarch64-unknown-linux-gnu> from pdfgrep.cc:24: pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/cstdlib:151:11: error: 'malloc' has not been declared in '::' pdfgrep-aarch64-unknown-linux-gnu> 151 | using ::malloc; pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~ pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/cstdlib:164:11: error: 'realloc' has not been declared in '::' pdfgrep-aarch64-unknown-linux-gnu> 164 | using ::realloc; pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~~ pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:65:12: error: 'malloc' has not been declared in 'std' pdfgrep-aarch64-unknown-linux-gnu> 65 | using std::malloc; pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~ pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:73:12: error: 'realloc' has not been declared in 'std' pdfgrep-aarch64-unknown-linux-gnu> 73 | using std::realloc; pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~~ pdfgrep-aarch64-unknown-linux-gnu> make[2]: *** [Makefile:413: pdfgrep.o] Error 1 pdfgrep-aarch64-unknown-linux-gnu> make[2]: Leaving directory '/build/pdfgrep-2.1.2/src' pdfgrep-aarch64-unknown-linux-gnu> make[1]: *** [Makefile:388: all-recursive] Error 1 pdfgrep-aarch64-unknown-linux-gnu> make[1]: Leaving directory '/build/pdfgrep-2.1.2' pdfgrep-aarch64-unknown-linux-gnu> make: *** [Makefile:329: all] Error 2 ```
33 lines
893 B
Nix
33 lines
893 B
Nix
{ lib, stdenv, fetchurl, pkg-config, poppler, libgcrypt, pcre, asciidoc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pdfgrep";
|
|
version = "2.1.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://pdfgrep.org/download/${pname}-${version}.tar.gz";
|
|
sha256 = "1fia10djcxxl7n9jw2prargw4yzbykk6izig2443ycj9syhxrwqf";
|
|
};
|
|
|
|
postPatch = ''
|
|
for i in ./src/search.h ./src/pdfgrep.cc ./src/search.cc; do
|
|
substituteInPlace $i --replace '<cpp/' '<'
|
|
done
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--with-libgcrypt-prefix=${lib.getDev libgcrypt}"
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config asciidoc ];
|
|
buildInputs = [ poppler libgcrypt pcre ];
|
|
|
|
meta = {
|
|
description = "Commandline utility to search text in PDF files";
|
|
homepage = "https://pdfgrep.org/";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [ qknight fpletz ];
|
|
platforms = with lib.platforms; unix;
|
|
};
|
|
}
|