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