From 29c676e73d1efa2f6bfcafecebc1931962d6103c Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 2 Dec 2015 23:18:01 +0000 Subject: [PATCH] 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. --- pkgs/applications/misc/pdfmod/default.nix | 53 ++++++++++++++++++++ pkgs/development/libraries/hyena/default.nix | 42 ++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 99 insertions(+) create mode 100644 pkgs/applications/misc/pdfmod/default.nix create mode 100644 pkgs/development/libraries/hyena/default.nix diff --git a/pkgs/applications/misc/pdfmod/default.nix b/pkgs/applications/misc/pdfmod/default.nix new file mode 100644 index 000000000000..f23238b2dc61 --- /dev/null +++ b/pkgs/applications/misc/pdfmod/default.nix @@ -0,0 +1,53 @@ +{ 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 ]; + }; +} diff --git a/pkgs/development/libraries/hyena/default.nix b/pkgs/development/libraries/hyena/default.nix new file mode 100644 index 000000000000..daa4f7fb9f21 --- /dev/null +++ b/pkgs/development/libraries/hyena/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, pkgconfig, mono, gtk-sharp, monoDLLFixer }: + +stdenv.mkDerivation rec { + name = "hyena-${version}"; + version = "0.5"; + + src = fetchurl { + url = "mirror://gnome/sources/hyena/${version}/hyena-${version}.tar.bz2" ; + sha256 = "eb7154a42b6529bb9746c39272719f3168d6363ed4bad305a916ed7d90bc8de9"; + }; + + buildInputs = [ + pkgconfig mono gtk-sharp + ]; + + postPatch = '' + patchShebangs build/dll-map-makefile-verifier + patchShebangs build/private-icon-theme-installer + find -name Makefile.in | xargs -n 1 -d '\n' sed -e 's/^dnl/#/' -i + ''; + + preConfigure = '' + substituteInPlace configure --replace gmcs mcs + ''; + + dontStrip = true; + + inherit monoDLLFixer; + + meta = with stdenv.lib; { + homepage = https://wiki.gnome.org/Hyena; + description = "A C# library which contains a hodge-podge of random stuff"; + longDescription = '' + Hyena is a C# library used to make awesome applications. It contains a lot of random things, + including useful data structures, a Sqlite-based db layer, cool widgets, a JSON library, + a smart job/task scheduler, a user-query/search parser, and much more. It's particularly + useful for Gtk# applications, though only the Hyena.Gui assembly requires Gtk#. + ''; + platforms = platforms.all; + maintainers = with maintainers; [ obadz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c961c51cfb32..8dfc2db0b3b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2681,6 +2681,8 @@ let pdfjam = callPackage ../tools/typesetting/pdfjam { }; + pdfmod = callPackage ../applications/misc/pdfmod { }; + jbig2enc = callPackage ../tools/graphics/jbig2enc { }; pdfread = callPackage ../tools/graphics/pdfread { @@ -6777,6 +6779,8 @@ let hydraAntLogger = callPackage ../development/libraries/java/hydra-ant-logger { }; + hyena = callPackage ../development/libraries/hyena { }; + icu = callPackage ../development/libraries/icu { }; id3lib = callPackage ../development/libraries/id3lib { };