Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 59 lines 1.9 kB view raw
1{ lib, mkDerivation, fetchurl, fetchpatch, qmake, qttools, qtbase, poppler }: 2 3mkDerivation rec { 4 version = "2.1.3"; 5 pname = "diffpdf"; 6 7 src = fetchurl { 8 url = "http://www.qtrac.eu/${pname}-${version}.tar.gz"; 9 sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566"; 10 }; 11 12 patches = [ 13 (fetchpatch { 14 url = "https://raw.githubusercontent.com/gentoo/gentoo/9b971631588ff46e7c2d501bc35cd0d9ce2d98e2/app-text/diffpdf/files/diffpdf-2.1.3-qt5.patch"; 15 sha256 = "0sax8gcqcmzf74hmdr3rarqs4nsxmml9qmh6pqyjmgl3lypxhafg"; 16 }) 17 ./fix_path_poppler_qt5.patch 18 ]; 19 20 nativeBuildInputs = [ qmake qttools ]; 21 buildInputs = [ qtbase poppler ]; 22 23 preConfigure = '' 24 substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT5@@ ${poppler.dev} 25 lrelease diffpdf.pro 26 ''; 27 28 installPhase = '' 29 mkdir -p $out/bin $out/share/man/man1 30 31 install -Dpm755 -D diffpdf $out/bin/diffpdf 32 install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1 33 34 install -dpm755 $out/share/doc/${pname}-${version} $out/share/licenses/${pname}-${version} $out/share/icons $out/share/pixmaps $out/share/applications 35 install -Dpm644 CHANGES README help.html $out/share/doc/${pname}-${version}/ 36 install -Dpm644 gpl-2.0.txt $out/share/licenses/${pname}-${version}/ 37 install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png 38 39 cat > $out/share/applications/diffpdf.desktop <<EOF 40 [Desktop Entry] 41 Type=Application 42 Version=1.0 43 Name=diffpdf 44 Icon=diffpdf 45 Comment=PDF diffing tool 46 Exec=$out/bin/diffpdf 47 Terminal=false 48 EOF 49 ''; 50 51 meta = { 52 homepage = "http://www.qtrac.eu/diffpdfc.html"; 53 description = "Tool for diffing pdf files visually or textually"; 54 mainProgram = "diffpdf"; 55 license = lib.licenses.gpl2Plus; 56 maintainers = [ ]; 57 platforms = with lib.platforms; linux; 58 }; 59}