3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/pdfmod/default.nix
obadz 29c676e73d pdfmod: init at 0.9.1 (close #11417)
vcunat did some cosmetic changes, such as joining lines
because we seem to rarely use one-identifier-per-line style,
or fixing hyena description to conform to our rules.
2015-12-21 15:19:36 +01:00

54 lines
1.8 KiB
Nix

{ stdenv, fetchurl, fetchpatch, pkgconfig, gnome_doc_utils, intltool
, mono, gtk-sharp, gnome-sharp, hyena
, which, makeWrapper, glib, gnome3, poppler, wrapGAppsHook
}:
stdenv.mkDerivation rec {
name = "pdfmod-${version}";
version = "0.9.1";
src = fetchurl {
url = "mirror://gnome/sources/pdfmod/0.9/pdfmod-${version}.tar.bz2";
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";
}) ];
buildInputs = [
pkgconfig gnome_doc_utils intltool mono gtk-sharp gnome-sharp
hyena which makeWrapper wrapGAppsHook
];
preConfigure = ''
substituteInPlace configure --replace gmcs mcs
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" \
--prefix MONO_GAC_PREFIX : ${gtk-sharp} \
--prefix MONO_GAC_PREFIX : ${gnome-sharp} \
--prefix LD_LIBRARY_PATH : ${glib}/lib \
--prefix LD_LIBRARY_PATH : ${gtk-sharp}/lib \
--prefix LD_LIBRARY_PATH : ${gnome-sharp}/lib \
--prefix LD_LIBRARY_PATH : ${gtk-sharp.gtk}/lib \
--prefix LD_LIBRARY_PATH : ${gnome3.gconf}/lib \
--prefix LD_LIBRARY_PATH : ${poppler}/lib
'';
dontStrip = true;
meta = with stdenv.lib; {
homepage = "https://wiki.gnome.org/Apps/PdfMod";
description = "A simple application for modifying PDF documents";
platforms = platforms.all;
maintainers = with maintainers; [ obadz ];
};
}