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