From 528fae6dd304ac3c2db4e49fa894b9c7ef575d08 Mon Sep 17 00:00:00 2001 From: Thomas Strobel Date: Tue, 7 Jul 2015 23:32:54 +0200 Subject: [PATCH] diffpdf: init at 2.1.3 --- pkgs/applications/misc/diffpdf/default.nix | 53 +++++++++++++++++++ .../misc/diffpdf/fix_path_poppler_qt4.patch | 16 ++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 71 insertions(+) create mode 100644 pkgs/applications/misc/diffpdf/default.nix create mode 100644 pkgs/applications/misc/diffpdf/fix_path_poppler_qt4.patch diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix new file mode 100644 index 000000000000..88952f5eb761 --- /dev/null +++ b/pkgs/applications/misc/diffpdf/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchurl, qt4, poppler_qt4 }: + +stdenv.mkDerivation rec { + version = "2.1.3"; + name = "diffpdf-${version}"; + + src = fetchurl { + url = "http://www.qtrac.eu/${name}.tar.gz"; + sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566"; + }; + + patches = [ ./fix_path_poppler_qt4.patch ]; + + buildInputs = [ qt4 poppler_qt4 ]; + + preBuild = '' + substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4} + [ -e "*.qm" ] && make clean + lrelease diffpdf.pro + qmake -makefile PREFIX=\$out + ''; + + installPhase = '' + mkdir -p $out/bin $out/share/man/man1 + + install -Dpm755 -D diffpdf $out/bin/diffpdf + install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1 + + install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/pixmaps $out/share/applications + install -Dpm644 CHANGES README help.html $out/share/doc/${name}/ + install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/ + install -Dpm644 images/icon.png $out/share/pixmaps/${name}.png + + cat > $out/share/applications/diffpdf.desktop <