2021-01-17 03:09:27 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkg-config, gnome-doc-utils, intltool, lib
|
2016-09-11 23:24:51 +02:00
|
|
|
, mono, gtk-sharp-2_0, gnome-sharp, hyena
|
2018-07-10 00:34:32 +02:00
|
|
|
, which, makeWrapper, glib, gnome2, poppler, wrapGAppsHook
|
2015-12-03 00:18:01 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-25 08:46:07 +02:00
|
|
|
pname = "pdfmod";
|
2015-12-03 00:18:01 +01:00
|
|
|
version = "0.9.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-15 06:42:41 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
|
2015-12-03 00:18:01 +01:00
|
|
|
sha256 = "eb7c987514a053106ddf03f26544766c751c801d87762909b36415d46bc425c9";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/City-busz/Arch-Linux-Repository"
|
|
|
|
+ "/master/gnome/pdfmod/pdfmod/pdfmod-mono-2.10.patch";
|
|
|
|
sha256 = "0fpz9ifr6476lqhd5rkb94dm68vlrwdq5w1aaxzgyjgdax9hxx81";
|
|
|
|
}) ];
|
|
|
|
|
2021-01-17 03:09:27 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2015-12-03 00:18:01 +01:00
|
|
|
buildInputs = [
|
2018-02-25 03:23:58 +01:00
|
|
|
gnome-doc-utils intltool mono gtk-sharp-2_0 gnome-sharp
|
2015-12-03 00:18:01 +01:00
|
|
|
hyena which makeWrapper wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace lib/poppler-sharp/poppler-sharp/poppler-sharp.dll.config \
|
|
|
|
--replace libpoppler-glib.so.4 libpoppler-glib.so
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
makeWrapper "${mono}/bin/mono" "$out/bin/pdfmod" \
|
|
|
|
--add-flags "$out/lib/pdfmod/PdfMod.exe" \
|
2016-09-11 23:24:51 +02:00
|
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
2015-12-03 00:18:01 +01:00
|
|
|
--prefix MONO_GAC_PREFIX : ${gnome-sharp} \
|
2018-07-10 00:34:32 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ glib gnome-sharp gnome2.GConf gtk-sharp-2_0 gtk-sharp-2_0.gtk poppler ]}
|
2015-12-03 00:18:01 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-05-04 15:59:55 +02:00
|
|
|
homepage = "https://wiki.gnome.org/Attic/PdfMod";
|
2015-12-03 00:18:01 +01:00
|
|
|
description = "A simple application for modifying PDF documents";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ obadz ];
|
2018-08-06 12:07:14 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2015-12-03 00:18:01 +01:00
|
|
|
};
|
|
|
|
}
|