1{ lib
2, fetchFromGitHub
3, python3Packages
4, xpdf
5}:
6
7python3Packages.buildPythonApplication rec {
8 pname = "pdfdiff";
9 version = "0.93";
10
11 src = fetchFromGitHub {
12 owner = "cascremers";
13 repo = "pdfdiff";
14 rev = version;
15 hash = "sha256-NPki/PFm0b71Ksak1mimR4w6J2a0jBCbQDTMQR4uZFI=";
16 };
17
18 format = "other";
19
20 dontConfigure = true;
21 dontBuild = true;
22 doCheck = false;
23
24 postPatch = ''
25 substituteInPlace pdfdiff.py \
26 --replace 'pdftotextProgram = "pdftotext"' 'pdftotextProgram = "${xpdf}/bin/pdftotext"' \
27 --replace 'progName = "pdfdiff.py"' 'progName = "pdfdiff"'
28 '';
29
30 installPhase = ''
31 mkdir -p $out/bin
32 cp pdfdiff.py $out/bin/pdfdiff
33 chmod +x $out/bin/pdfdiff
34 '';
35
36 meta = with lib; {
37 homepage = "https://github.com/cascremers/pdfdiff";
38 description = "Tool to view the difference between two PDF or PS files";
39 license = licenses.gpl2Plus;
40 platforms = platforms.linux;
41 };
42}