about summary refs log tree commit diff
path: root/pkgs/applications/graphics/inkscape/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/inkscape/default.nix')
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix28
1 files changed, 25 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index ca52a4f2766d..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";
 
@@ -18,7 +29,7 @@ stdenv.mkDerivation rec {
     patchShebangs share/extensions
   ''
   # Clang gets misdetected, so hardcode the right answer
-  + stdenv.lib.optionalString (stdenv.cc.cc.isClang or false) ''
+  + stdenv.lib.optionalString stdenv.cc.isClang ''
     substituteInPlace src/ui/tool/node.h \
       --replace "#if __cplusplus >= 201103L" "#if true"
   '';
@@ -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