From 582ecf47711c60c28d554b42f60af2711578c76b Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Thu, 21 May 2015 15:43:02 +0200 Subject: [PATCH] inkscape with boxmaker plugin --- .../graphics/inkscape/default.nix | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 41531ed0de84..409fd0a767ce 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -2,9 +2,20 @@ , libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm , glibmm, libsigcxx, lcms, boost, gettext, makeWrapper, intltool , gsl, python, pyxml, lxml, poppler, imagemagick, libwpg, librevenge -, libvisio, libcdr, libexif +, libvisio, libcdr, libexif, unzip +, boxMakerPlugin ? false # boxmaker plugin }: +let + +boxmaker = fetchurl { + # http://www.inkscapeforum.com/viewtopic.php?f=11&t=10403 + url = "http://www.keppel.demon.co.uk/111000/files/BoxMaker0.91.zip"; + sha256 = "5c5697f43dc3a95468f61f479cb50b7e2b93379a1729abf19e4040ac9f43a1a8"; +}; + +in + stdenv.mkDerivation rec { name = "inkscape-0.91"; @@ -34,12 +45,23 @@ stdenv.mkDerivation rec { libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext makeWrapper intltool gsl poppler imagemagick libwpg librevenge libvisio libcdr libexif - ]; + ] ++ stdenv.lib.optional boxMakerPlugin unzip; enableParallelBuilding = true; doCheck = true; postInstall = '' + ${if boxMakerPlugin then " + mkdir -p $out/share/inkscape/extensions/ + # boxmaker packaged version 0.91 in a directory called 0.85 ?!?? + unzip ${boxmaker}; + cp boxmake-upd-0.85/* $out/share/inkscape/extensions/ + rm -Rf boxmake-upd-0.85 + " + else + "" + } + # Make sure PyXML modules can be found at run-time. for i in "$out/bin/"* do