nixpkgs/pkgs/by-name/pd/pdfdiff/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
955 B
Nix
Raw Normal View History

2022-04-25 02:44:00 +00:00
{ lib
, fetchFromGitHub
, python3Packages
, xpdf
}:
2022-03-07 11:37:20 +00:00
2022-04-25 02:44:00 +00:00
python3Packages.buildPythonApplication rec {
2022-03-07 11:37:20 +00:00
pname = "pdfdiff";
2022-04-25 02:44:00 +00:00
version = "0.93";
2015-07-07 22:22:57 +00:00
2022-04-25 02:44:00 +00:00
src = fetchFromGitHub {
owner = "cascremers";
repo = "pdfdiff";
rev = version;
hash = "sha256-NPki/PFm0b71Ksak1mimR4w6J2a0jBCbQDTMQR4uZFI=";
2015-07-07 22:22:57 +00:00
};
2022-04-25 02:44:00 +00:00
format = "other";
2015-07-07 22:22:57 +00:00
2021-07-14 12:12:46 +00:00
dontConfigure = true;
dontBuild = true;
2015-07-07 22:22:57 +00:00
doCheck = false;
postPatch = ''
2022-04-25 02:44:00 +00:00
substituteInPlace pdfdiff.py \
--replace 'pdftotextProgram = "pdftotext"' 'pdftotextProgram = "${xpdf}/bin/pdftotext"' \
--replace 'progName = "pdfdiff.py"' 'progName = "pdfdiff"'
2015-07-07 22:22:57 +00:00
'';
installPhase = ''
mkdir -p $out/bin
cp pdfdiff.py $out/bin/pdfdiff
chmod +x $out/bin/pdfdiff
'';
meta = with lib; {
2022-04-25 02:44:00 +00:00
homepage = "https://github.com/cascremers/pdfdiff";
2015-07-07 22:22:57 +00:00
description = "Tool to view the difference between two PDF or PS files";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}