pdfdiff: 0.92 -> 0.93

authored by

Armeen Mahdian and committed by
Armeen Mahdian
02b2dfa9 6fd1162b

+17 -14
+17 -14
pkgs/applications/misc/pdfdiff/default.nix
··· 1 - { lib, python2Packages, fetchurl, xpdf }: 2 3 - python2Packages.buildPythonApplication rec { 4 pname = "pdfdiff"; 5 - version = "0.92"; 6 7 - src = fetchurl { 8 - url = "https://www.cs.ox.ac.uk/people/cas.cremers/downloads/software/pdfdiff.py"; 9 - sha256 = "0zxwjjbklz87wkbhkmsvhc7xmv5php7m2a9vm6ydhmhlxsybf836"; 10 }; 11 12 - buildInputs = [ python2Packages.wrapPython ]; 13 14 dontConfigure = true; 15 dontBuild = true; 16 doCheck = false; 17 18 - unpackPhase = "cp $src pdfdiff.py"; 19 - 20 postPatch = '' 21 - sed -i -r 's|pdftotextProgram = "pdftotext"|pdftotextProgram = "${xpdf}/bin/pdftotext"|' pdfdiff.py 22 - sed -i -r 's|progName = "pdfdiff.py"|progName = "pdfdiff"|' pdfdiff.py 23 ''; 24 25 installPhase = '' 26 mkdir -p $out/bin 27 cp pdfdiff.py $out/bin/pdfdiff 28 chmod +x $out/bin/pdfdiff 29 - 30 - substituteInPlace $out/bin/pdfdiff --replace "#!/usr/bin/python" "#!${python2Packages.python.interpreter}" 31 ''; 32 33 meta = with lib; { 34 - homepage = "http://www.cs.ox.ac.uk/people/cas.cremers/misc/pdfdiff.html"; 35 description = "Tool to view the difference between two PDF or PS files"; 36 license = licenses.gpl2Plus; 37 platforms = platforms.linux;
··· 1 + { lib 2 + , fetchFromGitHub 3 + , python3Packages 4 + , xpdf 5 + }: 6 7 + python3Packages.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;