2016-04-17 00:31:25 +01:00
|
|
|
{ stdenv, fetchurl, qt4, poppler_qt4, qmake4Hook }:
|
2015-07-07 22:32:54 +01:00
|
|
|
|
|
|
|
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 ];
|
2016-04-17 00:31:25 +01:00
|
|
|
nativeBuildInputs = [ qmake4Hook ];
|
2015-07-07 22:32:54 +01:00
|
|
|
|
2016-04-17 00:31:25 +01:00
|
|
|
preConfigure = ''
|
2015-07-07 22:32:54 +01:00
|
|
|
substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4}
|
|
|
|
lrelease diffpdf.pro
|
2016-04-17 00:31:25 +01:00
|
|
|
'';
|
2015-07-07 22:32:54 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2015-07-15 09:13:58 +01:00
|
|
|
install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/icons $out/share/pixmaps $out/share/applications
|
2015-07-07 22:32:54 +01:00
|
|
|
install -Dpm644 CHANGES README help.html $out/share/doc/${name}/
|
|
|
|
install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/
|
2015-07-15 09:13:58 +01:00
|
|
|
install -Dpm644 images/icon.png $out/share/icons/diffpdf.png
|
|
|
|
install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png
|
2015-07-07 22:32:54 +01:00
|
|
|
|
|
|
|
cat > $out/share/applications/diffpdf.desktop <<EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Version=1.0
|
|
|
|
Name=diffpdf
|
2015-07-15 09:13:58 +01:00
|
|
|
Icon=diffpdf
|
2015-07-07 22:32:54 +01:00
|
|
|
Comment=PDF diffing tool
|
|
|
|
Exec=$out/bin/diffpdf
|
|
|
|
Terminal=false
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.qtrac.eu/diffpdfc.html;
|
|
|
|
description = "Tool for diffing pdf files visually or textually";
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|