at v206 1.7 kB view raw
1{ stdenv, fetchurl, qt4, poppler_qt4 }: 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 16 preBuild = '' 17 substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4} 18 [ -e "*.qm" ] && make clean 19 lrelease diffpdf.pro 20 qmake -makefile PREFIX=\$out 21 ''; 22 23 installPhase = '' 24 mkdir -p $out/bin $out/share/man/man1 25 26 install -Dpm755 -D diffpdf $out/bin/diffpdf 27 install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1 28 29 install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/icons $out/share/pixmaps $out/share/applications 30 install -Dpm644 CHANGES README help.html $out/share/doc/${name}/ 31 install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/ 32 install -Dpm644 images/icon.png $out/share/icons/diffpdf.png 33 install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png 34 35 cat > $out/share/applications/diffpdf.desktop <<EOF 36 [Desktop Entry] 37 Type=Application 38 Version=1.0 39 Name=diffpdf 40 Icon=diffpdf 41 Comment=PDF diffing tool 42 Exec=$out/bin/diffpdf 43 Terminal=false 44 EOF 45 ''; 46 47 meta = { 48 homepage = http://www.qtrac.eu/diffpdfc.html; 49 description = "Tool for diffing pdf files visually or textually"; 50 license = stdenv.lib.licenses.gpl2Plus; 51 maintainers = with stdenv.lib.maintainers; [ tstrobel ]; 52 platforms = with stdenv.lib.platforms; linux; 53 inherit version; 54 }; 55}