2016-09-11 21:24:51 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, perl, perlXMLParser, libXft
|
|
|
|
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
|
2010-07-28 15:35:01 +00:00
|
|
|
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper, intltool
|
2016-10-18 16:26:54 +00:00
|
|
|
, gsl, python2, poppler, imagemagick, libwpg, librevenge
|
2016-08-24 13:14:11 +00:00
|
|
|
, libvisio, libcdr, libexif, unzip, automake114x, autoconf
|
2015-05-21 13:43:02 +00:00
|
|
|
, boxMakerPlugin ? false # boxmaker plugin
|
2015-02-22 07:14:53 +00:00
|
|
|
}:
|
2005-09-07 14:57:30 +00:00
|
|
|
|
2015-05-21 13:43:02 +00:00
|
|
|
let
|
2016-10-18 16:26:54 +00:00
|
|
|
python2Env = python2.withPackages(ps: with ps; [ numpy lxml ]);
|
2015-05-21 13:43:02 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2016-08-24 13:14:11 +00:00
|
|
|
stdcxx-patch = fetchpatch {
|
|
|
|
url = http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/diff/14542?context=3;
|
|
|
|
sha256 = "15h831lsh61ichgdygkdkbdm1dlb9mhprldq27hkx2472lcnyx6y";
|
|
|
|
};
|
|
|
|
|
2015-05-21 13:43:02 +00:00
|
|
|
in
|
|
|
|
|
2008-02-03 13:17:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-22 07:14:53 +00:00
|
|
|
name = "inkscape-0.91";
|
2005-09-07 14:57:30 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-22 07:14:53 +00:00
|
|
|
url = "https://inkscape.global.ssl.fastly.net/media/resources/file/"
|
|
|
|
+ "${name}.tar.bz2";
|
|
|
|
sha256 = "06ql3x732x2rlnanv0a8aharsnj91j5kplksg574090rks51z42d";
|
2005-09-07 14:57:30 +00:00
|
|
|
};
|
|
|
|
|
2016-04-03 08:31:52 +00:00
|
|
|
patches = [ ./deprecated-scopedptr.patch ];
|
|
|
|
|
2015-02-22 07:14:53 +00:00
|
|
|
postPatch = ''
|
2016-08-24 13:14:11 +00:00
|
|
|
patch -i ${stdcxx-patch} -p 0
|
2015-02-22 07:14:53 +00:00
|
|
|
patchShebangs share/extensions
|
2015-04-08 05:02:59 +00:00
|
|
|
''
|
|
|
|
# Clang gets misdetected, so hardcode the right answer
|
2015-05-11 21:37:53 +00:00
|
|
|
+ stdenv.lib.optionalString stdenv.cc.isClang ''
|
2015-04-08 05:02:59 +00:00
|
|
|
substituteInPlace src/ui/tool/node.h \
|
|
|
|
--replace "#if __cplusplus >= 201103L" "#if true"
|
2015-02-22 07:14:53 +00:00
|
|
|
'';
|
2014-07-18 09:54:10 +00:00
|
|
|
|
2016-09-25 20:31:25 +00:00
|
|
|
# Python is used at run-time to execute scripts, e.g., those from
|
|
|
|
# the "Effects" menu.
|
2016-10-18 16:26:54 +00:00
|
|
|
propagatedBuildInputs = [ python2Env ];
|
2008-02-22 16:24:58 +00:00
|
|
|
|
2005-09-07 14:57:30 +00:00
|
|
|
buildInputs = [
|
2016-09-11 21:24:51 +00:00
|
|
|
pkgconfig perl perlXMLParser libXft libpng zlib popt boehmgc
|
|
|
|
libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
|
2015-02-22 07:14:53 +00:00
|
|
|
makeWrapper intltool gsl poppler imagemagick libwpg librevenge
|
2016-08-24 13:14:11 +00:00
|
|
|
libvisio libcdr libexif automake114x autoconf
|
2015-05-21 13:43:02 +00:00
|
|
|
] ++ stdenv.lib.optional boxMakerPlugin unzip;
|
2008-01-31 10:41:45 +00:00
|
|
|
|
2014-07-18 09:54:10 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = true;
|
|
|
|
|
2008-02-22 16:24:58 +00:00
|
|
|
postInstall = ''
|
2015-05-21 13:43:02 +00:00
|
|
|
${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
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
2008-02-22 16:24:58 +00:00
|
|
|
# Make sure PyXML modules can be found at run-time.
|
2015-02-22 07:14:53 +00:00
|
|
|
rm "$out/share/icons/hicolor/icon-theme.cache"
|
2008-02-22 16:24:58 +00:00
|
|
|
'';
|
|
|
|
|
2014-07-18 09:54:10 +00:00
|
|
|
meta = with stdenv.lib; {
|
2008-02-22 16:24:58 +00:00
|
|
|
license = "GPL";
|
2008-01-31 10:41:45 +00:00
|
|
|
homepage = http://www.inkscape.org;
|
2014-07-18 09:54:10 +00:00
|
|
|
description = "Vector graphics editor";
|
|
|
|
platforms = platforms.all;
|
2009-03-03 13:27:40 +00:00
|
|
|
longDescription = ''
|
|
|
|
Inkscape is a feature-rich vector graphics editor that edits
|
|
|
|
files in the W3C SVG (Scalable Vector Graphics) file format.
|
2009-10-18 04:43:53 +00:00
|
|
|
|
2009-11-26 12:39:22 +00:00
|
|
|
If you want to import .eps files install ps2edit.
|
2009-03-03 13:27:40 +00:00
|
|
|
'';
|
2008-01-31 10:41:45 +00:00
|
|
|
};
|
2005-09-07 14:57:30 +00:00
|
|
|
}
|