2021-01-25 08:26:54 +00:00
|
|
|
{ lib, mkDerivation, fetchurl, fetchpatch, qmake, qttools, qtbase, poppler }:
|
2015-07-07 22:32:54 +01:00
|
|
|
|
2019-12-21 12:46:53 +00:00
|
|
|
mkDerivation rec {
|
2015-07-07 22:32:54 +01:00
|
|
|
version = "2.1.3";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "diffpdf";
|
2015-07-07 22:32:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://www.qtrac.eu/${pname}-${version}.tar.gz";
|
2015-07-07 22:32:54 +01:00
|
|
|
sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566";
|
|
|
|
};
|
|
|
|
|
2018-02-06 18:11:25 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://raw.githubusercontent.com/gentoo/gentoo/9b971631588ff46e7c2d501bc35cd0d9ce2d98e2/app-text/diffpdf/files/diffpdf-2.1.3-qt5.patch";
|
2018-02-06 18:11:25 +00:00
|
|
|
sha256 = "0sax8gcqcmzf74hmdr3rarqs4nsxmml9qmh6pqyjmgl3lypxhafg";
|
|
|
|
})
|
|
|
|
./fix_path_poppler_qt5.patch
|
|
|
|
];
|
2015-07-07 22:32:54 +01:00
|
|
|
|
2018-02-06 18:11:25 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
2018-07-17 21:11:16 +01:00
|
|
|
buildInputs = [ qtbase poppler ];
|
2015-07-07 22:32:54 +01:00
|
|
|
|
2016-04-17 00:31:25 +01:00
|
|
|
preConfigure = ''
|
2018-07-17 21:11:16 +01:00
|
|
|
substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT5@@ ${poppler.dev}
|
2015-07-07 22:32:54 +01:00
|
|
|
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
|
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
install -dpm755 $out/share/doc/${pname}-${version} $out/share/licenses/${pname}-${version} $out/share/icons $out/share/pixmaps $out/share/applications
|
|
|
|
install -Dpm644 CHANGES README help.html $out/share/doc/${pname}-${version}/
|
|
|
|
install -Dpm644 gpl-2.0.txt $out/share/licenses/${pname}-${version}/
|
2015-07-15 09:13:58 +01:00
|
|
|
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 = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.qtrac.eu/diffpdfc.html";
|
2015-07-07 22:32:54 +01:00
|
|
|
description = "Tool for diffing pdf files visually or textually";
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ tstrobel ];
|
|
|
|
platforms = with lib.platforms; linux;
|
2015-07-07 22:32:54 +01:00
|
|
|
};
|
|
|
|
}
|