Merge pull request #8693 from ts468/upstream.pdfdiff
pdfdiff: init at 0.92
This commit is contained in:
commit
1e631b51e0
2 changed files with 43 additions and 0 deletions
41
pkgs/applications/misc/pdfdiff/default.nix
Normal file
41
pkgs/applications/misc/pdfdiff/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, pythonPackages, fetchurl, xpdf }:
|
||||
let
|
||||
py = pythonPackages;
|
||||
in
|
||||
py.buildPythonPackage rec {
|
||||
name = "pdfdiff-${version}";
|
||||
version = "0.92";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.cs.ox.ac.uk/people/cas.cremers/downloads/software/pdfdiff.py";
|
||||
sha256 = "0zxwjjbklz87wkbhkmsvhc7xmv5php7m2a9vm6ydhmhlxsybf836";
|
||||
};
|
||||
|
||||
buildInputs = [ pythonPackages.wrapPython ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
unpackPhase = "cp $src pdfdiff.py";
|
||||
|
||||
postPatch = ''
|
||||
sed -i -r 's|pdftotextProgram = "pdftotext"|pdftotextProgram = "${xpdf}/bin/pdftotext"|' pdfdiff.py
|
||||
sed -i -r 's|progName = "pdfdiff.py"|progName = "pdfdiff"|' pdfdiff.py
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp pdfdiff.py $out/bin/pdfdiff
|
||||
chmod +x $out/bin/pdfdiff
|
||||
|
||||
substituteInPlace $out/bin/pdfdiff --replace "#!/usr/bin/python" "#!${pythonPackages.python.interpreter}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.cs.ox.ac.uk/people/cas.cremers/misc/pdfdiff.html;
|
||||
description = "Tool to view the difference between two PDF or PS files";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -12133,6 +12133,8 @@ let
|
|||
|
||||
maxlib = callPackage ../applications/audio/pd-plugins/maxlib { };
|
||||
|
||||
pdfdiff = callPackage ../applications/misc/pdfdiff { };
|
||||
|
||||
mupdf = callPackage ../applications/misc/mupdf {
|
||||
openjpeg = openjpeg_2_0;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue