at 16.09-beta 54 lines 1.7 kB view raw
1{ stdenv, fetchurl, qt4, poppler_qt4, qmake4Hook }: 2 3stdenv.mkDerivation rec { 4 version = "2.1.3"; 5 name = "diffpdf-${version}"; 6 7 src = fetchurl { 8 url = "http://www.qtrac.eu/${name}.tar.gz"; 9 sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566"; 10 }; 11 12 patches = [ ./fix_path_poppler_qt4.patch ]; 13 14 buildInputs = [ qt4 poppler_qt4 ]; 15 nativeBuildInputs = [ qmake4Hook ]; 16 17 preConfigure = '' 18 substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4.dev} 19 lrelease diffpdf.pro 20 ''; 21 22 installPhase = '' 23 mkdir -p $out/bin $out/share/man/man1 24 25 install -Dpm755 -D diffpdf $out/bin/diffpdf 26 install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1 27 28 install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/icons $out/share/pixmaps $out/share/applications 29 install -Dpm644 CHANGES README help.html $out/share/doc/${name}/ 30 install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/ 31 install -Dpm644 images/icon.png $out/share/icons/diffpdf.png 32 install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png 33 34 cat > $out/share/applications/diffpdf.desktop <<EOF 35 [Desktop Entry] 36 Type=Application 37 Version=1.0 38 Name=diffpdf 39 Icon=diffpdf 40 Comment=PDF diffing tool 41 Exec=$out/bin/diffpdf 42 Terminal=false 43 EOF 44 ''; 45 46 meta = { 47 homepage = http://www.qtrac.eu/diffpdfc.html; 48 description = "Tool for diffing pdf files visually or textually"; 49 license = stdenv.lib.licenses.gpl2Plus; 50 maintainers = with stdenv.lib.maintainers; [ tstrobel ]; 51 platforms = with stdenv.lib.platforms; linux; 52 inherit version; 53 }; 54}